/* ==========================================================
   POOJASERVICE TEMPLE DIRECTORY
   Premium Maroon / Cream / Gold Animated Theme
   Isolated styles: Temple pages only
========================================================== */

.temple-directory-page,
.temple-detail-page {
    --temple-maroon: #781731;
    --temple-deep: #3b0d1c;
    --temple-gold: #c49a45;
    --temple-light-gold: #f1d99c;
    --temple-cream: #fffaf0;
    --temple-text: #49333a;
    --temple-muted: #806e70;
    color: var(--temple-text);
    font-family: 'Poppins', sans-serif;
}

.temple-directory-page *,
.temple-detail-page * {
    box-sizing: border-box;
}

.temple-directory-page a,
.temple-detail-page a {
    text-decoration: none;
}

.temple-directory-page img,
.temple-detail-page img {
    max-width: 100%;
}

/* HERO */

.temple-hero,
.temple-detail-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 440px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 75px 24px 95px;
    color: #fffaf0;
    text-align: center;
    background:
        radial-gradient(ellipse at 50% 110%, rgba(196,154,69,.24), transparent 48%),
        radial-gradient(circle at 12% 18%, rgba(255,220,151,.12), transparent 28%),
        linear-gradient(125deg, #350b19 0%, #781731 48%, #4b1024 100%);
    border-radius: 0 0 34px 34px;
}

.temple-hero-pattern,
.temple-detail-hero-pattern {
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: .19;
    background-image:
        radial-gradient(circle, rgba(255,226,164,.8) 1px, transparent 1.5px),
        repeating-conic-gradient(from 0deg at 50% 50%, transparent 0deg 14deg, rgba(255,218,145,.12) 15deg 16deg, transparent 17deg 30deg);
    background-size: 32px 32px, 240px 240px;
    animation: templePatternDrift 32s linear infinite;
}

.temple-hero::before,
.temple-detail-hero::before {
    content: "";
    position: absolute;
    width: 390px;
    height: 390px;
    border: 1px solid rgba(241,217,156,.22);
    border-radius: 50%;
    top: -230px;
    left: -100px;
    box-shadow: 0 0 0 28px rgba(241,217,156,.035),
                0 0 0 58px rgba(241,217,156,.025);
}

.temple-hero::after {
    content: "✧";
    position: absolute;
    right: 8%;
    top: 15%;
    color: rgba(241,217,156,.65);
    font-size: 35px;
    animation: templeTwinkle 3s ease-in-out infinite;
}

.temple-hero-content,
.temple-detail-hero-content {
    position: relative;
    z-index: 3;
    width: min(900px, 100%);
    animation: templeRise .9s ease both;
}

.temple-eyebrow,
.temple-section-kicker {
    display: inline-block;
    color: var(--temple-light-gold);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.temple-hero h1,
.temple-detail-hero h1 {
    margin: 20px auto 16px;
    color: #fffaf0;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(34px, 5vw, 58px);
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 0 5px 25px rgba(0,0,0,.28);
}

.temple-hero-content > p {
    max-width: 700px;
    margin: 0 auto;
    color: rgba(255,250,240,.86);
    font-size: 15px;
    line-height: 1.9;
}

.temple-hero-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 29px;
}

.temple-primary-btn,
.temple-language-btn {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 23px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 700;
    transition: .3s ease;
}

