/*
  ============================================================
  EHNCF Design System — Color Tokens from ehnnf.org
  ============================================================

  PRIMARY COLORS
  ─────────────────────────────────────────────────────────────
  --primary   : #13788C  — Main brand blue.
                Use for: primary buttons (CTA / submit / "Learn More"),
                active nav links, hover states on interactive elements,
                carousel controls/arrows, focus outlines (accessibility).

  --white     : #ffffff  — Main background for body, cards, content areas.

  SECONDARY COLORS
  ─────────────────────────────────────────────────────────────
  --gray-light : #f0f0f0 — Very light gray.
                Use for: social-icon containers, subtle section dividers,
                input field backgrounds, alternating-row backgrounds.

  --gray-dark  : #444444 — Dark gray.
                Use for: text on #f0f0f0 surfaces (social captions,
                secondary labels, helper text).

  TERTIARY / FUNCTIONAL COLORS
  ─────────────────────────────────────────────────────────────
  --overlay   : rgba(90,90,90,0.25)  — Semi-transparent gray (25 % opacity).
                Use for: lightbox / modal button backgrounds.
                Darken slightly on hover.

  --twitter   : #1da1f2 — Twitter / X brand color.
  --reddit    : #ff4500 — Reddit brand color.
  --whatsapp  : #25d366 — WhatsApp brand color.

  DERIVED / FALLBACK
  ─────────────────────────────────────────────────────────────
  --text-body : #5a5a5a — Solid dark gray. Default body-copy color on white.
  --text-sec  : #444444 — Same as --gray-dark, secondary/captions on light bg.
  ============================================================
*/

:root {
  /* ── Primary ───────────────────────────────── */
  --primary:        #13788C;   /* Main blue — CTAs, active links, focus rings */
  --primary-hover:  #0e5a6a;   /* 20 % darker — hover state of primary blue   */
  --white:          #ffffff;   /* Main background, cards, content areas        */

  /* ── Secondary ─────────────────────────────── */
  --gray-light:     #f0f0f0;   /* Icon containers, dividers, input backgrounds */
  --gray-dark:      #444444;   /* Text on #f0f0f0 surfaces, secondary labels   */

  /* ── Tertiary / Functional ─────────────────── */
  --overlay:        rgba(90,90,90,0.25); /* Modal / lightbox button bg          */
  --overlay-hover:  rgba(90,90,90,0.40); /* Slightly darker on hover            */
  --twitter:        #1da1f2;   /* Twitter/X icon & hover                       */
  --reddit:         #ff4500;   /* Reddit icon & hover                          */
  --whatsapp:       #25d366;   /* WhatsApp icon & hover                        */

  /* ── Derived / Fallback ────────────────────── */
  --text-body:      #5a5a5a;   /* Default body copy on white background        */
  --text-muted:     #444444;   /* Secondary / helper text on light backgrounds */

  /* ── Structural (no color change) ─────────── */
  --font-heading:   'Outfit', sans-serif;
  --font-body:      'Inter', sans-serif;
  --container-width: 1200px;
  --header-height:  80px;
  --radius:         12px;
  --transition:     all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow:         0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg:      0 10px 30px rgba(0,0,0,0.14);

  /* Derived accent surface (very light tint of primary) */
  --primary-tint:   rgba(19,120,140,0.07);
}

/* ── Reset & Base ──────────────────────────────────────────── */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text-body);     /* #5a5a5a — default body copy on white         */
  line-height: 1.6;
  background-color: var(--white); /* #ffffff — main page background            */
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--gray-dark);     /* #444444 — heading text default               */
}

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

ul { list-style: none; }

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

/* ── Accessibility: focus outline ─────────────────────────── */
:focus-visible {
  outline: 3px solid var(--primary); /* #13788C — focus ring for keyboard nav */
  outline-offset: 3px;
}

/* ── Utilities ─────────────────────────────────────────────── */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.section { padding: 80px 0; }

.text-center { text-align: center; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 2rem; }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-size: 1rem;
}

/* Primary button — #13788C background, white text */
.btn-primary {
  background-color: var(--primary); /* #13788C — main CTA color */
  color: var(--white);
}

.btn-primary:hover {
  background-color: var(--primary-hover); /* #0e5a6a — darkened primary on hover */
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* Secondary button — repurposed as a lighter call-to-action */
.btn-secondary {
  background-color: var(--white);
  color: var(--primary);         /* #13788C text on white */
  border: 2px solid var(--primary);
}

.btn-secondary:hover {
  background-color: var(--primary); /* Fill with primary on hover */
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* Outline variant — transparent with primary border */
.btn-outline {
  border: 2px solid var(--primary); /* #13788C border */
  color: var(--primary);
  background: transparent;
}

.btn-outline:hover {
  background-color: var(--primary); /* #13788C fill on hover */
  color: var(--white);
}

/* ── Navigation ─────────────────────────────────────────────── */
.navbar {
  height: var(--header-height);
  display: flex;
  align-items: center;
  background: var(--white);      /* #ffffff — nav background */
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

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

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 65px;
  width: auto;
  object-fit: contain;
  transition: var(--transition);
}

.logo:hover img {
  transform: scale(1.05);
}

.nav-links {
  display: flex;
  gap: 24px;
}

.nav-links a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-body);       /* #5a5a5a — default nav text */
  position: relative;
}

