/* ===== CSS Variables ===== */
:root {
  --primary: #0D2A5E;
  --secondary: #FDB813;
  --accent: #4DB1A1;
  --light-bg: #F9FAFB;
  --light-alt-bg: #F3F4F6;
  --dark-text: #1F2937;
  --body-text: #374151;
  --border-gray: #D1D5DB;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --white: #FFFFFF;
  --font-sans: 'Lato', sans-serif;
  --font-display: 'Montserrat', sans-serif;
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-sans);
  color: var(--body-text);
  background: var(--light-bg);
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--dark-text);
  line-height: 1.2;
}

a { color: var(--primary); text-decoration: none; }
a:hover { opacity: 0.9; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* ===== Layout ===== */
.container { max-width: 1280px; margin: 0 auto; padding: 0 1rem; }
.text-center { text-align: center; }
.section { padding: 4rem 0; }
.section-alt { background: var(--light-alt-bg); }

/* ===== Flex & Grid ===== */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-12 { gap: 3rem; }

.grid { display: grid; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: repeat(2, 1fr); }

/* ===== Typography ===== */
.font-display { font-family: var(--font-display); }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
.text-5xl { font-size: 3rem; }
.uppercase { text-transform: uppercase; }
.max-w-2xl { max-width: 42rem; margin-left: auto; margin-right: auto; }
.max-w-3xl { max-width: 48rem; margin-left: auto; margin-right: auto; }

/* ===== Colors ===== */
.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.text-accent { color: var(--accent); }
.text-body { color: var(--body-text); }
.text-white { color: var(--white); }
.text-gray-400 { color: var(--gray-400); }
.bg-primary { background-color: var(--primary); }
.bg-white { background-color: var(--white); }

/* ===== Icons (inline SVG) ===== */
.icon {
  width: 24px; height: 24px;
  stroke: currentColor; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
}
.icon-sm { width: 16px; height: 16px; }
.icon-md { width: 20px; height: 20px; }
.icon-lg { width: 40px; height: 40px; }
.icon-xl { width: 96px; height: 96px; }

/* ===== Buttons ===== */
.btn {
  display: inline-block; padding: 0.75rem 2rem;
  font-weight: 600; text-align: center; border-radius: 0.375rem;
  transition: transform 0.2s; cursor: pointer; border: none; font-size: 1rem;
  text-decoration: none;
}
.btn:hover { transform: scale(1.05); opacity: 1; }
.btn-primary { background: var(--primary); color: var(--white); }
.btn-secondary { background: var(--accent); color: var(--white); }
.btn-outline {
  background: transparent; border: 2px solid var(--primary);
  color: var(--primary);
}
.btn-outline:hover { background: var(--primary); color: var(--white); }
.btn-full { width: 100%; }

/* ===== Header / Nav ===== */
.header {
  background: rgba(249,250,251,0.9);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid rgba(209,213,219,0.6);
  transition: box-shadow 0.3s;
}
.header.scrolled { box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); }
.header .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; padding: 1rem; }
.header-logo img { height: 4rem; width: auto; }
.header-actions { display: flex; align-items: center; gap: 0.75rem; order: 3; }
.nav-menu { order: 2; }

/* Language selector */
.lang-btn {
  display: flex; align-items: center; gap: 0.5rem;
  background: rgba(243,244,246,0.5); border: none; border-radius: 0.375rem;
  padding: 0.5rem 0.75rem; font-size: 0.875rem; font-weight: 500;
  color: var(--body-text); cursor: pointer; transition: background 0.2s;
  font-family: var(--font-sans);
}
.lang-btn:hover { background: var(--gray-100); }
.lang-dropdown {
  position: absolute; right: 0; top: 100%; margin-top: 0.5rem;
  background: var(--white); border-radius: 0.375rem; border: 1px solid var(--gray-100);
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); z-index: 50;
  width: 8rem; padding: 0.5rem 0; display: none;
}
.lang-dropdown.open { display: block; }
.lang-dropdown button {
  display: block; width: 100%; text-align: left;
  padding: 0.5rem 1rem; font-size: 0.875rem; color: var(--body-text);
  background: none; border: none; cursor: pointer; font-family: var(--font-sans);
}
.lang-dropdown button:hover { background: var(--gray-100); color: var(--primary); }
.lang-wrapper { position: relative; }