.temple-primary-btn {
    color: #45101f !important;
    background: linear-gradient(120deg, #f5dfaa, #c49a45);
    box-shadow: 0 9px 25px rgba(0,0,0,.2);
}

.temple-primary-btn:hover {
    color: #45101f !important;
    transform: translateY(-4px);
    box-shadow: 0 13px 30px rgba(0,0,0,.28);
}

.temple-language-btn {
    color: #fffaf0 !important;
    border: 1px solid rgba(255,230,177,.65);
    background: rgba(255,255,255,.07);
    backdrop-filter: blur(8px);
}

.temple-language-btn:hover {
    color: #45101f !important;
    background: #f1d99c;
    border-color: #f1d99c;
}

.temple-hero-symbol {
    position: absolute;
    right: 7%;
    bottom: 36px;
    color: rgba(241,217,156,.15);
    font-family: serif;
    font-size: clamp(100px, 17vw, 205px);
    line-height: 1;
    animation: templeFloat 6s ease-in-out infinite;
    pointer-events: none;
}

.temple-hero-bottom {
    position: absolute;
    bottom: 18px;
    left: 0;
    width: 100%;
    color: rgba(255,230,177,.7);
    font-size: 11px;
    letter-spacing: 4px;
}

.temple-hero-orbit {
    position: absolute;
    width: 300px;
    height: 300px;
    border: 1px solid rgba(241,217,156,.14);
    border-radius: 50%;
    pointer-events: none;
}

.temple-orbit-one {
    top: -190px;
    right: 8%;
    animation: templeRotate 35s linear infinite;
}

.temple-orbit-two {
    bottom: -240px;
    left: 10%;
    width: 380px;
    height: 380px;
    animation: templeRotate 45s linear infinite reverse;
}

/* DIRECTORY SECTION */

.temple-library {
    width: min(1240px, calc(100% - 38px));
    margin: 0 auto;
    padding: 75px 0 65px;
}

.temple-section-heading {
    margin: 0 auto 34px;
    text-align: center;
}

.temple-section-heading .temple-eyebrow {
    color: #a17a35;
}

.temple-section-heading h2 {
    margin: 12px 0;
    color: var(--temple-maroon);
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(27px, 4vw, 39px);
    font-weight: 700;
}

.temple-section-heading p {
    color: var(--temple-muted);
    font-size: 14px;
    line-height: 1.8;
}

/* FILTER PANEL */

.temple-filter-panel {
    display: grid;
    grid-template-columns: minmax(210px, 1.7fr) 1fr 1fr 1fr auto;
    gap: 11px;
    align-items: center;
    padding: 18px;
    border: 1px solid #eee2cc;
    border-radius: 17px;
    background: linear-gradient(135deg, #fffdf8, #fff7e9);
    box-shadow: 0 12px 38px rgba(91,35,48,.07);
}

.temple-search-field {
    position: relative;
}

.temple-search-field i {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    color: #9d7840;
}

.temple-filter-panel input,
.temple-filter-panel select {
    width: 100%;
    min-width: 0;
    height: 46px;
    padding: 0 12px;
    color: #543943;
    border: 1px solid #eadcc5;
    border-radius: 9px;
    outline: none;
    background: #fff;
    font-family: inherit;
    font-size: 12px;
    transition: .25s ease;
}

.temple-search-field input {
    padding-left: 39px;
}

.temple-filter-panel input:focus,
.temple-filter-panel select:focus {
    border-color: var(--temple-gold);
    box-shadow: 0 0 0 3px rgba(196,154,69,.12);
}

.temple-filter-panel button {
    height: 46px;
    padding: 0 19px;
    border: 0;
    border-radius: 9px;
    color: #fffaf0;
    background: linear-gradient(120deg, #781731, #4b1024);
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: .3s ease;
}

.temple-filter-panel button:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 17px rgba(120,23,49,.2);
}

.temple-reset-btn {
    grid-column: 1 / -1;
    justify-self: end;
    color: var(--temple-maroon);
    font-size: 12px;
    font-weight: 700;
}

/* RESULT COUNT AND CARDS */

.temple-results-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin: 35px 0 19px;
    padding-bottom: 13px;
    border-bottom: 1px solid #eee3d1;
    color: var(--temple-maroon);
    font-size: 13px;
    font-weight: 700;
}

.temple-results-line span:last-child {
    color: #9b8059;
    font-size: 12px;
    font-weight: 500;
}

.temple-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 25px;
}

.temple-card {
    overflow: hidden;
    border: 1px solid #eee5d8;
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 9px 30px rgba(65,25,36,.055);
    transition: transform .35s ease, box-shadow .35s ease;
    animation: templeRise .65s ease both;
}

