/* ═══════════════════════════════════════════════════════════════
   NEONATOLOGY HOMEPAGE DESIGN SYSTEM v4.0
   Warm · Clinical · Trustworthy · Physician-grade
   ═══════════════════════════════════════════════════════════════ */

/* ── BASE OVERRIDES (homepage only) ─────────────────────────── */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans, 'Plus Jakarta Sans', system-ui, sans-serif);
  background: #fafaf9;
  color: #1c1917;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Reset heading gradients from shared-styles that make text invisible */
#main-content h1,
#main-content h2,
#main-content h3,
#main-content h4 {
  -webkit-text-fill-color: unset;
  -webkit-background-clip: unset;
  background-clip: unset;
  color: inherit;
}

/* Skip link (accessibility) */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  z-index: 9999;
  padding: 0.75rem 1.25rem;
  background: #0d9488;
  color: #fff;
  font-weight: 700;
  font-size: 0.875rem;
  border-radius: 0 0 8px 0;
  transition: top 0.2s ease;
  text-decoration: none;
}
.skip-link:focus {
  top: 0;
}

/* Override layout.js ambient blobs to be warmer */
.blob-1 { background: rgba(13, 148, 136, 0.12) !important; }
.blob-2 { background: rgba(251, 146, 60, 0.08) !important; }
.blob-3 { background: rgba(8, 145, 178, 0.10) !important; }

/* ── HERO SECTION ───────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--header-height, 64px) + 2rem);
  padding-bottom: 4rem;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 10% 10%, rgba(13, 148, 136, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 90% 90%, rgba(251, 146, 60, 0.04) 0%, transparent 55%),
    linear-gradient(180deg, #fafaf9 0%, #f5f5f4 100%);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%230d9488' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.6;
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

@media (max-width: 900px) {
  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }
}

/* Hero content */
.hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  width: fit-content;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  background: rgba(13, 148, 136, 0.08);
  border: 1px solid rgba(13, 148, 136, 0.18);
  color: #0f766e;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  animation: fadeInDown 0.6s ease both;
}

.hero-badge svg {
  width: 14px;
  height: 14px;
  color: #0d9488;
}

@media (max-width: 900px) {
  .hero-badge {
    margin: 0 auto;
  }
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.04em;
  color: #1c1917;
  animation: fadeInUp 0.6s 0.1s ease both;
}

.hero-title em {
  font-style: normal;
  background: linear-gradient(135deg, #0d9488 0%, #0891b2 50%, #0284c7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: #57534e;
  max-width: 480px;
  line-height: 1.7;
  animation: fadeInUp 0.6s 0.2s ease both;
}

@media (max-width: 900px) {
  .hero-subtitle {
    margin: 0 auto;
    max-width: 520px;
  }
}

.hero-actions {
  display: flex;
  gap: 0.875rem;
  flex-wrap: wrap;
  animation: fadeInUp 0.6s 0.3s ease both;
}

@media (max-width: 900px) {
  .hero-actions {
    justify-content: center;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.8rem 1.8rem;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #0d9488, #0369a1);
  color: #fff;
  box-shadow: 0 4px 16px rgba(13, 148, 136, 0.28);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(13, 148, 136, 0.38);
}

.btn-secondary {
  background: #fff;
  color: #44403c;
  border: 1.5px solid #e7e5e4;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.btn-secondary:hover {
  border-color: #0d9488;
  color: #0d9488;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.05);
}

/* Hero visual */
.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  animation: fadeInUp 0.8s 0.25s ease both;
}

.hero-visual svg {
  width: 100%;
  max-width: 420px;
  height: auto;
  filter: drop-shadow(0 20px 40px rgba(13, 148, 136, 0.12));
}

.hero-image {
  width: 100%;
  max-width: 420px;
  height: auto;
  border-radius: 24px;
  object-fit: cover;
  box-shadow: 0 20px 60px rgba(13, 148, 136, 0.15);
  transition: transform 0.3s ease;
}

.hero-image:hover {
  transform: scale(1.02);
}

/* Floating stat bar */
.hero-stats {
  display: inline-flex;
  gap: 0;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 16px;
  padding: 1.25rem 2rem;
  box-shadow: 0 12px 40px -8px rgba(0,0,0,0.06);
  animation: fadeInUp 0.6s 0.4s ease both;
  width: fit-content;
}

@media (max-width: 900px) {
  .hero-stats {
    margin: 0 auto;
  }
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0 1.75rem;
  border-right: 1px solid rgba(0,0,0,0.06);
}

.stat-item:last-child {
  border-right: none;
}

.stat-number {
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #0d9488, #0369a1);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}

.stat-label {
  font-size: 0.7rem;
  color: #78716c;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  white-space: nowrap;
}

/* Trust pills */
.hero-trust {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  animation: fadeInUp 0.6s 0.35s ease both;
}

@media (max-width: 900px) {
  .hero-trust {
    justify-content: center;
  }
}

.trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(13, 148, 136, 0.15);
  background: rgba(255,255,255,0.6);
  color: #57534e;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.trust-pill svg {
  width: 12px;
  height: 12px;
  color: #0d9488;
}

/* ── WORKFLOW SECTION ───────────────────────────────────────── */
.workflow-section {
  padding: 4rem 0 3rem;
  background: linear-gradient(180deg, #f5f5f4 0%, #fafaf9 100%);
  position: relative;
}

.workflow-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(13,148,136,0.15), transparent);
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #0d9488;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #1c1917;
  margin-bottom: 0.5rem;
}

