/* ==========================================================================
   The Earth Computer Institute - Core Design System & Stylesheet
   Modern, Professional, SEO-Optimized Educational Web Platform
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Earth Primary: Deep Forest Teal / Pine Tones (Inspired by User Theme) */
  --primary-950: #02201d;
  --primary-900: #042f2a;
  --primary-800: #07433c;
  --primary-700: #0e584f;
  --primary-600: #166f64;
  --primary-500: #007a6e;

  /* Earth Brand Signature Teal */
  --accent-teal: #007a6e;
  --accent-teal-dark: #005d54;
  --accent-teal-light: #2dd4bf;
  --accent-emerald: #007a6e;
  --accent-emerald-dark: #005d54;
  --accent-emerald-light: #2dd4bf;

  /* User's Signature Mustard Gold / Warm Amber Accent */
  --accent-amber: #d9921a;
  --accent-amber-dark: #b8770c;
  --accent-amber-light: #f5a72e;
  --accent-gold: #d9921a;
  --accent-gold-dark: #b8770c;
  --accent-gold-light: #f5a72e;

  /* Neutral Background & Cards */
  --bg-slate: #f4f8f7;
  --surface-card: #ffffff;
  --border-subtle: #dce7e4;
  --text-primary: #042420;
  --text-muted: #4e6b66;
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-subtle: 0 4px 20px -2px rgba(4, 47, 42, 0.06);
  --shadow-card: 0 10px 30px -4px rgba(4, 47, 42, 0.08);
  --shadow-hover: 0 20px 40px -4px rgba(4, 47, 42, 0.16);
  --shadow-emerald: 0 10px 25px -3px rgba(0, 122, 110, 0.35);
  --shadow-gold: 0 10px 25px -3px rgba(217, 146, 26, 0.4);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-body);
  color: var(--text-primary);
  background-color: var(--bg-slate);
}

body {
  overflow-x: hidden;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: inherit;
}

/* Guaranteed High-Contrast Visibility in Hero, Primary, and Dark Sections */
.gradient-hero,
.gradient-primary,
.glass-card-dark,
[class*="bg-primary-950"],
[class*="bg-primary-900"],
[class*="bg-slate-900"],
[class*="bg-slate-800"],
footer,
.text-white {
  color: #ffffff;
}

.gradient-hero h1,
.gradient-hero h2,
.gradient-hero h3,
.gradient-hero h4,
.gradient-hero h5,
.gradient-hero h6,
.gradient-primary h1,
.gradient-primary h2,
.gradient-primary h3,
.glass-card-dark h1,
.glass-card-dark h2,
.glass-card-dark h3,
.text-white h1,
.text-white h2,
.text-white h3,
.text-white h4,
.text-white h5,
.text-white h6,
footer h1,
footer h2,
footer h3,
footer h4 {
  color: #ffffff !important;
}

.gradient-hero p,
.gradient-primary p {
  color: #e2e8f0;
}

.gradient-hero strong,
.gradient-primary strong {
  color: #ffffff;
}

/* Glassmorphism Classes */
.glass-header {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(220, 231, 228, 0.85);
}

