/* 
==============================================
   Media Section Styles (Added for Card Layout) 
==============================================
*/

/* Videos Grid Layout */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    /* Icon density */
    gap: 5px;
    /* Tiny spacing */
    padding: 15px 0;
    margin-top: 20px;
}

/* Video Card Styling */
.video-card {
    background: #fff;
    border-radius: 8px;
    /* Slightly less rounded */
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    /* Lighter shadow */
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.video-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

/* 16:9 Aspect Ratio Wrapper */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 */
    height: 0;
    overflow: hidden;
    background: #000;
}

.video-wrapper video,
.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: none;
}

/* Photos Grid (Gallery) */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    cursor: pointer;
    aspect-ratio: 4/3;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.2);
}

.gallery-item:hover img {
    transform: scale(1.08);
}

/* Tabs Styling */
.media-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.tab-btn {
    padding: 10px 30px;
    border: 2px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn.active,
.tab-btn:hover {
    background: var(--primary-color);
    color: white;
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-content.active {
    display: grid;
    /* restored grid for active tab */
}

/* Pagination Styles */
.pagination-controls {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    padding: 10px;
    margin-bottom: 20px;
}

.page-btn {
    padding: 8px 14px;
    border: 1px solid #ddd;
    background: white;
    color: var(--primary-color);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: auto;
    min-width: 40px;
}

.page-btn:hover:not(.disabled) {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    font-weight: bold;
}

.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f8f9fa;
}

/* 
==============================================
   MOBILE RESPONSIVE STYLES FOR MEDIA SECTION
==============================================
*/

/* Tablet and Medium Screens (max-width: 768px) */
@media (max-width: 768px) {

    /* Adjust video grid for tablet - larger cards */
    .videos-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
        padding: 10px 0;
    }

    /* Slightly smaller border radius on mobile */
    .video-card {
        border-radius: 6px;
    }

    /* Adjust gallery grid for tablet */
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }

    /* Adjust tab buttons for mobile */
    .tab-btn {
        padding: 8px 20px;
        font-size: 0.95rem;
    }
}

/* Small Mobile Devices (max-width: 480px) */
@media (max-width: 480px) {

    /* Force 2-column layout for videos on small screens */
    .videos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 8px 0;
    }

    /* Force 2-column layout for photos on small screens */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    /* Smaller tab buttons on very small screens */
    .tab-btn {
        padding: 6px 15px;
        font-size: 0.9rem;
    }

    /* Adjust pagination for small screens */
    .pagination-controls {
        gap: 5px;
        padding: 8px;
    }

    .page-btn {
        padding: 6px 10px;
        font-size: 0.85rem;
        min-width: 35px;
    }
}