/* ── eGENEe Stylesheet — Bright Blue & White Theme ─────────────── */

/* ── Fonts & Variables ──────────────────────────────────────────── */
:root {
  --blue-900: #0D2B6B;
  --blue-800: #1247A8;
  --blue-700: #1565C0;
  --blue-600: #1976D2;
  --blue-500: #2196F3;
  --blue-400: #42A5F5;
  --blue-300: #90CAF9;
  --blue-200: #BBDEFB;
  --blue-100: #E3F2FD;
  --blue-50:  #F0F8FF;

  --amber:    #FFC107;
  --amber-dk: #F9A825;

  --white:    #FFFFFF;
  --gray-900: #1a1a2e;
  --gray-700: #374151;
  --gray-500: #6B7280;
  --gray-300: #D1D5DB;
  --gray-100: #F3F4F6;

  --font-display: 'Roboto Flex', sans-serif;
  --font-body:    'DM Sans', system-ui, sans-serif;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  --shadow-sm: 0 1px 3px rgba(13,43,107,0.08);
  --shadow-md: 0 4px 16px rgba(13,43,107,0.12);

  --header-h: 58px;
  --max-w:    1160px;
}

/* ── Reset & Base ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--gray-900);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue-700); text-decoration: none; }
a:hover { color: var(--blue-500); }
img { max-width: 100%; display: block; }

/* ── Layout ──────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Header ──────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--blue-700);
  box-shadow: 0 2px 12px rgba(13,43,107,0.25);
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  font-family: "Roboto Flex", sans-serif;
  font-optical-sizing: auto;
  font-weight: 600;
  font-style: normal;
  font-variation-settings:
    "slnt" 0,
    "wdth" 100,
    "GRAD" 0,
    "XOPQ" 96,
    "XTRA" 468,
    "YOPQ" 79,
    "YTAS" 750,
    "YTDE" -203,
    "YTFI" 738,
    "YTLC" 514,
    "YTUC" 712;
  font-size: 22px;
  color: var(--white);
  letter-spacing: -0.5px;
  flex-shrink: 0;
}
}
.brand span { color: var(--blue-400); }

.main-nav { display: flex; gap: 4px; }
.nav-link {
  color: var(--blue-200);
  font-size: 14px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  transition: background 0.15s, color 0.15s;
}
.nav-link:hover        { background: rgba(255,255,255,0.12); color: var(--white); }
.nav-link.active       { background: rgba(255,255,255,0.18); color: var(--white); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

/* ── Hero ────────────────────────────────────────────────────────── */
.hero {
  background: var(--blue-700);
  padding: 5px 0 5px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(66,165,245,0.25) 0%, transparent 70%);
  pointer-events: none;
}
.hero-content { position: relative; }
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 44px);
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 12px;
}
.hero p {
  color: var(--blue-200);
  font-size: 17px;
  margin-bottom: 32px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.hero-search {
  display: flex;
  max-width: 580px;
  margin: 0 auto 36px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.2);
}
.hero-search input {
  flex: 1;
  padding: 16px 20px;
  font-size: 16px;
  font-family: var(--font-body);
  border: none;
  outline: none;
  background: var(--white);
  color: var(--gray-900);
}
.hero-search input::placeholder { color: var(--gray-500); }
.hero-search button {
  background: var(--amber);
  color: var(--gray-900);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  padding: 16px 28px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.hero-search button:hover { background: var(--amber-dk); }

.hero-stats {
  display: flex;
  gap: 40px;
  justify-content: center;
  flex-wrap: wrap;
}
.stat { text-align: center; }
.stat-num {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--white);
  line-height: 1;
}
.stat-lbl {
  font-size: 12px;
  color: var(--blue-300);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── Feature Cards ───────────────────────────────────────────────── */
.features {
  padding: 64px 0;
  background: var(--blue-50);
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 40px;
}
.feature-card {
  background: var(--white);
  border: 1px solid var(--blue-100);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  transition: box-shadow 0.2s, transform 0.2s;
}
.feature-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.feature-icon {
  width: 48px;
  height: 48px;
  background: var(--blue-100);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.feature-icon svg { width: 24px; height: 24px; stroke: var(--blue-700); }
.feature-card h3 { font-size: 15px; font-weight: 500; color: var(--gray-900); margin-bottom: 8px; }
.feature-card p  { font-size: 13px; color: var(--gray-500); line-height: 1.5; }

.section-heading {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--blue-900);
  text-align: center;
  margin-bottom: 8px;
}
.section-sub {
  text-align: center;
  color: var(--gray-500);
  font-size: 15px;
}

/* ── CTA Banner ──────────────────────────────────────────────────── */
.cta-banner {
  background: var(--blue-700);
  padding: 52px 0;
  text-align: center;
}
.cta-banner h2 {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--white);
  margin-bottom: 12px;
}
.cta-banner p {
  color: var(--blue-200);
  font-size: 16px;
  margin-bottom: 28px;
}
.btn-primary {
  display: inline-block;
  background: var(--amber);
  color: var(--gray-900);
  font-weight: 500;
  font-size: 15px;
  padding: 13px 32px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  text-decoration: none;
}
.btn-primary:hover { background: var(--amber-dk); color: var(--gray-900); transform: translateY(-1px); }
.btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--blue-700);
  font-weight: 500;
  font-size: 15px;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  border: 2px solid var(--blue-200);
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}
.btn-secondary:hover { background: var(--blue-100); color: var(--blue-700); }

