/*
 * ============================================================
 *  Apolo Landing Page — Design System
 *  Based on apolo-web (Bootstrap 5.3 + Keen Themes palette)
 *  info.apolo.education
 * ============================================================
 */

/* ============================================================
   1. DESIGN TOKENS
   ============================================================ */
:root {
  /* ---- Brand Colors ---- */
  --apolo-blue: #0C4CA8;
  --apolo-blue-light: #037CFF;
  --apolo-purple: #0A2E4A;
  --apolo-purple-dark: #0A2E4A;
  --apolo-purple-light: #45BEFF;
  --apolo-cyan: #81D7FF;
  --apolo-cyan-dark: #037CFF;
  --apolo-orange: #FFB900;
  --apolo-orange-dark: #FFA500;
  --apolo-green: #14813B;
  --apolo-green-light: #49DF7D;
  --apolo-red: #E74C3C;

  /* ---- Backgrounds (Light — default) ---- */
  --bg-deep: #E7F2F7;
  --bg-surface: #ffffff;
  --bg-card: rgba(10, 46, 74, 0.04);
  --bg-card-hover: rgba(10, 46, 74, 0.08);

  /* ---- Text ---- */
  --text-primary: #0A2E4A;
  --text-secondary: #666666;
  --text-muted: #868686;

  /* ---- Solid Colors (previously gradients) ---- */
  --gradient-brand: #0A2E4A;
  --gradient-btn: #0A2E4A;
  --gradient-orange: #FFB900;

  /* ---- Layout ---- */
  --container-max: 1200px;
  --header-h: 72px;

  /* ---- Glass / Effects ---- */
  --glass-bg: rgba(247, 249, 252, 0.9);
  --glass-border: 1px solid rgba(10, 46, 74, 0.1);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 40px -10px rgba(0, 0, 0, 0.5);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 50px;

  /* ---- Typography ---- */
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --leading-tight: 1.15;
  --leading-normal: 1.6;

  /* ---- Motion ---- */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 200ms;
  --dur-base: 300ms;
  --dur-slow: 500ms;

  /* ---- Semantic ---- */
  --bg-body: var(--bg-deep);
}

/* ============================================================
   2. LIGHT THEME
   ============================================================ */
body.light-mode {
  --bg-body: #ECF9FF;
  --bg-surface: #ffffff;
  --bg-card: rgba(236, 249, 255, 0.8);
  --bg-card-hover: rgba(236, 249, 255, 1);
  --text-primary: #0A2E4A;
  --text-secondary: #666666;
  --text-muted: #868686;
  --glass-bg: rgba(255, 255, 255, 0.95);
  --glass-border: 1px solid rgba(10, 46, 74, 0.15);
  --shadow-lg: 0 10px 30px -10px rgba(0, 0, 0, 0.15);
}

body.light-mode {
  background-image: none;
}

/* ============================================================
   3. RESET & BASE
   ============================================================ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-body);
  color: var(--text-primary);
  line-height: var(--leading-normal);
  overflow-x: hidden;
  background-image: none;
  background-attachment: fixed;
  transition: background-color var(--dur-base) var(--ease),
              color var(--dur-base) var(--ease);
}

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

ul, ol { list-style: none; }

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

/* ============================================================
   4. LAYOUT UTILITIES
   ============================================================ */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.home-flow {
  position: relative;
}

.screen-section {
  position: relative;
  display: flex;
  align-items: center;
  min-block-size: 100svh;
}

@supports (min-height: 100dvh) {
  .screen-section {
    min-block-size: 100dvh;
  }
}

.screen-section > .container {
  width: 100%;
}

.section-padding {
  padding-block: clamp(3rem, 5vw, 5rem);
}

.section-kicker {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: rgba(12, 76, 168, 0.08);
  color: var(--apolo-blue);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.text-gradient {
  color: #0C4CA8;
  font-weight: 600;
}

.text-orange  { color: var(--apolo-orange); }
.text-cyan    { color: var(--apolo-cyan); }
.text-purple  { color: var(--apolo-purple-light); }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ============================================================
   5. BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 2rem;
  border: none;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: transform var(--dur-base) var(--ease),
              box-shadow var(--dur-base) var(--ease);
}

