/* ============================================================
   Sarvodaya Residence for the Seniors — Global Stylesheet
   Theme: Green & White • Font: Calibri (Carlito fallback)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,700&display=swap');

:root {
  --green-900: #1b4332;
  --green-800: #225c42;
  --green-700: #2d6a4f;
  --green-500: #40916c;
  --green-400: #52b788;
  --green-300: #95d5b2;
  --green-100: #d8f3dc;
  --green-50:  #f1faf4;
  --ink:       #1a2a22;
  --muted:     #4a5d52;
  --line:      #e1ece5;
  --white:     #ffffff;
  --shadow-sm: 0 4px 14px rgba(27, 67, 50, 0.06);
  --shadow:    0 12px 36px rgba(27, 67, 50, 0.10);
  --radius:    14px;
  --radius-sm: 10px;
  --font:      'Nunito', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

img { max-width: 100%; display: block; }
a { color: var(--green-700); text-decoration: none; }
a:hover { color: var(--green-900); }

h1, h2, h3, h4 {
  font-family: var(--font);
  color: var(--green-900);
  line-height: 1.2;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); font-weight: 700; }
h3 { font-size: clamp(1.15rem, 2vw, 1.35rem); font-weight: 700; }
p  { color: var(--muted); margin-bottom: 1rem; font-size: 1rem; }

.eyebrow {
  display: inline-block; text-transform: uppercase; letter-spacing: 3px;
  font-size: 0.75rem; font-weight: 700; color: var(--green-700);
  padding-left: 32px; position: relative; margin-bottom: 12px;
}
.eyebrow::before {
  content: ""; position: absolute; left: 0; top: 50%;
  width: 22px; height: 2px; background: var(--green-500); transform: translateY(-50%);
}

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ---------- Topbar ---------- */
.topbar {
  background: var(--green-900); color: #e9f5ec; font-size: 0.85rem;
}
.topbar .container {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; gap: 8px;
}
.topbar a { color: #d8f3dc; }
.topbar a:hover { color: #fff; }

@media (max-width: 640px) {
  .topbar { font-size: 0.78rem; text-align: center; }
  .topbar .container { justify-content: center; }
  .topbar > .container > span:first-child { display: none; }
}

/* ---------- Header / Nav ---------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px; padding-bottom: 14px; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand-mark {
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, var(--green-500), var(--green-900));
  color: #fff; display: grid; place-items: center;
  font-family: var(--font); font-weight: 700; font-size: 1.4rem;
  box-shadow: var(--shadow-sm); flex-shrink: 0;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { color: var(--green-900); font-size: 1.05rem; font-weight: 800; }
.brand-text span { color: var(--muted); font-size: 0.78rem; font-weight: 600; }

.nav { display: flex; gap: 2px; align-items: center; }
.nav > a, .nav .has-sub > a {
  padding: 10px 14px; border-radius: 8px; font-weight: 600; font-size: 0.95rem;
  color: var(--green-900); transition: background 0.2s, color 0.2s;
  display: inline-block;
}
.nav > a:hover, .nav .has-sub > a:hover, .nav a.active { background: var(--green-100); }

.nav .has-sub { position: relative; }
.nav .has-sub > a::after { content: " ▾"; font-size: 0.7rem; opacity: 0.7; }
.nav .submenu {
  position: absolute; top: 100%; left: 0; min-width: 240px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); padding: 8px; display: none;
}
.nav .has-sub:hover .submenu, .nav .has-sub:focus-within .submenu { display: block; }
.nav .submenu a { display: block; padding: 10px 12px; border-radius: 6px; color: var(--green-900); font-weight: 500; }
.nav .submenu a:hover { background: var(--green-50); }

.menu-toggle-cb { display: none; }

.menu-toggle {
  display: none; background: var(--green-700); color: #fff;
  border: none; padding: 10px 14px; border-radius: 8px; cursor: pointer; font-weight: 700;
  font-family: var(--font); font-size: 0.95rem; align-items: center; gap: 6px;
  user-select: none;
}
.menu-toggle::before { content: "☰"; font-size: 1.1rem; line-height: 1; }

@media (max-width: 960px) {
  .menu-toggle { display: inline-flex; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; flex-direction: column; align-items: stretch;
    padding: 12px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    gap: 4px;
  }
  .menu-toggle-cb:checked ~ .nav { display: flex; }
  .nav > a, .nav .has-sub > a { padding: 14px 16px; font-size: 1rem; }
  .nav .submenu { position: static; box-shadow: none; border: none; padding-left: 12px; min-width: 0; }
  .nav .has-sub:hover .submenu, .nav .has-sub:focus-within .submenu { display: block; }
  .site-header .container { position: relative; padding-top: 12px; padding-bottom: 12px; }
  .brand-mark { width: 44px; height: 44px; font-size: 1.2rem; }
  .brand-text strong { font-size: 0.92rem; }
  .brand-text span { font-size: 0.72rem; }
}

@media (max-width: 420px) {
  .brand-mark { width: 40px; height: 40px; font-size: 1.1rem; }
  .brand-text strong { font-size: 0.85rem; }
  .brand-text span { font-size: 0.68rem; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; border-radius: 999px;
  font-weight: 700; letter-spacing: 0.2px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s;
  border: 2px solid transparent; cursor: pointer; font-family: inherit; font-size: 0.98rem;
  text-align: center;
}
.btn-primary { background: var(--green-700); color: #fff; }
.btn-primary:hover { background: var(--green-900); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-outline { background: #fff; color: var(--green-900); border-color: var(--green-700); }
.btn-outline:hover { background: var(--green-100); }
.btn-arrow::after { content: "→"; font-size: 1.1rem; }

/* ---------- HERO (Lenity-inspired) ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--green-50);
  padding: 80px 0 0;
}
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: 56px; align-items: center;
}
.hero-content .eyebrow { color: var(--green-700); }
.hero-content h1 {
  margin: 8px 0 18px;
}
.hero-content h1 .accent { color: var(--green-500); font-style: italic; }
.hero-content p.lead {
  font-size: 1.08rem; color: var(--muted); margin-bottom: 28px; max-width: 540px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 36px; }

.hero-bullets {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  border-top: 1px solid var(--line); padding-top: 24px;
}
.hero-bullets div {
  display: flex; gap: 10px; align-items: flex-start; color: var(--green-900); font-weight: 600;
}
.hero-bullets div::before {
  content: "✓"; flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%;
  background: var(--green-700); color: #fff; display: grid; place-items: center;
  font-size: 0.85rem; font-weight: 900;
}

.hero-visual {
  position: relative;
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: end;
}
.hero-visual .img-a {
  border-radius: 200px 200px 16px 16px; overflow: hidden; height: 460px;
  box-shadow: var(--shadow);
}
.hero-visual .img-b {
  border-radius: 16px 16px 200px 200px; overflow: hidden; height: 360px;
  box-shadow: var(--shadow); margin-bottom: 40px;
}
.hero-visual img { width: 100%; height: 100%; object-fit: cover; }

.hero-badge {
  position: absolute; left: -10px; bottom: 30px; background: #fff;
  border-radius: 18px; padding: 18px 20px; box-shadow: var(--shadow);
  display: flex; gap: 14px; align-items: center; max-width: 280px;
  z-index: 2;
}
.hero-badge .num {
  width: 56px; height: 56px; border-radius: 50%; background: var(--green-100);
  color: var(--green-900); display: grid; place-items: center; font-weight: 700; font-size: 1.4rem;
  flex-shrink: 0;
}
.hero-badge h4 { font-size: 0.95rem; color: var(--green-900); margin-bottom: 2px; }
.hero-badge p { font-size: 0.82rem; margin: 0; color: var(--muted); }

@media (max-width: 960px) {
  .hero { padding: 56px 0 40px; }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-visual { max-width: 520px; margin: 0 auto; width: 100%; }
  .hero-visual .img-a { height: 320px; border-radius: 140px 140px 14px 14px; }
  .hero-visual .img-b { height: 240px; border-radius: 14px 14px 140px 140px; margin-bottom: 24px; }
  .hero-badge { left: 10px; bottom: 10px; max-width: 240px; padding: 14px; }
}

@media (max-width: 480px) {
  .hero-bullets { grid-template-columns: 1fr; gap: 10px; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero-visual .img-a { height: 260px; }
  .hero-visual .img-b { height: 180px; }
  .hero-badge { max-width: 200px; padding: 10px 12px; }
  .hero-badge .num { width: 44px; height: 44px; font-size: 1.1rem; }
}

/* ---------- Page header (non-home) ---------- */
.page-head {
  background: linear-gradient(135deg, var(--green-700), var(--green-900));
  color: #fff; padding: 64px 0 56px;
}
.page-head h1 { color: #fff; }
.page-head .crumbs { color: #d8f3dc; font-size: 0.88rem; margin-bottom: 10px; }
.page-head .crumbs a { color: #d8f3dc; }
.page-head p { color: #e8f5ed; max-width: 720px; margin-top: 10px; }

/* ---------- Sections ---------- */
section { padding: 80px 0; }
@media (max-width: 768px) { section { padding: 56px 0; } }

.section-alt { background: var(--green-50); }
.section-title { text-align: center; margin-bottom: 12px; }
.section-sub { text-align: center; color: var(--muted); max-width: 700px; margin: 0 auto 48px; font-size: 1.05rem; }

/* ---------- Cards / Grids ---------- */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
}

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--green-300); }
.card .icon {
  width: 56px; height: 56px; border-radius: 14px;
  background: var(--green-100); color: var(--green-900);
  display: grid; place-items: center; font-size: 1.5rem; font-weight: 700;
  margin-bottom: 16px;
}
.card h3 { margin-bottom: 10px; }
.card p { margin-bottom: 0; }

/* ---------- About two-col ---------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 960px) { .two-col { grid-template-columns: 1fr; gap: 36px; } }
.two-col img { border-radius: var(--radius); box-shadow: var(--shadow); }

.about-images {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: end;
}
.about-images .img-1 { border-radius: 200px 200px 16px 16px; overflow: hidden; height: 420px; }
.about-images .img-2 { border-radius: 16px 16px 200px 200px; overflow: hidden; height: 320px; margin-bottom: 30px; }
.about-images img { width: 100%; height: 100%; object-fit: cover; box-shadow: var(--shadow); }
@media (max-width: 480px) {
  .about-images .img-1 { height: 280px; border-radius: 140px 140px 14px 14px; }
  .about-images .img-2 { height: 200px; border-radius: 14px 14px 140px 140px; margin-bottom: 20px; }
}

.feature-row { display: flex; gap: 16px; margin-bottom: 22px; align-items: flex-start; }
.feature-row .ficon {
  width: 56px; height: 56px; border-radius: 14px; background: var(--green-100);
  color: var(--green-900); display: grid; place-items: center; font-size: 1.4rem; font-weight: 700;
  flex-shrink: 0;
}
.feature-row h4 { color: var(--green-900); font-size: 1.1rem; margin-bottom: 4px; }
.feature-row p { font-size: 0.95rem; margin: 0; }

/* ---------- Service / Cause card with image ---------- */
.cause-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--line); transition: transform 0.2s, box-shadow 0.2s; }
.cause-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.cause-card .cause-img { height: 220px; overflow: hidden; }
.cause-card .cause-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.cause-card:hover .cause-img img { transform: scale(1.05); }
.cause-card .cause-body { padding: 24px; }
.cause-card h3 { margin-bottom: 8px; }
.cause-card .cause-tag { display: inline-block; background: var(--green-100); color: var(--green-900); font-size: 0.78rem; padding: 4px 12px; border-radius: 999px; font-weight: 700; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.5px; }

/* ---------- Why Choose Us ---------- */
.why-list { list-style: none; padding: 0; margin: 24px 0; }
.why-list li {
  padding: 14px 0 14px 38px; position: relative; border-bottom: 1px dashed var(--line);
  color: var(--green-900); font-weight: 600; font-size: 1.05rem;
}
.why-list li:last-child { border-bottom: none; }
.why-list li::before {
  content: "✓"; position: absolute; left: 0; top: 14px;
  width: 26px; height: 26px; border-radius: 50%; background: var(--green-700); color: #fff;
  display: grid; place-items: center; font-size: 0.9rem; font-weight: 900;
}

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 28px; }
.stat-row .stat { text-align: center; padding: 18px 8px; border-right: 1px solid var(--line); }
.stat-row .stat:last-child { border-right: none; }
.stat-row .num { font-size: 2.2rem; font-weight: 700; color: var(--green-700); }
.stat-row .lbl { color: var(--muted); font-size: 0.9rem; }
@media (max-width: 640px) {
  .stat-row { grid-template-columns: 1fr; }
  .stat-row .stat { border-right: none; border-bottom: 1px solid var(--line); padding: 14px 0; }
  .stat-row .stat:last-child { border-bottom: none; }
}