/* Mobile menu button */
.menu-toggle {
  display: none; padding: 0.5rem; border-radius: 0.375rem;
  background: none; border: none; cursor: pointer; font-family: var(--font-sans);
  font-size: 0.875rem; color: var(--body-text);
}
.menu-toggle:hover { background: var(--gray-200); }

/* Nav links */
.nav-menu { display: flex; gap: 2rem; }
.nav-menu a {
  color: var(--body-text); font-weight: 500; padding: 0.5rem 0;
  transition: color 0.2s; text-decoration: none;
}
.nav-menu a:hover, .nav-menu a.active { color: var(--primary); opacity: 1; }

/* ===== Page Header ===== */
.page-header {
  background: var(--light-alt-bg); padding: 4rem 1rem; text-align: center;
}
.page-header h1 { font-size: 2.25rem; font-weight: 700; color: var(--primary); }
.page-header p { margin-top: 1rem; font-size: 1.125rem; color: var(--body-text); max-width: 42rem; margin-left: auto; margin-right: auto; }

/* ===== Hero Section ===== */
.hero {
  background: var(--light-alt-bg); padding: 2.5rem 1rem 5rem;
  text-align: center;
}
.hero h1 { font-size: 3rem; font-weight: 700; color: var(--primary); margin-bottom: 1rem; }
.hero .subtitle { font-size: 1.25rem; font-weight: 600; color: var(--secondary); max-width: 48rem; margin: 0 auto 0.5rem; }
.hero .location {
  font-size: 1.125rem; font-weight: 700; color: var(--primary);
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  margin-bottom: 1rem; text-decoration: none;
}
.hero .location:hover { text-decoration: underline; opacity: 1; }
.hero .description { font-size: 1.125rem; color: var(--body-text); max-width: 48rem; margin: 0 auto 2rem; }
.hero .btn-group { display: flex; justify-content: center; gap: 1rem; }

/* ===== Feature Cards ===== */
.feature-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.feature-box {
  background: var(--white); padding: 1.5rem; border-radius: 0.5rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05); text-align: center;
}
.feature-box .icon-wrapper {
  width: 3rem; height: 3rem; margin: 0 auto 1rem;
  background: rgba(77,177,161,0.2); color: var(--accent);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.feature-box h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.feature-box p { color: var(--body-text); }

/* ===== Erasmus Section ===== */
.erasmus-grid { display: grid; grid-template-columns: 1fr; gap: 3rem; align-items: center; }
.erasmus-tag { font-weight: 700; color: var(--accent); text-transform: uppercase; font-size: 0.875rem; }
.erasmus-grid h2 { font-size: 1.875rem; font-weight: 700; margin: 0.5rem 0 1rem; }
.erasmus-grid p { color: var(--body-text); margin-bottom: 1.5rem; }
.erasmus-grid img { border-radius: 0.5rem; }

/* ===== Info Card (About page) ===== */
.info-card {
  background: var(--white); padding: 2rem; border-radius: 0.5rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05); border: 1px solid var(--gray-200);
}
.info-card h3 { font-size: 1.5rem; font-weight: 600; color: var(--primary); margin-bottom: 1rem; }
.info-card p { color: var(--body-text); margin-bottom: 1rem; }
.check-list { display: flex; flex-direction: column; gap: 0.75rem; }
.check-item { display: flex; align-items: flex-start; gap: 0.75rem; }
.check-item svg { color: var(--accent); margin-top: 0.25rem; }

/* ===== Trainer Card ===== */
.trainer-card {
  background: var(--white); padding: 2rem; border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
  display: grid; grid-template-columns: 1fr; gap: 2rem; align-items: center;
}
.trainer-avatar {
  width: 12rem; height: 12rem; border-radius: 50%;
  background: var(--light-alt-bg); display: flex;
  align-items: center; justify-content: center; margin: 0 auto;
  color: var(--gray-400);
}
.trainer-card h3 { font-size: 1.5rem; font-weight: 600; color: var(--primary); margin-bottom: 1rem; }
.trainer-card p { color: var(--body-text); margin-bottom: 1.5rem; }
.expertise-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.expertise-item {
  display: flex; align-items: center; gap: 0.5rem;
  background: var(--gray-100); padding: 0.75rem; border-radius: 0.375rem; font-size: 0.875rem;
}
.expertise-item svg { color: var(--accent); }