/* ── Search Page ─────────────────────────────────────────────────── */
.search-hero {
  background: var(--blue-700);
  padding: 36px 0 28px;
}
.search-hero h1 {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--white);
  margin-bottom: 16px;
}
.search-bar-wrap {
  display: flex;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  max-width: 680px;
}
.search-bar-wrap input {
  flex: 1;
  padding: 14px 18px;
  font-size: 15px;
  font-family: var(--font-body);
  border: none;
  outline: none;
  background: var(--white);
  color: var(--gray-900);
}
.search-bar-wrap input::placeholder { color: var(--gray-500); }
.search-bar-wrap button {
  background: var(--amber);
  color: var(--gray-900);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  padding: 14px 24px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.search-bar-wrap button:hover { background: var(--amber-dk); }

/* ── Filters Bar ─────────────────────────────────────────────────── */
.filters-bar {
  background: var(--blue-100);
  border-bottom: 1px solid var(--blue-200);
  padding: 14px 0;
  position: sticky;
  top: var(--header-h);
  z-index: 50;
}
.filters-inner {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  flex-wrap: wrap;
}

/* ── Filter groups (keyword vs. delineated) ───────────────────────– */
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.filter-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--blue-700);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.filter-group-search {
  flex: 0 0 auto;
  min-width: 320px;
}
.filter-group-search input {
  font-family: var(--font-body);
  font-size: 16px;
  padding: 12px 14px;
  border: 1px solid var(--blue-300);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--gray-900);
  outline: none;
  transition: border-color 0.15s;
}
.filter-group-search input::placeholder { color: var(--gray-500); }
.filter-group-search input:focus { 
  border-color: var(--blue-500);
  box-shadow: 0 0 0 2px rgba(33,150,243,0.12);
}
.filter-group-filters {
  flex: 1;
  min-width: 300px;
}
.filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.filters-row select {
  font-family: var(--font-body);
  font-size: 13px;
  padding: 7px 10px;
  border: 1px solid var(--blue-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--blue-800);
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s;
}
.filters-row select:focus { border-color: var(--blue-500); }
.btn-clear {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--blue-700);
  background: none;
  border: none;
  cursor: pointer;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
  margin-left: auto;
}
.btn-clear:hover { background: var(--blue-200); }
.results-meta {
  width: 100%;
  font-size: 13px;
  color: var(--blue-700);
  text-align: right;
  margin-top: 4px;
}

/* ── Results Area ────────────────────────────────────────────────── */
.results-area { padding: 24px 0 48px; }

.state-msg {
  text-align: center;
  padding: 64px 24px;
  color: var(--gray-500);
}
.state-msg h3 { font-size: 18px; color: var(--gray-700); margin-bottom: 8px; }

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--blue-200);
  border-top-color: var(--blue-600);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}
