/* ═══════════════════════════════════════════════════════════════
   MCAL Global — Premium Polish
   Loaded after Tailwind CDN, Font Awesome, and density.css.
   All selectors scoped precisely to avoid unintended overrides.
   ═══════════════════════════════════════════════════════════════ */

/* ─── GLOBAL SCROLL ─────────────────────────────────────────── */
html { scroll-behavior: smooth; }

/* Offset all anchor target sections so they clear the sticky nav */
section[id], div[id], footer[id] {
  scroll-margin-top: 96px;
}

/* ═══════════════════════════════════════════════════════════════
   1. NAVBAR — GLASSMORPHISM
   ═══════════════════════════════════════════════════════════════ */
body > header {
  background: rgba(20, 25, 35, 0.88) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  box-shadow: none !important;
  transition: box-shadow 0.35s ease !important;
}
body > header.nav-scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.35) !important;
}

/* Top-level nav links → white on dark bg */
body > header nav[aria-label="Primary navigation"] > a,
body > header nav[aria-label="Primary navigation"] > div > button {
  color: rgba(255, 255, 255, 0.78) !important;
  transition: color 0.2s ease !important;
}
body > header nav[aria-label="Primary navigation"] > a:hover,
body > header nav[aria-label="Primary navigation"] > div > button:hover {
  color: #22D3EE !important;
}
body > header nav[aria-label="Primary navigation"] > a .fa-arrow-left {
  opacity: 0.5;
}

/* Dropdown panel — frosted, keep light text */
body > header nav[aria-label="Primary navigation"] .absolute {
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25) !important;
}
body > header nav[aria-label="Primary navigation"] .absolute a {
  color: #475569 !important;
}
body > header nav[aria-label="Primary navigation"] .absolute a:hover {
  color: #22D3EE !important;
}

/* Hamburger icon */
body > header div.flex button.md\:hidden {
  color: rgba(255, 255, 255, 0.8) !important;
}

/* Mobile menu panel */
body > header #mobileMenu {
  background: rgba(15, 20, 30, 0.97) !important;
  border-top-color: rgba(255, 255, 255, 0.06) !important;
}
body > header #mobileMenu a,
body > header #mobileMenu p {
  color: rgba(255, 255, 255, 0.7) !important;
}
body > header #mobileMenu a:hover { color: #22D3EE !important; }
body > header #mobileMenu .text-cyan-600,
body > header #mobileMenu .text-cyan-500,
body > header #mobileMenu .text-sky-600 {
  color: #22D3EE !important;
}

/* Navbar CTA button glow */
body > header .flex.items-center > button:first-child {
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.32) !important;
  transition: box-shadow 0.3s ease, transform 0.25s ease !important;
}
body > header .flex.items-center > button:first-child:hover {
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.5) !important;
}

/* Logo — no border, outline, box, or focus-ring artifact */
body > header > div > a:first-child,
body > header > div > a:first-child:hover,
body > header > div > a:first-child:focus,
body > header > div > a:first-child:focus-visible,
body > header > div > a:first-child:visited,
body > header > div > a:first-child:active {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  text-decoration: none !important;
}
body > header > div > a:first-child img {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  display: block !important;
}

/* ═══════════════════════════════════════════════════════════════
   2. HERO — DEPTH & GRAIN TEXTURE
   ═══════════════════════════════════════════════════════════════ */
.hero-bg { position: relative; }

/* Grain / film noise overlay — cinematic, very subtle */
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.04;
  z-index: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 220px 220px;
  background-repeat: repeat;
}

/* Content must sit above pseudo-elements */
.hero-bg > div { position: relative; z-index: 1; }

/* Accent badge pill — subtle glow + blur */
.hero-bg .bg-cyan-400\/10,
.hero-bg .bg-sky-400\/10 {
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.12) !important;
}

/* Trust / info row — thin separator line above */
.hero-bg .text-white\/60,
.hero-bg .text-white\/55 {
  color: rgba(224, 224, 224, 0.65) !important;
}
.hero-bg .text-white\/70 { color: rgba(224, 224, 224, 0.75) !important; }
.hero-bg .text-white\/65 { color: rgba(224, 224, 224, 0.68) !important; }

/* ═══════════════════════════════════════════════════════════════
   3. BUTTONS — PREMIUM GRADIENTS & HOVER LIFT
   ═══════════════════════════════════════════════════════════════ */