/* ---------- Stats banner ---------- */
.stats {
  background: var(--green-700); color: #fff; border-radius: var(--radius); padding: 36px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; text-align: center;
}
.stats .num { font-size: 2.4rem; font-weight: 700; }
.stats .lbl { font-size: 0.9rem; opacity: 0.95; }
@media (max-width: 768px) { .stats { grid-template-columns: repeat(2, 1fr); padding: 28px 20px; } }

/* ---------- Testimonials ---------- */
.testimonial {
  background: #fff; border-radius: var(--radius); padding: 28px; border: 1px solid var(--line);
  box-shadow: var(--shadow-sm); position: relative;
}
.testimonial::before {
  content: "“"; position: absolute; top: 8px; right: 22px; font-size: 5rem;
  color: var(--green-100); font-family: Georgia, serif; line-height: 1;
}
.testimonial p { font-style: italic; color: var(--ink); font-size: 1rem; }
.testimonial .who { display: flex; gap: 12px; align-items: center; margin-top: 16px; }
.testimonial .avatar {
  width: 48px; height: 48px; border-radius: 50%; background: var(--green-500); color: #fff;
  display: grid; place-items: center; font-weight: 700; flex-shrink: 0;
}
.testimonial .who h4 { font-size: 1rem; margin-bottom: 0; }
.testimonial .who small { color: var(--muted); font-size: 0.85rem; }

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gallery img {
  width: 100%; height: 240px; object-fit: cover; border-radius: var(--radius-sm);
  border: 1px solid var(--line); transition: transform 0.3s;
}
.gallery img:hover { transform: scale(1.02); }
@media (max-width: 768px) { .gallery { grid-template-columns: 1fr 1fr; } .gallery img { height: 180px; } }
@media (max-width: 420px) { .gallery { grid-template-columns: 1fr; } }