.btn-primary {
  background: #0A2E4A;
  color: #fff;
  box-shadow: 0 4px 15px rgba(10, 46, 74, 0.2);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(10, 46, 74, 0.3);
  background: #0C4CA8;
}

.btn-outline {
  background: transparent;
  border: 1px solid rgba(10, 46, 74, 0.3);
  color: #0A2E4A;
}
.btn-outline:hover {
  border-color: var(--apolo-cyan);
  background: rgba(129, 215, 255, 0.1);
}

.btn-whatsapp {
  background: #25D366;
  color: #fff;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}
.btn-whatsapp:hover {
  background: #20bd5a;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.5);
}

body.light-mode .btn-outline {
  border-color: var(--apolo-purple);
  color: var(--apolo-purple);
}
body.light-mode .btn-outline:hover {
  background: rgba(123, 44, 191, 0.08);
}

/* ============================================================
   6. THEME TOGGLE
   ============================================================ */
.theme-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  cursor: pointer;
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--dur-base) var(--ease);
}
.theme-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
  transform: rotate(15deg);
}

/* ============================================================
   7. HEADER / NAVIGATION
   ============================================================ */
.navbar {
  position: fixed;
  inset-inline: 0; top: 0;
  height: var(--header-h);
  background: #141414;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: background var(--dur-base) var(--ease),
              box-shadow var(--dur-base) var(--ease);
}

.navbar.scrolled {
  background: #0A0A0A;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

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

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.4rem;
  color: #ffffff;
}
.logo img {
  height: 36px;
  width: auto;
}

.logo-wordmark {
  height: 34px;
  width: auto;
  object-fit: contain;
}

/* Nav links */
.nav-menu {
  display: flex;
  gap: 2rem;
  align-items: center;
}
.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  position: relative;
  padding: 0.5rem 0;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: #0C4CA8;
  transition: width var(--dur-base) var(--ease);
}
.nav-link:hover,
.nav-link.active { color: #ffffff; }
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }

/* Mobile toggle */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #ffffff;
  cursor: pointer;
}

/* Light-mode navbar override — keep dark */
body.light-mode .navbar {
  background: #141414;
  border-bottom-color: rgba(255, 255, 255, 0.1);
}
body.light-mode .navbar .logo,
body.light-mode .navbar .nav-link,
body.light-mode .navbar .theme-btn,
body.light-mode .navbar .mobile-toggle { color: #ffffff; }
body.light-mode .navbar .nav-link { color: rgba(255, 255, 255, 0.7); }

/* ============================================================
   8. HERO
   ============================================================ */
.hero {
  padding-top: calc(var(--header-h) + 2rem);
  padding-bottom: 4rem;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: var(--bg-deep);
}

body.light-mode .hero {
  background: var(--bg-body);
}

.hero::before {
  content: '';
  position: absolute;
  top: -20%; right: -10%;
  width: 800px; height: 800px;
  background: transparent;
  z-index: -1;
  filter: blur(80px);
  pointer-events: none;
}

.hero .container {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 4rem;
  align-items: center;
  max-width: var(--container-max);
}

.hero-content {
  max-width: 100%;
  flex-shrink: 0;
  z-index: 1;
}

.hero-badge {
  display: inline-block;
  padding: 0.45rem 1rem;
  background: rgba(129, 215, 255, 0.15);
  border: 1px solid rgba(129, 215, 255, 0.4);
  border-radius: var(--radius-pill);
  color: #037CFF;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: var(--leading-tight);
  font-weight: 800;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: var(--leading-normal);
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Hero visual / floating card */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
}

.hero-device-visual {
  width: 100%;
  max-width: 112%;
  height: auto;
  object-fit: contain;
  transform: none;
  filter: drop-shadow(0 18px 38px rgba(10, 46, 74, 0.18));
  animation: hero-float 6s ease-in-out infinite;
  background: transparent;
  border: 0;
  box-shadow: none;
}

@keyframes hero-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-18px); }
}

/* ============================================================
   9. SECTION TITLES
   ============================================================ */
