/* ==============================================================================
   ST. LAWRENCE JUNIOR SCHOOL KABOWA — VIRTUAL TOUR SECTION
   Mockup Reference: media_1788541580210.jpg
   Strict Colors: Royal/Navy Blue #0b1a38 / #084298, Red #dc2626, White #ffffff
   100% AI-Free, Deterministic Code, Zero Gradients, Zero Glassmorphism
   ============================================================================== */

.virtual-tour-modern {
    background-color: #ffffff;
    padding: 92px 0 84px 0;
    position: relative;
    overflow: hidden;
    color: #0f172a;
}

/* --- Ghosted Watermarks --- */
.tour-watermark-text {
    position: absolute;
    top: 36px;
    left: 40px;
    font-family: 'Poppins', sans-serif;
    font-size: clamp(60px, 8vw, 110px);
    font-weight: 900;
    line-height: 0.88;
    color: #0b1a38;
    opacity: 0.035;
    letter-spacing: -2px;
    pointer-events: none;
    user-select: none;
    z-index: 0;
}

.tour-watermark-crest {
    position: absolute;
    top: 24px;
    right: 40px;
    width: clamp(180px, 22vw, 270px);
    opacity: 0.085;
    pointer-events: none;
    user-select: none;
    z-index: 0;
}

.tour-watermark-crest img {
    width: 100%;
    height: auto;
    display: block;
}

.tour-watermark-quote {
    position: absolute;
    bottom: 120px;
    left: 40px;
    pointer-events: none;
    user-select: none;
    z-index: 0;
}

.tour-watermark-quote p {
    font-family: 'Playfair Display', Georgia, serif;
    font-style: italic;
    font-size: clamp(15px, 1.5vw, 19px);
    color: #94a3b8;
    opacity: 0.35;
    line-height: 1.35;
    margin: 0 0 8px 0;
}

.tour-watermark-line {
    display: block;
    width: 36px;
    height: 2px;
    background-color: #dc2626;
    border-radius: 1px;
    opacity: 0.6;
}

/* --- Container --- */
.tour-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 2;
}

/* --- Section Header --- */
.tour-header {
    text-align: center;
    margin-bottom: 40px;
}

.tour-eyebrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
}

.tour-eyebrow-line {
    display: inline-block;
    width: 32px;
    height: 2.5px;
    background-color: #dc2626;
    border-radius: 2px;
    flex-shrink: 0;
}

.tour-eyebrow-text {
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: #dc2626;
}

.tour-heading {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(2.3rem, 3.8vw, 3.3rem);
    font-weight: 800;
    line-height: 1.15;
    color: #0b1a38;
    margin: 0 0 14px 0;
    letter-spacing: -0.5px;
}

.tour-heading .text-red {
    color: #dc2626;
}

.tour-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 15.5px;
    line-height: 1.68;
    color: #475569;
    max-width: 620px;
    margin: 0 auto;
}

/* --- Media Wrapper & Frame --- */
.tour-media-wrapper {
    max-width: 1040px;
    margin: 0 auto 44px;
}

.tour-media-frame {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    background-color: #0b1a38;
    border: 1px solid rgba(11, 26, 56, 0.08);
    box-shadow: 0 20px 48px rgba(11, 26, 56, 0.12);
    aspect-ratio: 16 / 9;
    max-height: 540px;
}

/* --- Thumbnail Mode --- */
.tour-thumbnail-wrap {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    cursor: pointer;
}

.tour-thumbnail-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 35%;
    display: block;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.tour-thumbnail-wrap:hover .tour-thumbnail-img {
    transform: scale(1.025);
}

.tour-media-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(11, 26, 56, 0.14);
    transition: background-color 0.3s ease;
}

.tour-thumbnail-wrap:hover .tour-media-overlay {
    background-color: rgba(11, 26, 56, 0.22);
}

/* --- Play Button --- */
.tour-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 78px;
    height: 78px;
    border-radius: 50%;
    background-color: #ffffff;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 4;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
    animation: tourPlayPulse 2.6s ease-in-out infinite;
}

.tour-play-btn:hover {
    transform: translate(-50%, -50%) scale(1.08);
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.38);
    background-color: #ffffff;
}

.tour-play-btn:active {
    transform: translate(-50%, -50%) scale(0.94);
}

@keyframes tourPlayPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.35), 0 10px 30px rgba(0, 0, 0, 0.28);
    }
    70% {
        box-shadow: 0 0 0 16px rgba(220, 38, 38, 0), 0 10px 30px rgba(0, 0, 0, 0.28);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0), 0 10px 30px rgba(0, 0, 0, 0.28);
    }
}

.tour-play-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.tour-play-icon i {
    font-size: 26px;
    color: #dc2626;
    margin-left: 5px; /* optical centering */
    transition: transform 0.25s ease;
}