.temple-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 19px 42px rgba(65,25,36,.14);
}

.temple-card-image {
    position: relative;
    display: block;
    height: 225px;
    overflow: hidden;
    background: linear-gradient(135deg, #781731, #3b0d1c);
}

.temple-card-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .7s ease;
}

.temple-card:hover .temple-card-image img {
    transform: scale(1.08);
}

.temple-image-overlay {
    position: absolute;
    inset: 35% 0 0;
    background: linear-gradient(transparent, rgba(35,7,17,.6));
    pointer-events: none;
}

.temple-image-tag {
    position: absolute;
    bottom: 14px;
    left: 15px;
    padding: 7px 12px;
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 20px;
    color: #fff;
    background: rgba(70,13,32,.72);
    font-size: 10px;
    font-weight: 600;
    backdrop-filter: blur(8px);
}

.temple-image-placeholder,
.temple-detail-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #f5dfaa;
    background:
        radial-gradient(circle, rgba(255,220,151,.15), transparent 48%),
        linear-gradient(135deg, #781731, #3b0d1c);
}

.temple-image-placeholder span {
    font-family: serif;
    font-size: 75px;
    animation: templeFloat 5s ease-in-out infinite;
}

.temple-image-placeholder small {
    color: #f1d99c;
    font-size: 11px;
    letter-spacing: 2px;
}

.temple-card-body {
    padding: 21px 20px 22px;
}

.temple-card-location {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    color: #94774d;
    font-size: 11px;
}

.temple-card-location i {
    color: var(--temple-maroon);
}

.temple-card-body h3 {
    margin: 12px 0 10px;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 21px;
    line-height: 1.35;
}

.temple-card-body h3 a {
    color: var(--temple-maroon);
}

.temple-card-body h3 a:hover {
    color: #ad8035;
}

.temple-card-deity {
    margin: 0 0 11px;
    color: #8c6537;
    font-size: 11px;
    font-weight: 600;
}

.temple-card-deity i {
    margin-right: 4px;
}

.temple-card-body > p {
    min-height: 49px;
    margin: 0 0 17px;
    color: #796b6d;
    font-size: 12px;
    line-height: 1.8;
}

.temple-card-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 13px;
    border-top: 1px solid #f0e7da;
    color: var(--temple-maroon) !important;
    font-size: 12px;
    font-weight: 700;
}

.temple-card-link span {
    font-size: 19px;
    transition: transform .25s ease;
}

.temple-card-link:hover span {
    transform: translateX(5px);
}

/* EMPTY STATE AND PAGINATION */

.temple-empty-state {
    padding: 55px 20px;
    border: 1px dashed #ddcba9;
    border-radius: 18px;
    background: #fffaf1;
    text-align: center;
}

.temple-empty-state > span {
    display: block;
    color: #c49a45;
    font-size: 65px;
}

.temple-empty-state h3 {
    margin: 12px 0;
    color: var(--temple-maroon);
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 25px;
}

.temple-empty-state p {
    margin-bottom: 22px;
    color: var(--temple-muted);
    font-size: 13px;
}

.temple-pagination {
    display: flex;
    justify-content: center;
    margin-top: 36px;
}

.temple-pagination nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.temple-pagination nav > div:first-child {
    display: none;
}

.temple-pagination nav span,
.temple-pagination nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    min-height: 38px;
    margin: 3px;
    padding: 6px 12px;
    border: 1px solid #eadcc5;
    border-radius: 8px;
    color: var(--temple-maroon);
    background: #fff;
    font-size: 12px;
}

.temple-pagination nav span[aria-current="page"] span {
    color: white;
    background: var(--temple-maroon);
}

.temple-disclaimer {
    width: min(1100px, calc(100% - 38px));
    margin: 0 auto 45px;
    padding: 17px 20px;
    border-left: 3px solid var(--temple-gold);
    border-radius: 7px;
    color: #826f66;
    background: #fff8eb;
    font-size: 11px;
    line-height: 1.8;
}