/* ---------- Steps ---------- */
.steps { counter-reset: step; }
.step {
  background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--green-700);
  border-radius: var(--radius-sm); padding: 22px 22px 22px 70px; margin-bottom: 16px;
  position: relative;
}
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 18px; top: 22px;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--green-700); color: #fff;
  display: grid; place-items: center; font-weight: 700;
}
.step h3 { color: var(--green-900); margin-bottom: 8px; font-size: 1.1rem; }
.step ul { margin: 8px 0 0 18px; color: var(--muted); }
.step ul li { margin-bottom: 4px; }
.step code, .codebox {
  font-family: 'Source Code Pro', Menlo, monospace; background: var(--green-50);
  padding: 2px 6px; border-radius: 4px; color: var(--green-900); font-size: 0.92em;
  word-break: break-all;
}
.codebox { display: block; padding: 10px 12px; margin: 6px 0; }
@media (max-width: 480px) {
  .step { padding: 18px 16px 18px 56px; }
  .step::before { left: 12px; top: 18px; width: 30px; height: 30px; font-size: 0.95rem; }
}

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
@media (max-width: 768px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.contact-card h3 { color: var(--green-900); margin-bottom: 14px; }
.contact-list { list-style: none; }
.contact-list li { padding: 10px 0; border-bottom: 1px dashed var(--line); display: flex; gap: 12px; flex-wrap: wrap; }
.contact-list li:last-child { border-bottom: none; }
.contact-list .label { font-weight: 700; color: var(--green-900); min-width: 100px; }
iframe.map { width: 100%; height: 360px; border: 0; border-radius: var(--radius); }
@media (max-width: 480px) { iframe.map { height: 280px; } }

/* ---------- CTA banner ---------- */
.cta-banner {
  background: linear-gradient(135deg, var(--green-700), var(--green-900));
  color: #fff; border-radius: var(--radius); padding: 56px 32px; text-align: center;
  position: relative; overflow: hidden;
}
.cta-banner::before {
  content: ""; position: absolute; right: -60px; top: -60px;
  width: 240px; height: 240px; border-radius: 50%; background: rgba(255,255,255,0.06);
}
.cta-banner h2 { color: #fff; margin-bottom: 12px; }
.cta-banner p { color: #d8f3dc; max-width: 640px; margin: 0 auto 24px; }
.cta-banner .btn-outline { color: #fff; border-color: #fff; background: transparent; }
.cta-banner .btn-outline:hover { background: #fff; color: var(--green-900); }
@media (max-width: 480px) { .cta-banner { padding: 40px 22px; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--green-900); color: #d8f3dc; padding: 64px 0 24px; }
.site-footer h4 { color: #fff; margin-bottom: 16px; font-size: 1.05rem; font-weight: 700; }
.site-footer a { color: #d8f3dc; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 36px; }
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }
.footer-grid ul { list-style: none; }
.footer-grid ul li { padding: 4px 0; font-size: 0.92rem; }
.footer-contact li { display: flex; gap: 8px; align-items: flex-start; }
.footer-contact .lbl { color: #95d5b2; min-width: 60px; }
.copyright {
  border-top: 1px solid rgba(255,255,255,0.12); margin-top: 32px; padding-top: 16px;
  text-align: center; font-size: 0.85rem; color: #b7d6c2;
}

/* ---------- Marquee ribbon ---------- */
.ribbon {
  background: var(--green-700); color: #fff; padding: 18px 0; overflow: hidden;
}
.ribbon-track {
  display: flex; gap: 48px; white-space: nowrap; animation: scroll 25s linear infinite;
}
.ribbon-track span {
  font-size: 1.4rem; font-weight: 700; display: inline-flex; align-items: center; gap: 48px;
}
.ribbon-track span::after {
  content: "✦"; color: var(--green-300); margin-left: 48px;
}
@keyframes scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* utility */
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; } .mb-4 { margin-bottom: 32px; }
