/* Phulwariya Mandir — design tokens, translated 1:1 from the Figma file
   (Indiquest -> Mandir project). Keep in sync with Figma "Brand Colors" variable
   collection and the Hindi/Latin text styles — see PRD §4.4 / PROJECT_BRIEF.md. */

:root {
    --color-saffron: #E8792B;
    --color-maroon: #8A1C2B;
    --color-gold: #D4A017;
    --color-cream: #FAF6EF;
    --color-charcoal: #2B2B2B;
    --color-green: #2E7D53;
    --color-white: #FFFFFF;
    --color-grey-light: #EBEBEB;
    --color-grey-mid: #D9D9D9;

    --font-hindi-display: 'Noto Sans Devanagari', sans-serif;
    --font-hindi-body: 'Mukta', sans-serif;
    --font-latin-display: 'Lora', serif;
    --font-latin-heading: 'Poppins', sans-serif;
    --font-latin-body: 'Inter', sans-serif;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --max-width: 480px; /* mobile-first reference width, per PRD §16.1 */
}

* { box-sizing: border-box; }

html { overflow-x: hidden; }

body {
    margin: 0;
    width: 100%;
    overflow-x: hidden;
    background: var(--color-cream);
    color: var(--color-charcoal);
    font-family: var(--font-hindi-body);
    font-size: 16px;
    line-height: 1.5;
}

.wrap { width: 100%; }

.img-slot.placeholder { overflow-wrap: break-word; word-break: break-all; box-sizing: border-box; }

/* Mixed-script rule (learned building the Figma mockups): never mix Devanagari
   and Latin symbols/arrows in one element relying on a single font to cover
   both — use separate spans with explicit font-family per script. */
.lang-hi { font-family: var(--font-hindi-body); }
.lang-en { font-family: var(--font-latin-body); }

h1, h2, h3 { font-family: var(--font-hindi-display); color: var(--color-maroon); margin: 0 0 0.4em; }
h1.lang-en, h2.lang-en, h3.lang-en { font-family: var(--font-latin-display); }

.wrap { max-width: var(--max-width); margin: 0 auto; background: var(--color-white); min-height: 100vh; }

/* Header */
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-grey-light);
    position: sticky;
    top: 0;
    z-index: 40;
}
.site-header .logo { font-family: var(--font-hindi-display); font-weight: 700; font-size: 18px; color: var(--color-maroon); text-decoration: none; }

.hamburger-btn {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: var(--color-charcoal);
    cursor: pointer;
    padding: 4px 6px;
}

/* Top nav — persistent primary navigation (moved up from the old bottom-nav) */
.top-nav {
    display: flex;
    justify-content: space-between;
    padding: 10px 12px;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-grey-light);
}
.top-nav a {
    font-size: 12px;
    color: var(--color-charcoal);
    text-decoration: none;
    font-weight: 500;
    padding: 6px 4px;
    border-bottom: 2px solid transparent;
}
.top-nav a.active { color: var(--color-saffron); font-weight: 700; border-bottom-color: var(--color-saffron); }

/* Side menu (hamburger drawer) */
.side-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 49;
}
.side-menu-overlay.open { opacity: 1; }
.side-menu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 78%;
    max-width: 300px;
    background: var(--color-white);
    box-shadow: -2px 0 12px rgba(0,0,0,0.15);
    padding: 20px;
    transform: translateX(100%);
    transition: transform 0.2s ease;
    z-index: 50;
}
.side-menu.open { transform: translateX(0); }
.side-menu a {
    display: block;
    padding: 12px 0;
    color: var(--color-charcoal);
    text-decoration: none;
    font-size: 15px;
    border-bottom: 1px solid var(--color-grey-light);
}
.side-menu-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    color: var(--color-charcoal);
}

/* Footer (secondary links only — primary nav lives at the top now) */
.site-footer {
    padding: 20px;
    text-align: center;
    font-size: 12px;
    color: #888;
    border-top: 1px solid var(--color-grey-light);
}
.site-footer a { color: var(--color-charcoal); text-decoration: none; }

/* WhatsApp floating button */
.whatsapp-fab {
    position: fixed;
    right: 16px;
    bottom: 78px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--color-green);
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 50;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: var(--radius-md);
    font-family: var(--font-hindi-body);
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    width: 100%;
}
.btn-primary { background: var(--color-saffron); color: var(--color-white); }
.btn-secondary { background: var(--color-green); color: var(--color-white); }
.btn-outline { background: transparent; color: var(--color-maroon); border: 1.5px solid var(--color-maroon); }

/* Image placeholder — mirrors the Figma component so the fallback is visible
   in-browser exactly like it was in the mockups. */
.img-slot { display: block; width: 100%; border-radius: var(--radius-sm); object-fit: cover; background: var(--color-grey-mid); }
.img-slot.placeholder {
    display: flex; align-items: center; justify-content: center;
    border: 1px dashed var(--color-charcoal);
    color: var(--color-charcoal);
    font-family: var(--font-latin-body);
    font-size: 11px;
    text-align: center;
    padding: 8px;
    min-height: 120px;
}

/* Form fields */
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 4px; }
.field input, .field select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--color-grey-mid);
    border-radius: var(--radius-sm);
    font-family: var(--font-hindi-body);
    font-size: 14px;
    background: var(--color-white);
}

/* Cards / chips / grids */
.card { background: var(--color-white); border-radius: var(--radius-md); padding: 8px; }
.chip { display: inline-flex; padding: 6px 12px; border-radius: 16px; background: var(--color-grey-light); font-size: 12px; font-weight: 500; }
.chip.active { background: var(--color-saffron); color: var(--color-white); }
.grid-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; width: 100%; min-width: 0; }
.grid-row > * { flex: none; }
.gallery-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.gallery-grid .img-slot { width: 78px; height: 78px; }

/* Deity showcase — the primary identity of each temple; deliberately more
   prominent than the priest listing, per explicit direction (2026-07-03). */
.deity-showcase {
    background: linear-gradient(135deg, var(--color-maroon), #6e1522);
    padding: 20px;
    margin: 4px 0;
}
.deity-showcase h2 {
    color: var(--color-gold);
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 12px;
}
.deity-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.deity-chip {
    background: var(--color-white);
    color: var(--color-maroon);
    font-weight: 700;
    font-size: 15px;
    padding: 8px 16px;
    border-radius: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.admin-notice {
    font-family: var(--font-latin-body);
    font-size: 11px;
    color: #808080;
    padding: 8px 20px;
}
