/* ===== AML Terminale - Global Styles ===== */

/* --- CSS Variables --- */
:root {
  --blue-primary: #152D5B;
  --blue-dark: #0B1A38;
  --blue-light: #1E3F7A;
  --gold: #D4A843;
  --gold-light: #E8C76A;
  --gold-dark: #B8912E;
  --white: #FFFFFF;
  --off-white: #F7F8FA;
  --gray-light: #E8EBF0;
  --gray: #8C94A3;
  --gray-dark: #4A5568;
  --black: #1A1A2E;
  --shadow-sm: 0 2px 8px rgba(27, 58, 107, 0.08);
  --shadow-md: 0 4px 20px rgba(27, 58, 107, 0.12);
  --shadow-lg: 0 8px 40px rgba(27, 58, 107, 0.16);
  --shadow-gold: 0 4px 20px rgba(212, 168, 67, 0.25);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--black);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

img {
  max-width: 100%;
  display: block;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: 'Sora', 'Inter', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
h4 { font-size: 1.1rem; }

p {
  color: var(--gray-dark);
  line-height: 1.7;
}

/* --- Layout --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 80px 0;
}

/* --- Navigation --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: var(--transition);
  padding: 12px 0;
}

.navbar.scrolled {
  border-bottom: 1px solid var(--gray-light);
  box-shadow: var(--shadow-sm);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--blue-primary);
}

.nav-brand img {
  height: 42px;
  width: auto;
}

.nav-brand span {
  font-size: 0.75rem;
  color: var(--gray);
  font-weight: 400;
  display: block;
  line-height: 1.2;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 4px;
  align-items: center;
}

.nav-links a {
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--gray-dark);
  position: relative;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--blue-primary);
  background: rgba(27, 58, 107, 0.06);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 16px;
  right: 16px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
}

/* Mobile menu */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--blue-primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* --- Hero --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue-primary) 50%, var(--blue-light) 100%);
  padding-top: 80px;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 800px;
  height: 800px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 168, 67, 0.15) 0%, transparent 70%);
  animation: float 8s ease-in-out infinite;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(42, 82, 152, 0.3) 0%, transparent 70%);
  animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-30px) rotate(3deg); }
}

.hero-content {
  position: relative;
  z-index: 2;
  color: var(--white);
  max-width: 700px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(212, 168, 67, 0.2);
  border: 1px solid rgba(212, 168, 67, 0.3);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  color: var(--gold-light);
  margin-bottom: 24px;
  backdrop-filter: blur(10px);
}

.hero h1 {
  margin-bottom: 20px;
  font-weight: 800;
}

.hero h1 .highlight {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.15rem;
  margin-bottom: 36px;
  max-width: 560px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--gold);
  color: var(--blue-dark);
}

.btn-primary:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--blue-primary);
  border: 2px solid var(--blue-primary);
}

.btn-outline:hover {
  background: var(--blue-primary);
  color: var(--white);
  transform: translateY(-2px);
}

/* --- Section Headers --- */
.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-tag {
  display: inline-block;
  color: var(--gold-dark);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.section-header h2 {
  color: var(--blue-primary);
  margin-bottom: 16px;
}

.section-header p {
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.05rem;
}

/* --- Cards Grid --- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 32px;
  border: 1px solid var(--gray-light);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue-primary), var(--gold));
  transform: scaleX(0);
  transform-origin: left;
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

.card:hover::before {
  transform: scaleX(1);
}

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
  background: linear-gradient(135deg, rgba(27, 58, 107, 0.08), rgba(212, 168, 67, 0.08));
}

.card h3 {
  color: var(--blue-primary);
  margin-bottom: 10px;
}

.card p {
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--gold-dark);
  font-weight: 600;
  font-size: 0.9rem;
}

.card-link:hover {
  gap: 10px;
  color: var(--blue-primary);
}

/* --- Feature Section (alternating) --- */
.feature-section {
  padding: 60px 0;
}

.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  margin-bottom: 80px;
}

.feature-row:nth-child(even) .feature-visual {
  order: -1;
}

.feature-visual {
  background: linear-gradient(135deg, var(--off-white), var(--gray-light));
  border-radius: var(--radius-lg);
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  font-size: 4rem;
}

.feature-text h3 {
  color: var(--blue-primary);
  margin-bottom: 16px;
  font-size: 1.6rem;
}

.feature-text p {
  margin-bottom: 24px;
}

/* --- Accordion / Toggle --- */
.accordion {
  max-width: 800px;
  margin: 0 auto;
}

.accordion-item {
  border: 1px solid var(--gray-light);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
  transition: var(--transition);
}

.accordion-item:hover {
  border-color: var(--blue-primary);
}

.accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  cursor: pointer;
  background: var(--white);
  font-weight: 600;
  color: var(--blue-primary);
  transition: var(--transition);
  border: none;
  width: 100%;
  text-align: left;
  font-size: 1rem;
  font-family: inherit;
}

.accordion-header:hover {
  background: var(--off-white);
}

.accordion-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  color: var(--gold);
  font-size: 1.2rem;
  flex-shrink: 0;
}

