/* ══════════════════════════════════════════
   NGCC — Nueva Guardia Cyber Consulting
   style.css — Shared Stylesheet
   ══════════════════════════════════════════ */

/* ── VARIABLES ── */
:root {
  --navy: #0f172a;
  --navy-mid: #1a2942;
  --navy-light: #1e293b;
  --gold: #b8952a;
  --gold-light: #d4aa3f;
  --gold-pale: #fde68a;
  --offwhite: #f8fafc;
  --cream: #f1f5f9;
  --cream-dark: #cbd5e1;
  --border: #e2e8f0;
  --border-gold: rgba(184, 149, 42, 0.4);
  --text-soft: #475569;
  --text-mid: #334155;
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
  --transition: all 0.3s ease;
}

/* ── RESET ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--offwhite);
  color: var(--text-mid);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; }

/* ── LAYOUT ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

section { padding: 5rem 0; }

.section-header {
  margin-bottom: 3rem;
  text-align: left;
}

/* ── TYPOGRAPHY ── */
h1, h2, h3, h4, .logo {
  font-family: 'Cormorant Garamond', serif;
  color: var(--navy);
  font-weight: 600;
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.section-eyebrow::before {
  content: '';
  width: 20px;
  height: 1px;
  background: var(--gold);
}

.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-soft);
  max-width: 40rem;
  margin-bottom: 3rem;
  line-height: 1.6;
}

/* ── BUTTONS ── */
.btn-gold {
  display: inline-block;
  background: var(--gold);
  color: #fff !important;
  padding: 0.8rem 1.8rem;
  border-radius: 4px;
  font-weight: 500;
  font-size: 0.9rem;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  text-align: center;
}

.btn-gold:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(184, 149, 42, 0.25);
}

.btn-ghost-dark {
  display: inline-block;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff !important;
  padding: 0.8rem 1.8rem;
  border-radius: 4px;
  font-weight: 500;
  font-size: 0.9rem;
  transition: var(--transition);
  text-align: center;
}

.btn-ghost-dark:hover {
  border-color: var(--gold-light);
  color: var(--gold-light) !important;
  background: rgba(255, 255, 255, 0.05);
}

.btn-outline {
  display: inline-block;
  border: 2px solid var(--navy);
  color: var(--navy) !important;
  padding: 0.75rem 1.75rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
}

.btn-outline:hover {
  background: var(--navy);
  color: #fff !important;
}

.btn-submit {
  width: 100%;
  background: var(--gold);
  color: #fff;
  border: none;
  padding: 1rem;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 0.5rem;
}

.btn-submit:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(184, 149, 42, 0.25);
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-up {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── HEADER & NAV ── */
header {
  background: var(--navy);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  font-weight: 700;
  color: #fff !important;
  letter-spacing: 0.05em;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
  height: 100%;
}

.nav-item {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.nav-link {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.2s;
  padding: 0.5rem 0;
  cursor: pointer;
}

.nav-link:hover { color: var(--gold-light); }

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--navy-light);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0 0 4px 4px;
  min-width: 230px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
}

.nav-item:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-link {
  display: block;
  padding: 0.8rem 1.2rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s;
}

.dropdown-link:last-child { border-bottom: none; }

.dropdown-link:hover {
  color: var(--gold-light);
  background: rgba(255, 255, 255, 0.04);
  padding-left: 1.5rem;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
}

.nav-toggle svg {
  width: 24px;
  height: 24px;
  stroke: #fff;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

/* ── PAGE HERO (subpages) ── */
.page-hero {
  background: var(--navy);
  padding: 4rem 0 3.5rem;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 80% at 80% 50%, rgba(184, 149, 42, 0.07), transparent 60%);
  pointer-events: none;
}

.page-hero-inner {
  position: relative;
  z-index: 1;
}

.page-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 1.5rem;
}

.page-breadcrumb a {
  color: rgba(255, 255, 255, 0.55);
  transition: color 0.2s;
}

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

.page-breadcrumb svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
}

.page-eyebrow {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 0.75rem;
}

.page-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.12;
  margin-bottom: 0.8rem;
}

.page-subtitle {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.6);
  max-width: 36rem;
  line-height: 1.7;
  font-weight: 300;
}

/* ── HERO (homepage) ── */
.hero {
  padding: 6rem 0 5rem;
  background: var(--navy);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 50%, rgba(184, 149, 42, 0.08), transparent 60%),
    radial-gradient(ellipse 50% 80% at 10% 80%, rgba(184, 149, 42, 0.05), transparent 55%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 4rem;
  align-items: center;
}

.hero-left { animation: fadeUp 0.65s ease-out 0.1s both; }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 1.4rem;
}

.hero-eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--gold);
}

