/* Common Gallery Styles */
.gallery-wrapper {
    /* max-width: 1400px; */
    margin: 0 auto;
    padding: 0 20px;
    background: #fff;
    margin-top: 20px;
}

.gallery-section {
    width: 100%;
    box-sizing: border-box;
    background: #fff;
} 

.section-title {
    text-align: center;
    color: #fff;
    font-size: 28px;
    font-weight: bold;
    margin: 30px auto;
    text-transform: uppercase;
    background: #000080;
    padding: 15px;
    /* border-radius: 12px; */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    /* max-width: 1400px; */
    position: relative;
    top: 0;
    z-index: 10;
    max-width: 100vw !important;
    width: 100vw !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    left: 0 !important;
    border-radius: 0 !important;
    box-sizing: border-box;
}

/* Common Container Styles */
.gallery-container {
    display: grid;
    gap: 20px;
    padding: 20px;
    background: #fff;
    margin: 0 auto 20px;
    max-height: 400px;
    overflow-y: auto;
}

/* No Data Message Styles */
.no-data {
    text-align: center;
    color: #6b7280;
    font-size: 16px;
    padding: 40px 20px;
    background: #f9fafb;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    margin: 20px 0;
    font-style: italic;
}

/* Scrollbar Styles */
.gallery-container::-webkit-scrollbar {
    width: 8px;
}

.gallery-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.gallery-container::-webkit-scrollbar-thumb {
    background: #000080;
    border-radius: 4px;
}

.gallery-container::-webkit-scrollbar-thumb:hover {
    background: #000060;
}

/* Course Gallery Styles */
.courses-gallery {
    grid-template-columns: repeat(5, 1fr);
    max-height: none;
    overflow: visible;
}

.course-item {
    position: relative;
    border: 3px solid #000080;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.course-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.course-item .caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1a75ff !important;
    color: #fff;
    padding: 12px;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
}

.course-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

/* Override common gallery item styles for courses */
.courses-gallery .gallery-item .caption {
    transform: none;
}

.courses-gallery .gallery-item:hover .caption {
    transform: none;
}

/* Students Gallery Styles */
.students-gallery {
    display: flex;
    overflow: hidden;
    position: relative;
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
}

.students-gallery-track {
    display: flex;
    gap: 20px;
    animation: scroll 40s linear infinite;
    width: fit-content;
    will-change: transform;
    padding-right: 20px;
}

.students-gallery .gallery-item {
    flex: 0 0 250px;
    width: 250px;
    transform: translateZ(0);
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-250px * 6 - 20px * 6));
    }
}

/* Pause animation on hover */
.students-gallery:hover .students-gallery-track {
    animation-play-state: paused;
}

.students-gallery .gallery-item,
.student-item {
    position: relative;
    border: 2px solid #000080;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    background: #fff;
    aspect-ratio: initial;
    height: auto;
}

.students-gallery .gallery-item img,
.student-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transform: none !important;
}

.students-gallery .gallery-item .caption,
.student-item .caption {
    position: relative !important;
    background: #1a75ff !important;
    padding: 10px;
    transform: none !important;
    text-align: center;
    color: #fff;
    display: block !important;
}

.students-gallery .gallery-item:hover,
.student-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.students-gallery .gallery-item:hover img,
.student-item:hover img {
    transform: none !important;
}

.students-gallery .gallery-item:hover .caption,
.student-item:hover .caption {
    transform: none !important;
}

/* Centers Gallery Styles */
.centers-gallery {
    grid-template-columns: repeat(6, 1fr);
    max-height: 400px;
}

.center-item {
    border-color: #004d00;
}

.center-item .caption {
    background: rgba(0, 77, 0, 0.9);
}

/* Faculty Gallery Styles */
.faculty-gallery {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    max-height: 400px;
    overflow-y: auto;
    width: 100%;
    box-sizing: border-box;
}

.faculty-gallery .gallery-item,
.faculty-item {
    position: relative;
    border: 2px solid #000080;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    background: #fff;
    aspect-ratio: initial;
    height: auto;
}

