:root {
    --maroon: #af0201;
    --maroon-dark: #7a0101;
    --gold: #fbbd54;
    --cream: #fff4df;
    --brown: #2b1713;
    --leaf: #275d45;
}

* { box-sizing: border-box; }
html { overflow-x: hidden; }
body { margin: 0; font-family: "Inter", "Noto Sans Malayalam", system-ui, sans-serif; color: var(--brown); background: #fffaf1; }
body { overflow-x: hidden; }
a { color: var(--maroon); }
.narrow { max-width: 860px; }
.section { padding: 72px 0; }
.cream-band { background: var(--cream); }

.temple-nav { background: linear-gradient(90deg, var(--maroon-dark), var(--maroon)); box-shadow: 0 12px 34px rgba(43, 23, 19, .16); }
.temple-nav .nav-link { color: #fff; }
.temple-nav .nav-link:hover { color: var(--gold); }
.nav-logo { width: 42px; height: 42px; object-fit: contain; }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #21120d; font-weight: 700; }
.btn-gold:hover { background: #ffd081; border-color: #ffd081; }
.btn-maroon { background: var(--maroon); border-color: var(--maroon); color: #fff; font-weight: 700; }
.btn-maroon:hover { background: var(--maroon-dark); border-color: var(--maroon-dark); color: #fff; }
.btn-outline-maroon { border-color: var(--maroon); color: var(--maroon); font-weight: 700; }
.btn-outline-maroon:hover { background: var(--maroon); color: #fff; }

.hero { min-height: 88vh; position: relative; display: flex; align-items: center; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(39, 17, 12, .9), rgba(87, 25, 19, .7), rgba(43, 23, 19, .24)); }
.hero-content { position: relative; color: #fff; padding-top: 56px; }
.hero-wordmark { width: min(620px, 100%); height: auto; margin-bottom: 18px; }
.hero-kicker { color: var(--gold); font-size: 1.2rem; font-weight: 700; }
.hero h1 { max-width: 820px; font-size: clamp(2.5rem, 6vw, 5.75rem); line-height: .96; font-weight: 900; letter-spacing: 0; }
.hero-copy { max-width: 720px; font-size: 1.16rem; margin: 20px 0 28px; }

.section-title { text-align: center; margin-bottom: 34px; }
.section-title p, .page-hero p { color: var(--gold); text-transform: uppercase; letter-spacing: 0; font-weight: 900; margin-bottom: 6px; }
.section-title h2, .page-hero h1 { color: var(--maroon); font-weight: 900; }
.deity-banner { filter: drop-shadow(0 18px 28px rgba(43, 23, 19, .16)); }
.timing-tile { background: #fff; border: 1px solid #efd8b7; padding: 22px; min-height: 120px; display: flex; flex-direction: column; justify-content: space-between; }
.timing-tile span { color: #765d55; }
.timing-tile strong { color: var(--maroon); font-size: 1.3rem; }

.pooja-card, .pooja-list-card, .feature-panel, .payment-panel, .contact-panel, .temple-form, .dashboard-panel, .login-card, .admin-login-card {
    background: #fff; border: 1px solid #efd8b7; border-radius: 8px; box-shadow: 0 18px 45px rgba(43, 23, 19, .08);
}
.pooja-card { position: relative; padding: 24px; min-height: 250px; }
.pooja-card small, .pooja-list-card small { color: var(--leaf); font-weight: 900; text-transform: uppercase; }
.pooja-card h3, .pooja-list-card h2 { color: var(--maroon); font-weight: 900; margin-top: 10px; }
.pooja-icon { height: 72px; object-fit: contain; float: right; opacity: .9; }
.pooja-list-card, .feature-panel, .payment-panel, .contact-panel, .temple-form, .dashboard-panel { padding: 28px; height: 100%; }
.feature-panel h2, .payment-panel h2, .contact-panel h2, .dashboard-panel h2 { color: var(--maroon); font-weight: 900; }
.list-row { display: flex; gap: 16px; border-bottom: 1px solid #f0dcc3; padding: 16px 0; }
.list-row span { color: var(--gold); font-weight: 900; min-width: 56px; }
.list-row p { margin: 4px 0 0; color: #765d55; }
.qr-preview { max-height: 190px; width: auto; display: block; margin: 16px 0; border: 1px solid #efd8b7; }
.gallery-img, .gallery-card img, .video-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; border: 1px solid #efd8b7; }
.gallery-card { background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 18px 45px rgba(43, 23, 19, .08); }
.gallery-card figcaption { padding: 14px 16px; font-weight: 800; }
.gallery-card figcaption span { display: block; color: #765d55; font-weight: 500; }
.video-card { display: block; text-decoration: none; background: #fff; padding: 12px; border-radius: 8px; border: 1px solid #efd8b7; height: 100%; }
.video-card span { display: inline-block; margin-top: 12px; color: var(--leaf); font-weight: 900; text-transform: uppercase; }
.video-card h2 { font-size: 1.25rem; color: var(--maroon); font-weight: 900; }

.page-hero { background: linear-gradient(135deg, var(--maroon-dark), var(--maroon)); color: #fff; padding: 76px 0; }
.page-hero h1 { color: #fff; font-size: clamp(2.25rem, 5vw, 4.75rem); }
.content-body { background: #fff; padding: 34px; border: 1px solid #efd8b7; border-radius: 8px; line-height: 1.85; font-size: 1.08rem; }
.festival-row { display: grid; grid-template-columns: 120px 1fr; gap: 24px; background: #fff; border: 1px solid #efd8b7; border-radius: 8px; padding: 22px; margin-bottom: 18px; }
.festival-date { background: var(--maroon); color: #fff; text-align: center; padding: 16px; font-size: 2rem; font-weight: 900; border-radius: 8px; }
.festival-date span { display: block; font-size: .85rem; color: var(--gold); }
.form-total { background: var(--cream); border: 1px solid #efd8b7; padding: 16px; border-radius: 8px; }
.history-row { display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px solid #f0dcc3; padding: 14px 0; }
.history-row span { display: block; color: #765d55; }

.temple-footer { background: var(--brown); color: #f8ead0; padding: 54px 0 22px; }
.temple-footer a { display: block; color: #f8ead0; text-decoration: none; margin-bottom: 8px; }
.temple-footer a:hover { color: var(--gold); }
.footer-wordmark { max-width: 360px; width: 100%; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.16); margin-top: 34px; padding-top: 18px; color: #d7bfa0; }

.auth-body { min-height: 100vh; background: linear-gradient(135deg, var(--maroon-dark), var(--maroon)); display: grid; place-items: center; padding: 24px; }
.auth-wrap { width: min(420px, 100%); }
.admin-login-card, .login-card { padding: 30px; text-align: center; }
.admin-login-card img, .login-card img, .error-logo { width: 84px; height: 84px; object-fit: contain; margin-bottom: 14px; }
.admin-login-card h1, .login-card h1 { color: var(--maroon); font-size: 1.7rem; font-weight: 900; }
.admin-body .content-wrapper { background: #f6efe4; }
.offline-page { min-height: 100vh; display: grid; place-items: center; background: var(--cream); }
.offline-card { max-width: 460px; padding: 32px; text-align: center; background: #fff; border-radius: 8px; border: 1px solid #efd8b7; }
.offline-card img { width: 90px; }

@media (max-width: 767px) {
    .section { padding: 48px 0; }
    .hero { min-height: 82vh; }
    .hero h1 { font-size: 2.55rem; }
    .festival-row { grid-template-columns: 1fr; }
    .history-row { flex-direction: column; }
}

/* Landing-page inspired temple theme */
body {
    background:
        radial-gradient(circle at 20% 10%, rgba(217, 165, 40, .10), transparent 28rem),
        linear-gradient(180deg, #fffaf1 0%, #fff 46%, #fff7e9 100%);
}

.site-masthead {
    background: #fff;
    position: relative;
    z-index: 20;
    border-bottom: 1px solid rgba(217, 165, 40, .28);
}

.masthead-inner {
    min-height: 112px;
    display: grid;
    grid-template-columns: 1.4fr 64px 128px 64px 1.4fr auto;
    align-items: center;
    gap: 18px;
    position: relative;
}

.brand-title {
    color: #b36f20;
    font-size: clamp(1.05rem, 2.2vw, 1.75rem);
    font-weight: 900;
    line-height: 1.05;
}

.brand-title-ml {
    text-align: right;
    font-weight: 800;
}

.masthead-emblem {
    width: 128px;
    height: 128px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: #fff;
    border: 5px solid var(--gold);
    box-shadow: 0 14px 26px rgba(43, 23, 19, .18);
    margin-bottom: -48px;
}

.brand-wordmark-en {
    grid-column: 1;
}

.brand-wordmark-ml {
    grid-column: 3;
}

.online-vazhipad {
    grid-column: 4;
}

.masthead-emblem img {
    width: 104px;
    height: 104px;
    object-fit: contain;
}

.online-vazhipad {
    text-decoration: none;
    color: var(--maroon);
    border: 2px solid var(--maroon);
    border-radius: 8px;
    padding: 10px 18px;
    line-height: 1.05;
    text-transform: uppercase;
    font-weight: 900;
    font-size: .8rem;
    text-align: center;
}

.online-vazhipad:hover {
    background: var(--maroon);
    color: #fff;
}

.temple-nav {
    background-color: #af0201;
    background-image:
        linear-gradient(135deg, rgba(255,255,255,.08) 25%, transparent 25%),
        linear-gradient(225deg, rgba(255,255,255,.08) 25%, transparent 25%),
        linear-gradient(45deg, rgba(255,255,255,.06) 25%, transparent 25%),
        linear-gradient(315deg, rgba(255,255,255,.06) 25%, #af0201 25%);
    background-position: 12px 0, 12px 0, 0 0, 0 0;
    background-size: 24px 24px;
    border-bottom: 5px solid #fbbd54;
    min-height: 70px;
}

.temple-nav .container {
    position: relative;
}

.temple-nav .nav-link {
    color: #fff;
    background: #fbbd54;
    border-radius: 8px;
    margin: 0 5px;
    padding: 10px 18px;
    font-size: .92rem;
    box-shadow: inset 0 -2px 0 rgba(43, 23, 19, .16);
}

.temple-nav .nav-link:hover,
.temple-nav .nav-link.active {
    color: #fff;
    background: #7a0101;
}

.navbar-toggler {
    margin-left: auto;
}

.temple-nav .navbar-collapse {
    justify-content: space-between;
}

.temple-nav .nav-left,
.temple-nav .nav-right {
    gap: 8px;
}

.nav-devotee-link {
    border: 1px solid rgba(255,255,255,.78);
    background: transparent !important;
}

.hero-slider {
    min-height: 72vh;
    background: #1c1714;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .7s ease;
}

.hero-slide.active {
    opacity: 1;
}

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

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(33, 24, 20, .76), rgba(70, 47, 35, .28), rgba(33, 24, 20, .54));
}

.hero-panel {
    max-width: 760px;
}

.hero h1 {
    color: #fff;
    text-shadow: 0 6px 20px rgba(0, 0, 0, .24);
}

.hero-kicker {
    display: inline-block;
    background: rgba(90, 0, 37, .82);
    color: #ffd67a;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 8px;
    padding: 8px 12px;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 56px;
    height: 80px;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 4.5rem;
    line-height: 1;
}

.hero-prev { left: 24px; }
.hero-next { right: 24px; }

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 3;
}

.hero-dots span {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: rgba(255,255,255,.75);
}

.hero-dots span.active {
    background: #fff;
    outline: 3px solid rgba(228, 136, 18, .7);
}

.chant-strip {
    overflow: hidden;
    background: #fbbd54;
    color: #4a001e;
    border-top: 4px solid #af0201;
    border-bottom: 4px solid #af0201;
    font-weight: 900;
}

.chant-track {
    min-width: max-content;
    display: flex;
    gap: 64px;
    padding: 12px 0;
    animation: chantScroll 28s linear infinite;
}

.chant-track span {
    white-space: nowrap;
}

@keyframes chantScroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.script-heading {
    color: #af0201;
    font-family: "Brush Script MT", "Segoe Script", cursive;
    font-weight: 500;
    font-size: clamp(2.7rem, 7vw, 5.4rem);
    line-height: .9;
}

.kicker-title,
.section-title p {
    color: #7a0101;
    font-size: 1.25rem;
    text-transform: none;
    font-weight: 900;
}

.about-split {
    background: #fff;
}

.timings-section {
    background: #fff7e9;
    background-image: radial-gradient(circle at 50% 0, rgba(90, 0, 37, .08), transparent 24rem);
}

.timing-board {
    max-width: 960px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    background: #fff;
    border: 1px solid #ecd2ae;
    box-shadow: 0 22px 50px rgba(43, 23, 19, .08);
}

.timing-board > div {
    padding: 34px;
}

.timing-board > div + div {
    border-left: 1px solid #ecd2ae;
}

.timing-board h3 {
    color: #7a0101;
    font-weight: 900;
    margin-bottom: 20px;
}

.timing-line {
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #f0dcc3;
}

.timing-line strong {
    color: #af0201;
}

.timing-note {
    max-width: 760px;
    margin: 18px auto 0;
    text-align: center;
    color: #765d55;
}

.offerings-section {
    background: #fff;
}

.offering-buttons {
    display: grid;
    gap: 14px;
}

.offering-buttons a {
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    font-size: 1.08rem;
    font-weight: 900;
}

.offering-buttons .dark { background: #7a0101; }
.offering-buttons .gold { background: #fbbd54; }
.offering-buttons span { font-size: 1.8rem; line-height: 1; }

.offering-photo {
    position: relative;
}

.offering-photo img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.offering-caption {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 24px;
    background: rgba(90, 0, 37, .88);
    color: #fff;
    border-radius: 8px;
    padding: 14px 18px;
    font-weight: 700;
}

.service-banner {
    min-height: 430px;
    position: relative;
    display: flex;
    align-items: center;
    color: #fff;
    overflow: hidden;
}

.service-banner > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(43,23,19,.82), rgba(43,23,19,.38), rgba(43,23,19,.72));
}

.service-content {
    position: relative;
    max-width: 680px;
    margin-left: auto;
}

.service-content > p:first-child {
    color: #fff;
    font-weight: 900;
    font-size: 1.3rem;
}

.service-content .script-heading {
    color: #e7a348;
}

.service-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin-top: 28px;
    border-top: 1px solid rgba(255,255,255,.34);
}

.service-stats div {
    padding: 18px;
    border-right: 1px solid rgba(255,255,255,.34);
    text-align: center;
}

.service-stats div:last-child {
    border-right: 0;
}

.service-stats strong {
    display: block;
    font-size: 1.6rem;
}

.festival-card-home {
    display: block;
    text-align: center;
    text-decoration: none;
    color: #7a0101;
}

.festival-card-home img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    margin-bottom: 18px;
}

.festival-card-home h3 {
    font-weight: 900;
}

.festival-card-home span {
    color: #af0201;
    font-weight: 800;
}

.news-band {
    background: #fff7e9;
    background-image:
        radial-gradient(circle at 50% 0, rgba(90, 0, 37, .10), transparent 22rem),
        linear-gradient(180deg, rgba(255,255,255,.5), rgba(255,244,223,.7));
}

.news-list {
    max-width: 760px;
    margin: 0 auto;
}

.news-row {
    display: grid;
    grid-template-columns: 220px 96px 1fr;
    align-items: center;
    gap: 24px;
    text-decoration: none;
    color: #7a0101;
    padding: 22px 0;
    border-bottom: 1px solid #b87c8e;
}

.news-row img {
    width: 220px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.news-date {
    font-size: 3.2rem;
    line-height: 1;
    color: #7a0101;
    border-right: 1px solid #7c5360;
}

.news-date small {
    display: block;
    font-size: .8rem;
    margin-top: 8px;
    color: #765d55;
}

.gallery-strip {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
    align-items: center;
}

.gallery-strip img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.contact-cta {
    background: #7a0101;
    color: #fff;
}

.contact-cta h2 {
    color: #fff;
    font-weight: 900;
}

.floating-actions {
    position: fixed;
    right: 20px;
    bottom: 22px;
    z-index: 50;
    display: grid;
    gap: 8px;
}

.floating-actions a {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    text-decoration: none;
    color: #fff;
    background: #fbbd54;
    box-shadow: 0 10px 24px rgba(43,23,19,.18);
    font-weight: 900;
}

.floating-actions .whatsapp {
    background: #25d366;
}

.floating-actions a:last-child {
    background: #fff0d7;
    color: #7a0101;
}

.temple-footer {
    background: #7a0101;
}

.temple-footer h6 {
    color: #fff;
    font-weight: 900;
    border-bottom: 1px solid rgba(255,255,255,.28);
    padding-bottom: 12px;
    margin-bottom: 18px;
}

.page-hero {
    background:
        linear-gradient(90deg, rgba(90,0,37,.88), rgba(90,0,37,.66)),
        url("/assets/img/temple-campus.jpeg") center/cover;
    border-bottom: 5px solid #fbbd54;
}

.page-hero h1 {
    font-family: "Brush Script MT", "Segoe Script", cursive;
    color: #f0a84e;
    font-weight: 500;
}

.pooja-list-card,
.festival-row,
.gallery-card,
.video-card,
.contact-panel,
.temple-form,
.dashboard-panel,
.login-card {
    border-radius: 0;
    border-color: #ecd2ae;
}

@media (max-width: 991px) {
    .masthead-inner {
        grid-template-columns: 1fr auto 1fr;
        min-height: 98px;
    }
    .brand-title-en,
    .brand-title-ml {
        font-size: 1rem;
    }
    .online-vazhipad {
        display: none;
    }
    .masthead-emblem {
        width: 92px;
        height: 92px;
        margin-bottom: -34px;
    }
    .masthead-emblem img {
        width: 74px;
        height: 74px;
    }
    .temple-nav .nav-link {
        margin: 5px 0;
    }
    .hero-arrow {
        display: none;
    }
    .timing-board,
    .service-stats,
    .gallery-strip {
        grid-template-columns: 1fr;
    }
    .timing-board > div + div {
        border-left: 0;
        border-top: 1px solid #ecd2ae;
    }
    .news-row {
        grid-template-columns: 1fr;
    }
    .news-row img {
        width: 100%;
    }
    .news-date {
        border-right: 0;
    }
}

@media (max-width: 767px) {
    .brand-title-ml {
        display: none;
    }
    .masthead-inner {
        grid-template-columns: 1fr auto;
    }
    .hero-slider {
        min-height: 74vh;
    }
    .hero-panel {
        padding-right: 38px;
    }
    .script-heading {
        font-size: 3.25rem;
    }
    .offering-caption {
        position: static;
        border-radius: 0;
    }
}

/* KPT final header assets and spacing refinements */
.masthead-inner {
    min-height: 126px;
    grid-template-columns: minmax(260px, 1.05fr) 48px 148px 48px minmax(260px, 1.05fr) auto;
    column-gap: clamp(12px, 2vw, 28px);
    padding-top: 14px;
    padding-bottom: 14px;
}

.brand-wordmark {
    display: flex;
    align-items: center;
    min-width: 0;
    text-decoration: none;
}

.brand-wordmark img {
    display: block;
    width: 100%;
    max-height: 82px;
    object-fit: contain;
}

.brand-wordmark-en {
    justify-content: flex-start;
}

.brand-wordmark-ml {
    justify-content: flex-end;
}

.masthead-emblem {
    width: 148px;
    height: 148px;
    margin-bottom: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    z-index: 3;
}

.masthead-emblem img {
    width: 148px;
    height: 148px;
    filter: drop-shadow(0 12px 18px rgba(43, 23, 19, .2));
}

.temple-nav {
    z-index: 19;
}

.temple-nav .navbar-collapse {
    justify-content: space-between;
}

.temple-nav .nav-left {
    margin-right: 24px;
}

.temple-nav .nav-right {
    margin-left: 24px;
}

.hero-slider {
    min-height: clamp(560px, 72vh, 760px);
}

.hero-content {
    padding-top: clamp(28px, 5vh, 70px);
    padding-bottom: clamp(48px, 8vh, 86px);
}

.hero-panel {
    max-width: 820px;
    padding: clamp(18px, 3vw, 28px);
    border-radius: 8px;
    background: linear-gradient(90deg, rgba(43, 23, 19, .58), rgba(43, 23, 19, .18));
}

.hero h1 {
    font-size: clamp(2.5rem, 5.8vw, 5.35rem);
}

.malayalam-history-card {
    margin-top: 54px;
    padding: clamp(24px, 4vw, 40px);
    display: grid;
    grid-template-columns: minmax(220px, .65fr) 1fr;
    gap: clamp(22px, 4vw, 48px);
    background: #fff8ec;
    border-left: 6px solid #fbbd54;
    box-shadow: 0 20px 48px rgba(43, 23, 19, .08);
    line-height: 1.9;
}

.malayalam-history-card span {
    display: block;
    color: #af0201;
    font-weight: 900;
}

.malayalam-history-card h3 {
    color: #7a0101;
    font-weight: 900;
    margin: 8px 0 0;
}

.malayalam-history-card p {
    margin: 0;
    font-size: 1.04rem;
}

.devotee-flow {
    background: #fff;
}

.flow-card {
    min-height: 100%;
    background: #fff8ec;
    border: 1px solid #ecd2ae;
    padding: 18px;
}

.flow-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    margin-bottom: 18px;
}

.flow-card h3 {
    color: #7a0101;
    font-weight: 900;
}

.flow-card p {
    color: #6d5147;
    margin-bottom: 0;
}

.gallery-strip {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.floating-actions {
    right: max(14px, env(safe-area-inset-right));
    bottom: max(18px, env(safe-area-inset-bottom));
}

.floating-actions a {
    width: 46px;
    height: 46px;
}

.content-body {
    overflow-wrap: anywhere;
}

.about-page {
    background: #fff;
}

.about-contact-box {
    margin-top: 22px;
    padding: 18px;
    display: grid;
    gap: 6px;
    background: #fff8ec;
    border-left: 5px solid #fbbd54;
}

.about-history-card {
    margin-bottom: 64px;
}

.malayalam-copy {
    display: grid;
    gap: 14px;
}

.admin-team-title {
    margin-top: 20px;
}

.team-group {
    margin-top: 34px;
}

.team-group h3 {
    color: #7a0101;
    font-weight: 900;
    border-bottom: 2px solid #fbbd54;
    padding-bottom: 10px;
    margin-bottom: 18px;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.team-card {
    min-height: 116px;
    padding: 18px;
    display: grid;
    align-content: start;
    gap: 7px;
    background: #fff8ec;
    border: 1px solid #ecd2ae;
}

.team-card small {
    color: #af0201;
    font-weight: 900;
}

.team-card strong {
    color: #7a0101;
    font-size: 1.05rem;
}

.team-card span {
    color: #6d5147;
}

.videos-gallery-section {
    background: #fff8ec;
}

.video-embed-card {
    background: #fff;
    border: 1px solid #ecd2ae;
    min-height: 100%;
}

.video-frame {
    aspect-ratio: 16 / 9;
    background: #240f12;
    display: grid;
    place-items: center;
    overflow: hidden;
}

.video-frame iframe,
.video-frame .instagram-media {
    width: 100% !important;
    min-width: 0 !important;
    height: 100%;
    border: 0;
}

.video-fallback {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    color: #fff;
    text-decoration: none;
}

.video-fallback img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .72;
}

.video-fallback span {
    position: absolute;
    inset: auto 18px 18px;
    background: #7a0101;
    border-radius: 8px;
    padding: 10px 14px;
    text-align: center;
    font-weight: 900;
}

.video-meta {
    padding: 18px;
}

.video-meta span {
    color: #af0201;
    font-weight: 900;
    text-transform: uppercase;
}

.video-meta h3 {
    color: #7a0101;
    font-weight: 900;
    margin: 8px 0 0;
}

.booking-tabs {
    margin-bottom: 24px;
    gap: 12px;
}

.booking-tabs .nav-link {
    color: #7a0101;
    border: 1px solid #fbbd54;
    border-radius: 8px;
    font-weight: 900;
}

.booking-tabs .nav-link.active {
    background: #7a0101;
    border-color: #7a0101;
}

.item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
}

.item-option {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 10px;
    align-items: center;
    padding: 14px;
    background: #fff8ec;
    border: 1px solid #ecd2ae;
    cursor: pointer;
}

.item-option strong {
    grid-column: 2;
    color: #7a0101;
}

.phonepe-card {
    overflow: hidden;
    border-radius: 8px;
    background:
        radial-gradient(circle at 88% 8%, rgba(255, 255, 255, .2), transparent 8rem),
        linear-gradient(145deg, #4b168c, #6739b7 54%, #2f0f67);
    color: #fff;
    box-shadow: 0 24px 48px rgba(50, 15, 103, .24);
}

.phonepe-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, .18);
}

.phonepe-top span {
    font-size: 1.45rem;
    font-weight: 900;
}

.phonepe-top strong {
    font-size: .78rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.phonepe-icon {
    width: 78px;
    height: 78px;
    margin: 22px auto;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #fff;
    color: #6739b7;
    font-size: 2rem;
    font-weight: 900;
    box-shadow: 0 12px 26px rgba(20, 8, 46, .28);
}

.phonepe-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 20px;
    border-top: 1px solid rgba(255, 255, 255, .14);
}

.phonepe-row span {
    color: rgba(255, 255, 255, .76);
}

.phonepe-pay-button {
    width: calc(100% - 40px);
    margin: 20px;
    padding: 13px 18px;
    border: 0;
    border-radius: 8px;
    background: #fff;
    color: #4b168c;
    font-weight: 900;
    opacity: .86;
}

.phonepe-checkout-mini,
.upi-mini {
    display: grid;
    gap: 6px;
    padding: 16px;
    border: 1px solid #e2d3f6;
    background: #faf7ff;
    color: #35106d;
}

.phonepe-checkout-mini span,
.upi-mini span {
    color: #6739b7;
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.phonepe-checkout-mini strong,
.upi-mini strong {
    font-size: 1.05rem;
}

.phonepe-checkout-mini small {
    color: #6d5d82;
}

@media (min-width: 992px) and (max-width: 1199px) {
    .masthead-inner {
        grid-template-columns: minmax(220px, 1fr) 34px 126px 34px minmax(220px, 1fr) 92px;
    }
    .masthead-emblem,
    .masthead-emblem img {
        width: 126px;
        height: 126px;
    }
    .brand-wordmark img {
        max-height: 68px;
    }
    .temple-nav .nav-link {
        padding: 9px 12px;
        margin: 0 3px;
        font-size: .84rem;
    }
}

@media (max-width: 991px) {
    .masthead-inner {
        grid-template-columns: 1fr 104px 1fr;
        gap: 10px;
        min-height: 104px;
        padding: 12px 0 14px;
    }
    .brand-wordmark img {
        max-height: 54px;
    }
    .brand-wordmark-en {
        grid-column: 1;
    }
    .masthead-emblem {
        grid-column: 2;
        grid-row: 1;
        width: 104px;
        height: 104px;
        margin-bottom: 0;
    }
    .masthead-emblem img {
        width: 104px;
        height: 104px;
    }
    .brand-wordmark-ml {
        grid-column: 3;
        display: flex;
    }
    .temple-nav {
        min-height: 64px;
    }
    .temple-nav .navbar-collapse {
        padding-top: 14px;
    }
    .temple-nav .nav-link {
        width: 100%;
        margin: 5px 0;
        text-align: center;
    }
    .temple-nav .nav-left,
    .temple-nav .nav-right {
        gap: 0;
    }
    .hero-slider {
        min-height: 620px;
    }
    .malayalam-history-card {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575px) {
    .masthead-inner {
        grid-template-columns: 76px 1fr;
        min-height: 132px;
        align-items: center;
        padding: 10px 12px 14px;
    }
    .masthead-emblem {
        grid-column: 1;
        grid-row: 1 / span 2;
        width: 76px;
        height: 76px;
        margin: 0;
    }
    .masthead-emblem img {
        width: 76px;
        height: 76px;
    }
    .brand-wordmark-en,
    .brand-wordmark-ml {
        grid-column: 2;
        justify-content: flex-start;
    }
    .brand-wordmark-ml {
        display: flex;
    }
    .brand-wordmark img {
        max-height: 44px;
        max-width: 100%;
    }
    .online-vazhipad {
        display: none;
    }
    .hero-slider {
        min-height: 650px;
    }
    .hero-panel {
        padding: 16px;
        background: linear-gradient(180deg, rgba(43, 23, 19, .7), rgba(43, 23, 19, .22));
    }
    .hero h1 {
        font-size: clamp(2rem, 12vw, 3.2rem);
        line-height: 1.02;
    }
    .hero-copy {
        font-size: 1rem;
    }
    .hero .btn {
        width: 100%;
        margin-bottom: 6px;
    }
    .chant-track {
        gap: 36px;
    }
    .timing-line {
        grid-template-columns: 92px 1fr;
    }
    .service-content {
        padding-right: 64px;
    }
    .floating-actions {
        right: 10px;
        bottom: 14px;
    }
    .floating-actions a {
        width: 40px;
        height: 40px;
    }
}

/* Reference-style masthead: large centered crest with menu spacing */
.site-masthead {
    overflow: visible;
}

.masthead-inner {
    min-height: clamp(132px, 9.8vw, 168px);
    grid-template-columns: minmax(260px, 1fr) clamp(190px, 15vw, 236px) minmax(260px, 1fr) auto;
    padding-top: clamp(10px, 1vw, 16px);
    padding-bottom: clamp(10px, 1vw, 16px);
    isolation: isolate;
}

.masthead-emblem {
    position: absolute;
    left: 50%;
    top: clamp(6px, .8vw, 12px);
    transform: translateX(-50%);
    width: clamp(190px, 15vw, 236px);
    height: clamp(190px, 15vw, 236px);
    z-index: 30;
    pointer-events: auto;
}

.masthead-emblem img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-wordmark img {
    max-height: clamp(58px, 5vw, 82px);
}

.temple-nav {
    overflow: visible;
}

@media (min-width: 992px) {
    .temple-nav .navbar-collapse {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) clamp(190px, 15vw, 236px) minmax(0, 1fr);
        align-items: center;
        gap: clamp(16px, 2vw, 30px);
        width: 100%;
    }

    .temple-nav .nav-left {
        grid-column: 1;
        justify-content: flex-start;
        margin-right: 0;
    }

    .temple-nav .nav-right {
        grid-column: 3;
        justify-content: flex-end;
        margin-left: 0;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .masthead-inner {
        grid-template-columns: minmax(220px, 1fr) 176px minmax(220px, 1fr) 96px;
        min-height: 128px;
    }

    .masthead-emblem {
        width: 176px;
        height: 176px;
    }

    .brand-wordmark img {
        max-height: 64px;
    }

    .temple-nav .navbar-collapse {
        grid-template-columns: minmax(0, 1fr) 176px minmax(0, 1fr);
        gap: 18px;
    }
}

@media (max-width: 991px) {
    .masthead-inner {
        grid-template-columns: minmax(130px, 1fr) clamp(126px, 18vw, 158px) minmax(130px, 1fr);
        min-height: clamp(118px, 16vw, 148px);
        padding: 12px 0;
    }

    .masthead-emblem {
        grid-column: auto;
        grid-row: auto;
        left: 50%;
        transform: translateX(-50%);
        width: clamp(126px, 18vw, 158px);
        height: clamp(126px, 18vw, 158px);
        top: 8px;
    }

    .masthead-emblem img {
        width: 100%;
        height: 100%;
    }

    .brand-wordmark-en {
        grid-column: 1;
        grid-row: 1;
    }

    .brand-wordmark-ml {
        grid-column: 3;
        grid-row: 1;
        display: flex;
    }

    .brand-wordmark img {
        max-height: clamp(42px, 7vw, 58px);
    }

    .online-vazhipad {
        display: none;
    }

    .temple-nav .navbar-collapse {
        padding-top: 62px;
    }
}

@media (max-width: 575px) {
    .masthead-inner {
        grid-template-columns: 1fr 108px 1fr;
        min-height: 124px;
        padding: 10px 10px 12px;
    }

    .masthead-emblem {
        grid-column: auto;
        grid-row: auto;
        left: 50%;
        transform: translateX(-50%);
        width: 108px;
        height: 108px;
        top: 8px;
    }

    .brand-wordmark-en,
    .brand-wordmark-ml {
        grid-row: 1;
        justify-content: center;
    }

    .brand-wordmark-en {
        grid-column: 1;
    }

    .brand-wordmark-ml {
        grid-column: 3;
    }

    .brand-wordmark img {
        max-height: 36px;
    }

    .temple-nav .navbar-collapse {
        padding-top: 54px;
    }
}

/* Worship timing and CMS poster slot */
.worship-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr);
    gap: clamp(22px, 4vw, 44px);
    align-items: stretch;
}

.worship-card.timing-board {
    max-width: none;
    margin: 0;
    min-height: 100%;
}

.worship-card p {
    color: #6d5147;
    line-height: 1.75;
}

.worship-label {
    display: inline-flex;
    margin-bottom: 12px;
    color: #af0201;
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.daily-time {
    color: #7a0101;
    font-size: clamp(2.2rem, 5vw, 4.4rem);
    line-height: .95;
    font-weight: 900;
    margin-bottom: 18px;
}

.malayalam-line {
    margin-top: 18px;
    padding: 14px 16px;
    background: #fff8ec;
    border-left: 5px solid #fbbd54;
    color: #7a0101;
    font-weight: 800;
    line-height: 1.75;
}

.special-poster-card {
    min-height: 100%;
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 18px;
    padding: 18px;
    background: #fff;
    border: 1px solid #ecd2ae;
    box-shadow: 0 22px 50px rgba(43, 23, 19, .08);
}

.poster-frame {
    aspect-ratio: 4 / 5;
    width: 100%;
    background: #fff8ec;
    border: 1px solid #ecd2ae;
    overflow: hidden;
}

.poster-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.special-poster-card span {
    color: #af0201;
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.special-poster-card h3 {
    color: #7a0101;
    font-weight: 900;
    margin: 8px 0;
}

.special-poster-card p {
    color: #6d5147;
    line-height: 1.65;
    margin-bottom: 0;
}

@media (max-width: 991px) {
    .worship-grid {
        grid-template-columns: 1fr;
    }

    .special-poster-card {
        max-width: 420px;
        width: 100%;
        margin: 0 auto;
    }
}

@media (max-width: 575px) {
    .worship-card.timing-board {
        grid-template-columns: 1fr;
    }

    .worship-card.timing-board > div + div {
        border-left: 0;
        border-top: 1px solid #ecd2ae;
    }

    .daily-time {
        font-size: 2.35rem;
    }
}

/* Floating header after scroll */
body.header-floating {
    padding-top: var(--floating-header-height, 220px);
}

body.header-floating .site-masthead,
body.header-floating .temple-nav {
    position: fixed;
    left: 0;
    right: 0;
    width: 100%;
}

body.header-floating .site-masthead {
    top: 0;
    z-index: 1040;
    box-shadow: 0 12px 30px rgba(43, 23, 19, .12);
}

body.header-floating .temple-nav {
    top: var(--floating-masthead-height, 150px);
    z-index: 1039;
    box-shadow: 0 16px 34px rgba(43, 23, 19, .18);
}

body.header-floating .masthead-emblem {
    filter: drop-shadow(0 12px 18px rgba(43, 23, 19, .18));
}