.hero-headline {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.8rem, 5vw, 4.2rem);
  font-weight: 600;
  line-height: 1.07;
  color: #fff;
  letter-spacing: -0.01em;
  margin-bottom: 1.4rem;
}

.hero-headline em {
  font-style: italic;
  color: var(--gold-light);
}

.hero-sub {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.68);
  max-width: 30rem;
  margin-bottom: 2.6rem;
  line-height: 1.7;
  font-weight: 400;
}

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

.hero-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 2rem;
  position: relative;
  animation: fadeUp 0.7s ease-out 0.3s both;
}

.hero-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), transparent);
  border-radius: 6px 6px 0 0;
}

.card-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 1.2rem;
}

.card-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.8rem;
  line-height: 1.3;
}

.card-body {
  font-size: 0.83rem;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.65;
  margin-bottom: 1.4rem;
  font-weight: 400;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.4rem;
}

.tag {
  padding: 0.25rem 0.65rem;
  border-radius: 2px;
  border: 1px solid rgba(184, 149, 42, 0.4);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(212, 170, 63, 0.9);
}

.card-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin-bottom: 1.2rem;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.4);
}

.card-status { display: flex; align-items: center; gap: 0.4rem; }

.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.7);
  animation: pulse 2s infinite;
}

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ── WHY NGCC ── */
#why { background: var(--offwhite); }

.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}

.why-card {
  background: var(--offwhite);
  padding: 2.5rem 2rem;
  position: relative;
  transition: background 0.25s;
}

.why-card:hover { background: #fff; box-shadow: 0 4px 20px rgba(0,0,0,0.07); }

.why-number {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--cream-dark);
  line-height: 1;
  margin-bottom: 0.75rem;
  transition: color 0.25s;
}

.why-card:hover .why-number { color: var(--gold-pale); }

.why-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.8rem;
}

.why-text {
  font-size: 0.9rem;
  color: var(--text-soft);
  line-height: 1.7;
  font-weight: 300;
}

.why-accent {
  position: absolute;
  bottom: 0; left: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width 0.35s ease;
}

.why-card:hover .why-accent { width: 100%; }

/* ── SERVICES PREVIEW ── */
#services-preview { background: var(--navy); }
#services-preview .section-title { color: #fff; }
#services-preview .section-eyebrow { color: var(--gold-light); }
#services-preview .section-eyebrow::before { background: var(--gold-light); }
#services-preview .section-subtitle { color: rgba(255, 255, 255, 0.6); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.2rem;
}

.service-card {
  grid-column: span 2;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}

.service-card:nth-child(4) { grid-column: 2 / span 2; }
.service-card:nth-child(5) { grid-column: 4 / span 2; }

.service-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.service-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(184, 149, 42, 0.4);
  transform: translateY(-3px);
}

.service-card:hover::after { opacity: 1; }

.service-icon {
  width: 38px; height: 38px;
  background: rgba(184, 149, 42, 0.12);
  border: 1px solid rgba(184, 149, 42, 0.3);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.1rem;
}

.service-icon svg {
  width: 18px; height: 18px;
  stroke: var(--gold-light);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.5rem;
}

.service-desc {
  flex: 1;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.65;
  margin-bottom: 1.2rem;
  font-weight: 400;
}

.service-deliverables {
  font-size: 0.75rem;
  color: rgba(184, 149, 42, 0.8);
  line-height: 1.5;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 0.8rem;
}

.service-deliverables strong {
  color: rgba(212, 170, 63, 0.95);
  font-weight: 600;
  display: block;
  margin-bottom: 0.2rem;
}

/* ── EDUCATION PREVIEW ── */
#edu-preview { background: var(--cream); }

.edu-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.edu-visual {
  background: var(--navy);
  border-radius: 6px;
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
}

.edu-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 80% 20%, rgba(184, 149, 42, 0.12), transparent 55%);
}

.edu-stat-grid {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  width: 100%;
}

.edu-stat {
  background: rgba(255, 255, 255, 0.04);
  padding: 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.edu-stat-number {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--gold-light);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.edu-stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.edu-body {
  font-size: 0.95rem;
  color: var(--text-soft);
  line-height: 1.75;
  font-weight: 400;
  margin-bottom: 1.2rem;
}

.edu-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.edu-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-mid);
  line-height: 1.55;
}

.edu-list li::before {
  content: '';
  width: 20px; height: 20px;
  border-radius: 3px;
  background: var(--navy);
  flex-shrink: 0;
  margin-top: 0.05rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b8952a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-size: 12px;
  background-repeat: no-repeat;
  background-position: center;
}

/* ── CTA STRIP ── */
.cta-strip {
  background: var(--navy);
  padding: 4rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.cta-strip-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2.5rem;
  border-radius: 6px;
}

.cta-strip-eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 0.5rem;
}