.section-title {
  text-align: center;
  margin-bottom: 1.5rem;
}

.section-title-left {
  text-align: left;
}

.section-title-left p {
  margin-inline: 0;
  max-width: none;
}

.section-title h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.section-title p {
  color: var(--text-secondary);
  max-width: var(--container-max);
  margin-inline: auto;
  font-size: 1.1rem;
}

.tabs-container .section-title {
  text-align: left;
}
.tabs-container .section-title p {
  margin-inline: 0;
}

/* ============================================================
   10. FEATURE TABS (Roles)
   ============================================================ */
#roles {
  background: var(--bg-deep);
}
body.light-mode #roles {
  background: var(--bg-body);
}

.features-showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.tabs-container {
  min-width: 0;
  padding: 0.75rem 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.feature-text {
  max-width: 100%;
}

.nav-tabs {
  display: flex;
  justify-content: flex-start;
  gap: 1rem;
  border-bottom: var(--glass-border);
  padding-bottom: 1rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--dur-base) var(--ease);
}
.tab-btn:hover {
  color: var(--text-primary);
  background: var(--bg-card-hover);
}
.tab-btn.active {
  color: #fff;
  background: #0A2E4A;
}

.tab-content {
  display: none;
  animation: fadeUp var(--dur-slow) var(--ease);
}
.tab-content.active {
  display: block;
}

.feature-text {
  max-width: 100%;
}

.tabs-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: min(60vh, 680px);
}

.roles-floating-img {
  display: block;
  width: 100%;
  max-width: 560px;
  height: auto;
  object-fit: contain;
  border: none;
  border-radius: 0;
  box-shadow: none;
  animation: float-img 6s ease-in-out infinite;
  transition: opacity var(--dur-base) var(--ease),
              transform var(--dur-base) var(--ease);
}

/* ============================================================
   11. MODULE / FEATURE CARDS
   ============================================================ */
#modulos {
  position: relative;
  background-image: linear-gradient(rgba(231, 242, 247, 0.9), rgba(231, 242, 247, 0.94)),
                    url('../img/FondoWebApolo1.webp');
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.module-card {
  background: var(--bg-card);
  border: var(--glass-border);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  transition: all var(--dur-base) var(--ease);
}
.module-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-5px);
  border-color: var(--apolo-cyan);
}

.module-icon {
  width: 56px; height: 56px;
  background: rgba(129, 215, 255, 0.2);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: #0A2E4A;
}
body.light-mode .module-icon {
  background: rgba(129, 215, 255, 0.2);
  color: #0A2E4A;
}

.module-card h3 {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}
.module-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ============================================================
   12. TECH / SECURITY GRID
   ============================================================ */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  text-align: center;
}

.tech-item {
  background: var(--bg-card);
  padding: 1.5rem 1rem;
  border-radius: var(--radius-md);
  border: var(--glass-border);
  transition: transform var(--dur-base) var(--ease);
}
.tech-item svg {
  display: block;
  margin: 0 auto;
}
.tech-item:hover {
  transform: translateY(-5px);
  border-color: var(--apolo-cyan);
}
.tech-item h4 {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}
.tech-item p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ============================================================
   13. PRICING
   ============================================================ */
.pricing-list {
  max-width: var(--container-max);
  margin: 3rem auto 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.pricing-item {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  align-items: center;
  background: var(--bg-card);
  border: var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  gap: 2rem;
  transition: all var(--dur-base) var(--ease);
  position: relative;
  overflow: hidden;
}
.pricing-item:hover {
  background: var(--bg-card-hover);
  transform: translateX(10px);
  border-color: rgba(255, 255, 255, 0.2);
}
.pricing-item.featured {
  background: rgba(236, 249, 255, 0.8);
  border-color: #45BEFF;
  box-shadow: 0 6px 20px rgba(10, 46, 74, 0.15);
}
.pricing-item.featured::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 5px;
  background: #FFB900;
}

body.light-mode .pricing-item.featured {
  background: rgba(236, 249, 255, 0.8);
  border-color: #45BEFF;
}