/* ===== Course Card ===== */
.course-card {
  background: var(--white); padding: 2rem; border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); border: 1px solid var(--gray-200);
}
.course-card h3 { font-size: 1.5rem; font-weight: 700; color: var(--primary); margin-bottom: 1rem; }
.course-details { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; margin-bottom: 2rem; }
.course-detail-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; }
.course-detail-item svg { color: var(--accent); }

.outcomes-box {
  background: var(--light-alt-bg); padding: 1.5rem; border-radius: 0.375rem; margin-bottom: 2rem;
}
.outcomes-box h4 { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; margin-bottom: 0.75rem; }
.outcomes-list { list-style: disc; list-style-position: inside; display: flex; flex-direction: column; gap: 0.5rem; color: var(--body-text); }

.program-section { border-top: 1px solid var(--gray-200); padding-top: 2rem; margin-top: 2rem; }
.program-section h4 { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; color: var(--primary); margin-bottom: 1.5rem; }
.program-days { display: flex; flex-direction: column; gap: 1rem; }
.program-day { padding: 1rem; border: 1px solid var(--gray-200); border-radius: 0.375rem; }
.program-day h5 { font-weight: 700; font-size: 1.125rem; color: var(--secondary); }
.program-day p { color: var(--body-text); }

.financial-box {
  background: rgba(13,42,94,0.05); padding: 1.5rem; border-radius: 0.375rem;
  margin-top: 2rem; color: var(--primary);
}
.financial-box h4 { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; margin-bottom: 0.5rem; }
.financial-box p { color: var(--body-text); margin-top: 0.5rem; }

/* ===== Date Cards ===== */
.date-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.date-card {
  background: var(--white); padding: 1.5rem; border-radius: 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); text-align: center;
}
.date-card svg { margin: 0 auto 0.75rem; color: var(--secondary); }
.date-card h4 { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; }
.date-card p { color: var(--body-text); }
.date-badge {
  display: inline-block; background: rgba(253,184,19,0.2); color: var(--secondary);
  font-size: 0.75rem; font-weight: 700; padding: 0.25rem 0.75rem;
  border-radius: 9999px; margin-top: 0.75rem;
}

.custom-box {
  background: var(--white); padding: 1.5rem; border-radius: 0.5rem;
  border: 1px solid var(--gray-200); text-align: center; margin-top: 3rem;
}
.custom-box a { font-weight: 600; color: var(--primary); }
.custom-box a:hover { text-decoration: underline; }

/* ===== Format Cards ===== */
.format-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.format-card {
  background: var(--white); padding: 2rem; border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); border: 1px solid var(--gray-200);
}
.format-card svg { color: var(--accent); margin-bottom: 1rem; }
.format-card h3 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; margin-bottom: 0.75rem; }
.format-card p { color: var(--body-text); }

/* ===== Contact Cards ===== */
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 3rem; }
.contact-info { display: flex; flex-direction: column; gap: 2rem; }
.contact-card {
  background: var(--white); padding: 2rem; border-radius: 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); border: 1px solid var(--gray-200);
}
.contact-card svg { color: var(--accent); margin-bottom: 1rem; }
.contact-card h3 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; margin-bottom: 0.5rem; }
.contact-card p { color: var(--body-text); margin-bottom: 1rem; }
.contact-card a { font-weight: 600; color: var(--primary); }
.contact-card a:hover { text-decoration: underline; }

