/* ------------------------------------------------------------------
   GujPsychSurvey — Modern Clinical Portal Theme
------------------------------------------------------------------- */
:root {
  /* Colors from screenshot */
  --bg: #f8fafc;            /* Very light cool gray background */
  --surface: #ffffff;
  --ink: #0f172a;           /* Dark navy for headings */
  --muted: #475569;         /* Slate gray for text */
  --accent: #1d4ed8;        /* Clinical blue for primary buttons */
  --accent-hover: #1e40af;
  --accent-soft: #eff6ff;   /* Light blue for tags/badges */
  --line: #e2e8f0;          /* Subtle borders */
  --alert-bg: #fef2f2;      /* Light red for urgent banner */
  --alert-ink: #991b1b;     /* Dark red text */
  
  /* Typography */
  --sans: "DM Sans", system-ui, -apple-system, sans-serif;
  --serif: "Cormorant Garamond", Georgia, serif; /* Kept for larger headings if needed */
  
  --radius: 12px;
  --maxw: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 1rem; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 2rem; }

/* ---------- Top Alert Bar ---------- */
.top-alert {
  background: var(--alert-bg); color: var(--alert-ink);
  text-align: center; padding: 0.5rem 1rem; font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
}

/* ---------- Header / Nav ---------- */
.site-header { 
  background: var(--surface); 
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; }
.brand { font-size: 1.4rem; font-weight: 600; color: var(--ink); text-decoration: none; }
.brand em { color: var(--accent); font-style: normal; }

#main-nav ul { display: flex; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
#main-nav a { color: var(--muted); font-weight: 500; font-size: 0.95rem; text-decoration: none; }
#main-nav a:hover, #main-nav a[aria-current="page"] { color: var(--accent); }
.hamburger { display: none; background: none; border: none; cursor: pointer; }

/* ---------- Hero Section ---------- */
.hero { 
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 4rem 0; 
  max-width: 800px; /* This keeps the text from stretching too wide */
  margin: 0 auto;   /* This centers the whole block on the page */
}
.hero-tag {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--accent-soft); color: var(--accent);
  font-size: 0.85rem; font-weight: 600; padding: 0.4rem 1rem; 
  border-radius: 999px; margin-bottom: 1.5rem; border: 1px solid #bfdbfe;
}
.hero h1 { font-size: clamp(2.2rem, 4vw, 3.2rem); line-height: 1.15; margin: 0 0 1rem; font-weight: 700; letter-spacing: -0.02em; }
.hero p.lead { font-size: 1.15rem; color: var(--muted); margin: 0 0 2rem; max-width: 90%; }
.hero-actions { 
  display: flex; 
  flex-wrap: wrap; 
  gap: 1rem; 
  margin-bottom: 1.5rem; 
  justify-content: center; /* Centers the buttons */
}
/* Buttons */
.btn-primary, .btn-secondary {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.75rem 1.5rem; border-radius: 8px; font-weight: 600;
  text-decoration: none; transition: all 0.2s; font-size: 1rem;
}
.btn-primary { background: var(--accent); color: #fff; border: 1px solid var(--accent); }
.btn-primary:hover { background: var(--accent-hover); text-decoration: none; }
.btn-secondary { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn-secondary:hover { background: var(--accent-soft); text-decoration: none; }

.hero-badges { display: flex; gap: 1rem; font-size: 0.85rem; color: var(--muted); }
.hero-badges span { display: flex; align-items: center; gap: 0.4rem; }
.hero-badges span::before { content: "✓"; color: #10b981; font-weight: bold; }

/* Mockup Abstract Block (Right side of hero) */
.hero-mockup {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.5rem; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}
.mockup-bar { height: 12px; background: var(--line); border-radius: 4px; margin-bottom: 1rem; }
.mockup-bar.w-75 { width: 75%; }
.mockup-bar.w-50 { width: 50%; }
.mockup-bar.w-100 { width: 100%; }
.mockup-meta { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--muted); margin-top: 1.5rem; }

/* ---------- Stats Grid ---------- */
.stats-section { padding: 2rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; text-align: center; }
.stat-card { padding: 1rem; }
.stat-number { font-size: 2rem; font-weight: 700; color: var(--accent); line-height: 1; margin-bottom: 0.5rem; }
.stat-label { font-size: 0.9rem; color: var(--muted); font-weight: 500; }

/* ---------- Search Bar ---------- */
.search-section { padding: 3rem 0; text-align: center; }
.search-section h3 { margin-bottom: 1rem; font-weight: 600; }
.search-wrapper { 
  display: flex; max-width: 700px; margin: 0 auto; 
  background: var(--surface); border: 1px solid var(--line); 
  border-radius: 999px; padding: 0.5rem; box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.search-wrapper input { 
  flex: 1; border: none; background: transparent; padding: 0.75rem 1rem; 
  font-size: 1rem; outline: none; font-family: inherit;
}
.search-wrapper button { padding: 0.75rem 2rem; border-radius: 999px; }

/* ---------- How It Works ---------- */
.how-it-works { padding: 4rem 0; }
.section-title { text-align: center; margin-bottom: 3rem; }
.section-title h2 { font-size: 1.8rem; margin-bottom: 0.5rem; }
.section-title p { color: var(--muted); font-size: 1.1rem; }
.steps-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.step-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 2rem; position: relative;
}
.step-num {
  width: 32px; height: 32px; background: var(--accent-soft); color: var(--accent);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 700; margin-bottom: 1rem;
}
.step-card h3 { font-size: 1.2rem; margin: 0 0 0.5rem; }
.step-card p { font-size: 0.95rem; color: var(--muted); margin: 0; }

/* ---------- Featured Research ---------- */
.featured-section { padding: 3rem 0 5rem; border-top: 1px solid var(--line); }
.featured-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 2rem; }
.featured-header h2 { margin: 0 0 0.5rem; font-size: 1.8rem; }
.featured-header p { margin: 0; color: var(--muted); }
.featured-header a { font-weight: 500; font-size: 0.95rem; }
.empty-state { 
  background: var(--surface); border: 1px dashed var(--line); 
  border-radius: var(--radius); padding: 3rem; text-align: center; color: var(--muted); 
}

/* ---------- Footer ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding: 3rem 0; text-align: center; color: var(--muted); font-size: 0.9rem; }

/* Responsive */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero-badges { justify-content: center; }
  .hero-actions { justify-content: center; }
  .hero-mockup { display: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid { grid-template-columns: 1fr; }
  .featured-header { flex-direction: column; align-items: flex-start; gap: 1rem; }
}

@media (max-width: 768px) {
  .hamburger { display: block; }
  #main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--surface); padding: 1rem; border-bottom: 1px solid var(--line); }
  #main-nav.open { display: block; }
  #main-nav ul { flex-direction: column; gap: 1rem; }
}

/* ---------- Footer ---------- */
.site-footer { 
  background: var(--surface); 
  border-top: 1px solid var(--line); 
  padding: 3rem 0 2rem; 
  color: var(--muted); 
  font-size: 0.9rem; 
  line-height: 1.6;
}

.site-footer a { 
  color: var(--accent); 
  text-decoration: none; 
}
.site-footer a:hover { 
  text-decoration: underline; 
}

.footer-top {
  margin-bottom: 1.5rem;
}

.footer-email {
  font-size: 1.1rem;
  font-weight: 600;
}

.footer-maintainer {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.footer-maintainer p {
  margin: 0 0 0.5rem 0;
}

.footer-links { 
  display: flex; 
  flex-wrap: wrap; 
  gap: 0.75rem 1.25rem; 
  margin-top: 0.5rem;
  justify-content: center; /* <-this brings links in centre */
}

.footer-disclaimer {
  font-size: 0.85rem;
  color: #64748b; /* Slightly lighter gray for legal text */
  margin-bottom: 1.5rem;
}

.footer-bottom {
  text-align: center;
  font-size: 0.85rem;
  color: #94a3b8;
}

/* --- Mobile Header Fix --- */
@media (max-width: 900px) {
  /* Hide the text links */
  #main-nav ul {
    display: none; 
    flex-direction: column;
    width: 100%;
    margin-top: 1rem;
  }
  
  /* Show the links when the hamburger is clicked */
  #main-nav.open ul {
    display: flex;
  }

  /* Make the nav container drop down below the header */
  #main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    display: none;
  }

  #main-nav.open {
    display: block;
  }

  /* Show the hamburger button */
  .hamburger {
    display: block;
  }
}