/* Primary filled cyan buttons — gradient + glow */
.bg-\[\#22D3EE\] {
  background: linear-gradient(135deg, #2ee6f8 0%, #00B4D8 100%) !important;
  box-shadow: 0 4px 15px rgba(34, 211, 238, 0.28) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.bg-\[\#22D3EE\]:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 22px rgba(34, 211, 238, 0.44) !important;
}
/* Prevent hero CTA from double-animating when density.css caps py */
.hero-bg .bg-\[\#22D3EE\]:active { transform: translateY(0) !important; }

/* badge-glow (data analyst page CTA) */
.badge-glow {
  background: linear-gradient(135deg, #38BDF8 0%, #0EA5E9 55%, #0284C7 100%) !important;
  box-shadow: 0 4px 15px rgba(56, 189, 248, 0.30) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.badge-glow:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 24px rgba(56, 189, 248, 0.46) !important;
}

/* Secondary / ghost outline buttons */
.border-2[class*="border-white"] {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.border-2[class*="border-white"]:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.55) !important;
}

/* Pulsing glow for key conversion CTA (class added in PHP) */
@keyframes mcal-pulse-glow {
  0%, 100% { box-shadow: 0 4px 15px rgba(34, 211, 238, 0.28); }
  50%       { box-shadow: 0 4px 30px rgba(34, 211, 238, 0.6), 0 0 0 8px rgba(34, 211, 238, 0.06); }
}
.cta-pulse {
  animation: mcal-pulse-glow 2.8s ease-in-out infinite !important;
}
.cta-pulse:hover {
  animation: none !important;
  box-shadow: 0 6px 28px rgba(34, 211, 238, 0.5) !important;
  transform: translateY(-2px) !important;
}

/* ═══════════════════════════════════════════════════════════════
   4. CARDS — DEPTH, SHADOWS, IMAGE ZOOM
   ═══════════════════════════════════════════════════════════════ */

/* Light-bg cards */
.card-hover {
  border-radius: 14px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06) !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}
.card-hover:hover {
  transform: translateY(-5px) !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.11) !important;
}

/* Image zoom on card hover */
.card-hover img {
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.card-hover:hover img {
  transform: scale(1.05) !important;
}

/* Dark-bg icon feature cards */
.bg-cyan-400\/10.rounded-xl,
.bg-cyan-400\/10.rounded-2xl {
  transition: background 0.25s ease, box-shadow 0.25s ease !important;
}
.bg-cyan-400\/10.rounded-xl:hover,
.bg-cyan-400\/10.rounded-2xl:hover {
  background: rgba(34, 211, 238, 0.15) !important;
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.1) !important;
}

/* ═══════════════════════════════════════════════════════════════
   5. HOME PAGE STATS BAR
   ═══════════════════════════════════════════════════════════════ */
#home-stats {
  background: #f8fafc !important;
}
#home-stats > div {
  background: #ffffff !important;
  border-radius: 12px !important;
  padding: 1.5rem 1rem !important;
  border-top: 3px solid #22D3EE !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05) !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease !important;
}
#home-stats > div:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 6px 20px rgba(34, 211, 238, 0.14) !important;
}

/* ═══════════════════════════════════════════════════════════════
   6. SECTION TRANSITIONS & SCROLL REVEAL
   ═══════════════════════════════════════════════════════════════ */

/* Fade-in for sections below the fold (class set by premium.js) */
.mcal-reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.30s ease, transform 0.30s ease;
}
.mcal-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children in reveal sections */
.mcal-reveal > * { transition-delay: 0ms; }
.mcal-reveal > *:nth-child(2) { transition-delay: 80ms; }
.mcal-reveal > *:nth-child(3) { transition-delay: 160ms; }
.mcal-reveal > *:nth-child(4) { transition-delay: 240ms; }

/* ═══════════════════════════════════════════════════════════════
   7. TYPOGRAPHY REFINEMENTS
   ═══════════════════════════════════════════════════════════════ */

/* Heading letter-spacing — editorial tightness */
h1, h2, h3 { letter-spacing: -0.02em; }

/* Section labels — wider tracking + cyan accent underline */
p.tracking-widest.font-semibold.uppercase {
  letter-spacing: 0.14em !important;
  font-size: 0.6875rem !important;
  display: block;
}
p.tracking-widest.font-semibold.uppercase::after {
  content: '';
  display: block;
  width: 28px;
  height: 2px;
  background: currentColor;
  opacity: 0.7;
  border-radius: 2px;
  margin: 0.45rem auto 0;
}
/* Left-aligned labels should left-align the underline */
div:not(.text-center) > p.tracking-widest.font-semibold.uppercase::after {
  margin: 0.45rem 0 0;
}

/* Testimonial quote cards — large decorative " mark */
.bg-slate-50.p-8.rounded-3xl {
  position: relative !important;
  overflow: hidden !important;
}
.bg-slate-50.p-8.rounded-3xl::before {
  content: '\201C';
  position: absolute;
  top: 0;
  left: 1rem;
  font-size: 7rem;
  line-height: 1;
  color: #22D3EE;
  opacity: 0.07;
  font-family: Georgia, serif;
  pointer-events: none;
  z-index: 0;
}
.bg-slate-50.p-8.rounded-3xl > * { position: relative; z-index: 1; }