.tour-play-btn:hover .tour-play-icon i {
    transform: scale(1.05);
}

/* --- Bottom-Left Caption Badge --- */
.tour-caption-badge {
    position: absolute;
    bottom: 22px;
    left: 24px;
    background-color: rgba(15, 23, 42, 0.76);
    color: #ffffff;
    border-radius: 6px;
    padding: 8px 16px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    z-index: 3;
    pointer-events: none;
}

.tour-caption-bar {
    width: 3px;
    height: 16px;
    background-color: #dc2626;
    border-radius: 1px;
    flex-shrink: 0;
}

.tour-caption-text {
    font-family: 'Inter', sans-serif;
    font-size: 13.5px;
    font-weight: 500;
    color: #ffffff;
    letter-spacing: 0.2px;
}

/* --- Bottom-Right Duration Badge --- */
.tour-duration-badge {
    position: absolute;
    bottom: 22px;
    right: 24px;
    background-color: rgba(15, 23, 42, 0.76);
    color: #ffffff;
    border-radius: 20px;
    padding: 6px 14px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    z-index: 3;
    pointer-events: none;
}

.tour-duration-badge i {
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.9);
}

/* --- Active Video Player View --- */
.tour-player-active {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000000;
    z-index: 10;
}

.tour-video-element,
.tour-iframe-element {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: none;
    display: block;
}

.tour-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: rgba(15, 23, 42, 0.85);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    font-size: 18px;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.tour-close-btn:hover {
    background-color: #dc2626;
    transform: scale(1.05);
}

/* --- Three Supporting Highlights --- */
.tour-highlights-grid {
    max-width: 920px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr;
    align-items: center;
    gap: 20px;
}

.tour-highlight-item {
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: center;
    padding: 6px 12px;
}

.tour-highlight-icon {
    font-size: 28px;
    color: #084298;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tour-highlight-content {
    display: flex;
    flex-direction: column;
}

.tour-highlight-title {
    font-family: 'Poppins', sans-serif;
    font-size: 15.5px;
    font-weight: 700;
    color: #0b1a38;
    margin: 0 0 2px 0;
    line-height: 1.25;
}

.tour-highlight-desc {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}

.tour-highlight-divider {
    width: 1px;
    height: 42px;
    background-color: #e2e8f0;
}

/* --- Bottom Institutional Signature --- */
.tour-brand-signature {
    text-align: center;
    margin-top: 36px;
}

.tour-signature-line {
    display: inline-block;
    width: 36px;
    height: 2.5px;
    background-color: #dc2626;
    border-radius: 2px;
    margin-bottom: 14px;
}

.tour-signature-name {
    font-family: 'Poppins', sans-serif;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
    color: #084298;
    text-transform: uppercase;
    margin: 0 0 3px 0;
}

.tour-signature-motto {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 2.5px;
    color: #64748b;
    text-transform: uppercase;
    margin: 0;
}

/* --- Responsive Styles --- */
@media (max-width: 991px) {
    .virtual-tour-modern {
        padding: 72px 0 64px 0;
    }

    .tour-watermark-text,
    .tour-watermark-quote {
        display: none;
    }

    .tour-watermark-crest {
        width: 140px;
        opacity: 0.05;
        right: 24px;
        top: 20px;
    }

    .tour-media-frame {
        max-height: 460px;
    }

    .tour-play-btn {
        width: 68px;
        height: 68px;
    }

    .tour-play-icon i {
        font-size: 22px;
    }

    .tour-highlights-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        max-width: 440px;
    }

    .tour-highlight-divider {
        display: none;
    }

    .tour-highlight-item {
        justify-content: flex-start;
        padding: 8px 16px;
        background-color: #f8fafc;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
    }
}

@media (max-width: 768px) {
    .virtual-tour-modern {
        padding: 50px 0 42px 0;
    }

    .tour-container {
        padding: 0 20px;
    }

    /* Completely hide watermark crest on mobile to prevent clashing with header */
    .tour-watermark-crest {
        display: none;
    }

    .tour-header {
        margin-bottom: 24px;
    }

    .tour-eyebrow {
        gap: 10px;
        margin-bottom: 10px;
    }

    .tour-eyebrow-line {
        width: 24px;
        height: 2px;
    }

    .tour-eyebrow-text {
        font-size: 12px;
        letter-spacing: 2px;
    }

    .tour-heading {
        font-size: clamp(1.75rem, 6.2vw, 2.3rem);
        line-height: 1.2;
        margin: 0 0 10px 0;
        letter-spacing: -0.4px;
    }

    .tour-subtitle {
        font-size: 14.5px;
        line-height: 1.55;
        max-width: 520px;
        padding: 0 8px;
    }

    .tour-subtitle br {
        display: none;
    }

    .tour-media-wrapper {
        margin: 0 auto 0;
    }

    .tour-media-frame {
        border-radius: 14px;
        aspect-ratio: 16 / 10;
        max-height: none;
        min-height: 220px;
        box-shadow: 0 12px 32px rgba(11, 26, 56, 0.12);
    }

    .tour-thumbnail-img {
        object-position: center 30%;
    }

    .tour-play-btn {
        width: 60px;
        height: 60px;
    }

    .tour-play-icon i {
        font-size: 19px;
        margin-left: 3px;
    }

    .tour-close-btn {
        top: 12px;
        right: 12px;
        width: 38px;
        height: 38px;
        font-size: 15px;
    }
}