/* TEMPLE DETAIL PAGE */

.temple-detail-hero {
    min-height: 350px;
    padding: 55px 22px 65px;
    border-radius: 0 0 27px 27px;
}

.temple-detail-hero-content {
    max-width: 1000px;
}

.temple-breadcrumb {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    color: rgba(255,250,240,.7);
    font-size: 11px;
}

.temple-breadcrumb a {
    color: #f1d99c !important;
}

.temple-detail-hero h1 {
    margin: 12px 0;
}

.temple-detail-deity,
.temple-detail-location {
    color: rgba(255,250,240,.85);
    font-size: 13px;
    line-height: 2;
}

.temple-detail-location {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 22px;
}

.temple-detail-hero .temple-language-btn {
    min-height: 38px;
    padding: 8px 20px;
}

.temple-detail-main {
    width: min(1160px, calc(100% - 38px));
    margin: 0 auto;
    padding: 42px 0 65px;
}

.temple-detail-cover {
    height: clamp(240px, 43vw, 490px);
    overflow: hidden;
    border: 5px solid #fff;
    border-radius: 19px;
    background: #4b1024;
    box-shadow: 0 15px 45px rgba(58,17,31,.14);
}

.temple-detail-cover > img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.temple-detail-placeholder span {
    font-size: 110px;
}

.temple-detail-placeholder p {
    color: #f1d99c;
    letter-spacing: 3px;
}

.temple-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(260px, .85fr);
    gap: 35px;
    align-items: start;
    margin-top: 42px;
}

.temple-detail-content {
    min-width: 0;
}

.temple-info-section {
    margin-bottom: 35px;
    padding: 27px;
    border: 1px solid #eee5d8;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 8px 26px rgba(65,25,36,.045);
}

.temple-info-section .temple-section-kicker {
    color: #a17a35;
    font-size: 9px;
    letter-spacing: 2px;
}

.temple-info-section h2 {
    margin: 9px 0 17px;
    color: var(--temple-maroon);
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 26px;
}

.temple-rich-text {
    color: #6f6061;
    font-size: 13px;
    line-height: 2;
    overflow-wrap: anywhere;
}

.temple-detail-sidebar {
    display: grid;
    gap: 17px;
}

.temple-sidebar-card {
    padding: 23px;
    border: 1px solid #eadfcf;
    border-radius: 14px;
    background: linear-gradient(145deg, #fffdf8, #fff6e8);
    box-shadow: 0 8px 23px rgba(65,25,36,.05);
}

.temple-sidebar-icon {
    width: 39px;
    height: 39px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    border-radius: 50%;
    color: #fff3d2;
    background: var(--temple-maroon);
    font-size: 17px;
}

.temple-sidebar-card h3 {
    margin: 0 0 12px;
    color: var(--temple-maroon);
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 18px;
}

.temple-sidebar-card p {
    margin: 0 0 8px;
    color: #746568;
    font-size: 12px;
    line-height: 1.9;
    overflow-wrap: anywhere;
}

.temple-map-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 12px;
    color: var(--temple-maroon) !important;
    font-size: 12px;
    font-weight: 700;
}

.temple-map-link:hover {
    color: #a17a35 !important;
}

/* GALLERY */

.temple-detail-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.temple-gallery-item {
    min-width: 0;
    overflow: hidden;
    margin: 0;
    border-radius: 11px;
    background: #fff7eb;
}

.temple-gallery-item img {
    width: 100%;
    height: 190px;
    display: block;
    object-fit: cover;
    transition: transform .5s ease;
}

.temple-gallery-item:hover img {
    transform: scale(1.05);
}

.temple-gallery-item figcaption {
    padding: 10px;
    color: #735d52;
    font-size: 11px;
}

/* FESTIVALS */

.temple-festival-list {
    display: grid;
    gap: 12px;
}

.temple-festival-card {
    display: flex;
    gap: 13px;
    padding: 15px;
    border: 1px solid #eee4d5;
    border-radius: 11px;
    background: #fffaf2;
}