/* Active or hovered nav link → primary blue */
.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);         /* #13788C — active / hover nav link */
}

/* Animated underline indicator */
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);    /* #13788C — underline accent */
  transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Fix for btn-primary in nav links to prevent invisible text */
.nav-links a.btn-primary.active,
.nav-links a.btn-primary:hover {
  color: #000000;
}

.nav-links a.btn-primary::after {
  display: none;
}

/* Hamburger icon */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  background: none;
  border: none;
}

.hamburger span {
  width: 30px;
  height: 3px;
  background: var(--primary);    /* #13788C — hamburger lines */
  border-radius: 2px;
  transition: var(--transition);
  transform-origin: center;
}

/* ── Hero Section ────────────────────────────────────────────── */
.hero {
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
  /* Light tint of primary blue as gradient backdrop */
  background: linear-gradient(135deg, var(--primary-tint) 0%, rgba(240,240,240,0.4) 100%);
  position: relative;
  overflow: hidden;
}

.hero-content { max-width: 700px; }

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  color: var(--primary);         /* #13788C — hero headline */
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-body);       /* #5a5a5a — hero sub-copy */
  margin-bottom: 2.5rem;
}

.hero-image {
  position: absolute;
  right: -5%;
  top: 50%;
  transform: translateY(-50%);
  width: 45%;
  z-index: -1;
  opacity: 0.8;
}

/* ── Partner Carousel ─────────────────────────────────────────── */
.partners-section {
  background: var(--gray-light); /* #f0f0f0 — subtle section background */
  padding: 40px 0;
  border-top: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
}

.carousel-container {
  overflow: hidden;
  white-space: nowrap;
  position: relative;
}

.carousel-track {
  display: inline-flex;
  animation: scroll 30s linear infinite;
}

.carousel-track:hover { animation-play-state: paused; }

.partner-logo {
  width: 180px;
  height: 90px;
  margin: 0 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);      /* #ffffff — card background */
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  border: 1px solid #eee;
  transition: var(--transition);
}

.partner-logo img {
  max-width: 85%;
  max-height: 85%;
  object-fit: contain;
  transition: var(--transition);
}

.partner-logo:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,122,255,0.1);
  border-color: var(--primary);
}

/* Carousel arrow controls */
.carousel-btn {
  background: var(--primary);    /* #13788C — carousel nav button */
  color: var(--white);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  transition: var(--transition);
}

.carousel-btn:hover {
  background: var(--primary-hover); /* #0e5a6a — darker on hover */
}

@keyframes scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── Cards & Components ───────────────────────────────────────── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.card {
  background: var(--white);      /* #ffffff — card background */
  padding: 30px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid #e8e8e8;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);  /* #13788C — highlight border on hover */
}

/* Icon box inside cards */
.icon-box {
  width: 60px;
  height: 60px;
  background: var(--primary-tint); /* Light tint of primary */
  color: var(--primary);          /* #13788C — icon color */
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 1.5rem;
}

