:root {
  --navy: #08264b;
  --navy-2: #0b3766;
  --blue: #12518a;
  --teal: #198b82;
  --gold: #d8b35f;
  --gold-light: #f4e7c5;
  --ink: #17283d;
  --muted: #64748b;
  --paper: #fffdf8;
  --soft: #f4f7fa;
  --line: #e1e7ee;
  --white: #fff;
  --radius: 18px;
  --shadow: 0 16px 40px rgba(8, 38, 75, .09);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Inter, "Segoe UI", Arial, sans-serif; line-height: 1.7; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
p { margin: 0 0 1rem; }
h1,h2,h3 { line-height: 1.18; color: var(--navy); margin: 0 0 1rem; letter-spacing: -.025em; }
h1 { font-size: clamp(2.5rem, 5vw, 4.65rem); }
h2 { font-size: clamp(1.8rem, 3vw, 2.55rem); }
h3 { font-size: 1.28rem; }
.container { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }
.skip-link { position: absolute; left: -9999px; top: 0; background: white; padding: 10px; z-index: 100; }
.skip-link:focus { left: 10px; }
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,253,248,.96); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(225,231,238,.9); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 82px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--navy); text-decoration: none; min-width: 230px; }
.brand:hover { text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; color: var(--gold); background: linear-gradient(145deg, var(--blue), #041c3d); font-size: 25px; box-shadow: 0 6px 18px rgba(8,38,75,.18); }
.brand-copy strong { display: block; font-size: 1.25rem; line-height: 1.2; }
.brand-copy small { display: block; color: var(--muted); font-size: .73rem; margin-top: 3px; }
.main-nav { display: flex; align-items: center; gap: 5px; }
.main-nav a { color: #31445c; font-size: .9rem; font-weight: 600; padding: 10px 11px; border-radius: 10px; white-space: nowrap; }
.main-nav a:hover, .main-nav a.active { color: var(--blue); background: #edf4fa; text-decoration: none; }
.main-nav .nav-download { background: var(--navy); color: white; padding-inline: 16px; }
.main-nav .nav-download:hover { background: var(--blue); color: white; }
.menu-toggle { display: none; border: 1px solid var(--line); background: white; color: var(--navy); border-radius: 10px; padding: 8px 12px; font-weight: 700; }
.hero { position: relative; overflow: hidden; color: white; background: radial-gradient(ellipse at 80% 15%, rgba(25,139,130,.28), transparent 34%), linear-gradient(120deg, #061c39, #0b3766 72%, #104d72); }
.hero:after { content: ""; position: absolute; inset: auto -10% -210px 40%; height: 380px; border: 1px solid rgba(216,179,95,.18); border-radius: 50%; transform: rotate(-13deg); pointer-events: none; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.12fr .88fr; gap: clamp(32px, 6vw, 82px); align-items: center; padding-block: clamp(64px, 9vw, 118px); }
.hero h1 { color: white; max-width: 720px; }
.hero-lead { color: #e1eaf4; font-size: 1.12rem; max-width: 650px; }
.eyebrow { color: var(--teal); font-size: .76rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 13px; }
.hero .eyebrow, .page-hero .eyebrow { color: var(--gold); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 27px 0 19px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; border: 1px solid transparent; border-radius: 11px; padding: 12px 18px; font-weight: 750; font-size: .94rem; text-decoration: none; transition: transform .15s ease, background .15s ease; }
.button:hover { transform: translateY(-1px); text-decoration: none; }
.button-gold { background: var(--gold); color: #182b42; }
.button-gold:hover { background: #e5c879; color: #182b42; }
.button-outline { border-color: rgba(255,255,255,.48); color: white; background: rgba(255,255,255,.04); }
.button-outline:hover { background: rgba(255,255,255,.12); color: white; }
.button-light { background: white; color: var(--navy); }
.hero-note { color: #c5d3e2; font-size: .9rem; }
.mantra-card { border: 1px solid rgba(244,231,197,.3); border-radius: 24px; padding: clamp(25px, 4vw, 42px); text-align: center; background: linear-gradient(160deg, rgba(255,255,255,.10), rgba(255,255,255,.035)); box-shadow: 0 28px 65px rgba(0,0,0,.18); backdrop-filter: blur(6px); }
.feather-symbol { font-family: Georgia, serif; font-size: 5rem; line-height: 1; color: var(--gold); transform: rotate(-20deg); margin-bottom: 14px; }
.mantra-label { color: #d6e1ed; text-transform: uppercase; font-size: .75rem; letter-spacing: .15em; font-weight: 700; }
.mantra-line { color: white; font-size: clamp(1.08rem, 2vw, 1.32rem); font-weight: 650; line-height: 1.8; margin: 20px 0; }
.ornament { color: var(--gold); display: flex; align-items: center; gap: 12px; justify-content: center; font-size: .8rem; letter-spacing: .08em; }
.ornament span { height: 1px; width: 34px; background: rgba(216,179,95,.6); }
.section { padding-block: clamp(58px, 8vw, 94px); }
.section-soft { background: var(--soft); }
.section-heading { max-width: 700px; margin: 0 auto 38px; text-align: center; }
.section-heading p:last-child { color: var(--muted); }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.topic-card { display: block; padding: 27px; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: 0 7px 22px rgba(8,38,75,.035); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; color: inherit; }
.topic-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #c3d4e5; text-decoration: none; }
.topic-card h3 { margin-top: 17px; }
.topic-card p { color: var(--muted); font-size: .96rem; }
.topic-number { display: inline-grid; place-items: center; width: 39px; height: 39px; border-radius: 12px; color: #8d6a1d; background: #fbf3dc; font-size: .8rem; font-weight: 800; }
.card-link, .text-link { color: var(--blue); font-weight: 750; }
.two-column { display: grid; grid-template-columns: 1fr .82fr; align-items: center; gap: clamp(32px, 7vw, 88px); }
.check-list { padding: 0; list-style: none; margin: 22px 0; }
.check-list li { position: relative; padding-left: 30px; margin: 12px 0; }
.check-list li:before { content: "✓"; position: absolute; left: 0; top: 1px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #e0f2ed; color: #16796f; font-size: .75rem; font-weight: 900; }
.quote-card { padding: clamp(28px, 4vw, 44px); border-radius: 24px; background: white; border: 1px solid var(--line); box-shadow: var(--shadow); }
.quote-mark { display: block; font-family: Georgia,serif; color: var(--gold); font-size: 4.5rem; height: 55px; line-height: 1; }
.quote-card p { font-size: 1.35rem; color: var(--navy); line-height: 1.55; }
.quote-attribution { font-size: .85rem; color: var(--muted); }
.dedication-strip { padding-block: 70px; color: white; text-align: center; background: linear-gradient(125deg, #08264b, #0b4771); }
.dedication-strip h2 { color: white; max-width: 850px; margin-inline: auto; }
.dedication-strip p:not(.eyebrow) { color: #d9e5ef; max-width: 760px; margin: 0 auto 24px; }
.page-hero { padding-block: 76px; color: white; background: radial-gradient(ellipse at 80% 10%, rgba(25,139,130,.25), transparent 32%), linear-gradient(120deg, #061c39, #0b3766); }
.page-hero h1 { color: white; font-size: clamp(2.35rem, 4.5vw, 3.8rem); }
.page-hero p:last-child { color: #dbe6f0; max-width: 760px; font-size: 1.1rem; }
.content-narrow { max-width: 820px; }
.content-narrow h2 { margin-top: 2.3rem; font-size: 1.7rem; }
.content-narrow h2:first-child { margin-top: 0; }
.content-narrow p { color: #35475b; }
.content-narrow a { text-decoration: underline; text-underline-offset: 3px; }
.notice { margin: 28px 0; padding: 18px 20px; border-left: 4px solid var(--gold); border-radius: 0 12px 12px 0; background: #fbf5e6; color: #594a2d; }
.notice.compact { font-size: .88rem; padding: 12px 14px; }
.mantra-card-page { margin-bottom: 40px; color: white; background: linear-gradient(130deg, #08264b, #0b4771); }
.mantra-card-page .mantra-line { font-size: 1.4rem; }
.bhakti-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.bhakti-item { border: 1px solid var(--line); border-radius: 16px; background: white; padding: 23px; }
.bhakti-item span { display: inline-block; color: #9a7629; font-size: .8rem; font-weight: 850; letter-spacing: .1em; margin-bottom: 12px; }
.bhakti-item p { color: var(--muted); margin-bottom: 0; }
.scripture-card { padding: 34px; }
.scripture-card h2 { font-size: 1.7rem; }
.download-panel { text-align: center; padding: 34px; border: 1px solid var(--line); border-radius: 22px; background: white; box-shadow: var(--shadow); }
.download-icon, .dedication-emblem { display: grid; place-items: center; margin: 0 auto 18px; width: 74px; height: 74px; border-radius: 22px; background: linear-gradient(145deg, var(--blue), #041c3d); color: var(--gold); font-size: 2.4rem; }
.button-disabled { background: #e9edf2; color: #68778a; cursor: not-allowed; }
.small-note { margin-top: 18px; color: var(--muted); font-size: .82rem; }
.dedication-page { text-align: center; }
.dedication-page h2 { margin-top: 0; }
.dedication-page p { max-width: 740px; margin-inline: auto; }
.dedication-signoff { margin-top: 36px !important; line-height: 1.9; }
.site-footer { background: #061a33; color: #d7e2ed; padding-top: 55px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 45px; padding-bottom: 38px; }
.footer-brand { font-size: 1.6rem; font-weight: 800; color: white; }
.footer-tagline { color: var(--gold); margin: 4px 0 12px; font-size: .9rem; }
.site-footer p { color: #b6c6d6; max-width: 400px; font-size: .92rem; }
.site-footer h2 { color: white; font-size: 1rem; letter-spacing: .02em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 8px 0; }
.site-footer a { color: #d7e2ed; font-size: .91rem; }
.site-footer a:hover { color: var(--gold); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-block: 20px; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer-bottom p { margin: 0; font-size: .82rem; }
@media (max-width: 1050px) {
  .header-inner { flex-wrap: wrap; padding-block: 14px; }
  .menu-toggle { display: block; }
  .main-nav { display: none; width: 100%; flex-wrap: wrap; padding-bottom: 8px; }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 9px 11px; }
  .hero-grid { grid-template-columns: 1fr .85fr; }
}
@media (max-width: 760px) {
  .container { width: min(100% - 30px, 600px); }
  .hero-grid, .two-column { grid-template-columns: 1fr; }
  .hero-grid { padding-block: 58px; }
  .mantra-card { max-width: 540px; width: 100%; margin-inline: auto; }
  .card-grid, .bhakti-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
  .page-hero { padding-block: 55px; }
}
@media (max-width: 430px) {
  .brand { min-width: 0; }
  .brand-copy strong { font-size: 1.1rem; }
  .brand-copy small { font-size: .65rem; }
  .hero-actions .button { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-grid > div:first-child { grid-column: auto; }
  .footer-bottom { align-items: flex-start; flex-direction: column; }
}

/* Bilingual English/Tamil language selector */
.main-nav .language-switch { border: 1px solid rgba(216,179,95,.7); color: var(--navy); background: #fffaf0; }
.main-nav .language-switch:hover { background: var(--gold-light); color: var(--navy); }
html[lang="ta"] body { font-family: "Noto Sans Tamil", "Latha", "Nirmala UI", "Segoe UI", sans-serif; }

/* Visitor counter and related resource / advertisement placements */
.visitor-counter-row { padding-top: 12px; text-align: center; }
.visitor-counter-row p { margin: 0; font-size: .84rem; color: #b6c6d6; }
.visitor-counter-row strong { color: var(--gold); font-variant-numeric: tabular-nums; }
.ad-card { position: relative; }
.ad-label { display: inline-block; padding: 4px 9px; margin-bottom: 9px; border-radius: 999px; background: #eef4f8; color: #39536d; font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }

/* Calendar, sponsored content and visitor counter */
.calendar-intro { display:grid; grid-template-columns:1.1fr .9fr; gap:28px; align-items:stretch; margin-bottom:30px; }
.calendar-status { background:white; border:1px solid var(--line); border-radius:var(--radius); padding:28px; box-shadow:var(--shadow); }
.calendar-status p { color:var(--muted); }
.calendar-symbol { display:inline-grid; place-items:center; width:48px; height:48px; border-radius:14px; background:#fbf3dc; color:#8d6a1d; font-size:1.8rem; margin-bottom:12px; }
.calendar-feature-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; }
.visitor-counter { width:min(1160px, calc(100% - 40px)); margin:0 auto 18px; text-align:right; color:#b6c6d6; font-size:.82rem; }
.visitor-counter strong { color:var(--gold); font-variant-numeric:tabular-nums; }
@media (max-width:760px) { .calendar-intro, .calendar-feature-grid { grid-template-columns:1fr; } }

/* Approved NamaAmrita logo */
.namaamrita-logo{width:48px;height:48px;object-fit:contain;border-radius:12px;display:block;flex-shrink:0;}


/* Exact approved NamaAmrita logo lockup: preserve full artwork */
.namaamrita-logo{display:block;width:160px;max-width:100%;height:auto;object-fit:contain;flex-shrink:0;border-radius:0;}



/* NamaAmrita V1.6: bilingual header overflow and Tamil navigation fix */
.site-header, .site-header * { box-sizing: border-box; }
.site-header { width: 100%; max-width: 100%; }
.header-inner {
  width: min(100% - 40px, 1780px);
  max-width: 1780px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.25vw, 24px);
  min-width: 0;
}
.brand, .site-brand, .header-brand {
  flex: 0 0 auto;
  min-width: 0;
}
.brand-copy, .brand-text, .site-brand-copy { min-width: 0; }
.main-nav, .site-nav, #main-nav {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: clamp(10px, 1.15vw, 22px);
}
.main-nav a, .site-nav a, #main-nav a {
  white-space: nowrap;
  flex: 0 1 auto;
  font-size: clamp(14px, 1.02vw, 18px);
}
.language-switcher, .language-toggle, .lang-switch, .language-selector,
.lang-selector, .header-actions, .header-cta, .header-controls {
  flex: 0 0 auto;
}
.header-actions, .header-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.language-switcher a, .language-toggle a, .lang-switch a,
.language-selector a, .lang-selector a {
  white-space: nowrap;
}
.namaamrita-logo { width: 64px; max-width: 64px; height: auto; }

/* Medium screens: slightly compact spacing before switching to the mobile menu. */
@media (max-width: 1450px) {
  .header-inner { width: calc(100% - 28px); gap: 10px; }
  .main-nav, .site-nav, #main-nav { gap: 9px; }
  .main-nav a, .site-nav a, #main-nav a { font-size: 14px; }
  .namaamrita-logo { width: 54px; max-width: 54px; }
}

/* Tablet/mobile: avoid horizontal overflow; keep language selection visible. */
@media (max-width: 1100px) {
  .header-inner {
    width: calc(100% - 28px);
    flex-wrap: wrap;
    justify-content: space-between;
    padding-block: 10px;
  }
  .main-nav, .site-nav, #main-nav {
    display: none;
    flex: 1 0 100%;
    width: 100%;
    max-width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
    overflow: visible;
    white-space: normal;
  }
  .main-nav.is-open, .site-nav.is-open, #main-nav.is-open {
    display: flex;
  }
  .main-nav a, .site-nav a, #main-nav a {
    white-space: normal;
    max-width: 100%;
    font-size: 15px;
    padding: 10px 12px;
  }
  .header-actions, .header-controls {
    margin-left: auto;
  }
}
@media (max-width: 560px) {
  .header-inner { width: calc(100% - 20px); gap: 8px; }
  .namaamrita-logo { width: 44px; max-width: 44px; }
  .brand-copy strong, .brand-text strong { font-size: 17px; }
  .brand-copy span, .brand-text span { font-size: 12px; }
  .header-actions a, .header-controls a { padding: 9px 10px; font-size: 13px; }
}


.menu-toggle { display:none; border:1px solid #d9e2ed; border-radius:10px; background:#fff; color:#0b2c50; padding:9px 12px; font-size:20px; line-height:1; cursor:pointer; }
@media (max-width:1100px) { .menu-toggle { display:block; order:3; } }


/* NamaAmrita account and password recovery pages */
.auth-wrap{max-width:680px;margin:0 auto}
.auth-card{background:#fff;border:1px solid #e3e9f0;border-radius:20px;padding:clamp(22px,4vw,42px);box-shadow:0 14px 42px rgba(9,43,85,.08)}
.auth-card h1{margin-top:0;color:#092b55}
.auth-form{display:grid;gap:17px;margin:24px 0}
.auth-form label{display:grid;gap:7px;font-weight:650;color:#233c59}
.auth-form input{width:100%;min-width:0;border:1px solid #cbd6e2;border-radius:10px;padding:12px 13px;font:inherit;color:#152b45;background:#fff}
.auth-form input:focus{outline:3px solid rgba(35,115,180,.18);border-color:#2373b4}
.auth-notice{margin:16px 0;padding:13px 15px;border-radius:10px;background:#eef5fc;color:#12395e}
.auth-error{background:#fff0ef;color:#8a1f17}.auth-success{background:#edf9f0;color:#155b2b}
.auth-card a{overflow-wrap:anywhere}


/* V1.8: grouped navigation with accessible dropdowns */
.main-nav { gap: clamp(8px, 1vw, 17px); }
.main-nav > a, .nav-group-toggle { font: inherit; color:#31445c; font-size:.9rem; font-weight:600; padding:10px 11px; border:0; border-radius:10px; background:transparent; white-space:nowrap; cursor:pointer; text-decoration:none; }
.main-nav > a:hover, .nav-group-toggle:hover, .nav-group:focus-within > .nav-group-toggle,
.main-nav > a.active { color:var(--blue); background:#edf4fa; text-decoration:none; }
.nav-group { position:relative; flex:0 0 auto; }
.nav-group-toggle span { margin-left:3px; font-size:.85em; }
.nav-submenu {
  display:none; position:absolute; z-index:100; top:calc(100% + 7px); left:0;
  min-width:220px; max-width:min(300px, 90vw); padding:8px;
  background:#fff; border:1px solid #e1e8f0; border-radius:13px;
  box-shadow:0 16px 38px rgba(7,34,65,.16);
}
.nav-group:hover > .nav-submenu, .nav-group:focus-within > .nav-submenu,
.nav-group.submenu-open > .nav-submenu { display:grid; }
.nav-submenu a { display:block; padding:10px 12px; border-radius:8px; color:#31445c; font-size:.92rem; line-height:1.35; white-space:normal; }
.nav-submenu a:hover { background:#edf4fa; color:var(--blue); text-decoration:none; }
.main-nav .nav-download { white-space:nowrap; }
@media (max-width:1100px) {
  .main-nav { align-items:stretch; }
  .nav-group { flex:1 1 100%; }
  .nav-group-toggle { width:100%; display:flex; align-items:center; justify-content:space-between; text-align:left; }
  .nav-submenu { position:static; min-width:0; max-width:none; box-shadow:none; border:0; border-radius:8px; padding:2px 8px 8px 16px; background:#f7f9fc; }
  .nav-group:hover > .nav-submenu { display:none; }
  .nav-group.submenu-open > .nav-submenu, .nav-group:focus-within > .nav-submenu { display:grid; }
  .main-nav > a, .nav-group-toggle { white-space:normal; }
}