.section-title span {
  background: linear-gradient(135deg, #0d9488, #0369a1);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-description {
  font-size: 1rem;
  color: #78716c;
  max-width: 480px;
  margin: 0 auto;
}

.workflow-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  position: relative;
}

@media (max-width: 768px) {
  .workflow-grid {
    grid-template-columns: 1fr;
  }
}

.workflow-card {
  position: relative;
  background: #fff;
  border: 1px solid #e7e5e4;
  border-radius: 20px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 20px -4px rgba(0,0,0,0.04);
}

.workflow-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px -8px rgba(13, 148, 136, 0.12);
  border-color: rgba(13, 148, 136, 0.25);
}

.workflow-card::after {
  content: '';
  position: absolute;
  inset: auto -10% -60% -10%;
  height: 100px;
  background: radial-gradient(circle at top, rgba(13, 148, 136, 0.08), transparent 70%);
  pointer-events: none;
}

.workflow-step {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(13,148,136,0.1), rgba(3,105,161,0.08));
  border: 1px solid rgba(13,148,136,0.15);
  display: grid;
  place-items: center;
  margin: 0 auto 1rem;
  font-size: 0.85rem;
  font-weight: 800;
  color: #0d9488;
}

.workflow-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #292524;
  margin-bottom: 0.4rem;
}

.workflow-card p {
  font-size: 0.9rem;
  color: #78716c;
  line-height: 1.6;
  margin: 0;
}

/* Connector line for desktop */
@media (min-width: 769px) {
  .workflow-grid::before {
    content: '';
    position: absolute;
    top: 40px;
    left: 20%;
    right: 20%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #e7e5e4 20%, #e7e5e4 80%, transparent);
    z-index: 0;
  }
  .workflow-card {
    z-index: 1;
  }
}

/* ── TOOLS SECTION ──────────────────────────────────────────── */
.tools-section {
  padding: 4rem 0;
  background: #fafaf9;
  position: relative;
}

.tools-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(13,148,136,0.15), transparent);
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

@media (max-width: 1024px) {
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .tools-grid {
    grid-template-columns: 1fr;
  }
}

.tool-card {
  background: #fff;
  border: 1px solid #e7e5e4;
  border-radius: 20px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 20px -4px rgba(0,0,0,0.03);
  position: relative;
  overflow: hidden;
}

.tool-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px -8px rgba(13, 148, 136, 0.12);
  border-color: rgba(13, 148, 136, 0.2);
}

/* Shimmer on hover */
.tool-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 25%, rgba(255,255,255,0.5) 48%, transparent 70%);
  transform: translateX(-130%);
  transition: transform 0.8s ease;
  pointer-events: none;
}

.tool-card:hover::before {
  transform: translateX(130%);
}

.tool-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(13,148,136,0.08), rgba(3,105,161,0.06));
  border: 1px solid rgba(13,148,136,0.12);
  display: grid;
  place-items: center;
  margin-bottom: 1.25rem;
  color: #0d9488;
  transition: all 0.25s ease;
}

.tool-card:hover .tool-icon {
  background: linear-gradient(135deg, #0d9488, #0369a1);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.25);
  transform: scale(1.05) rotate(-2deg);
}

.tool-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tool-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1c1917;
  margin-bottom: 0.4rem;
  letter-spacing: -0.02em;
}

.tool-card:hover .tool-title {
  color: #0f766e;
}

.tool-description {
  font-size: 0.875rem;
  color: #78716c;
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.tool-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #0d9488;
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  padding: 0.55rem 1rem;
  border-radius: 10px;
  background: rgba(13, 148, 136, 0.06);
  border: 1px solid rgba(13, 148, 136, 0.12);
  transition: all 0.2s ease;
  width: fit-content;
}

