/*!
 * GetAILearn - main.css
 * AI Education Platform - Light Theme, Teal Accent #14b8a6
 */

/* ── CSS Variables ──────────────────────────────────────── */
:root {
  --bg: #f8f9fa;
  --surface: #ffffff;
  --surface2: #f0fdfa;
  --text: #1a1a2e;
  --text-muted: #64748b;
  --accent: #14b8a6;
  --accent-dark: #0d9488;
  --border: rgba(20, 184, 166, 0.15);
  --radius: 12px;
  --gap: 2.5em;
  --nav-height: 4.5em;
  --funding-bar-h: 0px;
  --sidebar-w: 0px;
}

/* ── Reset & Base ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
img { max-width: 100%; height: auto; }
body {
  font-family: 'Segoe UI', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--bg);
}
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  margin-top: 0;
}
p { margin-top: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }
ul { list-style: none; padding: 0; margin: 0; }

/* ── Nav Override ───────────────────────────────────────── */
.custom-navbar {
  position: fixed !important;
  top: var(--funding-bar-h, 0px) !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 9999 !important;
  background-color: #ffffff !important;
  border-bottom: 1px solid rgba(20, 184, 166, 0.2) !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08) !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
.custom-navbar .navbar-brand {
  display: flex !important;
  align-items: center !important;
  padding: 8px 0 !important;
}
.custom-navbar .navbar-brand img {
  height: 34px !important;
  width: auto !important;
  display: block !important;
}
.custom-navbar .nav > li > a {
  color: #1a1a2e !important;
  font-size: 0.82em !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  font-weight: 600 !important;
  padding: 15px 14px !important;
  transition: color 0.2s !important;
}
.custom-navbar .nav > li > a:hover,
.custom-navbar .nav > li.active > a {
  color: var(--accent) !important;
  background: transparent !important;
}
.custom-navbar .nav > li.active > a {
  border-bottom: 2px solid var(--accent);
}

/* ── Hero Section ───────────────────────────────────────── */
#home {
  background-image: url('../images/hero-main.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: rgba(5, 15, 40, 0.30);
  background-blend-mode: multiply;
  position: relative;
  min-height: 600px;
  display: flex;
  align-items: center;
  padding-top: calc(var(--nav-height) + var(--funding-bar-h, 0px));
}
#home::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.52);
  z-index: 0;
  pointer-events: none;
}
#home > * { position: relative; z-index: 2; }
#home .home-info { text-align: center; padding: 3em 1em; }
#home .home-info h3 {
  color: rgba(255,255,255,0.82) !important;
  font-size: 1em;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: 0.5em;
}
#home .home-info h1 {
  color: #ffffff !important;
  font-size: 2.6em;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1em;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}
#home .home-info p {
  color: rgba(255,255,255,0.82) !important;
  font-size: 1.1em;
  margin-bottom: 1.5em;
}
#home .btn-hero {
  display: inline-block;
  background: var(--accent);
  color: #ffffff !important;
  padding: 0.9em 2.2em;
  border-radius: 6px;
  font-size: 1em;
  font-weight: 700;
  margin: 0 0.4em 0.8em;
  transition: background 0.2s, transform 0.2s;
  text-decoration: none;
}
#home .btn-hero:hover { background: var(--accent-dark); transform: translateY(-1px); }
#home .btn-hero.secondary {
  background: transparent;
  border: 2px solid rgba(255,255,255,0.75);
  color: #fff !important;
}
#home .btn-hero.secondary:hover { background: rgba(255,255,255,0.1); }