.cta-strip-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.cta-strip-sub {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

.cta-strip-actions {
  display: flex;
  gap: 1rem;
  flex-shrink: 0;
}

/* ── CONTACT FORM ── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin-bottom: 1.2rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.2rem;
}

.form-field label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy);
}

.form-field input,
.form-field select,
.form-field textarea {
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.88rem;
  color: var(--text-mid);
  background: var(--offwhite);
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
  width: 100%;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(184, 149, 42, 0.12);
}

.form-field textarea {
  min-height: 130px;
  resize: vertical;
}

/* ── FOOTER ── */
footer {
  background: #080d18;
  padding: 4rem 0 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
}

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

.footer-col h4 {
  color: #fff;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  margin-bottom: 1.2rem;
}

.footer-col p {
  line-height: 1.6;
  margin-bottom: 1rem;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-col a {
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.2s;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
}

/* ── RESPONSIVE ── */
@media (max-width: 1000px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-card { max-width: 480px; }
  .edu-layout { grid-template-columns: 1fr; }
  .cta-strip-inner { flex-direction: column; text-align: center; }
  .cta-strip-actions { justify-content: center; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 800px) {
  .service-card { grid-column: span 3 !important; }
  .service-card:nth-child(5) { grid-column: 2 / span 3 !important; }
  .why-grid { grid-template-columns: 1fr; background: none; border: none; gap: 1rem; }
  .why-card { border: 1px solid var(--border); border-radius: 6px; }
}

@media (max-width: 768px) {
  section { padding: 3.5rem 0; }
  .section-title { font-size: 2rem; }
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 70px;
    left: 0; right: 0;
    background: var(--navy);
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 1.5rem 1.5rem;
    gap: 0;
    border-top: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    height: auto;
  }
  .nav-links.open { display: flex; }
  .nav-item { height: auto; width: 100%; }
  .nav-link { padding: 0.7rem 0; width: 100%; display: block; }
  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: rgba(255,255,255,0.04);
    border: none;
    border-left: 2px solid var(--gold);
    border-radius: 0;
    margin-left: 0.5rem;
    min-width: unset;
    display: none;
  }
  .nav-item.open .dropdown-menu { display: block; }
  .nav-links .btn-gold { margin-top: 0.5rem; width: 100%; text-align: center; }
  .form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .service-card,
  .service-card:nth-child(4),
  .service-card:nth-child(5) { grid-column: 1 / -1 !important; }
  .hero { padding: 4rem 0 3.5rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta-strip-inner { padding: 2rem 1.5rem; }
}

/* ── DARK MODE ── */
[data-theme="dark"] {
  --navy: #0f172a;
  --navy-mid: #1a2942;
  --navy-light: #1e293b;
  --offwhite: #0f172a;
  --cream: #1e293b;
  --cream-dark: #334155;
  --border: #2d3f55;
  --border-gold: rgba(184, 149, 42, 0.4);
  --text-soft: #94a3b8;
  --text-mid: #cbd5e1;
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] body {
  background-color: #0f172a;
  color: #cbd5e1;
}

[data-theme="dark"] .blog-featured,
[data-theme="dark"] .post-row,
[data-theme="dark"] .sidebar-widget,
[data-theme="dark"] .why-card,
[data-theme="dark"] .why-card:hover {
  background: #1e293b;
  border-color: #2d3f55;
}

[data-theme="dark"] .tag-filter-btn,
[data-theme="dark"] .sidebar-tag {
  background: #1e293b;
  border-color: #2d3f55;
  color: #94a3b8;
}

[data-theme="dark"] .post-body {
  color: #cbd5e1;
}

[data-theme="dark"] .post-body h2,
[data-theme="dark"] .post-body h3 {
  color: #e2e8f0;
}

[data-theme="dark"] .post-body blockquote {
  background: #1e293b;
  color: #94a3b8;
}

[data-theme="dark"] .post-body code {
  background: #1e293b;
  color: #e2e8f0;
}

/* dark mode: section backgrounds handled per-section in each layout */

[data-theme="dark"] footer {
  background: #080d18;
}

[data-theme="dark"] .blog-featured-title a,
[data-theme="dark"] .post-row-title a {
  color: #e2e8f0;
}

[data-theme="dark"] .blog-featured-title a:hover,
[data-theme="dark"] .post-row-title a:hover {
  color: var(--gold-light);
}

[data-theme="dark"] .sidebar-recent-title {
  color: #e2e8f0;
}

[data-theme="dark"] .sidebar-recent-title:hover {
  color: var(--gold-light);
}

[data-theme="dark"] .sidebar-recent-date,
[data-theme="dark"] .post-row-meta,
[data-theme="dark"] .blog-featured-meta {
  color: #94a3b8;
}

[data-theme="dark"] .sidebar-widget-title {
  color: #e2e8f0;
}

[data-theme="dark"] .post-body strong {
  color: #e2e8f0;
}

/* Dark mode toggle button */
.dark-toggle {
  background: none;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  cursor: pointer;
  padding: 0.3rem 0.7rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255,255,255,0.8);
  font-size: 0.75rem;
  font-weight: 500;
  transition: all 0.2s;
  font-family: inherit;
}

.dark-toggle:hover {
  border-color: var(--gold);
  color: var(--gold-light);
}

.dark-toggle svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

/* ── POST BODY TABLES ── */
.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.6rem 0;
  font-size: 0.9rem;
  overflow-x: auto;
  display: block;
}
.post-body thead th {
  background: var(--navy);
  color: #fff;
  font-weight: 600;
  text-align: left;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--navy);
}
.post-body tbody td {
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.5;
}
.post-body tbody tr:nth-child(even) td {
  background: rgba(0, 31, 63, 0.04);
}
[data-theme="dark"] .post-body thead th {
  background: #1e3a5f;
  border-color: #2d3f55;
}
[data-theme="dark"] .post-body tbody td {
  border-color: #2d3f55;
}
[data-theme="dark"] .post-body tbody tr:nth-child(even) td {
  background: rgba(255,255,255,0.04);
}