/* ═══════════════════════════════════════════════════════════════
   8. TECHNOLOGY TAGS
   ═══════════════════════════════════════════════════════════════ */

/* Hero dark-bg tags */
.hero-bg span[class*="bg-white/10"],
.hero-bg span[class*="bg-white/8"] {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  backdrop-filter: blur(3px) !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}
.hero-bg span[class*="bg-white/10"]:hover,
.hero-bg span[class*="bg-white/8"]:hover {
  border-color: rgba(34, 211, 238, 0.38) !important;
  box-shadow: 0 0 8px rgba(34, 211, 238, 0.12) !important;
}

/* Light-bg cyan tags (card sections) */
.bg-cyan-50.text-cyan-700 {
  background: rgba(34, 211, 238, 0.07) !important;
  border: 1px solid rgba(34, 211, 238, 0.14) !important;
  transition: border-color 0.2s ease !important;
}
.bg-cyan-50.text-cyan-700:hover {
  border-color: rgba(34, 211, 238, 0.32) !important;
}

/* ═══════════════════════════════════════════════════════════════
   10. FAQ ACCORDIONS
   ═══════════════════════════════════════════════════════════════ */
.faq-item {
  border-left: 3px solid transparent !important;
  transition: border-color 0.22s ease, background 0.22s ease !important;
  border-radius: 12px !important;
}
.faq-item:hover {
  border-left-color: rgba(34, 211, 238, 0.3) !important;
}
.faq-item.active {
  border-left-color: #22D3EE !important;
  background: linear-gradient(to right, rgba(34, 211, 238, 0.025), transparent) !important;
}
.faq-answer {
  transition: max-height 0.32s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* ═══════════════════════════════════════════════════════════════
   11. MODULE / CURRICULUM IMAGES
   ═══════════════════════════════════════════════════════════════ */
.module-item img {
  border-radius: 12px !important;
  border: 1px solid rgba(0, 0, 0, 0.07) !important;
  max-height: 240px !important;
  object-fit: cover !important;
}

/* ═══════════════════════════════════════════════════════════════
   12. COMPARISON TABLES
   ═══════════════════════════════════════════════════════════════ */
.overflow-x-auto {
  border-radius: 14px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07) !important;
}
.overflow-x-auto table {
  border-radius: 0 !important;
}
/* Alternating row backgrounds */
.overflow-x-auto tbody tr:nth-child(even) td {
  background: rgba(248, 250, 252, 0.55) !important;
}
/* MCAL / positive column — reinforced green tint */
.overflow-x-auto tbody td.bg-emerald-50\/50 {
  background: rgba(52, 211, 153, 0.07) !important;
}
/* Hover row highlight */
.overflow-x-auto tbody tr:hover td {
  background: rgba(34, 211, 238, 0.03) !important;
}

/* ═══════════════════════════════════════════════════════════════
   13. TESTIMONIAL CARDS — LEFT ACCENT BORDER
   ═══════════════════════════════════════════════════════════════ */
.bg-slate-50.p-8.rounded-3xl.border {
  border-left: 3px solid #22D3EE !important;
  border-top-color: transparent !important;
  border-right-color: transparent !important;
  border-bottom-color: transparent !important;
  background: linear-gradient(150deg, #f8fafc 0%, #f1f5f9 100%) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06) !important;
}

/* ═══════════════════════════════════════════════════════════════
   14. FOOTER — POLISH
   ═══════════════════════════════════════════════════════════════ */
footer {
  position: relative !important;
  padding-top: 4rem !important;
}
footer::before {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(to right, #22D3EE 0%, rgba(34, 211, 238, 0.25) 50%, transparent 100%);
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  pointer-events: none;
}

/* Column headings — cyan underline accent */
footer h4 {
  display: inline-block !important;
  padding-bottom: 0.5rem !important;
  margin-bottom: 1rem !important;
  position: relative !important;
}
footer h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  opacity: 0.8;
}

/* Social icon hover — circular outline */
footer a[aria-label] {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 2rem !important;
  height: 2rem !important;
  border-radius: 50% !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease !important;
}
footer a[aria-label]:hover {
  background: rgba(34, 211, 238, 0.12) !important;
  border-color: rgba(34, 211, 238, 0.35) !important;
}

/* Footer link hover */
footer ul a {
  transition: color 0.18s ease, padding-left 0.18s ease !important;
}
footer ul a:hover {
  padding-left: 4px !important;
}