.accordion-item.active .accordion-icon {
  transform: rotate(45deg);
}

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-item.active .accordion-body {
  max-height: 2000px;
}

.accordion-content {
  padding: 0 24px 20px;
  color: var(--gray-dark);
  line-height: 1.8;
}

.accordion-content ul {
  list-style: none;
  padding: 0;
}

.accordion-content li {
  padding: 8px 0;
  padding-left: 20px;
  position: relative;
}

.accordion-content li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 16px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

.accordion-content ol {
  padding-left: 20px;
}

.accordion-content ol li {
  padding-left: 8px;
}

.accordion-content ol li::before {
  display: none;
}

/* --- Stats bar --- */
.stats-bar {
  background: var(--off-white);
  padding: 40px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
}

.stat-item h3 {
  font-size: 2.5rem;
  color: var(--blue-primary);
  margin-bottom: 4px;
}

.stat-item span {
  font-size: 2.5rem;
  color: var(--gold);
}

.stat-item p {
  font-size: 0.9rem;
  color: var(--gray);
}

/* --- Table styles --- */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--gray-light);
  margin: 24px 0;
}

.data-table thead {
  background: var(--blue-primary);
  color: var(--white);
}

.data-table th {
  padding: 14px 20px;
  text-align: left;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.data-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--gray-light);
  font-size: 0.9rem;
}

.data-table tbody tr {
  transition: var(--transition);
}

.data-table tbody tr:hover {
  background: var(--off-white);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* --- Promotion cards --- */
.promo-section {
  margin-bottom: 48px;
}

.promo-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  cursor: pointer;
  padding: 16px 24px;
  background: linear-gradient(135deg, var(--blue-primary), var(--blue-light));
  color: var(--white);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.promo-header:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

.promo-header h3 {
  color: var(--white);
  font-size: 1.2rem;
}

.promo-header .badge {
  background: var(--gold);
  color: var(--blue-dark);
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
}

.student-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.student-card {
  padding: 16px 20px;
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius-sm);
  font-weight: 500;
  color: var(--blue-primary);
  transition: var(--transition);
  cursor: default;
}

.student-card:hover {
  border-color: var(--gold);
  background: rgba(212, 168, 67, 0.05);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* --- Content page layout --- */
.page-hero {
  background: linear-gradient(135deg, var(--blue-dark), var(--blue-primary));
  color: var(--white);
  padding: 140px 0 60px;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(212, 168, 67, 0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.page-hero h1 {
  position: relative;
  z-index: 2;
}

.page-hero p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.1rem;
  margin-top: 12px;
  position: relative;
  z-index: 2;
}

.page-hero .breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 16px;
  position: relative;
  z-index: 2;
}

.page-hero .breadcrumb a {
  color: var(--gold-light);
}

.page-hero .breadcrumb a:hover {
  text-decoration: underline;
}

.page-content {
  padding: 60px 0;
}

.content-wrapper {
  max-width: 800px;
  margin: 0 auto;
}

.content-wrapper h2 {
  color: var(--blue-primary);
  margin-top: 48px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--gray-light);
}

.content-wrapper h3 {
  color: var(--blue-dark);
  margin-top: 32px;
  margin-bottom: 12px;
}

.content-wrapper p {
  margin-bottom: 16px;
}

.content-wrapper ul, .content-wrapper ol {
  margin-bottom: 16px;
  padding-left: 24px;
}

.content-wrapper li {
  margin-bottom: 8px;
  color: var(--gray-dark);
}

.callout {
  background: linear-gradient(135deg, rgba(27, 58, 107, 0.04), rgba(212, 168, 67, 0.06));
  border-left: 4px solid var(--gold);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 20px 24px;
  margin: 24px 0;
}

.callout p {
  color: var(--blue-dark);
  font-weight: 500;
}

.callout-info {
  border-left-color: var(--blue-primary);
  background: linear-gradient(135deg, rgba(27, 58, 107, 0.06), rgba(27, 58, 107, 0.02));
}

.callout-tip {
  border-left-color: #22C55E;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.06), rgba(34, 197, 94, 0.02));
}

/* --- Footer --- */
.footer {
  background: var(--blue-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 60px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand img {
  height: 48px;
  margin-bottom: 16px;
  background: white;
  border-radius: 8px;
  padding: 4px;
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
}

.footer h4 {
  color: var(--white);
  margin-bottom: 16px;
  font-size: 0.95rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--gold-light);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.3);
}

/* --- Scroll Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* stagger children */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0.05s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.1s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.15s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.2s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.25s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.3s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(n+7) { transition-delay: 0.35s; opacity: 1; transform: translateY(0); }

/* --- Responsive --- */
@media (max-width: 1024px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid var(--gray-light);
    box-shadow: var(--shadow-md);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

  .hero-content {
    text-align: center;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero p {
    margin-left: auto;
    margin-right: auto;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .feature-row {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .feature-row:nth-child(even) .feature-visual {
    order: 0;
  }

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

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

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

  section {
    padding: 60px 0;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .student-grid {
    grid-template-columns: 1fr;
  }
}