/* ── BACK TO TOP BUTTON ── */
.back-to-top {
  position: fixed; bottom: 2rem; right: 2rem;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--navy); color: #fff; border: none;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: translateY(10px);
  transition: opacity 0.3s, transform 0.3s;
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
  z-index: 999;
}
.back-to-top.visible { opacity: 1; transform: translateY(0); }
.back-to-top:hover { background: var(--gold); }
.back-to-top svg { width: 18px; height: 18px; stroke: #fff; fill: none; stroke-width: 2.5; }

/* ── SIDEBAR WIDGETS ── */
.sidebar-widget { background: #fff; border: 1px solid var(--border); border-radius: 6px; padding: 1.6rem; margin-bottom: 1.6rem; }
.sidebar-widget-title { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--navy); padding-bottom: 0.7rem; border-bottom: 2px solid var(--gold); margin-bottom: 1.2rem; }
.sidebar-recent { display: flex; flex-direction: column; gap: 0.9rem; }
.sidebar-recent-item { display: flex; flex-direction: column; gap: 0.2rem; border-bottom: 1px solid var(--border); padding-bottom: 0.9rem; }
.sidebar-recent-item:last-child { border-bottom: none; padding-bottom: 0; }
.sidebar-recent-title { font-size: 0.83rem; font-weight: 500; color: var(--navy); line-height: 1.35; transition: color 0.2s; }
.sidebar-recent-title:hover { color: var(--gold); }
.sidebar-recent-date { font-size: 0.68rem; color: var(--text-soft); }

/* ── NAV LOGO SIZE FIX ── */
header .logo {
  font-size: 1.65rem;
}

/* ── DARK MODE: per-section background overrides ── */
[data-theme="dark"] #why { background: #0f172a; }
[data-theme="dark"] #edu-preview { background: #1a2942; }
[data-theme="dark"] .page-hero { background: #0a1020; }
[data-theme="dark"] .about-section { background: transparent; }
[data-theme="dark"] .cta-strip { background: #080d18; }
[data-theme="dark"] .blog-featured { background: #1e293b; border-color: #2d3f55; }
[data-theme="dark"] .post-row { background: #1e293b; border-color: #2d3f55; }
[data-theme="dark"] .toc-widget { background: #1e293b; border-color: #2d3f55; }
[data-theme="dark"] .author-bio { background: #1e293b; border-color: #2d3f55; }
[data-theme="dark"] .related-card { background: #1e293b; border-color: #2d3f55; }
[data-theme="dark"] .sidebar-widget { background: #1e293b; border-color: #2d3f55; }
[data-theme="dark"] .author-bio-name { color: #e2e8f0; }
[data-theme="dark"] .author-bio-text { color: #94a3b8; }

/* ── HERO CARD — Logo2 landscape layout ── */
.hero-card-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.8rem 1.5rem 1.4rem;
  background: rgba(255,255,255,0.03);
  border-radius: 4px;
  margin-bottom: 1.2rem;
}

.hero-card-logo {
  width: 100%;
  max-width: 320px;
  height: auto;
  display: block;
}

.hero-card-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 0.4rem;
  gap: 0.5rem;
}

.hero-card-stat {
  text-align: center;
  flex: 1;
}

.hero-card-stat-value {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gold-light);
  line-height: 1;
  margin-bottom: 0.3rem;
}

.hero-card-stat-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
}

.hero-card-stat-divider {
  width: 1px;
  height: 32px;
  background: rgba(255,255,255,0.12);
  flex-shrink: 0;
}