/* ── Page Hero (non-home pages) ─────────────────────────── */
.page-hero {
  min-height: 380px;
  display: flex;
  align-items: center;
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: rgba(5,15,40,0.30);
  background-blend-mode: multiply;
  padding-top: calc(var(--nav-height) + var(--funding-bar-h, 0px));
}
.page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.52);
  z-index: 0;
  pointer-events: none;
}
.page-hero > * { position: relative; z-index: 2; width: 100%; }
.page-hero h1 { color: #ffffff !important; font-size: 2.2em; font-weight: 800; margin: 0; text-shadow: 0 2px 8px rgba(0,0,0,0.4); }
.page-hero p { color: rgba(255,255,255,0.82) !important; font-size: 1.1em; margin: 0.5em 0 0; }

/* ── Stats Bar ──────────────────────────────────────────── */
.stats-bar {
  background: var(--accent);
  padding: 2.5em 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1em;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2em;
  text-align: center;
}
.stat-item .stat-num {
  font-size: 2.2em;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
}
.stat-item .stat-label {
  color: rgba(255,255,255,0.85);
  font-size: 0.9em;
  margin-top: 0.3em;
}
@media (max-width: 768px) { .stats-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 480px) {  }

/* ── Section Commons ────────────────────────────────────── */
section { padding: 5em 0; }
.section-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2em;
}
.section-header { text-align: center; margin-bottom: 3em; }
.section-header h2 { font-size: 2em; color: var(--text); margin-bottom: 0.4em; }
.section-header p { color: var(--text-muted); font-size: 1.05em; max-width: 600px; margin: 0 auto; }
.section-alt { background-color: var(--surface2); }

/* ── Feature Cards ──────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2em;
  align-items: stretch;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2em;
  transition: box-shadow 0.2s, transform 0.2s;
}
.feature-card:hover { box-shadow: 0 8px 32px rgba(20,184,166,0.15); transform: translateY(-3px); }
.feature-card .card-icon {
  width: 52px;
  height: 52px;
  background: var(--surface2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1em;
  color: var(--accent);
  font-size: 1.4em;
}
.feature-card h3 { font-size: 1.1em; margin-bottom: 0.5em; color: var(--text); }
.feature-card p { color: var(--text-muted); font-size: 0.9em; margin: 0; }

/* ── Advantages Grid ────────────────────────────────────── */
.advantages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5em;
}
.advantage-item {
  display: flex;
  gap: 1em;
  align-items: flex-start;
  background: var(--surface);
  border-radius: 10px;
  padding: 1.5em;
  border: 1px solid var(--border);
}
.advantage-num {
  width: 36px;
  height: 36px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9em;
  flex-shrink: 0;
}
.advantage-item h4 { font-size: 0.95em; margin-bottom: 0.3em; color: var(--text); }
.advantage-item p { font-size: 0.88em; color: var(--text-muted); margin: 0; }

/* ── Team Cards ─────────────────────────────────────────── */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2em;
  align-items: stretch;
}
.team-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2em 1.5em;
  text-align: center;
  transition: box-shadow 0.2s;
}
.team-card:hover { box-shadow: 0 6px 24px rgba(20,184,166,0.12); }
.team-card img {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 10%;
  display: block;
  margin: 0 auto 1.2rem;
}
.team-card h3 { font-size: 1.05em; margin-bottom: 0.2em; color: var(--text); }
.team-card .team-role { color: var(--accent); font-size: 0.88em; font-weight: 600; margin-bottom: 0.8em; }
.team-card .bio { font-size: 0.88em; color: var(--text-muted); margin: 0; line-height: 1.6; }

