/* Product Tour Page Styles */
.tour-hero {
    background-color: var(--primary-color);
    color: white;
    padding: 80px 0;
    text-align: center;
    margin-top: 60px;
}

.tour-hero h1 {
    font-family: var(--font-family-headings);
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: white;
}

.tour-hero p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
}

.tour-gallery {
    padding: 60px 0;
    background-color: #f9f9f9;
}

.tour-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.tour-card {
    background: var(--light-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tour-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1), 0 8px 10px rgba(0,0,0,0.1);
}

.video-still {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16; /* Phone aspect ratio approximation */
    background: var(--light-color);
    overflow: hidden;
}

.video-still video {
    width: 100%;
    height: calc(100% + 2px); /* Prevents subpixel gaps/lines at the bottom */
    object-fit: cover;
    display: block;
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(48, 57, 148, 0.8); /* Primary color */
    color: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    padding-left: 5px; /* Offset for play triangle */
}

.tour-card-text {
    padding: 1.5rem;
}

.tour-card-text h3 {
    font-family: var(--font-family-headings);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    width: fit-content;
    max-width: 95%;
    height: auto;
    max-height: 90vh;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(to bottom, 
        #ffffff 0%, #ffffff 25%, 
        var(--primary-color) 25%, var(--primary-color) 75%, 
        #ffffff 75%, #ffffff 100%
    );
    border-radius: 24px;
    box-shadow: 0 50px 100px rgba(0,0,0,0.7);
    padding: 4rem 6rem;
}

.modal-bar-top, .modal-bar-bottom {
    background: transparent;
    height: 0;
    width: 100%;
}

.close-btn {
    position: absolute;
    right: 25px;
    top: 15px;
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--dark-color);
    cursor: pointer;
    line-height: 1;
    z-index: 1000;
}

.close-btn:hover {
    color: var(--primary-color);
}

.modal-purple-box {
    background-color: transparent;
    width: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    position: relative;
}

.modal-layout {
    display: flex;
    align-items: center;
    gap: 3rem;
    width: 100%;
    position: relative;
}

.modal-text {
    flex: 0 0 320px; /* Fixed width for text to let video define modal width */
    color: var(--light-color);
    z-index: 10;
}

.modal-text h2 {
    font-family: var(--font-family-headings);
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.modal-text p {
    font-size: 1.15rem;
    line-height: 1.5;
}

.modal-video-container {
    flex: 0 1 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.modal-video-container video {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 16px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
    background: #000;
}

@media (max-width: 768px) {
    .modal-content {
        width: 92%;
        max-width: 450px; /* Standard phone width limit */
        height: auto;
        max-height: 98vh;
        min-height: auto;
        padding: 1.5rem;
        background: #fff;
        border-radius: 20px;
    }

    .modal-bar-top {
        display: block;
        height: 0;
        background: transparent;
    }

    .modal-bar-bottom {
        display: none;
    }

    .modal-purple-box {
        background-color: transparent;
        padding: 0;
    }

    .modal-layout {
        flex-direction: column-reverse; /* Video on top for mobile */
        gap: 1rem;
    }
    
    .modal-text {
        flex: 0 0 auto;
        text-align: center;
        color: var(--text-color);
    }

    .modal-text h2 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .modal-text p {
        font-size: 1rem;
    }
    
    .modal-video-container {
        width: 100%;
    }

    .modal-video-container video {
        width: 100%;
        max-height: 75vh;
        height: auto;
        border-radius: 12px;
    }
    
    .close-btn {
        top: 5px;
        right: 15px;
        font-size: 2rem;
        color: var(--text-color);
    }
}