.results-label {
  font-size: 13px;
  color: var(--blue-700);
  font-weight: 500;
  margin-bottom: 16px;
}


/* ── Resource Card ───────────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--blue-100);
  border-left: 3px solid var(--blue-500);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.15s;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }

.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.card-name { font-size: 14px; font-weight: 500; line-height: 1.4; }
.card-name a { color: var(--blue-800); }
.card-name a:hover { color: var(--blue-500); text-decoration: underline; }

.price-badge {
  font-size: 10px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}
.badge-Free  { background: #DCEEFB; color: #0D47A1; }
.badge-Inst  { background: #EDE7F6; color: #4527A0; }
.badge-Mixed { background: #E8F5E9; color: #1B5E20; }
.badge-Pay   { background: #FFF8E1; color: #E65100; }

.card-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--blue-50);
  color: var(--blue-800);
  border: 1px solid var(--blue-100);
}
.tag-geo { background: var(--gray-100); color: var(--gray-700); border-color: var(--gray-300); }

.card-years { font-size: 11px; color: var(--gray-500); }
.card-notes { font-size: 12px; color: var(--gray-500); font-style: italic; line-height: 1.4; }

/* ── Pagination ──────────────────────────────────────────────────── */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 36px;
  flex-wrap: wrap;
}
.page-btn {
  font-family: var(--font-body);
  font-size: 13px;
  padding: 7px 13px;
  border: 1px solid var(--blue-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--blue-700);
  cursor: pointer;
  transition: all 0.15s;
}
.page-btn:hover:not(:disabled) { background: var(--blue-100); border-color: var(--blue-400); }
.page-btn.active { background: var(--blue-700); color: var(--white); border-color: var(--blue-700); }
.page-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.page-gap { padding: 7px 4px; color: var(--gray-500); font-size: 13px; }

/* ── Inner Page Prose ────────────────────────────────────────────── */
.page-hero {
  background: var(--blue-700);
  padding: 40px 0 32px;
}
.page-hero h1 {
  font-family: var(--font-display);
  font-size: 32px;
  color: var(--white);
  margin-bottom: 8px;
}
.page-hero p { color: var(--blue-200); font-size: 16px; }

.prose-section { padding: 52px 0; }
.prose-section h2 {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--blue-900);
  margin-bottom: 12px;
}
.prose-section p { color: var(--gray-700); margin-bottom: 16px; line-height: 1.75; }

/* ── Contact Form ────────────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 6px;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--gray-900);
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.15s;
}
.form-group input:focus,
.form-group textarea:focus { border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(33,150,243,0.12); }
.form-group textarea { resize: vertical; min-height: 120px; }
.form-msg { font-size: 13px; margin-top: 12px; padding: 10px 14px; border-radius: var(--radius-sm); }
.form-msg.success { background: #E8F5E9; color: #1B5E20; }
.form-msg.error   { background: #FFEBEE; color: #B71C1C; }

/* ── Footer ──────────────────────────────────────────────────────── */
.site-footer {
  background: var(--blue-700);
  padding: 20px 0;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}
.footer-brand {
  margin: 0;
}
.footer-brand .brand {
  font-size: 20px;
  color: var(--white);
}
.footer-brand .brand span {
  color: var(--blue-300);
}
.footer-copy {
  font-size: 12px;
  color: var(--blue-300);
  margin: 0;
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .main-nav { display: none; flex-direction: column; position: absolute; top: var(--header-h); left: 0; right: 0; background: var(--blue-800); padding: 12px; gap: 4px; }
  .main-nav.open { display: flex; }
  .nav-toggle { display: flex; }
  .hero-stats { gap: 24px; }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .results-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .filters-inner select { max-width: 140px; font-size: 12px; }
  .footer-inner { flex-direction: column; text-align: center; }
}
@media (max-width: 480px) {
  .hero { padding: 40px 0 36px; }
  .hero-search { flex-direction: column; border-radius: var(--radius-md); }
  .hero-search input  { border-radius: var(--radius-md) var(--radius-md) 0 0; }
  .hero-search button { border-radius: 0 0 var(--radius-md) var(--radius-md); }
  .features-grid { grid-template-columns: 1fr; }
}