/* Separation of Badges on Screens <= 640px to completely prevent collisions */
@media (max-width: 640px) {
    /* Relocate Duration Badge to Top-Right */
    .tour-duration-badge {
        top: 12px;
        right: 12px;
        bottom: auto;
        padding: 5px 12px;
        font-size: 11.5px;
        border-radius: 20px;
        background-color: rgba(11, 26, 56, 0.85);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        border: 1px solid rgba(255, 255, 255, 0.16);
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.28);
    }

    /* Bottom Caption Badge expands gracefully without colliding */
    .tour-caption-badge {
        bottom: 12px;
        left: 12px;
        right: auto;
        max-width: calc(100% - 24px);
        padding: 6px 12px;
        gap: 8px;
        border-radius: 7px;
        background-color: rgba(11, 26, 56, 0.85);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        border: 1px solid rgba(255, 255, 255, 0.16);
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.28);
        box-sizing: border-box;
    }

    .tour-caption-bar {
        width: 3px;
        height: 14px;
    }

    .tour-caption-text {
        font-size: 11.5px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block;
    }
}

@media (max-width: 480px) {
    .virtual-tour-modern {
        padding: 38px 0 32px 0;
    }

    .tour-container {
        padding: 0 16px;
    }

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

    .tour-eyebrow {
        gap: 8px;
        margin-bottom: 8px;
    }

    .tour-eyebrow-line {
        width: 20px;
        height: 2px;
    }

    .tour-eyebrow-text {
        font-size: 11px;
        letter-spacing: 1.8px;
    }

    .tour-heading {
        font-size: clamp(1.55rem, 6.8vw, 1.95rem);
        margin: 0 0 8px 0;
        letter-spacing: -0.3px;
    }

    .tour-subtitle {
        font-size: 13.5px;
        line-height: 1.5;
        padding: 0 4px;
    }

    .tour-media-frame {
        border-radius: 12px;
        aspect-ratio: 16 / 10;
        min-height: 200px;
    }

    .tour-thumbnail-img {
        object-position: center 25%;
    }

    .tour-play-btn {
        width: 52px;
        height: 52px;
    }

    .tour-play-icon i {
        font-size: 16px;
        margin-left: 3px;
    }

    .tour-duration-badge {
        top: 10px;
        right: 10px;
        padding: 4px 10px;
        font-size: 11px;
        gap: 6px;
    }

    .tour-duration-badge i {
        font-size: 11px;
    }

    .tour-caption-badge {
        bottom: 10px;
        left: 10px;
        max-width: calc(100% - 20px);
        padding: 5px 10px;
        gap: 7px;
        border-radius: 6px;
    }

    .tour-caption-bar {
        width: 2.5px;
        height: 13px;
    }

    .tour-caption-text {
        font-size: 11px;
    }

    .tour-close-btn {
        top: 8px;
        right: 8px;
        width: 34px;
        height: 34px;
        font-size: 14px;
    }
}

@media (max-width: 360px) {
    .virtual-tour-modern {
        padding: 32px 0 28px 0;
    }

    .tour-container {
        padding: 0 12px;
    }

    .tour-header {
        margin-bottom: 15px;
    }

    .tour-heading {
        font-size: 1.45rem;
    }

    .tour-subtitle {
        font-size: 12.5px;
        line-height: 1.45;
    }

    .tour-media-frame {
        min-height: 185px;
        border-radius: 10px;
    }

    .tour-play-btn {
        width: 46px;
        height: 46px;
    }

    .tour-play-icon i {
        font-size: 14px;
        margin-left: 2px;
    }

    .tour-duration-badge {
        top: 8px;
        right: 8px;
        padding: 3px 8px;
        font-size: 10px;
    }

    .tour-caption-badge {
        bottom: 8px;
        left: 8px;
        max-width: calc(100% - 16px);
        padding: 4px 8px;
        gap: 6px;
    }

    .tour-caption-text {
        font-size: 10px;
    }
}
