/* 
   Gallery Styles CSS
   Nashik Cambridge School Website
   Complete styles for gallery.html
*/

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--monotone-dark) -50%, var(--water-darker) 0%, var(--water) 30%, var(--water-lighter) 80%, var(--monotone-dark) 150%) !important;
    color: #fff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
    position: relative;
    padding: 100px 0;
    overflow: hidden;
}

.hero-section .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    font-family: 'Playfair Display', serif;
}

.gradient-text {
    background: linear-gradient(135deg, #fff 50%, var(--sun) 200%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    color: transparent !important;
}

/* Gallery-specific styles */
.gallery-container {
    padding: 20px 0;
}

.gallery-filter {
    margin-bottom: 0 !important; /* Remove all bottom margin */
}

.gallery-nav-container {
    position: relative;
    z-index: 1;
    margin-bottom: 0 !important; /* Remove bottom margin */
}

.gallery-nav-container:after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background-color: #e9ecef;
    z-index: -1;
}

/* Remove all margins from row elements */
.row.mb-3, .row.mb-2, .row {
    margin-bottom: 0 !important;
}

/* Fix gap between filter and gallery content completely */
#galleryTabContent {
    margin-top: 0 !important;
    padding-top: 5px !important; /* Minimal padding */
}

.tab-content {
    min-height: 150px;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.tab-pane {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.gallery-category {
    margin-bottom: 15px; /* Reduced */
    margin-top: 0 !important;
    position: relative;
    padding-bottom: 0;
    padding-top: 0 !important;
}

/* First gallery category should have no top spacing */
.gallery-category:first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.gallery-category-title {
    position: relative;
    padding-bottom: 3px; /* Minimal padding */
    margin-bottom: 3px; /* Minimal margin */
    margin-top: 0 !important;
    padding-top: 0 !important;
    color: #333;
    font-weight: 600;
    font-size: 1.6rem;
    display: inline-block;
}

.gallery-category-title:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #4e73df, #224abe);
}

.gallery-category-description {
    color: #6c757d;
    margin-bottom: 8px; /* Minimal margin */
    margin-top: 0 !important;
    font-size: 1rem;
    max-width: 800px;
}

.gallery-items {
    margin-top: 0 !important; /* Remove top margin completely */
    padding-top: 0 !important;
}

.gallery-item {
    transition: all 0.3s ease;
    margin-bottom: 25px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    background: white;
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 25px rgba(0,0,0,0.15);
}

.gallery-item img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    transition: all 0.5s ease;
}

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

.gallery-caption {
    padding: 15px;
    background: white;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.gallery-caption p {
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
    font-size: 15px;
}

.gallery-nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 5px !important; /* Minimal margin */
}

.gallery-nav .nav-link {
    color: #495057;
    font-weight: 500;
    padding: 12px 25px;
    border-radius: 30px;
    margin-right: 10px;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border: 1px solid #e9ecef;
}