/* ── CTA Section ────────────────────────────────────────── */
.cta-section {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  padding: 5em 0;
  text-align: center;
}
.cta-section h2 { color: #ffffff !important; font-size: 2em; margin-bottom: 0.6em; }
.cta-section p { color: rgba(255,255,255,0.88) !important; font-size: 1.05em; margin-bottom: 2em; }
.btn-cta {
  display: inline-block;
  background: #ffffff;
  color: var(--accent) !important;
  padding: 0.9em 2.2em;
  border-radius: 6px;
  font-size: 1em;
  font-weight: 700;
  margin: 0 0.4em 0.6em;
  transition: transform 0.2s;
}
.btn-cta:hover { transform: translateY(-2px); color: var(--accent-dark) !important; }
.btn-cta.outline {
  background: transparent;
  border: 2px solid rgba(255,255,255,0.8);
  color: #ffffff !important;
}
.btn-cta.outline:hover { background: rgba(255,255,255,0.12); }

/* ── Blog / Article Cards ───────────────────────────────── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2em;
  align-items: stretch;
}
.article-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s;
}
.article-card:hover { box-shadow: 0 8px 28px rgba(20,184,166,0.14); transform: translateY(-3px); }
.article-card.pinned { border-left: 3px solid var(--accent); background: rgba(20,184,166,0.04); }
.card-thumb {
  width: 100%;
  overflow: hidden;
}
.card-thumb img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
  display: block;
}
.card-body { padding: 1.5em; flex: 1; display: flex; flex-direction: column; }
.card-tag {
  display: inline-block;
  background: var(--surface2);
  color: var(--accent);
  font-size: 0.72em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 0.25em 0.65em;
  border-radius: 4px;
  margin-bottom: 0.8em;
}
.card-tag.funding { background: var(--accent); color: #fff; }
.card-body h3 { font-size: 1em; margin-bottom: 0.5em; }
.card-body h3 a { color: var(--text); }
.card-body h3 a:hover { color: var(--accent); }
.card-body p { font-size: 0.88em; color: var(--text-muted); margin: 0 0 1em; flex: 1; }
.card-meta { font-size: 0.8em; color: var(--text-muted); margin-top: auto; }

/* ── Article Detail ─────────────────────────────────────── */
.article-container { max-width: 800px; margin: 0 auto; padding: 3em 2em; }
.article-hero-img { width: 100%; overflow: hidden; border-radius: var(--radius); margin-bottom: 2rem; }
.article-hero-img img { width: 100%; aspect-ratio: 16/9; object-fit: cover; object-position: center; display: block; }
.article-body h2 { font-size: 1.5em; margin: 2em 0 0.7em; color: var(--text); }
.article-body h3 { font-size: 1.2em; margin: 1.5em 0 0.5em; color: var(--text); }
.article-body p { color: var(--text-muted); margin-bottom: 1.2em; line-height: 1.8; }
.article-body ul { padding-left: 1.5em; margin-bottom: 1.2em; list-style: disc; }
.article-body ul li { color: var(--text-muted); margin-bottom: 0.5em; }
.article-breadcrumb { font-size: 0.85em; color: var(--text-muted); margin-bottom: 1em; }
.article-breadcrumb a { color: var(--accent); }
.article-meta { font-size: 0.85em; color: var(--text-muted); margin-bottom: 2em; }

/* ── Spotlight Section (About story) ────────────────────── */
.spotlight-section {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 4em;
  align-items: start;
  max-width: 1100px;
  margin: 0 auto;
  padding: 4em 2em;
}
.story-img { width: 100%; overflow: hidden; border-radius: var(--radius); }
.story-img img { width: 100%; aspect-ratio: 4/3; object-fit: cover; object-position: center; border-radius: var(--radius); display: block; }
@media (max-width: 768px) { .spotlight-section { grid-template-columns: 1fr; } }

/* ── Contact Page ───────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4em;
  align-items: start;
}
.contact-info h3 { font-size: 1.1em; margin-bottom: 1.5em; }
.contact-detail { display: flex; gap: 1em; align-items: flex-start; margin-bottom: 1.5em; }
.contact-detail .icon-wrap {
  width: 40px; height: 40px;
  background: var(--surface2);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}
.contact-detail p { margin: 0; font-size: 0.9em; color: var(--text-muted); }
.contact-form-section h3 { font-size: 1.1em; margin-bottom: 1.5em; }
.form-group { margin-bottom: 1.2em; }
.form-group label { display: block; font-size: 0.88em; font-weight: 600; margin-bottom: 0.4em; color: var(--text); }
.form-control-custom {
  width: 100%;
  padding: 0.75em 1em;
  border: 1px solid rgba(20,184,166,0.3);
  border-radius: 8px;
  font-size: 0.95em;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: border-color 0.2s;
}
.form-control-custom:focus { border-color: var(--accent); }
.btn-submit {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.85em 2em;
  border-radius: 8px;
  font-size: 1em;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-submit:hover { background: var(--accent-dark); }
@media (max-width: 768px) {  }

/* ── Courses Page ───────────────────────────────────────── */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2em;
  align-items: stretch;
}
.course-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s;
}
.course-card:hover { box-shadow: 0 8px 28px rgba(20,184,166,0.14); transform: translateY(-3px); }
.course-img { width: 100%; overflow: hidden; }
.course-img img { width: 100%; aspect-ratio: 16/9; object-fit: cover; object-position: center; display: block; }
.course-body { padding: 1.5em; flex: 1; display: flex; flex-direction: column; }
.course-level { display: inline-block; background: var(--surface2); color: var(--accent); font-size: 0.72em; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; padding: 0.25em 0.65em; border-radius: 4px; margin-bottom: 0.8em; }
.course-body h3 { font-size: 1em; margin-bottom: 0.4em; color: var(--text); }
.course-body p { font-size: 0.88em; color: var(--text-muted); margin-bottom: 1em; flex: 1; }
.course-meta { font-size: 0.82em; color: var(--text-muted); margin-top: auto; display: flex; gap: 1em; flex-wrap: wrap; }
.course-cta { display: inline-block; background: var(--accent); color: #fff !important; padding: 0.65em 1.4em; border-radius: 6px; font-size: 0.88em; font-weight: 700; margin-top: 1em; transition: background 0.2s; }
.course-cta:hover { background: var(--accent-dark); }

/* ── Feature Image Wrappers ─────────────────────────────── */
.feature-img-wrap { width: 100%; max-width: 100%; overflow: hidden; border-radius: var(--radius); display: block; margin: 0 0 1.5rem; }
.feature-img-wrap img { width: 100%; max-width: 100%; height: auto; display: block; aspect-ratio: 16/9; object-fit: cover; }

/* ── Legal Pages ────────────────────────────────────────── */
.legal-content { max-width: 860px; margin: 0 auto; padding: 3em 2em; }
.legal-content h2 { font-size: 1.4em; margin: 2em 0 0.7em; color: var(--text); }
.legal-content h3 { font-size: 1.1em; margin: 1.5em 0 0.5em; color: var(--text); }
.legal-content p, .legal-content li { color: var(--text-muted); line-height: 1.8; margin-bottom: 0.8em; }
.legal-content ul { list-style: disc; padding-left: 1.5em; margin-bottom: 1em; }
.legal-last-updated { font-size: 0.85em; color: var(--text-muted); margin-bottom: 2em; padding-bottom: 1em; border-bottom: 1px solid var(--border); }

/* ── Footer ─────────────────────────────────────────────── */
#footer {
  background-color: #0f172a;
  border-top: 1px solid rgba(20,184,166,0.2);
  padding: 4em 2em 2em;
  text-align: left;
  width: 100%;
}
#footer .inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3em;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 4em;
  align-items: start;
  box-sizing: border-box;
}
#footer h2 {
  color: #ffffff;
  font-size: 0.95em;
  font-weight: 600;
  margin: 0 0 1em;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