.temple-festival-icon {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff4d8;
    background: var(--temple-maroon);
}

.temple-festival-card h3 {
    margin: 2px 0 5px;
    color: var(--temple-maroon);
    font-size: 14px;
}

.temple-festival-period {
    display: block;
    margin-bottom: 6px;
    color: #9c793e;
    font-size: 11px;
}

.temple-festival-card p {
    margin: 0;
    color: #78686a;
    font-size: 12px;
    line-height: 1.8;
}

.temple-back-directory {
    margin-top: 8px;
    text-align: center;
}

/* ANIMATIONS */

@keyframes templeRise {
    from {
        opacity: 0;
        transform: translateY(22px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes templeFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-13px);
    }
}

@keyframes templeRotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes templeTwinkle {
    0%, 100% {
        opacity: .45;
        transform: scale(.85) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.2) rotate(35deg);
    }
}

@keyframes templePatternDrift {
    from {
        background-position: 0 0, 0 0;
    }
    to {
        background-position: 32px 32px, 240px 240px;
    }
}

/* RESPONSIVE */

@media (max-width: 1050px) {
    .temple-filter-panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .temple-search-field {
        grid-column: 1 / -1;
    }

    .temple-filter-panel button {
        width: 100%;
    }

    .temple-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .temple-hero {
        min-height: 390px;
        padding: 65px 20px 85px;
        border-radius: 0 0 22px 22px;
    }

    .temple-hero-content > p {
        font-size: 13px;
    }

    .temple-hero-symbol {
        right: 1%;
        bottom: 32px;
        font-size: 105px;
    }

    .temple-library {
        width: min(100% - 26px, 600px);
        padding: 53px 0 45px;
    }

    .temple-filter-panel {
        grid-template-columns: 1fr 1fr;
        padding: 13px;
        gap: 9px;
    }

    .temple-search-field,
    .temple-filter-panel button,
    .temple-reset-btn {
        grid-column: 1 / -1;
    }

    .temple-card-grid {
        gap: 15px;
    }

    .temple-card-image {
        height: 175px;
    }

    .temple-card-body {
        padding: 15px;
    }

    .temple-card-body h3 {
        font-size: 18px;
    }

    .temple-detail-layout {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .temple-detail-hero {
        min-height: 320px;
        padding: 42px 16px;
    }

    .temple-detail-main {
        width: min(100% - 26px, 650px);
        padding-top: 27px;
    }

    .temple-info-section {
        padding: 21px;
    }

    .temple-sidebar-card {
        padding: 19px;
    }
}

@media (max-width: 480px) {
    .temple-eyebrow {
        font-size: 9px;
        letter-spacing: 2px;
    }

    .temple-hero h1,
    .temple-detail-hero h1 {
        font-size: 32px;
    }

    .temple-hero-actions {
        gap: 9px;
    }

    .temple-primary-btn,
    .temple-language-btn {
        min-height: 42px;
        padding: 10px 17px;
        font-size: 11px;
    }

    .temple-filter-panel {
        grid-template-columns: 1fr;
    }

    .temple-filter-panel input,
    .temple-filter-panel select,
    .temple-filter-panel button {
        height: 44px;
    }

    .temple-card-grid {
        grid-template-columns: 1fr;
    }

    .temple-card-image {
        height: 215px;
    }

    .temple-results-line {
        font-size: 12px;
    }

    .temple-detail-gallery {
        grid-template-columns: 1fr;
    }

    .temple-gallery-item img {
        height: 210px;
    }

    .temple-info-section h2 {
        font-size: 22px;
    }

    .temple-breadcrumb {
        font-size: 10px;
    }

    .temple-detail-location {
        font-size: 11px;
    }
}

/* ACCESSIBILITY: respect reduced-motion preferences */

@media (prefers-reduced-motion: reduce) {
    .temple-directory-page *,
    .temple-detail-page *,
    .temple-directory-page *::before,
    .temple-detail-page *::before,
    .temple-directory-page *::after,
    .temple-detail-page *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