.gallery-nav .nav-link.active {
    background: linear-gradient(135deg, #4e73df, #224abe);
    color: white;
    border-color: transparent;
    box-shadow: 0 5px 15px rgba(34, 74, 190, 0.3);
}

.gallery-nav .nav-link:hover:not(.active) {
    background-color: #f8f9fa;
    border-color: #dee2e6;
}

.filter-container {
    position: relative;
    max-width: 400px;
    margin: 0 auto;
    margin-bottom: 5px !important; /* Minimal margin */
}

.filter-container::before {
    content: "\f0b0";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    z-index: 10;
}

.filter-container select {
    width: 100%;
    padding-left: 40px;
    appearance: none;
    cursor: pointer;
    border-radius: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid #dee2e6;
    height: 45px;
    font-weight: 500;
}

.filter-container select:focus {
    border-color: #4e73df;
    box-shadow: 0 0 0 0.25rem rgba(78, 115, 223, 0.25);
}

.filter-container::after {
    content: "\f078";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    pointer-events: none;
}

.video-container {
    position: relative;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
}

.video-container .ratio {
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}

.video-source-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.youtube-badge {
    background: #ff0000;
    color: white;
}

.gdrive-badge {
    background: #4285F4;
    color: white;
}

.empty-state {
    text-align: center;
    padding: 50px 0;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 5px; /* Minimal margin */
}

.empty-state i {
    font-size: 3rem;
    color: #dee2e6;
    margin-bottom: 15px;
}

.empty-state p {
    color: #6c757d;
    font-size: 1.1rem;
}

.section-title {
    margin-bottom: 35px;
}

footer.footer-container {
    display: block;
    text-align: center;
    margin-top: 20px;
    color: #6c757d;
    font-size: 0.9rem;
}

.breadcrumb-custom{
    display: inline-flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 8px 18px;
    border-radius: 50px;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin: 0 auto;
    white-space: nowrap;
    overflow-x: auto;
    max-width: fit-content;
    scrollbar-width: none; /* Firefox */
}

.breadcrumb-custom::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.breadcrumb-custom a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.breadcrumb-custom a:hover {
    color: #fff;
    transform: translateY(-1px);
}

.breadcrumb-custom i.divider {
    color: rgba(255, 255, 255, 0.5);
    margin: 0 8px;
    font-size: 12px;
}

.breadcrumb-custom span {
    color: var(--sun-lighter);
    font-weight: 600;
}

/* Fix dropdown overflow for all screen sizes */
.dropdown {
    position: relative !important;
}

.dropdown-menu {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: auto !important;
    transform: none !important;
    margin-top: 2px !important;
    z-index: 1050 !important;
    min-width: 180px !important;
    max-width: 300px !important;
    width: auto !important;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Desktop dropdown positioning */
@media (min-width: 992px) {
    .dropdown-menu {
        left: 50% !important;
        transform: translateX(-50%) !important;
        margin-top: 5px !important;
    }
}

/* Tablet dropdown fixes */
@media (max-width: 991px) and (min-width: 769px) {
    .dropdown-menu {
        left: 0 !important;
        right: auto !important;
        transform: none !important;
        max-width: 250px !important;
        margin-top: 3px !important;
    }
    
    .dropdown:last-child .dropdown-menu {
        left: auto !important;
        right: 0 !important;
    }
}

/* Mobile responsiveness and dropdown fixes */
@media (max-width: 768px) {
    .gallery-nav .nav-link {
        padding: 8px 15px;
        font-size: 0.9rem;
        margin-right: 5px;
        margin-bottom: 3px;
    }
    
    .gallery-item img {
        height: 200px;
    }
    
    .gallery-category {
        margin-bottom: 10px; /* Further reduced */
    }
    
    .gallery-items {
        margin-top: 0 !important;
    }
    
    .gallery-category-title {
        font-size: 1.4rem;
        margin-bottom: 2px;
    }
    
    .gallery-category-description {
        margin-bottom: 5px;
        font-size: 14px;
    }
    
    /* Mobile dropdown positioning - keep within screen bounds */
    .dropdown-menu {
        position: absolute !important;
        left: 0 !important;
        right: 0 !important;
        transform: none !important;
        margin: 3px 10px !important;
        max-width: calc(100vw - 40px) !important;
        width: auto !important;
        z-index: 1060 !important;
    }
    
    .dropdown-menu .dropdown-item {
        white-space: normal !important;
        word-wrap: break-word !important;
        padding: 8px 16px !important;
        font-size: 14px !important;
    }
    
    /* Ensure dropdown doesn't extend beyond viewport */
    .dropdown {
        overflow: visible !important;
    }
    
    .nav-menu .dropdown:last-child .dropdown-menu {
        left: auto !important;
        right: 10px !important;
    }
}

@media (max-width: 576px) {
    .gallery-nav .nav-link {
        padding: 6px 12px;
        font-size: 0.8rem;
        margin-right: 3px;
        margin-bottom: 3px;
    }
    
    .gallery-item img {
        height: 180px;
    }
    
    .filter-container {
        max-width: 100%;
        margin: 0 5px 3px 5px !important;
    }
    
    .gallery-category {
        margin-bottom: 8px;
    }
    
    .gallery-category-title {
        font-size: 1.2rem;
        margin-bottom: 1px;
    }
    
    .gallery-category-description {
        margin-bottom: 3px;
        font-size: 13px;
    }
    
    /* Extra small screen dropdown fixes */
    .dropdown-menu {
        position: fixed !important;
        left: 5px !important;
        right: 5px !important;
        top: auto !important;
        transform: none !important;
        margin: 0 !important;
        max-width: calc(100vw - 10px) !important;
        z-index: 9999 !important;
        border-radius: 8px !important;
    }
    
    .dropdown.show .dropdown-menu {
        display: block !important;
        animation: slideDown 0.3s ease-out !important;
    }
    
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .dropdown-menu .dropdown-item {
        padding: 10px 16px !important;
        font-size: 14px !important;
        border-bottom: 1px solid #f8f9fa !important;
    }
    
    .dropdown-menu .dropdown-item:last-child {
        border-bottom: none !important;
    }
}

/* Additional gap reduction styles */
.mb-2, .mb-3 {
    margin-bottom: 0 !important;
}

/* Ensure no extra spacing in tab content */
.tab-pane.active {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Override Bootstrap spacing */
.container .row {
    margin-bottom: 0 !important;
}

.container .row + .row {
    margin-top: 10px !important; /* Small spacing between different row sections */
}

/* Special handling for gallery filter row */
.row:has(.gallery-filter) {
    margin-top: 5px !important;
    margin-bottom: 0 !important;
}

/* Gallery content row should have minimal top margin */
.row:has(#galleryTabContent) {
    margin-top: 0 !important;
}