.pricing-icon {
  width: 80px; height: 80px;
  background: rgba(129, 215, 255, 0.1);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #037CFF;
}
body.light-mode .pricing-icon { background: rgba(129, 215, 255, 0.12); }

.pricing-content h3 {
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.pricing-content p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
}

.pricing-tag {
  font-size: 0.7rem;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  letter-spacing: 1px;
  font-weight: 700;
}
.tag-orange { background: rgba(255, 185, 0, 0.15); color: #FFB900; }
.tag-blue   { background: rgba(129, 215, 255, 0.2); color: #037CFF; }
.tag-purple { background: rgba(69, 190, 255, 0.15); color: #0C4CA8; }

.pricing-value {
  text-align: right;
  min-width: 180px;
  padding-left: 2rem;
  border-left: 1px solid rgba(10, 46, 74, 0.1);
}
body.light-mode .pricing-value { border-left-color: rgba(10, 46, 74, 0.1); }

.price-number {
  display: block;
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
}
.price-period {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 5px;
}

/* ============================================================
   14. EFIAP SECTION
   ============================================================ */
.efiap-section {
  background: #E7F2F7;
  border-top: 1px solid rgba(10, 46, 74, 0.1);
  border-bottom: 1px solid rgba(10, 46, 74, 0.1);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.efiap-section h2,
.efiap-section p {
  color: #0A2E4A;
  position: relative;
  z-index: 2;
}
.efiap-badge {
  color: var(--apolo-orange);
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 1rem;
  display: block;
  position: relative;
  z-index: 2;
}

/* ============================================================
   14b. FEATURE LIST (shared)
   ============================================================ */
.feature-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
}
.feature-list li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
  font-size: 0.95rem;
  line-height: 1.5;
}
.feature-list li:last-child {
  margin-bottom: 0;
}
.feature-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--apolo-blue);
}

/* ============================================================
   14c. RECTOR SECTION
   ============================================================ */
.rector-section {
  background: var(--bg-surface);
}

.screen-section--leadership .container,
.screen-section--modules .container {
  width: 100%;
}

.rector-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.rector-text .section-kicker {
  text-align: left;
}
.rector-text h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 1rem;
}
.rector-text p {
  color: var(--text-secondary);
  line-height: 1.7;
}
.rector-image img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

/* ============================================================
   15. ALLIES
   ============================================================ */
.allies-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
}
.ally-card {
  background: var(--bg-card);
  border: var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all var(--dur-base) var(--ease);
  min-width: 250px;
}
.ally-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-3px);
  border-color: var(--apolo-cyan-dark);
}

/* ============================================================
   15b. LEGAL PAGES
   ============================================================ */
.legal-body {
  padding-top: var(--header-h);
}

