/* Sub Temples Page Styling */

.subtemples-page {
    background: radial-gradient(circle at 50% 0, rgba(231, 184, 78, .18), transparent 400px), #f8ecd4;
}

.subtemples-hero {
    position: relative;
}

.subtemples-layout {
    max-width: 1100px;
    margin: 40px auto 70px;
    padding: 0 var(--page-pad);
}

.subtemples-sacred-intro {
    align-items: center;
    color: #725020;
    display: flex;
    font-family: Georgia, serif;
    font-size: 16px;
    font-style: italic;
    gap: 13px;
    justify-content: center;
    letter-spacing: .15px;
    margin: 0 auto 35px;
    text-align: center;
}

.subtemples-sacred-intro .intro-icon {
    color: var(--gold2);
    font-size: 18px;
}

.subtemples-list {
    display: flex;
    flex-direction: column;
    gap: 50px;
}

.subtemple-card {
    background: rgba(255, 252, 243, 0.98);
    border: 1px solid rgba(196, 139, 39, .22);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(65, 37, 8, 0.05);
    display: flex;
    flex-direction: row;
    align-items: stretch;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.subtemple-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(65, 37, 8, 0.12);
    border-color: rgba(196, 139, 39, 0.45);
}

/* Alternating rows logic */
.subtemple-card:nth-child(even) .subtemple-image-wrapper {
    order: 2;
    border-right: none;
    border-left: 1px solid rgba(196, 139, 39, .15);
}

.subtemple-image-wrapper {
    position: relative;
    overflow: hidden;
    width: 300px;
    flex-shrink: 0;
    border-right: 1px solid rgba(196, 139, 39, .15);
}

.subtemple-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.subtemple-card:hover .subtemple-img {
    transform: scale(1.05);
}

.subtemple-image-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 60%, rgba(5, 36, 64, 0.3));
    pointer-events: none;
}

.subtemple-content-wrapper {
    padding: 35px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-grow: 1;
}

.subtemple-card:nth-child(even) .subtemple-content-wrapper {
    padding: 35px 40px;
}

.subtemple-header {
    margin-bottom: 18px;
}

.subtemple-name {
    color: var(--blue);
    font-family: Georgia, serif;
    font-size: 26px;
    margin: 0;
    font-weight: 700;
    line-height: 1.25;
}

.subtemple-subtitle {
    display: block;
    color: var(--gold2);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-top: 6px;
}

.subtemple-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 0 16px;
}

.subtemple-divider span {
    height: 1px;
    background: linear-gradient(90deg, rgba(185, 119, 33, 0.45), transparent);
    width: 60px;
}

.subtemple-card:nth-child(even) .subtemple-divider span {
    background: linear-gradient(270deg, rgba(185, 119, 33, 0.45), transparent);
}

.subtemple-divider i {
    color: var(--gold);
    font-size: 11px;
}

.subtemple-description {
    color: #444;
    font-size: 15px;
    line-height: 1.75;
    margin: 0;
    text-align: justify;
}

/* Telugu Specific overrides */
.lang-te .subtemple-name {
    font-family: 'Noto Sans Telugu', sans-serif;
    font-weight: 700;
    font-size: 24px;
}

.lang-te .subtemple-description {
    font-family: 'Noto Sans Telugu', sans-serif;
    line-height: 1.85;
    font-size: 15px;
}

/* Responsiveness */
@media (max-width: 900px) {
    .subtemple-card,
    .subtemple-card:nth-child(even) {
        flex-direction: column;
    }

    .subtemple-card:nth-child(even) .subtemple-image-wrapper {
        order: 0;
    }

    .subtemple-image-wrapper {
        width: 100%;
        height: 250px;
        min-height: auto;
        border-right: none;
        border-bottom: 1px solid rgba(196, 139, 39, .15);
    }

    .subtemple-card:nth-child(even) .subtemple-image-wrapper {
        border-left: none;
        border-bottom: 1px solid rgba(196, 139, 39, .15);
    }

    .subtemple-content-wrapper,
    .subtemple-card:nth-child(even) .subtemple-content-wrapper {
        padding: 25px 30px;
    }

    .subtemple-name {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .subtemples-layout {
        margin: 25px auto 50px;
    }

    .subtemple-content-wrapper,
    .subtemple-card:nth-child(even) .subtemple-content-wrapper {
        padding: 20px;
    }

    .subtemple-name {
        font-size: 20px;
    }

    .subtemple-description {
        font-size: 14px;
        line-height: 1.65;
    }
}