.tool-link svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s ease;
}

.tool-link:hover {
  background: linear-gradient(135deg, #0d9488, #0369a1);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.25);
  gap: 0.6rem;
}

.tool-link:hover svg {
  transform: translateX(3px);
}

/* ── ABOUT / TRUST SECTION ──────────────────────────────────── */
.about-section {
  padding: 4rem 0;
  background: linear-gradient(135deg, #f5f5f4 0%, #ecfdf5 40%, #f0f9ff 100%);
  position: relative;
  overflow: hidden;
}

.about-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 80% 20%, rgba(13, 148, 136, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 20% 80%, rgba(251, 146, 60, 0.04) 0%, transparent 60%);
  pointer-events: none;
}

.about-content {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}

.about-content > p {
  color: #57534e;
  font-size: 1.05rem;
  line-height: 1.75;
  margin-bottom: 2rem;
}

.about-features {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.feature {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  color: #44403c;
  background: rgba(255,255,255,0.7);
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(13, 148, 136, 0.12);
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  backdrop-filter: blur(8px);
}

.feature svg {
  width: 16px;
  height: 16px;
  color: #10b981;
  stroke-width: 2.5;
}

/* ── CONTACT SECTION ────────────────────────────────────────── */
.contact-section {
  padding: 4rem 0;
  background: #fafaf9;
  position: relative;
}

.contact-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(13,148,136,0.12), transparent);
}

.contact-content {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}

.contact-content > p {
  color: #78716c;
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  align-items: center;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e7e5e4;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  transition: all 0.2s ease;
  width: fit-content;
}

.contact-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.05);
}

.contact-link svg {
  width: 20px;
  height: 20px;
}

.contact-link-telegram {
  color: #229ED9;
}
.contact-link-telegram:hover {
  border-color: rgba(34, 158, 217, 0.3);
}

.contact-link-email {
  color: #8b5cf6;
}
.contact-link-email:hover {
  border-color: rgba(139, 92, 246, 0.3);
}

/* ── ANIMATIONS ─────────────────────────────────────────────── */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── REVEAL ON SCROLL ───────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero {
    min-height: auto;
    padding-top: calc(var(--header-height, 64px) + 1.5rem);
    padding-bottom: 3rem;
  }

  .hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    padding: 1rem;
    width: 100%;
    max-width: 320px;
  }

  .stat-item {
    padding: 0;
    border-right: none;
  }

  .stat-number {
    font-size: 1.3rem;
  }

  .workflow-grid {
    grid-template-columns: 1fr;
  }

  .workflow-grid::before {
    display: none;
  }

  .about-features {
    flex-direction: column;
    align-items: center;
  }

  .feature {
    width: 100%;
    max-width: 260px;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

  .hero-actions .btn {
    flex: 1;
    min-width: 130px;
  }

  .tool-card {
    padding: 1.25rem;
  }

  .contact-link {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }
}

/* ═══════════════════════════════════════════════════════════════
   LAYOUT.JS INJECTED ELEMENTS STYLES
   Header, Nav, Footer, Tab Bar, Donate — properly constrained
   ═══════════════════════════════════════════════════════════════ */

/* ── HEADER ─────────────────────────────────────────────────── */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(250, 250, 249, 0.85) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border-bottom: 1px solid rgba(13, 148, 136, 0.1) !important;
  box-shadow: 0 1px 0 rgba(255,255,255,0.8), 0 4px 20px rgba(13,148,136,0.06) !important;
  z-index: 500;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.logo-icon {
  width: 32px;
  height: 32px;
  color: #0d9488;
  flex-shrink: 0;
}

.logo svg {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-text h1 {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #1c1917;
  line-height: 1.2;
  margin: 0;
}

.logo-developer {
  font-size: 0.68rem;
  color: #78716c;
  line-height: 1;
}

.logo-developer a {
  color: inherit;
  text-decoration: none;
}

.logo-developer strong {
  font-weight: 600;
  color: #0d9488;
}

/* Nav */
.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 0.45rem 0.9rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #78716c;
  text-decoration: none;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.nav-link:hover {
  background: rgba(13, 148, 136, 0.08);
  color: #0d9488;
}

.nav-link.active {
  background: linear-gradient(135deg, #0d9488, #0369a1);
  color: #fff;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.3);
}

/* Header actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(13, 148, 136, 0.2);
  background: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #78716c;
  transition: all 0.18s ease;
}

.theme-toggle:hover {
  background: rgba(13, 148, 136, 0.08);
  border-color: #0d9488;
  color: #0d9488;
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

.mobile-menu-btn {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(13, 148, 136, 0.15);
  background: #fff;
  place-items: center;
  cursor: pointer;
  color: #57534e;
}

.mobile-menu-btn svg {
  width: 20px;
  height: 20px;
}

/* Donate header button */
.donate-header-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  background: linear-gradient(135deg, #a855f7, #8b5cf6);
  color: #fff !important;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 10px rgba(139, 92, 246, 0.3);
  white-space: nowrap;
}

.donate-header-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4);
}

