/* =========================================================
   Grampanchayat Sasvand — Design tokens
   Palette drawn from the Warli mud-and-ochre villages of
   Palghar/Dahanu: rice-paper cream walls, terracotta clay,
   forest green fields, deep indigo for civic trust.
   ========================================================= */
:root {
    --bg: #FBF6EC;
    --bg-alt: #F3EBD8;
    --ink: #2A2119;
    --ink-soft: #5B4F42;
    --terracotta: #B5502F;
    --terracotta-dark: #8F3D22;
    --forest: #3F5E3A;
    --indigo: #1F3B57;
    --gold: #C99A3E;
    --line: #E3D8BF;
    --white: #FFFFFF;

    --font-head: 'Baloo 2', 'Noto Sans Devanagari', sans-serif;
    --font-body: 'Noto Sans', 'Noto Sans Devanagari', sans-serif;

    --radius: 6px;
    --container: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--terracotta-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 2px;
}

h1, h2, h3, h4 {
    font-family: var(--font-head);
    font-weight: 700;
    color: var(--indigo);
    margin: 0 0 .5em;
    line-height: 1.25;
}
h1 { font-size: clamp(1.9rem, 4.5vw, 2.9rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
p { margin: 0 0 1em; max-width: 66ch; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }

/* ---------------- Warli motif strip (the one bold, signature element) --- */
.warli-strip {
    height: 14px;
    background-image: repeating-linear-gradient(
        45deg, var(--terracotta) 0 6px, transparent 6px 12px
    );
    opacity: .55;
}
.warli-figures {
    width: 100%;
    height: 46px;
    display: block;
    color: var(--terracotta);
}

/* ---------------- Top utility bar (language switch) --------------------- */
.topbar {
    background: var(--indigo);
    color: #EDE6D6;
    font-size: .85rem;
}
.topbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 6px;
    padding-bottom: 6px;
    gap: 12px;
    flex-wrap: wrap;
}
.topbar .tagline { opacity: .9; }
.lang-switch { display: flex; gap: 4px; }
.lang-switch a {
    color: #EDE6D6;
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,.25);
    font-size: .8rem;
}
.lang-switch a.active {
    background: var(--gold);
    color: var(--indigo);
    border-color: var(--gold);
    font-weight: 700;
    text-decoration: none;
}
.lang-switch a:hover { text-decoration: none; border-color: var(--gold); }

/* ---------------- Header / nav ------------------------------------------ */
header.site-header {
    background: var(--bg);
    border-bottom: 3px solid var(--terracotta);
    position: sticky;
    top: 0;
    z-index: 50;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
    width: 48px; height: 48px; flex: none;
    border-radius: 50%;
    background: var(--terracotta);
    color: var(--white);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.3rem;
}
.brand-text .brand-name {
    font-family: var(--font-head);
    font-weight: 700;
    color: var(--indigo);
    font-size: 1.15rem;
    line-height: 1.2;
}
.brand-text .brand-sub {
    font-size: .78rem;
    color: var(--ink-soft);
}

nav.main-nav ul {
    list-style: none;
    display: flex;
    gap: 4px;
    margin: 0; padding: 0;
}
nav.main-nav a {
    display: block;
    padding: 10px 14px;
    color: var(--ink);
    font-weight: 600;
    font-size: .95rem;
    border-radius: var(--radius);
}
nav.main-nav a:hover, nav.main-nav a.active {
    background: var(--bg-alt);
    color: var(--terracotta-dark);
    text-decoration: none;
}

.nav-toggle {
    display: none;
    background: none;
    border: 2px solid var(--indigo);
    border-radius: var(--radius);
    padding: 8px 10px;
    cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
    content: '';
    display: block;
    width: 22px; height: 2px;
    background: var(--indigo);
    position: relative;
}
.nav-toggle span::before { position: absolute; top: -7px; width: 22px; }
.nav-toggle span::after { position: absolute; top: 7px; width: 22px; }

