/* Component Styles - Map Tabs, Video Section, Gallery */

/* Map Tabs Styles */
.map-tabs {
    display: flex;
    background-color: #f8f9fa;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
    margin-bottom: 0;
}

.map-tab-button {
    flex: 1;
    padding: 12px 20px;
    background-color: #f8f9fa;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.map-tab-button:hover {
    background-color: #e9ecef;
    color: #4f67a5;
}

.map-tab-button.active {
    background-color: #ffffff;
    color: #4f67a5;
    border-bottom-color: #4f67a5;
    font-weight: 600;
}

.map-tab-content {
    display: none;
    background-color: #ffffff;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
    height: 450px;
}

.map-tab-content.active {
    display: block;
}

.map-tab-content iframe,
.map-iframe {
    border-radius: 0 0 8px 8px;
    width: 100% !important;
    height: 100% !important;
    max-width: 100%;
    border: none;
    display: block;
}

/* Contact map iframe styles */
.contact-map iframe {
    border-radius: 10px !important;
    width: 100% !important;
    height: 100% !important;
    border: none;
    display: block;
    box-shadow: 0 5px 15px rgba(0,0,0,.1);
}

/* Video Section Styles */
.video-section {
    padding: 80px 0;
    text-align: center;
    width: 100%;
    margin: 0 auto;
}

/* When video-section is inside content-grid, ensure proper alignment */
.content-grid .video-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 80px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}


.video-header {
    margin-bottom: 50px;
}

.video-section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #4f67a5;
    margin-bottom: 1rem;
}

.video-header p {
    font-size: 1.2rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.video-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #000;
    min-height: 450px; /* Fallback height for 16:9 at 800px width */
}

.video-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #000;
    display: block;
}

.video-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: none;
    outline: none;
    background: #000;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    z-index: 2;
}

.video-container:hover .video-overlay {
    background: rgba(0, 0, 0, 0.5);
}

.play-button {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 3;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.video-container:hover .play-button {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.play-button svg {
    margin-left: 5px;
}

/* Video Modal Styles */
.video-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
}

.video-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.video-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.3s ease;
}

.video-close:hover {
    color: #ccc;
}

#modalVideo {
    width: 100%;
    height: auto;
    max-height: 80vh;
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Gallery Styles */
.gallery-header {
    text-align: center;
    margin-bottom: 3rem;
}

.gallery-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #4f67a5;
    margin-bottom: 1rem;
}

.gallery-header p {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.gallery {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    gap: 1rem !important;
    padding: 0 !important;
    margin-bottom: 3rem !important;
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    grid-auto-rows: auto !important;
}

.gallery-item {
    position: relative !important;
    overflow: hidden !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s ease !important;
    aspect-ratio: 4/3 !important;
    background: #f8f9fa !important;
    grid-column: span 1 !important;
    grid-row: span 1 !important;
}

.gallery-item:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 8px 25px rgba(79, 103, 165, 0.2) !important;
}

.gallery-item img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.4s ease !important;
}

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

.gallery-item .overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: linear-gradient(135deg, rgba(79, 103, 165, 0.8) 0%, rgba(41, 150, 121, 0.8) 100%) !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transform: none !important;
    padding: 0 !important;
}

.gallery-item:hover .overlay {
    opacity: 1 !important;
    transform: none !important;
}

.gallery-item .overlay::after {
    content: '👁️';
    font-size: 2rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Utility Classes */
.explore-btn-white {
    color: #fff;
}

.about-image-constrained {
    max-width: 80%;
    display: block;
}

.about-image-full {
    width: 100%;
    height: auto;
    max-width: none;
}

.fd-cta-text-white,
.fd-arrow-white {
    color: #ffffff !important;
}

.services-grid-wide {
    max-width: 1400px;
}

.service-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 80px;
    margin-bottom: 10px;
    padding: 0;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .map-tab-button {
        padding: 10px 15px;
        font-size: 13px;
    }

    .video-section {
        padding: 60px 0;
    }

    .content-grid .video-section {
        padding: 60px 20px;
    }

    .video-section-title {
        font-size: 2rem;
    }

    .video-header p {
        font-size: 1rem;
        padding: 0 20px;
    }

    .video-container {
        max-width: 90%;
        margin: 0 auto;
    }

    .play-button {
        width: 80px;
        height: 80px;
    }

    .video-modal-content {
        max-width: 95%;
        max-height: 80%;
    }

    .video-close {
        top: -35px;
        font-size: 30px;
    }

    .gallery {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
        gap: 0.6rem !important;
        padding: 0 1rem !important;
    }

    .gallery-header h2 {
        font-size: 2rem;
    }

    .gallery-header p {
        font-size: 1rem;
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .video-section {
        padding: 40px 0;
    }

    .content-grid .video-section {
        padding: 40px 15px;
    }

    .video-section-title {
        font-size: 1.8rem;
    }

    .play-button {
        width: 70px;
        height: 70px;
    }

    .gallery {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem !important;
        padding: 0 0.5rem !important;
    }

    .gallery-item {
        aspect-ratio: 1 !important;
    }

    .gallery-header h2 {
        font-size: 1.8rem;
    }
}