/* ── BOTTOM TAB BAR ─────────────────────────────────────────── */
.bottom-tab-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(250, 250, 249, 0.92);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-top: 1px solid rgba(13, 148, 136, 0.1);
  box-shadow: 0 -4px 24px rgba(13, 148, 136, 0.06);
  padding: 0.5rem 0;
  padding-bottom: env(safe-area-inset-bottom, 0.5rem);
  z-index: 400;
  justify-content: space-around;
  align-items: center;
}

.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.4rem 0.8rem;
  border-radius: 12px;
  text-decoration: none;
  color: #a8a29e;
  font-size: 0.65rem;
  font-weight: 600;
  transition: all 0.18s ease;
  letter-spacing: 0.03em;
}

.tab-item svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.8;
  transition: all 0.18s;
}

.tab-item:hover {
  color: #0d9488;
}

.tab-item.active {
  color: #0d9488;
  background: rgba(13, 148, 136, 0.08);
}

.tab-item.active svg {
  stroke-width: 2.2;
}

/* ── FOOTER ─────────────────────────────────────────────────── */
.footer {
  background: linear-gradient(180deg, #0f172a 0%, #020617 100%) !important;
  color: #94a3b8;
  padding: 3rem 0 0;
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.4), transparent);
}

.footer-content {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.5rem 2.5rem;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.5fr;
  gap: 2rem;
  position: relative;
  z-index: 1;
}

.footer-col h3 {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-col h4 {
  color: #38bdf8;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.footer-col p {
  color: #94a3b8;
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-links li {
  margin: 0;
}

.footer-links a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.15s;
}

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  text-align: center;
  padding: 1.25rem 1.5rem;
  font-size: 0.8rem;
  color: #64748b;
}

.footer svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.footer a[href] {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  font-weight: 500;
}

/* ── DONATE WRAPPER ─────────────────────────────────────────── */
.donate-wrapper {
  text-align: center;
  padding: 2.5rem 2rem;
  background: linear-gradient(135deg, rgba(243,232,255,0.8) 0%, rgba(233,213,255,0.8) 100%) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(216,180,254,0.5) !important;
  border-radius: 24px !important;
  max-width: 680px !important;
  margin: 3rem auto !important;
  box-shadow: 0 20px 40px -10px rgba(168, 85, 247, 0.12) !important;
  position: relative;
  overflow: hidden;
  z-index: 10;
}

.donate-wrapper h3 {
  color: #6b21a8 !important;
  font-size: 1.5rem !important;
  font-weight: 800 !important;
  margin: 0 0 0.5rem !important;
}

.donate-wrapper p {
  color: #581c87 !important;
  margin-bottom: 1.5rem !important;
  font-size: 1rem;
  opacity: 0.9;
}

.donate-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  background: linear-gradient(135deg, #9333ea, #7e22ce) !important;
  color: white !important;
  text-decoration: none !important;
  padding: 0.875rem 2rem !important;
  border-radius: 99px !important;
  font-weight: 700 !important;
  font-size: 1rem !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 4px 15px rgba(147, 51, 234, 0.4) !important;
  border: 1px solid rgba(255,255,255,0.2) !important;
}

.donate-btn:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 25px rgba(147, 51, 234, 0.55) !important;
}

/* ── RESPONSIVE: HEADER & FOOTER ───────────────────────────── */
@media (max-width: 768px) {
  .nav {
    display: none;
  }

  .nav.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(250, 250, 249, 0.97);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(13, 148, 136, 0.1);
    padding: 1rem;
    box-shadow: 0 8px 32px rgba(13, 148, 136, 0.08);
    z-index: 499;
    gap: 0.25rem;
  }

  .nav.open .nav-link {
    border-radius: 10px;
    padding: 0.7rem 1rem;
    width: 100%;
  }

  .mobile-menu-btn {
    display: grid;
  }

  .bottom-tab-bar {
    display: flex;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .footer-links {
    align-items: center;
  }

  .donate-wrapper {
    margin: 2rem 1rem !important;
  }
}

/* Ensure main content bottom padding for mobile tab bar */
@media (max-width: 768px) {
  #main-content {
    padding-bottom: 5rem;
  }
}