/* ===== Form ===== */
.form-card {
  background: var(--white); padding: 2rem; border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); border: 1px solid var(--gray-200);
}
.form-card h3 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; margin-bottom: 1.5rem; }
.form-group { margin-bottom: 1.5rem; }
.form-group label {
  display: block; margin-bottom: 0.5rem; font-size: 0.875rem;
  font-weight: 500; color: var(--dark-text);
}
.form-group input,
.form-group textarea {
  width: 100%; padding: 0.625rem; font-size: 0.875rem;
  background: var(--gray-50); border: 1px solid var(--border-gray);
  border-radius: 0.5rem; color: var(--dark-text); font-family: var(--font-sans);
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13,42,94,0.15);
}
.form-submit {
  width: 100%; padding: 0.75rem; font-size: 1rem; font-weight: 600;
  color: var(--white); background: var(--primary); border: none;
  border-radius: 0.375rem; cursor: pointer; font-family: var(--font-sans);
}
.form-submit:hover { background: rgba(13,42,94,0.9); }

/* ===== Footer ===== */
.footer { background: var(--primary); color: var(--white); }
.footer .container { padding: 2rem 1rem 1rem; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.footer-brand p { font-size: 0.875rem; color: var(--gray-300); margin-top: 1rem; }
.footer-brand img { height: 3rem; width: auto; }
.footer-columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.footer-col h2 { font-size: 0.875rem; font-weight: 600; text-transform: uppercase; margin-bottom: 1rem; color: var(--white); }
.footer-col ul { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-col a { color: rgba(255,255,255,0.9); font-weight: 300; transition: color 0.2s; }
.footer-col a:hover { color: var(--accent); text-decoration: underline; opacity: 1; }
.footer-col li { color: rgba(255,255,255,0.9); font-weight: 300; }
.footer hr { border: none; border-top: 1px solid rgba(255,255,255,0.2); margin: 1.5rem 0; }
.footer-bottom { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.footer-bottom span { font-size: 0.875rem; color: var(--gray-400); }
.footer-bottom a { color: inherit; }
.footer-bottom a:hover { text-decoration: underline; opacity: 1; }
.footer-credit { text-align: center; margin-top: 1rem; font-size: 0.875rem; color: var(--gray-400); }
.footer-credit a { color: #60a5fa; }
.footer-credit a:hover { text-decoration: underline; opacity: 1; }

/* ===== Reveal Animations ===== */
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity 520ms cubic-bezier(0.2,0.7,0.2,1),
              transform 520ms cubic-bezier(0.2,0.7,0.2,1);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.visible { opacity: 1; transform: none; transition: none; }
}

/* ===== Responsive ===== */
@media (min-width: 640px) {
  .date-grid { grid-template-columns: repeat(2, 1fr); }
  .expertise-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
  .hero h1 { font-size: 4.5rem; }
  .hero .subtitle { font-size: 1.5rem; }
  .hero .location { font-size: 1.25rem; }
  .hero .description { font-size: 1.25rem; }
  .hero { padding: 4rem 1rem 8rem; }
  .section { padding: 6rem 0; }
  .page-header h1 { font-size: 3rem; }
  .header-logo img { height: 5rem; }

  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
  .erasmus-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .format-grid { grid-template-columns: repeat(2, 1fr); }
  .trainer-card { grid-template-columns: 1fr 2fr; }
  .footer-grid { grid-template-columns: 1fr 2fr; }
  .footer-bottom { flex-direction: row; justify-content: space-between; }
  .course-card h3 { font-size: 1.875rem; }
  .erasmus-grid h2 { font-size: 2.25rem; }

  .menu-toggle { display: none; }
  .nav-menu { display: flex !important; }
}

@media (max-width: 767px) {
  .menu-toggle { display: block; }
  .nav-menu {
    display: none; width: 100%; order: 10;
    flex-direction: column; gap: 0;
    margin-top: 1rem; padding: 1rem;
    background: var(--gray-50); border: 1px solid var(--gray-100); border-radius: 0.5rem;
  }
  .nav-menu.open { display: flex; }
  .nav-menu a { padding: 0.5rem 0.75rem; border-radius: 0.25rem; }
  .nav-menu a:hover { background: var(--gray-100); }
  .hero .btn-group { flex-direction: column; align-items: center; }
  .hero .btn-group .btn { width: 100%; max-width: 20rem; }
  .footer-columns { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .header-logo img { height: 6rem; }
  .date-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-brand img { height: 5rem; }
}
