/* ==================================================
   ROOT / THEME
================================================== */
:root {
  --bg: #eef3ff;
  --card-active: #eaf2ff;
  --card-disabled: #f3f4f6;

  --text-main: #0f172a;
  --text-muted: #64748b;

  --blue: #2563eb;
  --green: #16a34a;
  --red: #dc2626;
  --teal: #0f766e;
  --violet: #7c3aed;
  --gray: #6b7280;

  --shadow: 0 10px 30px rgba(0,0,0,.08);
  --radius: 16px;
}

/* ==================================================
   RESET
================================================== */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
}

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text-main);
}

/* ==================================================
   LAYOUT CONTAINERS
================================================== */
.page-wrap,
.container,
.footer-wrap,
.page-center {
  width: min(100%, 72rem);
  margin-inline: auto;
  padding-inline: clamp(12px, 3vw, 24px);
}

.page-center {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==================================================
   BOX / CARD
================================================== */
.box,
.card,
.members-box,
.site-footer {
  background: #fff;
  border-radius: var(--radius);
  padding: clamp(14px, 2.5vw, 20px);
  box-shadow: var(--shadow);
}

/* ==================================================
   BANNER
================================================== */
.banner {
  width: 100%;
  max-width: 1200px;
  height: 160px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-top {
  position: absolute;
  inset: 0 0 auto 0;
  height: 44px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(6px);
}

.banner-title {
  font-size: 15px;
  font-weight: 600;
}

.banner-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
}

/* Slim banner for FAQ / legal */
.banner.slim {
  height: 64px;
}
.banner.slim .banner-img {
  display: none;
}

/* ==================================================
   FORMS
================================================== */
.row {
  display: flex;
  flex-direction: column;
  margin-bottom: 12px;
}

.row label {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.row input,
.row select {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
}

/* ==================================================
   TABLE / EXCEL STYLE GRID
================================================== */
.table {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
}

.th, .tr {
  display: grid;
  grid-template-columns: 40px 2fr 1fr 1.5fr 1.5fr 1fr;
  align-items: center;
  padding: 12px 14px;
}

.th {
  background: #f8fafc;
  font-weight: 600;
  border-bottom: 1px solid #e5e7eb;
}

.tr {
  border-bottom: 1px solid #e5e7eb;
  cursor: pointer;
}

.tr:last-child {
  border-bottom: none;
}

.tr.selected {
  background: #eef2ff;
}

.muted {
  font-size: 13px;
  color: var(--text-muted);
}

/* ==================================================
   STATUS BADGES
================================================== */
.status.active {
  color: var(--green);
  font-weight: 600;
}

.status.inactive {
  color: #9ca3af;
}

/* ==================================================
   ACTION BUTTONS (GLOBAL, CONSISTENT)
================================================== */
.actions,
.member-actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.actions button,
.member-actions button {
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 600;
  cursor: pointer;
  color: #fff;
  white-space: nowrap;
}

.btn-add   { background: var(--green); }
.btn-edit  { background: var(--blue); }
.btn-del   { background: var(--red); }
.btn-mail  { background: var(--teal); }
.btn-print { background: var(--violet); }
.btn-close { background: var(--gray); }

.actions button:hover,
.member-actions button:hover {
  opacity: .9;
}

/* ==================================================
   FOOTER (NON-STICKY — FIXED)
================================================== */
.site-footer {
  margin-top: 40px;
  padding: 18px 12px;
  background: #f8fafc;
  border-top: 1px solid #e5e7eb;
  text-align: center;
  font-size: 14px;
  position: static;
}

.footer-inner {
  max-width: 1100px;
  margin: auto;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 8px;
}

.footer-links a {
  color: var(--blue);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
}

.footer-links a:hover {
  background: #eef2ff;
}

.footer-note {
  font-size: 12px;
  color: #64748b;
}

/* ==================================================
   MODAL (SAFE)
================================================== */
.app-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}

.app-modal-content {
  width: 90%;
  height: 85%;
  max-width: 1100px;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
}

/* ==================================================
   MOBILE
================================================== */
@media (max-width: 768px) {

  .banner {
    height: 110px;
  }

  .th {
    display: none;
  }

  .tr {
    grid-template-columns: 40px 1fr;
    row-gap: 6px;
  }

  .tr > div {
    grid-column: span 2;
  }

  .tr > div:first-child {
    grid-column: span 1;
  }

  .actions,
  .member-actions {
    justify-content: center;
  }

  footer,
  .site-footer,
  .footer-wrap {
    position: static !important;
  }
}
.donation-buttons {
    display: grid;
    gap: 14px;
    margin-top: 24px;
}
/* ==================================================
   WELCOME PAGE — WHITE CARD FIX + RESPONSIVE GRID
   (NO PHP / HTML CHANGES REQUIRED)
================================================== */

/* Grid auto-fit layout */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  width: 100%;
}