/* ---------------- Hero --------------------------------------------------- */
.hero {
    background: var(--indigo);
    color: #F2ECDC;
    padding: 56px 0 46px;
    position: relative;
    overflow: hidden;
}
.hero .container {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 32px;
    align-items: center;
}
.hero-tag {
    display: inline-block;
    color: var(--gold);
    font-weight: 700;
    font-size: .9rem;
    margin-bottom: 10px;
    letter-spacing: .02em;
}
.hero h1 { color: var(--white); margin-bottom: .3em; }
.hero .hero-sub { color: #D8CFB6; font-size: 1.1rem; max-width: 46ch; }
.hero-actions { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.btn {
    display: inline-block;
    padding: 11px 22px;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: .95rem;
    border: 2px solid transparent;
    cursor: pointer;
}
.btn-primary { background: var(--terracotta); color: var(--white); }
.btn-primary:hover { background: var(--terracotta-dark); text-decoration: none; }
.btn-outline { border-color: #D8CFB6; color: #F2ECDC; background: transparent; }
.btn-outline:hover { background: rgba(255,255,255,.08); text-decoration: none; }

.hero-panel {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: var(--radius);
    padding: 22px;
}
.hero-panel h3 { color: var(--gold); font-size: 1rem; margin-bottom: 14px; }
.hero-fact { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.12); font-size: .92rem; }
.hero-fact:last-child { border-bottom: none; }
.hero-fact .k { color: #B9AF95; min-width: 90px; }
.hero-fact .v { color: #F2ECDC; font-weight: 600; }

/* ---------------- Sections ------------------------------------------------ */
section { padding: 48px 0; }
.section-head { margin-bottom: 26px; display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.section-head p { margin: 0; color: var(--ink-soft); }
.section-alt { background: var(--bg-alt); }

/* Notices list */
.notice-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.notice-item {
    display: flex; gap: 18px; align-items: flex-start;
    padding: 18px 0; border-bottom: 1px solid var(--line);
}
.notice-date {
    flex: none; width: 68px; text-align: center;
    background: var(--terracotta); color: var(--white);
    border-radius: var(--radius); padding: 8px 4px; font-weight: 700;
}
.notice-date .d { font-size: 1.3rem; display: block; line-height: 1; }
.notice-date .m { font-size: .72rem; text-transform: uppercase; }
.notice-item h3 { font-size: 1.05rem; margin-bottom: 4px; }
.notice-item p { color: var(--ink-soft); margin-bottom: 0; font-size: .95rem; }

/* Members grid */
.leadership-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}
.member-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    text-align: center;
}
.member-photo {
    width: 100%; aspect-ratio: 1/1;
    background: var(--bg-alt);
    display: flex; align-items: center; justify-content: center;
    color: var(--terracotta);
    font-family: var(--font-head); font-size: 2.4rem; font-weight: 700;
    overflow: hidden;
}
.member-photo img { width: 100%; height: 100%; object-fit: cover; }
.member-body { padding: 16px; }
.member-role {
    display: inline-block;
    background: var(--gold);
    color: var(--indigo);
    font-size: .72rem; font-weight: 700;
    padding: 3px 10px; border-radius: 20px;
    margin-bottom: 8px;
    text-transform: uppercase;
}
.member-body h3 { font-size: 1.05rem; margin-bottom: 2px; }
.member-body .ward { color: var(--ink-soft); font-size: .85rem; }

.members-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.members-grid .member-card { text-align: left; display: flex; align-items: center; gap: 12px; padding: 10px; }
.members-grid .member-photo { width: 56px; height: 56px; flex: none; border-radius: 50%; font-size: 1.1rem; }
.members-grid .member-body { padding: 0; }
.members-grid .member-body h3 { font-size: .95rem; }

.empty-note {
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    padding: 22px;
    color: var(--ink-soft);
    text-align: center;
    background: var(--white);
}

/* About page */
.about-block { display: grid; grid-template-columns: 1.3fr .9fr; gap: 34px; align-items: start; }
.info-table { width: 100%; border-collapse: collapse; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.info-table tr { border-bottom: 1px solid var(--line); }
.info-table tr:last-child { border-bottom: none; }
.info-table th, .info-table td { text-align: left; padding: 12px 16px; font-size: .93rem; }
.info-table th { color: var(--ink-soft); font-weight: 600; width: 40%; background: var(--bg-alt); }

.link-card-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.link-card {
    display: block; background: var(--white); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 14px 16px;
}
.link-card strong { color: var(--terracotta-dark); }
.link-card span { display: block; color: var(--ink-soft); font-size: .85rem; margin-top: 2px; }

/* Gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.gallery-item { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--white); }
.gallery-item img { aspect-ratio: 4/3; object-fit: cover; }
.gallery-item .cap { padding: 8px 10px; font-size: .85rem; color: var(--ink-soft); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 34px; }
.contact-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.contact-card h3 { font-size: 1rem; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .92rem; }
.form-group input, .form-group textarea {
    width: 100%; padding: 11px 12px; border: 1px solid var(--line);
    border-radius: var(--radius); font-family: var(--font-body); font-size: .95rem;
    background: var(--white);
}
.form-group textarea { min-height: 130px; resize: vertical; }
.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 18px; font-size: .92rem; }
.alert-success { background: #E4EEDF; color: var(--forest); border: 1px solid #C4DBB9; }
.alert-error { background: #F6E1DA; color: var(--terracotta-dark); border: 1px solid #EBC2B3; }

/* Footer */
footer.site-footer { background: var(--indigo); color: #D8CFB6; padding: 40px 0 18px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; margin-bottom: 26px; }
.footer-grid h4 { color: var(--gold); font-family: var(--font-head); font-size: 1rem; margin-bottom: 12px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: #D8CFB6; }
.footer-grid a:hover { color: var(--white); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); padding-top: 16px; font-size: .82rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ---------------- Responsive ---------------------------------------------- */
@media (max-width: 880px) {
    .hero .container { grid-template-columns: 1fr; }
    .about-block, .contact-grid { grid-template-columns: 1fr; }
    .leadership-grid { grid-template-columns: 1fr; }
    .members-grid { grid-template-columns: repeat(2, 1fr); }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
    .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
    nav.main-nav {
        display: none;
        position: absolute; left: 0; right: 0; top: 100%;
        background: var(--bg); border-bottom: 3px solid var(--terracotta);
        padding: 10px 0;
    }
    nav.main-nav.open { display: block; }
    nav.main-nav ul { flex-direction: column; padding: 0 20px; }
    nav.main-nav a { padding: 12px 6px; border-bottom: 1px solid var(--line); border-radius: 0; }
    .topbar .container { justify-content: center; text-align: center; }
    .topbar .tagline { display: none; }
    .members-grid, .gallery-grid { grid-template-columns: 1fr; }
    section { padding: 34px 0; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}