#footer p { color: #94a3b8; font-size: 0.88em; line-height: 1.7; margin: 0; }
#footer .brand-tagline { color: #94a3b8; font-size: 0.88em; margin-top: 0.5em; }
.footer-nav { list-style: none; margin: 0; padding: 0; }
.footer-nav li { margin-bottom: 0.5em; }
.footer-nav a { color: #94a3b8; text-decoration: none; font-size: 0.88em; transition: color 0.2s; }
.footer-nav a:hover { color: #ffffff; }
#footer .copyright {
  color: #64748b;
  font-size: 0.82em;
  text-align: center;
  margin: 2.5em auto 0;
  padding-top: 1.5em;
  border-top: 1px solid rgba(255,255,255,0.08);
  max-width: 1100px;
}
@media (max-width: 768px) { #footer .inner { grid-template-columns: 1fr 1fr; padding: 0 2em; } }
@media (max-width: 480px) { #footer .inner { grid-template-columns: 1fr; } }

/* ── Cookie Banner ───────────────────────────────────────── */
#cookie-banner {
  background: #0f172a;
  color: #e2e8f0;
  padding: 1.2em 2em;
  border-top: 2px solid var(--accent);
  align-items: center;
  justify-content: space-between;
  gap: 1em;
  flex-wrap: wrap;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10003;
}
#cookie-banner p { margin: 0; font-size: 0.88em; color: #e2e8f0; }
#cookie-banner a { color: var(--accent); }
.cookie-buttons { display: flex; gap: 0.7em; flex-shrink: 0; }
#cookie-accept { background: var(--accent); color: #fff; border: none; padding: 0.5em 1.3em; border-radius: 6px; cursor: pointer; font-size: 0.85em; font-weight: 600; }
#cookie-decline { background: transparent; color: #94a3b8; border: 1px solid rgba(255,255,255,0.2); padding: 0.5em 1.3em; border-radius: 6px; cursor: pointer; font-size: 0.85em; }
#cookie-decline:hover { color: #fff; }

/* ── Page Top padding (non-index) ────────────────────────── */
body.page-top {
  padding-top: 0;
}
body.page-top .page-hero {
  padding-top: calc(var(--nav-height) + var(--funding-bar-h, 0px));
}
body.page-top .main-content {
  padding-top: calc(var(--nav-height) + var(--funding-bar-h, 0px));
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  #home .home-info h1 { font-size: 1.8em; }
  .page-hero h1 { font-size: 1.6em; }
  .section-header h2 { font-size: 1.5em; }
  section { padding: 3.5em 0; }
}

/* ── Utility ─────────────────────────────────────────────── */
.text-accent { color: var(--accent); }
.text-muted { color: var(--text-muted); }
.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #fff !important;
  padding: 0.75em 1.8em;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.95em;
  transition: background 0.2s;
  text-decoration: none;
}
.btn-primary:hover { background: var(--accent-dark); }

/* ── Page Wrapper offset ──────────────────────────────────── */
#page-wrapper { padding-top: calc(var(--nav-height) + var(--funding-bar-h, 0px)); }

/* container layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* === Card Grid Equal Height Fix === */
.features-grid,
.services-grid,
.cards-grid,
.solutions-grid,
.advantages-grid {
  align-items: start;
}

.card-custom,
.service-card,
.solution-card,
.advantage-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card-custom p,
.service-card p,
.solution-card p,
.advantage-card p {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

/* === Card Equal Height (stretch to tallest card) === */
.features-grid,
.services-grid,
.cards-grid,
.solutions-grid,
.advantages-grid,
.platform-grid,
[class*="-grid"] {
  align-items: stretch;
}

.card-custom,
.service-card,
.solution-card,
.advantage-card,
.feature-card,
.platform-card {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  box-sizing: border-box;
}

.card-custom h3,
.card-custom h4,
.service-card h3,
.solution-card h3 {
  flex-shrink: 0;
}

.card-custom p:last-of-type,
.service-card p:last-of-type,
.solution-card p:last-of-type {
  flex: 1;
}

/* === Odd-count card grid: last card centered === */
.features-grid > .card-custom:last-child:nth-child(odd),
.services-grid > .card-custom:last-child:nth-child(odd),
.cards-grid > .card-custom:last-child:nth-child(odd),
.solutions-grid > .card-custom:last-child:nth-child(odd),
.advantages-grid > .card-custom:last-child:nth-child(odd),
.features-grid > *:last-child:nth-child(odd),
.services-grid > *:last-child:nth-child(odd),
[class*="-grid"] > .card-custom:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  max-width: calc(50% - 1rem);
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

/* ---- Funding Bar Offset ---- */