/* Anchor cards (both structures) */
a.feature-card,
a.clickable-card,
.feature-grid a {
  display: block;
  text-decoration: none !important;
  color: inherit !important;
}

/* Card core */
.feature-card,
a.feature-card,
a.clickable-card > .feature-card {
  background: #ffffff !important;      /* ✅ WHITE */
  color: #0f172a !important;

  border-radius: 16px;
  min-height: 130px;
  padding: 18px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  text-align: center;
  cursor: pointer;

  box-shadow: 0 8px 22px rgba(0,0,0,0.08);

  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;

  position: relative;
}

/* Icon */
.feature-card span,
a.feature-card span,
a.clickable-card > .feature-card span {
  font-size: 34px;
  margin-bottom: 8px;
}

/* Label */
.feature-card div,
a.feature-card div,
a.clickable-card > .feature-card div {
  font-size: 15px;
  font-weight: 600;
}

/* Hover */
.feature-card:hover,
a.feature-card:hover,
a.clickable-card:hover > .feature-card {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(0,0,0,0.16);
}

/* Disabled cards */
.feature-card.disabled,
.feature-card.card-disabled {
  background: #f3f4f6 !important;
  color: #9ca3af !important;
  cursor: not-allowed;
  box-shadow: none !important;
  transform: none !important;
  opacity: 0.7;
}

/* ==================================================
   MOBILE — EXACTLY 2 PER ROW
================================================== */
@media (max-width: 768px) {

  .feature-grid {
    grid-template-columns: repeat(2, 1fr) !important;  /* ✅ 2 cards */
    gap: 12px;
  }

  .feature-card,
  a.feature-card,
  a.clickable-card > .feature-card {
    min-height: 110px;
    padding: 14px;
  }

  .feature-card span,
  a.feature-card span,
  a.clickable-card > .feature-card span {
    font-size: 28px;
  }

  .feature-card div,
  a.feature-card div,
  a.clickable-card > .feature-card div {
    font-size: 13px;
  }
}

/* ==================================================
   LARGE SCREENS — AUTO-FIT MORE CARDS
================================================== */
@media (min-width: 1200px) {
  .feature-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
}
/* ===============================
   HERO TEXT
=============================== */

.hero-subtitle {
  font-size: 16px;
  line-height: 1.6;
  color: #475569;
  max-width: 640px;
  margin: 10px auto 18px;
  text-align: center;
}

/* ===============================
   CTA ROW
=============================== */

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: center;
  margin: 18px 0;
}

.cta-row a {
  min-width: 180px;
  padding: 14px 18px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(0,0,0,0.08);
  transition: transform .12s ease, box-shadow .12s ease;
}

.cta-row a:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(0,0,0,0.12);
}

.cta-row small {
  display: block;
  font-size: 12px;
  opacity: 0.85;
}

/* ===============================
   TRUST LINE
=============================== */

.trust-line {
  font-size: 13.5px;
  color: #64748b;
  text-align: center;
  max-width: 720px;
  margin: 14px auto 18px;
  line-height: 1.5;
}

/* ===============================
   ANCHOR NAV (PILL STYLE)
=============================== */

.anchor-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
}

