/*
 * Temple to Temple — tablet layout
 * Loaded only for tablet-sized viewports.
 */

@media (min-width: 768px) and (max-width: 991.98px)
{

    /* ---------- Header and banner ---------- */
    .site-header {
        position: relative;
        background-color: #f3dba5 !important;
    }

    .site-header .container {
        width: 100%;
        max-width: none;
        padding: 12px 26px 18px;
    }

    .header-banner {
        display: flex !important;
        width: 100%;
        max-width: none;
        margin: 0;
        flex-direction: column !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
    }

    .header-banner .temple-banner-rotator,
    .header-banner .temple-circle-rotator,
    .header-banner .temple-banner-rotator__link,
    .header-banner .temple-circle-rotator__link {
        display: block;
        width: 100%;
    }

    .temple-banner-rotator__stage {
        width: 100%;
        aspect-ratio: 3.45 / 1;
        min-height: 0;
    }

    .temple-banner-rotator__photo {
        object-fit: cover;
        object-position: center;
    }

    /* Hide the phone-only combo menu on tablets. */
    .site-header .mobile-nav-dropdown {
        display: none !important;
    }

    /* ---------- Navigation below banner ---------- */
    .header-banner-nav {
        position: relative !important;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        bottom: auto !important;
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 18px 20px 16px !important;
        transform: none !important;
        background: transparent !important;
    }

    .header-banner-nav .navbar-toggler {
        display: none !important;
    }

    .header-banner-nav .navbar-collapse,
    .header-banner-nav .navbar-collapse.collapse,
    .header-banner-nav .navbar-collapse.collapsing {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        visibility: visible !important;
        margin: 0 !important;
    }

    .header-banner-nav .navbar-nav {
        display: grid !important;
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        gap: 12px !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    .header-banner-nav .nav-item {
        display: flex;
        min-width: 0;
        width: 100%;
    }

    .site-header .navbar .nav-link,
    .header-banner-nav .nav-link {
        display: flex !important;
        width: 100% !important;
        min-width: 0 !important;
        min-height: 56px !important;
        padding: 10px 8px !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 0 !important;
        color: #4f2918 !important;
        background-color: #f0aa29 !important;
        font-size: clamp(0.82rem, 1.8vw, 1rem) !important;
        font-weight: 600 !important;
        line-height: 1.1 !important;
        text-align: center !important;
        white-space: normal !important;
        overflow-wrap: anywhere;
    }

    .site-header .navbar .nav-link.active,
    .header-banner-nav .nav-link.active {
        color: #f0aa29 !important;
        background-color: #68151d !important;
        box-shadow: inset 0 -4px 0 #f0aa29;
    }

    .site-header .navbar .nav-link:hover,
    .site-header .navbar .nav-link:focus {
        color: #ffffff !important;
        background-color: #d88d20 !important;
    }

    /* ---------- Existing tablet page adjustments ---------- */
    .site-header .nav-link {
        text-align: center;
    }

    .temple-search-controls .btn {
        width: 100%;
    }

    .temple-results-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .clear-pilgrimage-btn {
        display: flex !important;
        width: 100%;
        align-items: center;
        justify-content: center;
        text-align: center !important;
    }

    .pilgrimage-temple-content {
        align-items: flex-start;
        flex-direction: column;
    }

    .pilgrimage-temple-actions {
        width: 100%;
    }

    .section-heading-row {
        align-items: stretch;
        flex-direction: column;
    }

    .journey-heading-actions {
        width: 100%;
        flex-direction: column;
    }

    .journey-action-button {
        width: 100%;
    }

    .journey-totals {
        grid-template-columns: 1fr;
    }

    /* ---------- Temple details page ---------- */

    /*
     * The detail columns stack on tablet, so the desktop sticky
     * Visit Information card must become a normal block.
     */
    .temple-visit-sticky,
    .sticky-top.temple-visit-sticky {
    position: static !important;
    top: auto !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .temple-banner-rotator__photo {
    transition: opacity 1.8s ease-in-out;
    }
}