.glass-card-dark {
  background: rgba(4, 47, 42, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.glass-card-light {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(220, 231, 228, 0.85);
}

/* Gradients */
.gradient-primary {
  background: linear-gradient(135deg, #02201d 0%, #042f2a 60%, #007a6e 100%);
}

.gradient-hero {
  background: radial-gradient(circle at 80% 20%, rgba(217, 146, 26, 0.22) 0%, transparent 45%),
              radial-gradient(circle at 10% 80%, rgba(0, 122, 110, 0.35) 0%, transparent 45%),
              linear-gradient(180deg, #02201d 0%, #042f2a 100%);
}

/* Luminous High-Contrast Heading Accents */
.gradient-text-emerald {
  background: linear-gradient(135deg, #2dd4bf 0%, #fbbf24 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline;
  font-weight: 800;
}

/* When used on light surfaces */
section:not(.gradient-hero):not(.gradient-primary):not(.glass-card-dark) .gradient-text-emerald {
  background: linear-gradient(135deg, #007a6e 0%, #d9921a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-text-gold {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline;
  font-weight: 800;
}

.gradient-text-teal {
  background: linear-gradient(135deg, #2dd4bf 0%, #a7f3d0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline;
  font-weight: 800;
}

/* Pulse animation */
@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(217, 146, 26, 0.55);
  }
  50% {
    box-shadow: 0 0 0 12px rgba(217, 146, 26, 0);
  }
}

.pulse-emerald {
  animation: pulseGlow 2.5s infinite;
}

/* Micro-interactions & Card Hover */
.course-card {
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: #ffffff;
}

.course-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(0, 122, 110, 0.4);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #d9921a 0%, #b8770c 100%);
  color: #ffffff;
  font-weight: 700;
  font-family: var(--font-heading);
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #f5a72e 0%, #d9921a 100%);
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -2px rgba(217, 146, 26, 0.5);
  color: #ffffff;
}

.btn-teal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #007a6e;
  color: #ffffff;
  font-weight: 700;
  font-family: var(--font-heading);
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-emerald);
}

.btn-teal:hover {
  background: #005d54;
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -2px rgba(0, 122, 110, 0.45);
  color: #ffffff;
}

.btn-navy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--primary-900);
  color: #ffffff;
  font-weight: 700;
  font-family: var(--font-heading);
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-navy:hover {
  background: var(--primary-800);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(4, 47, 42, 0.35);
}

.btn-outline-white {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: transparent;
  color: #ffffff;
  font-weight: 600;
  font-family: var(--font-heading);
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  border: 2px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.25s ease;
}

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

/* Floating Action / Sticky Bar */
.floating-whatsapp {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25d366;
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-decoration: none;
}

.floating-whatsapp:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 12px 30px rgba(37, 211, 102, 0.6);
}

/* Modal Overlay */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(11, 19, 41, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1050;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-backdrop.active {
  display: flex;
}

.modal-box {
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  animation: modalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(15px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Lightbox Modal */
.lightbox-modal {
  position: fixed;
  inset: 0;
  background: rgba(11, 19, 41, 0.95);
  backdrop-filter: blur(12px);
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.lightbox-modal.active {
  display: flex;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* SEO Breadcrumb styling */
.breadcrumb-nav a {
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.2s;
}
.breadcrumb-nav a:hover {
  color: var(--accent-emerald);
}
.breadcrumb-nav span {
  color: #e2e8f0;
  margin: 0 0.4rem;
}
.breadcrumb-nav .current {
  color: #cbd5e1;
  font-weight: 600;
}

/* Floating WhatsApp Widget with Pulse Effect */
.floating-whatsapp {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  background-color: #25D366;
  color: #ffffff !important;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px -5px rgba(37, 211, 102, 0.5), 0 8px 10px -6px rgba(37, 211, 102, 0.4);
  z-index: 9999;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.floating-whatsapp:hover {
  transform: scale(1.12) translateY(-4px);
  background-color: #20ba5a;
  box-shadow: 0 16px 32px -4px rgba(37, 211, 102, 0.6), 0 12px 14px -5px rgba(37, 211, 102, 0.5);
}

.floating-whatsapp::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background-color: #25D366;
  opacity: 0.4;
  animation: waPulseRing 2.2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  z-index: -1;
}

@keyframes waPulseRing {
  0% { transform: scale(0.95); opacity: 0.6; }
  50% { transform: scale(1.35); opacity: 0; }
  100% { transform: scale(1.35); opacity: 0; }
}

@media (max-width: 640px) {
  .floating-whatsapp {
    bottom: 18px;
    right: 18px;
    width: 50px;
    height: 50px;
  }
}