.faculty-gallery .gallery-item img,
.faculty-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    max-width: 100%;
}

.faculty-gallery .gallery-item .caption,
.faculty-item .caption {
    position: relative !important;
    background: #1a75ff !important;
    padding: 10px;
    transform: none !important;
    text-align: center;
    color: #fff;
    display: block !important;
}

.faculty-gallery .gallery-item .caption h3,
.faculty-item .caption h3 {
    margin: 0;
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    display: block;
}

.faculty-gallery .gallery-item .caption p,
.faculty-item .caption p {
    margin: 5px 0 0;
    font-size: 12px;
    color: #fff;
    font-style: italic;
    display: block;
}

.faculty-gallery .gallery-item:hover,
.faculty-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.faculty-gallery .gallery-item:hover img,
.faculty-item:hover img {
    transform: none !important;
}

.faculty-gallery .gallery-item:hover .caption,
.faculty-item:hover .caption {
    transform: none !important;
}

/* Common Item Styles */
.gallery-item {
    position: relative;
    border: 2px solid;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

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

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

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

.gallery-item .caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    color: #fff;
    padding: 10px;
    text-align: center;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .caption {
    transform: translateY(0);
}

/* Update hover effect for faculty items */
.faculty-item:hover .caption {
    transform: translateY(0);
}

/* Responsive Styles */
@media (max-width: 1400px) {
    .courses-gallery {
        grid-template-columns: repeat(4, 1fr);
    }
    .students-gallery,
    .centers-gallery {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 1200px) {
    .courses-gallery {
        grid-template-columns: repeat(3, 1fr);
    }
    .students-gallery,
    .centers-gallery {
        grid-template-columns: repeat(4, 1fr);
    }
    .gallery-container {
        max-height: 600px;
    }
    .faculty-gallery {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .faculty-item .caption h3 {
        font-size: 13px;
    }
    
    .faculty-item .caption p {
        font-size: 11px;
    }
}

@media (max-width: 992px) {
    .courses-gallery,
    .students-gallery,
    .centers-gallery {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .gallery-wrapper,
    .gallery-section {
        margin: 0 !important;
        padding: 0 10px !important;
        width: 100% !important;
        max-width: 100% !important;
        left: auto !important;
        right: auto !important;
        box-sizing: border-box !important;
    }
    .section-title {
        position: static !important;
        left: auto !important;
        right: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 40px 0 20px 0 !important;
        border-radius: 0 !important;
        box-sizing: border-box !important;
        z-index: 100;
    }

    .faculty-item .caption {
        padding: 10px;
    }

    .faculty-gallery {
        max-height: 600px;
        overflow-y: auto;
    }

    .courses-gallery {
        max-height: 600px;
        overflow-y: auto;
    }
}

@media (max-width: 480px) {
    .gallery-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        max-height: 400px;
    }
    

}

/* Slideshow Styles */
.slideshow-container {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    margin: 0;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.8s ease;
    display: none;
}

.slide.active {
    opacity: 1;
    transform: translateX(0);
    display: block;
    z-index: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide .caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #000080;
    color: #fff;
    padding: 15px;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    z-index: 2;
}

/* Slide Indicators */
.slide-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 2;
}

.slide-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.slide-indicator.active {
    background: #fff;
    transform: scale(1.2);
}

/* Navigation Arrows */
.slide-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 128, 0.6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    font-size: 24px;
    transition: all 0.3s ease;
    z-index: 2;
}

.slide-nav:hover {
    background: rgba(0, 0, 128, 0.9);
}

.slide-nav.prev {
    left: 20px;
}

.slide-nav.next {
    right: 20px;
}

.gallery-wrapper,
.gallery-section {
    margin: 0 !important;
    padding: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    left: 0 !important;
    right: 0 !important;
    box-sizing: border-box;
}

.section-title {
    position: relative !important;
    left: 50% !important;
    right: 50% !important;
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: -50vw !important;
    margin-right: 0 !important;
    border-radius: 0 !important;
    box-sizing: border-box !important;
    z-index: 10;
} 