/* ── Lightbox / Modal Buttons ─────────────────────────────────── */
.lightbox-btn {
  background: var(--overlay);    /* rgba(90,90,90,0.25) — semi-transparent */
  color: var(--white);
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-btn:hover {
  background: var(--overlay-hover); /* rgba(90,90,90,0.40) — slightly darker */
}

/* ── Social Media Icons ───────────────────────────────────────── */
.social-icon-wrap {
  background: var(--gray-light); /* #f0f0f0 — container for social icon */
  border-radius: 8px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

/* Generic social text / caption on light bg */
.social-caption {
  color: var(--gray-dark);       /* #444444 — text on #f0f0f0 */
  font-size: 0.8rem;
}

/* Platform-specific brand colors */
.social-twitter  { color: var(--twitter);  } /* #1da1f2 */
.social-reddit   { color: var(--reddit);   } /* #ff4500 */
.social-whatsapp { color: var(--whatsapp); } /* #25d366 */

.social-icon-wrap.twitter:hover  { background: var(--twitter);  color: white; }
.social-icon-wrap.reddit:hover   { background: var(--reddit);   color: white; }
.social-icon-wrap.whatsapp:hover { background: var(--whatsapp); color: white; }

/* ── Footer ───────────────────────────────────────────────────── */
footer {
  background: var(--primary);    /* #13788C — footer background (brand blue) */
  color: var(--white);
  padding: 80px 0 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 60px;
}

.footer-col h3 {
  margin-bottom: 25px;
  font-size: 1.2rem;
  color: var(--white);           /* #ffffff — footer heading */
  position: relative;
}

.footer-col h3::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 40px;
  height: 3px;
  background: rgba(255,255,255,0.4); /* subtle white underline */
}

.footer-links li { margin-bottom: 12px; }

.footer-links a {
  transition: var(--transition);
  display: inline-block;
  color: rgba(255,255,255,0.75); /* Muted white for footer links */
}

.footer-links a:hover {
  color: var(--white);           /* #ffffff — bright on hover */
  transform: translateX(5px);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
}

.footer-attribution {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 40px;
  margin-top: 30px;
  padding-top: 25px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.attr-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.85rem;
  font-weight: 500;
}

.attr-item img {
  height: 40px;
  width: auto;
  object-fit: contain;
  opacity: 0.8;
  transition: all 0.3s ease;
}

.attr-item img:hover {
  opacity: 1;
  filter: none; /* Shows original colors on hover */
}


/* ── Chatbot Widget ───────────────────────────────────────────── */
.chatbot-widget {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 9999;
}

/* Bubble trigger button — primary blue */
.chatbot-bubble {
  position: relative;
  width: 60px;
  height: 60px;
  background: var(--primary);    /* #13788C — chatbot trigger */
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
  border: none;
  font-size: 1.4rem;
}

.chatbot-label {
  position: absolute;
  right: 75px;
  bottom: 12px;
  background: var(--white);
  color: var(--primary);
  padding: 8px 18px;
  border-radius: 20px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.12);
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
  border: 1px solid rgba(19, 120, 140, 0.1);
}

.chatbot-label::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  border-left: 6px solid var(--white);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}


.chatbot-bubble:hover {
  background: var(--primary-hover); /* #0e5a6a */
  transform: scale(1.1);
}

.chatbot-window {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 350px;
  height: 450px;
  background: var(--white);     /* #ffffff — chat panel bg */
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: none;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #e0e0e0;
}

/* Chat header — primary blue band */
.chatbot-header {
  background: var(--primary);   /* #13788C */
  color: var(--white);
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chatbot-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.message {
  padding: 10px 15px;
  border-radius: 15px;
  max-width: 80%;
  font-size: 0.9rem;
}

/* Bot messages — light gray bubble */
.message.bot {
  background: var(--gray-light); /* #f0f0f0 */
  color: var(--text-body);       /* #5a5a5a */
  align-self: flex-start;
  border-bottom-left-radius: 2px;
}

/* User messages — primary blue bubble */
.message.user {
  background: var(--primary);   /* #13788C */
  color: var(--white);
  align-self: flex-end;
  border-bottom-right-radius: 2px;
}

.chatbot-input {
  padding: 15px;
  border-top: 1px solid #e8e8e8;
  display: flex;
  gap: 10px;
}

/* Input field — gray-light background */
.chatbot-input input {
  flex: 1;
  border: 1px solid #ddd;
  background: var(--gray-light); /* #f0f0f0 — input field background */
  color: var(--text-body);       /* #5a5a5a */
  padding: 8px 15px;
  border-radius: 20px;
  outline: none;
  transition: var(--transition);
}

.chatbot-input input:focus {
  border-color: var(--primary);  /* #13788C — focus ring on input */
  background: var(--white);
}

/* ── Skip Link (accessibility) ──────────────────────────────── */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary);   /* #13788C */
  color: var(--white);
  padding: 8px 16px;
  z-index: 9999;
  transition: top .2s;
}
.skip-link:focus { top: 0; }

/* ── Reveal animation (JS-driven) ───────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .5s ease, transform .5s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 992px) {
  .hero h1 { font-size: 2.8rem; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .navbar { position: sticky; }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background: var(--white);    /* #ffffff — mobile dropdown bg */
    flex-direction: column;
    padding: 20px 28px;
    box-shadow: var(--shadow);
    border-top: 1px solid var(--gray-light); /* #f0f0f0 — divider */
    z-index: 999;
  }

  .nav-links.active {
    display: flex;
    animation: slideDown .25s ease;
  }

  @keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  .hamburger { display: flex; }

  /* Hamburger → X animation */
  .hamburger.open span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
  .hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
  .hamburger.open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

  .hero {
    text-align: center;
    padding-top: 60px;
    padding-bottom: 60px;
  }

  .hero-content { margin: 0 auto; }

  .hero-image {
    position: static;
    transform: none;
    width: 80%;
    margin: 40px auto 0;
  }

  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 20px; text-align: center; }
}

/* Override hero h1 color */
.page-hero h1 { color: #fff !important; }