.legal-page {
  background: linear-gradient(180deg, rgba(231, 242, 247, 0.95) 0%, #ffffff 18%, #ffffff 100%);
  min-height: 100vh;
}

.legal-hero {
  padding: clamp(4rem, 8vw, 6rem) 0 2.5rem;
  border-bottom: 1px solid rgba(10, 46, 74, 0.08);
}

.legal-hero .container,
.legal-shell .container {
  max-width: var(--container-max);
}

.legal-breadcrumbs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.legal-breadcrumbs a:hover {
  color: var(--apolo-blue);
}

.legal-kicker {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: rgba(12, 76, 168, 0.08);
  color: var(--apolo-blue);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legal-hero h1 {
  font-size: clamp(2rem, 4.8vw, 3.4rem);
  line-height: 1.1;
  max-width: 14ch;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.legal-hero p {
  max-width: 70ch;
  font-size: 1.05rem;
  color: var(--text-secondary);
}

.legal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.75rem;
}

.legal-shell {
  padding: 2.5rem 0 5rem;
}

.legal-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.legal-summary-card,
.legal-nav-card,
.legal-crosslink {
  background: var(--bg-surface);
  border: var(--glass-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: 0 8px 24px rgba(10, 46, 74, 0.06);
}

.legal-summary-card h2,
.legal-nav-card h2,
.legal-crosslink h2 {
  font-size: 0.98rem;
  margin-bottom: 0.4rem;
  color: var(--text-primary);
}

.legal-summary-card p,
.legal-nav-card p,
.legal-crosslink p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.legal-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.legal-sidebar {
  position: sticky;
  top: 96px;
}

.legal-nav-card ul {
  display: grid;
  gap: 0.6rem;
  margin-top: 1rem;
}

.legal-nav-card a {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.legal-nav-card a:hover {
  color: var(--apolo-blue);
}

.legal-card {
  background: var(--bg-surface);
  border: var(--glass-border);
  border-radius: 24px;
  box-shadow: 0 12px 40px rgba(10, 46, 74, 0.08);
  overflow: hidden;
}

.legal-intro,
.legal-section {
  padding: 2rem;
}

.legal-intro {
  background: rgba(231, 242, 247, 0.55);
  border-bottom: 1px solid rgba(10, 46, 74, 0.08);
}

.legal-intro p,
.legal-section p,
.legal-section li {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.75;
}

.legal-intro p + p,
.legal-section p + p,
.legal-section ul,
.legal-section ol {
  margin-top: 1rem;
}

.legal-section + .legal-section {
  border-top: 1px solid rgba(10, 46, 74, 0.08);
}

.legal-section h2,
.legal-intro h2 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.legal-section h2 span {
  color: var(--apolo-blue);
}

.legal-definitions {
  display: grid;
  gap: 0.9rem;
  margin-top: 1.5rem;
}

.legal-definition {
  padding: 1rem 1.1rem;
  border-radius: 14px;
  background: rgba(10, 46, 74, 0.03);
  border: 1px solid rgba(10, 46, 74, 0.08);
}

.legal-definition strong {
  color: var(--text-primary);
}

.legal-list {
  list-style: disc;
  padding-left: 1.25rem;
}

.legal-footer-note {
  margin-top: 1.5rem;
  padding: 1rem 1.2rem;
  border-left: 4px solid var(--apolo-blue);
  background: rgba(12, 76, 168, 0.06);
  color: var(--text-primary);
  font-size: 0.95rem;
}

.legal-crosslinks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.legal-crosslink:hover {
  border-color: rgba(12, 76, 168, 0.18);
  transform: translateY(-2px);
}

.legal-mini-footer {
  padding: 2rem 0 3rem;
  color: var(--text-muted);
  font-size: 0.92rem;
  text-align: center;
}

/* ============================================================
   15c. CLOSING SECTION
   ============================================================ */
.screen-section--closing {
  background:
    radial-gradient(circle at top right, rgba(129, 215, 255, 0.35), transparent 28%),
    linear-gradient(180deg, rgba(231, 242, 247, 0.92) 0%, rgba(255, 255, 255, 0.98) 100%);
}

.closing-layout {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(2rem, 4vw, 3rem);
}

.closing-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.75rem;
  align-items: stretch;
}

.closing-panel {
  background: var(--bg-surface);
  border: var(--glass-border);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 2.5vw, 2.25rem);
  box-shadow: 0 12px 36px rgba(10, 46, 74, 0.08);
}

.closing-panel--tech {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.closing-panel--tech .tech-grid {
  margin-top: 1.5rem;
}

.closing-panel--cta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  color: var(--text-primary);
}

.closing-panel--cta .section-kicker {
  background: rgba(12, 76, 168, 0.08);
  color: var(--apolo-blue);
}

.closing-panel--cta .section-title h2,
.closing-panel--cta .section-title p {
  color: var(--text-primary);
}

.closing-panel--cta .section-title p {
  opacity: 1;
}

.hero-buttons-left {
  justify-content: center;
}

/* ============================================================
   16. FOOTER
   ============================================================ */
footer {
  background: #0A2E4A;
  padding-top: 4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.site-footer {
  border-radius: 0;
  border: none;
  box-shadow: none;
}

.footer-description {
  color: rgba(255, 255, 255, 0.72);
  margin-top: 1rem;
  font-size: 0.95rem;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  color: #fff;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}
.footer-col ul li { margin-bottom: 0.8rem; }
.footer-col ul li a {
  color: var(--text-secondary);
  font-size: 0.95rem;
}
.footer-col ul li a:hover { color: var(--apolo-cyan); }

.footer-bottom {
  padding: 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  text-align: center;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
}

/* ============================================================
   17. ANIMATIONS
   ============================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes float-img {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Intersection Observer targets */
[data-animate] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
[data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Floating images */
.floating-img {
  border-radius: var(--radius-md);
  box-shadow: 0 20px 40px rgba(10, 46, 74, 0.2);
  border: var(--glass-border);
  animation: float-img 6s ease-in-out infinite;
  max-height: 350px;
  object-fit: cover;
}

.image-block {
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeInRight 0.8s var(--ease);
}

/* ============================================================
   18. RESPONSIVE
   ============================================================ */

/* Tablet */
@media (max-width: 992px) {
  .screen-section {
    align-items: stretch;
  }
  .hero {
    padding-top: calc(var(--header-h) + 2rem);
    padding-bottom: 3rem;
  }
  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }
  .hero::before {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.78) 58%, rgba(255, 255, 255, 0.5) 100%);
  }
  .hero-content { max-width: 100%; }
  .hero-buttons { justify-content: center; }
  .hero-visual {
    justify-content: center;
    width: 100%;
  }
  .hero-device-visual {
    width: 100%;
    max-width: 560px;
    filter: drop-shadow(0 10px 24px rgba(10, 46, 74, 0.12));
  }
  .features-showcase { grid-template-columns: 1fr; gap: 2rem; }
  .tabs-container { order: -1; }
  .tabs-container .section-title { text-align: center; }
  .tabs-container .section-title p { margin-inline: auto; }
  .nav-tabs { justify-content: center; }
  .roles-floating-img {
    width: 100%;
    max-width: 420px;
    margin-inline: auto;
  }
  .tech-grid { grid-template-columns: 1fr 1fr; }
  .modules-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .rector-content { grid-template-columns: 1fr; text-align: center; }
  .rector-text .section-kicker { text-align: center; }
  .rector-image { order: -1; }
  .closing-grid { grid-template-columns: 1fr; }
  .legal-summary,
  .legal-crosslinks,
  .legal-layout {
    grid-template-columns: 1fr;
  }
  .legal-sidebar {
    position: static;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .section-padding {
    padding-block: clamp(2.5rem, 4vw, 4rem);
  }
  .hero-device-visual {
    width: 100%;
    max-width: 430px;
  }

  .section-title-left {
    text-align: center;
  }

  .section-title-left p {
    margin-inline: auto;
  }

  .hero-buttons-left {
    justify-content: center;
  }

  .nav-tabs {
    justify-content: center;
  }
  .roles-floating-img {
    width: 100%;
    max-width: 360px;
  }
  .nav-menu {
    position: fixed;
    top: var(--header-h);
    left: 0;
    width: 100%;
    background: #E7F2F7;
    flex-direction: column;
    padding: 2rem;
    border-bottom: 1px solid rgba(10, 46, 74, 0.1);
    transform: translateY(-150%);
    transition: transform var(--dur-base) var(--ease);
  }
  .nav-menu.active {
    transform: translateY(0);
    box-shadow: var(--shadow-lg);
  }
  .mobile-toggle { display: flex; }
  .hero h1 { font-size: 2.5rem; }
  .footer-top { grid-template-columns: 1fr; }
  .pricing-item {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1.5rem;
  }
  .pricing-value {
    border-left: none;
    border-top: 1px solid rgba(10, 46, 74, 0.1);
    padding-left: 0;
    padding-top: 1rem;
    text-align: center;
    min-width: auto;
  }
  .tech-grid { grid-template-columns: 1fr; }
  .modules-grid { grid-template-columns: 1fr; }
  .rector-content { gap: 2rem; }
  .legal-hero { padding-top: 3.5rem; }
  .legal-intro,
  .legal-section { padding: 1.4rem; }
  .legal-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .legal-actions .btn { width: 100%; }
}

/* Small mobile */
@media (max-width: 480px) {
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1rem; }
  .section-title h2 { font-size: 1.6rem; }
  .btn { padding: 0.7rem 1.5rem; font-size: 0.9rem; }
}