/* --- Responsive Header & Hamburger Menu --- */

/* Hide hamburger on large screens */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

/* Hamburger lines styling */
.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--ink);
  margin: 5px 0;
  transition: 0.3s;
}

/* On screens smaller than 1060px (Tablets & Phones) */
@media (max-width: 1060px) {
  /* 1. Show the hamburger button */
  .hamburger {
    display: block;
  }

  /* 2. Hide the main navigation by default */
  #main-nav {
    display: none; 
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    padding: 1rem;
  }

  /* 3. Show the navigation when the 'open' class is added via JS */
  #main-nav.open {
    display: block;
  }

  /* 4. Make the links stack vertically instead of horizontally */
  #main-nav ul {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  #main-nav ul li {
    width: 100%;
  }
  
  #main-nav ul li a {
    display: block;
    padding: 0.75rem 1rem;
  }
}

/* --- BILINGUAL TYPOGRAPHY --- */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Gujarati:wght@400;500;700&display=swap');

html[lang="gu"] body {
  /* Fallback to Noto Sans Gujarati for Gujarati text */
  font-family: 'Noto Sans Gujarati', 'DM Sans', sans-serif;
  /* Gujarati script often needs a tiny bit more line-height for legibility */
  line-height: 1.6; 
}

html[lang="gu"] h1, 
html[lang="gu"] h2, 
html[lang="gu"] h3 {
  line-height: 1.3;
}

#lang-toggle {
  background: var(--surface);
  border: 2px solid var(--line);
  color: var(--accent); /* Changed to blue to make it highlight */
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: 'DM Sans', 'Noto Sans Gujarati', sans-serif;
  font-weight: 600; /* Made slightly bolder */
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

#lang-toggle:hover {
  background: var(--accent); /* Solid blue background on hover */
  color: #ffffff; /* White text on hover */
  border-color: var(--accent);
}