
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }

        :root {
            --primary-color: #1a237e;
            --secondary-color: #283593;
            --accent-color: #3949ab;
            --light-blue: #e8eaf6;
            --gold-color: #ffb300;
            --text-dark: #1a237e;
            --text-light: #5c6bc0;
            --white: #ffffff;
        }

        body {
            background-color: #f5f7ff;
            color: #333;
            line-height: 1.6;
            overflow-x: hidden;
        }

        /* Reduced motion support */
        @media (prefers-reduced-motion: reduce) {
            *,
            *::before,
            *::after {
                animation-duration: 0.01ms !important;
                animation-iteration-count: 1 !important;
                transition-duration: 0.01ms !important;
                scroll-behavior: auto !important;
            }
        }

        /* Performance optimizations */
        img {
            content-visibility: auto;
        }

        .slide {
            contain: content;
        }

        /* Header Styles */
        .College-header {
            background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
            color: white;
            padding: 20px 0;
            text-align: center;
            position: sticky;
            top: 0;
            z-index: 100;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
            transition: padding 0.3s ease, box-shadow 0.3s ease;
        }

        .College-header h1 {
            font-size: 2.5rem;
            margin-bottom: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 15px;
            flex-wrap: wrap;
        }

        .College-header h1 i {
            color: var(--gold-color);
        }

        .College-header p {
            font-size: 1.1rem;
            opacity: 0.9;
            max-width: 800px;
            margin: 0 auto;
            padding: 0 15px;
        }

        /* Main Container */
        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 25px 15px;
        }

        /* Search and Filter Section */
        .search-filter-section {
            margin-bottom: 30px;
            padding: 20px;
            background: var(--white);
            border-radius: 12px;
            box-shadow: 0 4px 12px rgba(26, 35, 126, 0.08);
        }

        .search-container {
            display: flex;
            gap: 15px;
            margin-bottom: 20px;
            flex-wrap: wrap;
        }

        .search-input {
            flex: 1;
            min-width: 250px;
            padding: 12px 20px;
            border: 2px solid var(--light-blue);
            border-radius: 25px;
            font-size: 1rem;
            transition: all 0.3s ease;
        }

        .search-input:focus {
            outline: none;
            border-color: var(--accent-color);
            box-shadow: 0 0 0 3px rgba(57, 73, 171, 0.1);
        }

        .category-filter {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            justify-content: center;
        }

        .category-btn {
            padding: 8px 20px;
            border: 2px solid var(--light-blue);
            background: var(--white);
            border-radius: 20px;
            cursor: pointer;
            font-weight: 600;
            transition: all 0.3s ease;
            font-size: 0.9rem;
        }

        .category-btn:hover,
        .category-btn.active {
            background: var(--primary-color);
            color: var(--white);
            border-color: var(--primary-color);
        }

        /* Section Headers */
        .section-header {
            text-align: center;
            margin-bottom: 35px;
            padding-bottom: 15px;
            border-bottom: 3px solid var(--accent-color);
            position: relative;
        }

        .section-header h2 {
            color: var(--text-dark);
            font-size: 2rem;
            margin-bottom: 10px;
        }

        .section-header p {
            color: var(--text-light);
            font-size: 1rem;
            max-width: 700px;
            margin: 0 auto;
            padding: 0 10px;
        }

        /* Events Grid */
        .events-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 25px;
            margin-bottom: 50px;
        }

        .event-card {
            background: var(--white);
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 5px 15px rgba(26, 35, 126, 0.1);
            transition: all 0.3s ease;
            cursor: pointer;
            border: 2px solid transparent;
            height: 100%;
            display: flex;
            flex-direction: column;
            opacity: 1;
            transform: translateY(0);
        }

        .event-card.hidden {
            display: none;
        }

        .event-card.fade-out {
            opacity: 0;
            transform: translateY(20px);
        }

        .event-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 25px rgba(26, 35, 126, 0.15);
            border-color: var(--accent-color);
        }

        .event-image {
            width: 100%;
            height: 180px;
            object-fit: cover;
            display: block;
            background: var(--light-blue);
        }

        .event-image.loading {
            opacity: 0.5;
        }

        .event-content {
            padding: 20px;
            flex-grow: 1;
            display: flex;
            flex-direction: column;
        }

        .event-title {
            color: var(--text-dark);
            font-size: 1.3rem;
            margin-bottom: 12px;
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            flex-wrap: wrap;
            gap: 10px;
        }

        .event-title h3 {
            flex: 1;
            min-width: 200px;
        }

        .event-title span {
            background: var(--light-blue);
            color: var(--primary-color);
            padding: 4px 12px;
            border-radius: 15px;
            font-size: 0.8rem;
            font-weight: 600;
            white-space: nowrap;
        }

        .event-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 12px;
            margin-bottom: 12px;
        }

        .event-meta-item {
            display: flex;
            align-items: center;
            gap: 6px;
            color: var(--text-light);
            font-size: 0.9rem;
        }

        .event-meta-item i {
            color: var(--accent-color);
            flex-shrink: 0;
        }

        .event-description {
            color: #555;
            line-height: 1.6;
            margin-bottom: 15px;
            flex-grow: 1;
            display: -webkit-box;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .event-footer {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 15px;
            padding-top: 15px;
            border-top: 1px solid #eee;
            flex-wrap: wrap;
            gap: 10px;
        }

        .event-organizer {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .organizer-avatar {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: var(--accent-color);
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            flex-shrink: 0;
        }

        .event-actions {
            display: flex;
            gap: 10px;
            align-items: center;
        }

        .favorite-btn {
            background: transparent;
            border: 2px solid var(--light-blue);
            color: var(--text-light);
            width: 36px;
            height: 36px;
            border-radius: 50%;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
            font-size: 1rem;
        }

        .favorite-btn:hover {
            border-color: var(--gold-color);
            color: var(--gold-color);
        }

        .favorite-btn.favorited {
            background: var(--gold-color);
            border-color: var(--gold-color);
            color: white;
        }

        .view-gallery-btn {
            background: var(--primary-color);
            color: white;
            border: none;
            padding: 8px 16px;
            border-radius: 20px;
            cursor: pointer;
            font-weight: 600;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 0.9rem;
            flex-shrink: 0;
        }

        .view-gallery-btn:hover {
            background: var(--accent-color);
            transform: scale(1.05);
        }

        /* Focus states for accessibility */
        button:focus-visible,
        .category-btn:focus-visible,
        .favorite-btn:focus-visible,
        .view-gallery-btn:focus-visible {
            outline: 2px solid var(--gold-color);
            outline-offset: 2px;
        }

        .search-input:focus-visible {
            outline: 2px solid var(--accent-color);
            outline-offset: 2px;
        }

        /* Gallery Modal - IMPROVED SPACING FOR MOBILE */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.95);
            display: none;
            justify-content: center;
            align-items: center;
            z-index: 1000;
            padding: 15px;
            opacity: 0;
            transition: opacity 0.3s ease;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
        }

        .modal-overlay.active {
            display: flex;
            opacity: 1;
            animation: fadeIn 0.3s ease;
        }

        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        .gallery-modal {
            background: var(--white);
            border-radius: 15px;
            max-width: 95vw;
            width: 100%;
            max-height: 95vh;
            overflow: hidden;
            position: relative;
            animation: slideUp 0.4s ease;
            display: flex;
            flex-direction: column;
        }

        @keyframes slideUp {
            from { transform: translateY(30px); opacity: 0; }
            to { transform: translateY(0); opacity: 1; }
        }

        .close-modal {
            position: absolute;
            top: 15px;
            right: 15px;
            background: var(--primary-color);
            color: white;
            border: none;
            width: 44px;
            height: 44px;
            border-radius: 50%;
            cursor: pointer;
            font-size: 1.2rem;
            z-index: 20;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
        }

        .close-modal:hover {
            background: #0d1b6d;
            transform: rotate(90deg);
        }

        .modal-header {
            padding: 25px 20px;
            background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
            color: white;
            border-radius: 15px 15px 0 0;
            flex-shrink: 0;
            position: relative;
            /* Add padding for close button */
            padding-right: 70px;
        }

        .modal-header h2 {
            font-size: 1.8rem;
            margin-bottom: 10px;
            word-break: break-word;
            line-height: 1.3;
        }

        .modal-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 15px;
            margin-top: 12px;
        }

        .modal-meta-item {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 0.95rem;
        }

        .modal-content {
            padding: 25px 20px;
            display: flex;
            flex-direction: column;
            gap: 25px;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            flex-grow: 1;
        }

        /* Desktop layout */
        @media (min-width: 992px) {
            .modal-content {
                display: grid;
                grid-template-columns: 1fr 1.5fr;
                gap: 30px;
            }
            
            .modal-header {
                padding: 25px;
                padding-right: 70px;
            }
        }

        .event-details {
            display: flex;
            flex-direction: column;
            gap: 20px;
            order: 1;
        }

        /* Mobile layout - gallery first, details second WITH BETTER SPACING */
        @media (max-width: 991px) {
            .gallery-container {
                order: 0;
                margin-bottom: 0;
            }
            
            .event-details {
                order: 1;
                margin-top: 0;
            }
            
            .modal-content {
                gap: 25px;
                padding: 20px;
            }
            
            /* Add more spacing between sections on mobile */
            .gallery-container + .event-details {
                margin-top: 20px;
                padding-top: 25px;
                border-top: 2px solid var(--light-blue);
            }
        }

        .event-description-full {
            line-height: 1.7;
            color: #444;
            font-size: 1rem;
            margin-bottom: 10px;
        }

        .event-stats {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 15px;
            margin: 15px 0;
        }

        .stat-item {
            background: var(--light-blue);
            padding: 15px 10px;
            border-radius: 10px;
            text-align: center;
            display: flex;
            flex-direction: column;
            justify-content: center;
            min-height: 80px;
        }

        .stat-number {
            display: block;
            font-size: 1.6rem;
            font-weight: bold;
            color: var(--primary-color);
            line-height: 1.2;
        }

        .stat-label {
            font-size: 0.85rem;
            color: var(--text-light);
            margin-top: 5px;
        }

        /* Enhanced Gallery Styles with Sliding */
        .gallery-container {
            display: flex;
            flex-direction: column;
            gap: 20px;
            height: auto;
            min-height: 0;
            order: 0;
        }

        .gallery-main {
            position: relative;
            border-radius: 10px;
            overflow: hidden;
            background: #000;
            flex-shrink: 0;
            touch-action: pan-y pinch-zoom;
            margin-bottom: 10px;
        }

        /* Responsive gallery heights with better mobile handling */
        .gallery-main-fixed-height {
            height: 350px;
        }

        @media (max-height: 700px) {
            .gallery-main-fixed-height {
                height: 280px;
            }
        }

        @media (max-height: 900px) and (min-height: 701px) {
            .gallery-main-fixed-height {
                height: 320px;
            }
        }

        @media (min-height: 901px) {
            .gallery-main-fixed-height {
                height: 380px;
            }
        }

        /* Mobile-specific gallery height with more space */
        @media (max-width: 768px) {
            .gallery-main-fixed-height {
                height: 300px;
            }
            
            .modal-header h2 {
                font-size: 1.5rem;
                margin-bottom: 8px;
            }
            
            .modal-meta {
                gap: 10px;
            }
            
            .modal-meta-item {
                font-size: 0.9rem;
            }
        }

        @media (max-width: 576px) {
            .gallery-main-fixed-height {
                height: 260px;
            }
            
            .modal-header {
                padding: 20px 15px;
                padding-right: 60px;
            }
            
            .modal-header h2 {
                font-size: 1.4rem;
            }
            
            .close-modal {
                width: 40px;
                height: 40px;
                top: 12px;
                right: 12px;
                font-size: 1.1rem;
            }
            
            .modal-content {
                padding: 20px 15px;
                gap: 20px;
            }
        }

        @media (max-width: 480px) {
            .gallery-main-fixed-height {
                height: 220px;
            }
            
            .modal-header {
                padding: 18px 12px;
                padding-right: 55px;
            }
            
            .modal-header h2 {
                font-size: 1.3rem;
            }
            
            .modal-meta {
                flex-direction: column;
                gap: 8px;
            }
            
            .modal-meta-item {
                font-size: 0.85rem;
            }
        }

        @media (max-width: 375px) {
            .gallery-main-fixed-height {
                height: 200px;
            }
            
            .modal-header h2 {
                font-size: 1.2rem;
            }
        }

        .slider-wrapper {
            position: relative;
            width: 100%;
            height: 100%;
            overflow: hidden;
            user-select: none;
            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
        }

        .slides-container {
            display: flex;
            transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            height: 100%;
            will-change: transform;
        }

        .slide {
            min-width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            flex-shrink: 0;
        }

        .slide img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.3s ease;
            pointer-events: none;
        }

        .slide.active img {
            transform: scale(1.02);
        }

        .slide-caption {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
            color: white;
            padding: 12px 15px;
            transform: translateY(100%);
            transition: transform 0.3s ease;
            font-size: 0.9rem;
            line-height: 1.4;
        }

        .slide:hover .slide-caption {
            transform: translateY(0);
        }

        .image-nav {
            position: absolute;
            top: 50%;
            left: 0;
            right: 0;
            transform: translateY(-50%);
            display: flex;
            justify-content: space-between;
            padding: 0 10px;
            pointer-events: none;
            z-index: 5;
        }

        .nav-btn {
            background: rgba(255, 255, 255, 0.2);
            border: none;
            color: white;
            width: 44px;
            height: 44px;
            border-radius: 50%;
            cursor: pointer;
            font-size: 1.1rem;
            backdrop-filter: blur(8px);
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            pointer-events: all;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
        }

        .nav-btn:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: scale(1.1);
        }

        .image-counter {
            position: absolute;
            bottom: 15px;
            left: 15px;
            background: rgba(0, 0, 0, 0.7);
            color: white;
            padding: 6px 12px;
            border-radius: 15px;
            font-size: 0.85rem;
            backdrop-filter: blur(5px);
            z-index: 5;
        }

        /* Gallery controls - IMPROVED SPACING */
        .gallery-controls {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 15px;
            margin-top: 10px;
            flex-shrink: 0;
            padding: 12px;
            background: var(--light-blue);
            border-radius: 10px;
            margin-bottom: 15px;
        }

        /* Auto-play indicator */
        .auto-play-indicator {
            position: absolute;
            top: 15px;
            left: 15px;
            background: rgba(0, 0, 0, 0.7);
            color: white;
            padding: 6px 12px;
            border-radius: 15px;
            font-size: 0.8rem;
            backdrop-filter: blur(5px);
            display: flex;
            align-items: center;
            gap: 6px;
            z-index: 5;
        }

        .control-btn {
            background: var(--white);
            border: 2px solid var(--primary-color);
            color: var(--primary-color);
            width: 44px;
            height: 44px;
            border-radius: 50%;
            cursor: pointer;
            font-size: 1rem;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .control-btn:hover {
            background: var(--accent-color);
            color: white;
            border-color: var(--accent-color);
        }

        .play-pause-btn {
            width: 48px;
            height: 48px;
            font-size: 1.2rem;
        }

        .play-pause-btn.playing {
            background: var(--accent-color);
            color: white;
        }

        /* Thumbnail container with better spacing */
        .thumbnail-container {
            display: flex;
            gap: 8px;
            overflow-x: auto;
            padding: 12px 10px;
            scroll-behavior: smooth;
            flex-shrink: 0;
            min-height: 90px;
            -webkit-overflow-scrolling: touch;
            background: var(--light-blue);
            border-radius: 10px;
            margin-top: 5px;
            margin-bottom: 5px;
        }

        .thumbnail-container::-webkit-scrollbar {
            height: 6px;
        }

        .thumbnail-container::-webkit-scrollbar-track {
            background: #f1f1f1;
            border-radius: 3px;
        }

        .thumbnail-container::-webkit-scrollbar-thumb {
            background: var(--accent-color);
            border-radius: 3px;
        }

        .thumbnail {
            min-width: 70px;
            height: 70px;
            border-radius: 6px;
            overflow: hidden;
            cursor: pointer;
            opacity: 0.6;
            transition: all 0.3s ease;
            border: 2px solid transparent;
            position: relative;
            flex-shrink: 0;
        }

        .thumbnail:hover, .thumbnail.active {
            opacity: 1;
            border-color: var(--accent-color);
            transform: translateY(-3px);
        }

        .thumbnail img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .thumbnail-number {
            position: absolute;
            bottom: 4px;
            right: 4px;
            background: rgba(0, 0, 0, 0.7);
            color: white;
            width: 18px;
            height: 18px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.65rem;
        }

        /* Slide progress bar */
        .slide-progress {
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 3px;
            background: rgba(255, 255, 255, 0.3);
            z-index: 2;
        }

        .progress-bar {
            height: 100%;
            background: var(--gold-color);
            width: 0%;
            transition: width 0.1s linear;
        }

        /* Share buttons with better spacing */
        .share-buttons {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            margin: 15px 0;
            justify-content: center;
        }

        .share-btn {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 10px 16px;
            background: var(--light-blue);
            border: none;
            border-radius: 20px;
            cursor: pointer;
            font-size: 0.9rem;
            color: var(--text-dark);
            transition: all 0.3s ease;
            min-height: 40px;
        }

        .share-btn:hover {
            background: var(--accent-color);
            color: white;
        }

        .download-btn {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 10px 16px;
            background: var(--gold-color);
            border: none;
            border-radius: 20px;
            cursor: pointer;
            font-size: 0.9rem;
            color: white;
            font-weight: 600;
            transition: all 0.3s ease;
            min-height: 40px;
        }

        .download-btn:hover {
            background: #e6a200;
            transform: translateY(-2px);
        }

        /* Mobile-specific optimizations - FIXED OVERLAP AND ADDED WHITESPACE */
        @media (max-width: 991px) {
            .modal-content {
                display: flex;
                flex-direction: column;
                gap: 20px;
            }
            
            .event-details {
                margin-top: 0;
                padding-top: 0;
                border-top: none;
            }
            
            .gallery-controls {
                margin-bottom: 10px;
                padding: 10px;
                gap: 12px;
            }
            
            .thumbnail-container {
                margin-top: 0;
                padding: 10px;
                min-height: 85px;
            }
            
            /* Ensure no overlap between sections */
            .gallery-container + .event-details {
                margin-top: 20px;
                padding-top: 25px;
                border-top: 2px solid var(--light-blue);
            }
            
            /* Add spacing between elements */
            .event-stats {
                margin: 20px 0;
                gap: 12px;
            }
            
            .share-buttons {
                margin: 20px 0;
            }
        }

        @media (max-width: 768px) {
            .event-stats {
                grid-template-columns: repeat(3, 1fr);
                gap: 10px;
            }
            
            .stat-item {
                padding: 12px 8px;
                min-height: 75px;
            }
            
            .stat-number {
                font-size: 1.4rem;
            }
            
            .nav-btn {
                width: 40px;
                height: 40px;
                font-size: 1rem;
            }
            
            .thumbnail {
                min-width: 65px;
                height: 65px;
            }
            
            .close-modal {
                width: 40px;
                height: 40px;
                top: 12px;
                right: 12px;
                font-size: 1.1rem;
            }
            
            .gallery-controls {
                gap: 10px;
                padding: 10px;
            }
            
            .control-btn {
                width: 40px;
                height: 40px;
                font-size: 0.9rem;
            }
            
            .play-pause-btn {
                width: 44px;
                height: 44px;
                font-size: 1.1rem;
            }
            
            .share-buttons {
                gap: 8px;
            }
            
            .share-btn, .download-btn {
                padding: 8px 14px;
                font-size: 0.85rem;
            }
        }

        @media (max-width: 576px) {
            .events-grid {
                grid-template-columns: 1fr;
                gap: 20px;
            }
            
            .College-header h1 {
                font-size: 2rem;
                flex-direction: column;
                gap: 8px;
            }
            
            .College-header p {
                font-size: 1rem;
            }
            
            .modal-header {
                padding: 20px 15px;
                padding-right: 60px;
            }
            
            .modal-header h2 {
                font-size: 1.4rem;
            }
            
            .modal-meta {
                flex-direction: column;
                gap: 8px;
            }
            
            .modal-content {
                padding: 20px 15px;
                gap: 20px;
            }
            
            .event-stats {
                grid-template-columns: repeat(3, 1fr);
                gap: 8px;
            }
            
            .stat-item {
                padding: 10px 6px;
                min-height: 70px;
            }
            
            .stat-number {
                font-size: 1.3rem;
            }
            
            .stat-label {
                font-size: 0.8rem;
            }
            
            .gallery-controls {
                gap: 8px;
                padding: 8px;
            }
            
            .control-btn {
                width: 38px;
                height: 38px;
                font-size: 0.85rem;
            }
            
            .play-pause-btn {
                width: 42px;
                height: 42px;
                font-size: 1rem;
            }
            
            .thumbnail {
                min-width: 60px;
                height: 60px;
            }
            
            .thumbnail-container {
                min-height: 80px;
                padding: 10px 8px;
            }
            
            .share-buttons {
                flex-direction: column;
                align-items: stretch;
                gap: 10px;
            }
            
            .share-btn, .download-btn {
                width: 100%;
                justify-content: center;
                padding: 10px;
            }
        }

        @media (max-width: 480px) {
            .gallery-controls {
                flex-wrap: wrap;
                justify-content: center;
                gap: 8px;
                padding: 10px 8px;
            }
            
            .event-title {
                flex-direction: column;
                align-items: flex-start;
                gap: 8px;
            }
            
            .event-title span {
                align-self: flex-start;
            }
            
            .event-footer {
                flex-direction: column;
                align-items: flex-start;
                gap: 12px;
            }
            
            .view-gallery-btn {
                width: 100%;
                justify-content: center;
            }
            
            .event-actions {
                width: 100%;
                justify-content: space-between;
            }
            
            .modal-header h2 {
                font-size: 1.3rem;
                line-height: 1.2;
            }
            
            .modal-content {
                padding: 18px 12px;
                gap: 18px;
            }
            
            .event-stats {
                gap: 6px;
            }
            
            .stat-item {
                padding: 8px 4px;
                min-height: 65px;
            }
            
            .stat-number {
                font-size: 1.2rem;
            }
            
            .stat-label {
                font-size: 0.75rem;
            }
        }

        @media (max-width: 375px) {
            .gallery-main-fixed-height {
                height: 200px;
            }
            
            .modal-header h2 {
                font-size: 1.2rem;
            }
            
            .modal-content {
                padding: 16px 10px;
                gap: 16px;
            }
            
            .event-stats {
                gap: 5px;
            }
            
            .stat-item {
                padding: 6px 3px;
                min-height: 60px;
            }
            
            .stat-number {
                font-size: 1.1rem;
            }
            
            .thumbnail {
                min-width: 55px;
                height: 55px;
            }
            
            .thumbnail-container {
                min-height: 75px;
            }
        }

        /* Category Colors */
        .category-academic { background: #e3f2fd; color: #1565c0; }
        .category-sports { background: #f3e5f5; color: #7b1fa2; }
        .category-cultural { background: #e8f5e9; color: #2e7d32; }
        .category-social { background: #fff3e0; color: #ef6c00; }
        .category-tech { background: #fce4ec; color: #c2185b; }
        
        /* Event highlights styling */
        #highlightsList {
            list-style: none;
            padding-left: 0;
            margin: 15px 0;
        }
        
        #highlightsList li {
            margin-bottom: 10px;
            padding-left: 28px;
            position: relative;
            line-height: 1.5;
        }
        
        #highlightsList li:before {
            content: '✓';
            position: absolute;
            left: 0;
            color: var(--gold-color);
            font-weight: bold;
            font-size: 1.1rem;
        }

        /* Auto-play timer animation */
        @keyframes pulse {
            0% { transform: scale(1); }
            50% { transform: scale(1.1); }
            100% { transform: scale(1); }
        }

        .auto-play-pulse {
            animation: pulse 1s infinite;
        }

        /* Loading spinner */
        .loading-spinner {
            display: none;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 50px;
            height: 50px;
            border: 5px solid rgba(255, 255, 255, 0.3);
            border-radius: 50%;
            border-top-color: var(--gold-color);
            animation: spin 1s linear infinite;
            z-index: 10;
        }

        @keyframes spin {
            to { transform: translate(-50%, -50%) rotate(360deg); }
        }

        /* No results message */
        .no-results {
            text-align: center;
            padding: 40px;
            color: var(--text-light);
            font-size: 1.1rem;
            grid-column: 1 / -1;
        }

        /* Footer */
        .College-footer {
            background: var(--primary-color);
            color: white;
            padding: 30px 15px;
            text-align: center;
            margin-top: 50px;
        }

        .footer-content {
            max-width: 1200px;
            margin: 0 auto;
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 30px;
            text-align: left;
        }

        .footer-section h3 {
            font-size: 1.3rem;
            margin-bottom: 15px;
            color: var(--gold-color);
        }

        .footer-section p, .footer-section a {
            color: #c5cae9;
            margin-bottom: 8px;
            display: block;
            text-decoration: none;
            transition: color 0.3s;
            font-size: 0.95rem;
        }

        .footer-section a:hover {
            color: white;
        }

        .footer-bottom {
            margin-top: 30px;
            padding-top: 20px;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
            text-align: center;
            font-size: 0.9rem;
            line-height: 1.6;
        }

        /* Modal scroll prevention */
        body.modal-open {
            overflow: hidden;
        }
        
        /* Extra spacing utility classes */
        .spacing-sm {
            margin-bottom: 10px;
        }
        
        .spacing-md {
            margin-bottom: 20px;
        }
        
        .spacing-lg {
            margin-bottom: 30px;
        }
    /* Powered By Styles with Golden Text and Spinning Icon */
        .powered-by-sidebar {
            margin-top: auto;
            padding: 0 15px;
        }

        .sidebar-divider {
            margin: 15px 0;
            border: 0;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
        }

        .powered-by-sidebar .small {
            font-size: 0.75rem;
            line-height: 1.4;
            color: rgba(255, 255, 255, 0.7);
        }

        .golden-text {
            color: #FFD700 !important;
            font-weight: 600;
            text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
        }

        .spinning-cog {
            animation: spin 2s linear infinite;
            color: #FFD700;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        .logo-container .logo img {
            width: 60px; /* Adjust as needed */
            height: 60px; /* Adjust as needed */
            object-fit: contain;
            border-radius: 8px; /* Optional for rounded corners */
        }