/* Campus Life Section Styles */

.campus-life-section {
    padding: 60px 0;
    background: #ffffff;
    position: relative;
}

.campus-life-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-red), transparent);
}

/* Section Header */
.campus-life-header {
    margin-bottom: 50px;
}

.campus-life-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.7rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 30px;
    line-height: 1.2;
    text-align: center;
    position: relative;
}

.campus-life-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-red), var(--dark-red));
    border-radius: 2px;
}

.campus-life-subtitle {
    font-size: 1.2rem;
    color: var(--text-gray);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
    text-align: center;
}

/* Event Sections */
.campus-event-section {
    margin-bottom: 50px;
    padding: 30px 0;
    position: relative;
}

.event-header {
    margin-bottom: 30px;
    padding: 0 20px;
}

.event-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 15px;
    text-align: center;
    position: relative;
}

.event-subtitle {
    font-size: 1.1rem;
    color: var(--text-gray);
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Gallery Styles */
.campus-gallery {
    margin-bottom: 30px;
}

.gallery-carousel {
    position: relative;
    padding: 0 60px;
}

.carousel-container {
    overflow: hidden;
    position: relative;
    width: 100%;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease;
    gap: 20px;
    width: 100%;
    background: none;
}

.gallery-item {
    flex: 0 0 calc(33.333% - 14px);
    min-width: 280px;
    max-width: 100%;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    position: relative;
    background: #fff;
}

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

.gallery-image-wrapper {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

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

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

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-plus-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.gallery-plus-icon i {
    font-size: 20px;
    color: var(--primary-red);
    transition: transform 0.3s ease;
}

.gallery-overlay:hover .gallery-plus-icon {
    background: #ffffff;
    transform: scale(1.1);
}

.gallery-overlay:hover .gallery-plus-icon i {
    transform: rotate(90deg);
}

.gallery-caption {
    padding: 20px 25px;
    background: #ffffff;
}

.gallery-caption h4 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
    line-height: 1.3;
}

.gallery-caption p {
    color: var(--text-gray);
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
}

/* Carousel Navigation */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(220, 38, 38, 0.95);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.carousel-nav:hover {
    background: rgba(220, 38, 38, 1);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.carousel-nav:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: translateY(-50%) scale(1);
}

.carousel-prev {
    left: 15px;
}

.carousel-next {
    right: 15px;
}

/* Hide navigation buttons on mobile */
@media (max-width: 768px) {
    .carousel-nav {
        display: none;
    }
    
    .gallery-carousel {
        padding: 0 20px;
    }
}

/* Call to Action */
.campus-life-cta {
    background: linear-gradient(135deg, var(--primary-red), var(--dark-red));
    padding: 50px 30px;
    border-radius: 20px;
    color: #ffffff;
    position: relative;
    overflow: hidden;
    margin: 0 20px;
}

.campus-life-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.campus-life-cta h3 {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.campus-life-cta p {
    font-size: 1rem;
    margin-bottom: 30px;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.cta-button {
    display: inline-block;
    background: #ffffff;
    color: var(--primary-red);
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.cta-button:hover {
    background: #f8f9fa;
    color: var(--dark-red);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Lightbox Modal Styles */
.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.lightbox-modal.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.lightbox-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    background: #ffffff;
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.lightbox-modal.active .lightbox-content {
    transform: translate(-50%, -50%) scale(1);
}

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 45px;
    height: 45px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    color: #ffffff;
    font-size: 18px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.lightbox-close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    color: #ffffff;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.lightbox-nav:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 15px;
}

.lightbox-next {
    right: 15px;
}

.lightbox-image-container {
    width: 100%;
    height: 60vh;
    overflow: hidden;
    position: relative;
}

.lightbox-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lightbox-caption {
    display: none;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .campus-life-title {
        font-size: 3rem;
    }
    
    .event-title {
        font-size: 2.2rem;
    }
    
    .gallery-item {
        flex: 0 0 calc(50% - 10px);
        min-width: 250px;
    }
    
    .gallery-carousel {
        padding: 0 50px;
    }
}

@media (max-width: 992px) {
    .campus-life-section {
        padding: 50px 0;
    }
    
    .campus-life-title {
        font-size: 2.5rem;
    }
    
    .campus-life-subtitle {
        font-size: 1.1rem;
    }
    
    .event-title {
        font-size: 2rem;
    }
    
    .gallery-item {
        flex: 0 0 calc(50% - 10px);
        min-width: 220px;
    }
    
    .gallery-carousel {
        padding: 0 40px;
    }
    
    .campus-life-cta h3 {
        font-size: 2rem;
    }
    
    .lightbox-content {
        width: 95%;
    }
    
    .lightbox-nav {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

@media (max-width: 768px) {
    .campus-life-section {
        padding: 40px 0;
    }
    
    .campus-life-header {
        margin-bottom: 40px;
    }
    
    .campus-life-title {
        font-size: 2rem;
        line-height: 1.3;
    }
    
    .campus-life-subtitle {
        font-size: 1rem;
        padding: 0 15px;
    }
    
    .campus-event-section {
        margin-bottom: 40px;
        padding: 20px 0;
    }
    
    .event-title {
        font-size: 1.8rem;
    }
    
    .event-subtitle {
        font-size: 1rem;
        padding: 0 15px;
    }
    
    .gallery-carousel {
        padding: 0 20px;
    }
    
    .gallery-item {
        flex: 0 0 100%;
        min-width: 100%;
        max-width: 100%;
        margin: 0;
        width: 100%;
    }
    
    .carousel-track {
        gap: 0;
        background: none;
    }
    
    .gallery-image-wrapper {
        height: 180px;
    }
    
    .gallery-caption {
        padding: 18px 20px;
    }
    
    .gallery-caption h4 {
        font-size: 1.2rem;
    }
    
    .carousel-nav {
        display: none;
    }
    
    .campus-life-cta {
        padding: 35px 25px;
        margin: 0 15px;
    }
    
    .campus-life-cta h3 {
        font-size: 1.8rem;
    }
    
    .campus-life-cta p {
        font-size: 0.95rem;
    }
    
    .cta-button {
        padding: 10px 25px;
        font-size: 0.95rem;
    }
    
    .lightbox-image-container {
        height: 50vh;
    }
    
    .lightbox-caption {
        display: none;
    }
    
    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .lightbox-close {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

@media (max-width: 576px) {
    .campus-life-title {
        font-size: 1.8rem;
        padding: 0 10px;
    }
    
    .campus-life-subtitle {
        padding: 0 10px;
    }
    
    .event-title {
        font-size: 1.6rem;
    }
    
    .event-subtitle {
        padding: 0 10px;
    }
    
    .gallery-item {
        flex: 0 0 100%;
        min-width: 100%;
        max-width: 100%;
        margin: 0;
        width: 100%;
    }
    
    .carousel-track {
        gap: 0;
    }
    
    .campus-life-cta {
        margin: 0 10px;
        padding: 25px 20px;
    }
    
    .campus-life-cta h3 {
        font-size: 1.6rem;
    }
    
    .lightbox-content {
        width: 98%;
        max-height: 90vh;
    }
    
    .lightbox-image-container {
        height: 45vh;
    }
    
    .lightbox-caption {
        display: none;
    }
    
    .lightbox-nav {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .lightbox-close {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .campus-life-title {
        font-size: 1.6rem;
    }
    
    .event-title {
        font-size: 1.4rem;
    }
    
    .gallery-item {
        flex: 0 0 100%;
        min-width: 100%;
        max-width: 100%;
        margin: 0;
        width: 100%;
    }
    
    .carousel-track {
        gap: 0;
    }
    
    .gallery-caption h4 {
        font-size: 1.1rem;
    }
    
    .gallery-caption p {
        font-size: 0.85rem;
    }
    
    .campus-life-cta h3 {
        font-size: 1.4rem;
    }
    
    .lightbox-nav {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
    
    .lightbox-close {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Smooth transitions for gallery items */
.gallery-item {
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger animation for gallery items */
.gallery-item:nth-child(1) { animation-delay: 0.1s; }
.gallery-item:nth-child(2) { animation-delay: 0.2s; }
.gallery-item:nth-child(3) { animation-delay: 0.3s; }
.gallery-item:nth-child(4) { animation-delay: 0.4s; }
.gallery-item:nth-child(5) { animation-delay: 0.5s; }
.gallery-item:nth-child(6) { animation-delay: 0.6s; }