.anchor-nav a {
  background: #f1
  
  /* ===============================
   HERO MAIN HEADING
=============================== */

.hero h1 {
  font-size: clamp(28px, 4.5vw, 44px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;

  color: #0f172a;

  max-width: 820px;
  margin: 0 auto 12px;

  text-align: center;
}

/* Slight emphasis on key words (optional future-proof) */
.hero h1 strong {
  color: #2563eb;
}

/* ===============================
   MOBILE TUNING
=============================== */

@media (max-width: 768px) {
  .hero h1 {
    font-size: 28px;
    line-height: 1.2;
    margin-bottom: 10px;
  }
}
/* ===============================
   HERO H1 – SUBTLE LEFT OFFSET
=============================== */

.hero h1 {
  padding-left: 12px;   /* 👈 gentle left gap */
}

/* Mobile tuning */
@media (max-width: 768px) {
  .hero h1 {
    padding-left: 10px;
  }
}
.hero h1 {
  padding-left: 12px;
  padding-right: 12px;   /* balanced breathing */
}
/* ===============================
   PURE CSS SPLASH TRANSITION
=============================== */

body.splash #appContent {
  opacity: 0;
  animation: contentFadeIn 0.8s ease forwards;
  animation-delay: 1.6s;   /* wait for banner */
}

body.splash .banner {
  animation: bannerFadeOut 0.8s ease forwards;
  animation-delay: 1.4s;
}

/* Banner fade out */
@keyframes bannerFadeOut {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

/* Content fade in */
@keyframes contentFadeIn {
  to {
    opacity: 1;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  body.splash #appContent,
  body.splash .banner {
    animation: none;
    opacity: 1;
    visibility: visible;
  }
}
/* ==========================================
   PURE CSS SPLASH — LISTINGMEDICINES
   (NO JS, NO MARKUP CHANGE)
========================================== */

body.index-page.splash {
  overflow: hidden;
}

/* Fade out banner */
body.index-page.splash .banner {
  animation: lmBannerFade 1s ease forwards;
  animation-delay: 1.4s;
}

/* Fade in rest of page */
body.index-page.splash .hero,
body.index-page.splash section,
body.index-page.splash footer {
  opacity: 0;
  animation: lmContentFade 0.8s ease forwards;
  animation-delay: 1.6s;
}

/* Banner fade out */
@keyframes lmBannerFade {
  to {
    opacity: 0;
    height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
  }
}

/* Content fade in */
@keyframes lmContentFade {
  to {
    opacity: 1;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  body.index-page.splash .banner,
  body.index-page.splash .hero,
  body.index-page.splash section,
  body.index-page.splash footer {
    animation: none !important;
    opacity: 1 !important;
    height: auto !important;
  }

  body.index-page.splash {
    overflow: auto;
  }
}
/* =========================
   FORM GRID (ROW → COLUMNS)
========================= */

.form-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 14px 16px;
  align-items: end;
}

.form-grid .row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-grid label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}

.form-grid input,
.form-grid select {
  width: 100%;
}

/* Days grid inside row */
.days {
  display: grid;
  grid-template-columns: repeat(7, minmax(60px, 1fr));
  gap: 8px;
}

.days label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;

  background: #eef2ff;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;

  transition: background .15s ease;
}

/* Keep checkboxes visible */
.days input[type="checkbox"] {
  transform: scale(1.15);
  cursor: pointer;
}

.days label:has(input:checked) {
  background: #dbeafe;
}

/* Mic row */
.mic-row {
  position: relative;
}
.mic-row input {
  padding-right: 44px;
}
.mic-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 22px;
}

/* Full-width rows */
.row-full {
  grid-column: 1 / -1;
}

/* Form actions row */
.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

.form-actions button {
  flex: 1;
  padding: 14px 18px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 12px;
}

/* Mobile: stack */
@media (max-width: 820px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .days {
    grid-template-columns: repeat(4, 1fr);
  }
}
.cards{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
  gap:16px;
  margin-top:16px;
}

.card{
  border:1px solid #e5e7eb;
  border-radius:16px;
  padding:16px;
  background:#fff;
  cursor:pointer;
}

.card.selected{
  border-color:#2563eb;
  background:#eef2ff;
}

.radio-wrap{
  text-align:right;
}

.row-radio{
  transform:scale(1.3);
}

.med-title{
  margin:6px 0 12px;
  font-size:17px;
  font-weight:700;
}

.med-power{
  font-weight:600;
  color:#64748b;
  margin-left:6px;
}

.row{
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:6px 0;
  border-bottom:1px dashed #e5e7eb;
  font-size:14px;
}

.row:last-child{
  border-bottom:none;
}

.label{
  color:#065f46;
  font-weight:600;
}

.value{
  color:#111827;
  text-align:right;
  white-space:nowrap;
}

/* SEO-safe H1 sizing */
h1.page-title {
  font-size: 1.6rem;     /* adjust to match your H2 */
  font-weight: 700;
  margin: 0 0 12px;
  line-height: 1.3;
}

@media (max-width: 600px) {
  h1.page-title {
    font-size: 1.4rem;
  }
}