/* Root Variables */
:root {
    --bg-color: #121222;
    --primary-color: #FF3366;
    --accent-color: #8A2BE2;
    --text-color: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    background: transparent;
}

canvas#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    background: transparent;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--bg-color), rgba(18, 18, 34, 0.95));
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
}

/* Navbar Styles */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(18, 18, 34, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-family: 'Poppins', sans-serif;
}

.nav-content {
    max-width: 1440px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.corner-logo {
    display: flex;
    align-items: center;
    position: relative;
    margin-right: auto;
    padding-left: 0;
    margin-left: -10px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--text-color);
    font-size: 1.5rem;
    font-weight: 600;
    text-decoration: none;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-logo span {
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.5rem;
    font-weight: 600;
    position: relative;
    padding-bottom: 4px;
}

.nav-logo span::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transition: width 0.3s ease;
}

.nav-logo:hover span::after {
    width: 100%;
    box-shadow: 0 0 10px var(--accent-color);
}

.nav-logo-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 0.8rem;
    transition: transform 0.3s ease;
    object-fit: cover;
}

.nav-logo:hover .nav-logo-img {
    transform: scale(1.1);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

/* Mobile responsive styles */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(18, 18, 34, 0.95);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
    }
}

.gallery-container {
    position: relative;
    z-index: 2;
    background: transparent;
    min-height: 100vh;
    width: 100%;
    padding-top: 80px; /* Added padding-top to account for fixed navbar */
    padding-bottom: 50px;
    padding-left: 2%;
    padding-right: 2%;
}

.gallery-container::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255, 51, 102, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(138, 43, 226, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(18, 18, 34, 0.05) 0%, transparent 100%);
    pointer-events: none;
    z-index: -1;
}

h1 {
    color: var(--text-color);
    font-size: 3.5rem;
    text-align: center;
    margin-top: 2rem; /* Added margin-top */
    margin-bottom: 3rem;
    font-weight: 800;
    padding-top: 1rem; /* Added padding-top */
}

.gallery-subtitle {
    color: var(--primary-color);
    font-size: 1.8rem;
    text-align: center;
    margin: 1rem 0 3rem; /* Changed from -2rem to 1rem */
    font-weight: 600;
    opacity: 0.9;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(300px, 1fr));
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
    justify-content: center;
    align-items: start;
}

.gallery-card {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    width: 100%;
    height: 300px; /* Fixed height */
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.4s ease;
    cursor: pointer;
    border: 2px solid transparent;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
}

.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, 
        rgba(18, 18, 34, 0.95) 0%,
        rgba(18, 18, 34, 0.5) 50%,
        transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    opacity: 0;
    transition: all 0.4s ease;
}

.gallery-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-image: linear-gradient(45deg, var(--primary-color), var(--accent-color)) 1;
    box-shadow: 0 15px 45px rgba(255, 51, 102, 0.2);
}

.gallery-card:hover img {
    transform: scale(1.1);
}

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

.card-overlay h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.card-overlay p {
    color: var(--text-color);
    font-size: 1rem;
}

.gallery-card.view-more {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(45deg, rgba(255, 51, 102, 0.1), rgba(138, 43, 226, 0.1));
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.view-more-content {
    text-align: center;
    color: var(--primary-color);
}

.view-more-content i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.view-more-content h3 {
    font-size: 1.5rem;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gallery-card.view-more:hover {
    background: linear-gradient(45deg, rgba(255, 51, 102, 0.2), rgba(138, 43, 226, 0.2));
    transform: translateY(-5px);
}

.gallery-card.merged-view-more .card-overlay {
    opacity: 1;
    background: linear-gradient(to top,
        rgba(18, 18, 34, 0.95) 0%,
        rgba(138, 43, 226, 0.6) 100%);
    justify-content: center;
    align-items: center;
    text-align: center;
}

.gallery-card.merged-view-more .card-overlay h3 {
    margin-top: auto;
    font-size: 1.8rem;
}

.gallery-card.merged-view-more .card-overlay p {
    margin: 1rem 0;
}

.gallery-card.merged-view-more .card-overlay i {
    font-size: 2.5rem;
    margin-bottom: auto;
    color: var(--primary-color);
}

.gallery-card.merged-view-more:hover .card-overlay {
    background: linear-gradient(45deg,
        rgba(255, 51, 102, 0.9),
        rgba(138, 43, 226, 0.9));
}

@media (min-width: 1400px) {
    .gallery-grid {
        grid-template-columns: repeat(3, minmax(350px, 1fr));
        max-width: 1400px;
        gap: 3rem;
    }
}

@media (max-width: 1200px) {
    .gallery-grid {
        grid-template-columns: repeat(2, minmax(300px, 1fr));
        padding: 1.5rem;
    }
}

@media (max-width: 992px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .gallery-container {
        padding-top: 70px; /* Slightly reduced padding for mobile */
        padding: 100px 1rem 30px;
    }

    h1 {
        margin-top: 1rem;
        font-size: 2.5rem;
    }

    .gallery-grid {
        grid-template-columns: minmax(280px, 1fr);
        gap: 1.5rem;
        padding: 1rem;
    }

    .gallery-card {
        height: 250px;
    }

    .gallery-subtitle {
        font-size: 1.4rem;
        margin: -1rem 0 2rem;
    }
}

@media (max-width: 576px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        padding: 0 0.5rem;
    }

    .gallery-card {
        min-height: 180px; /* Reduced from 200px */
    }
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 20px rgba(255, 0, 0, 0.4); }
    50% { box-shadow: 0 0 30px rgba(255, 0, 0, 0.6); }
    100% { box-shadow: 0 0 20px rgba(255, 0, 0, 0.4); }
}

.events-title {
    margin: 4rem 0 3rem;
    color: var(--primary-color);
    font-size: 1.8rem;
    text-align: center;
    font-weight: 600;
    opacity: 0.9;
}

.math-symbol {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-right: 0.8rem;
    position: relative;
}

.sqrt {
    display: flex;
    align-items: center;
    font-size: 2rem;
    font-weight: bold;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: pulse 2s infinite;
    transform-origin: center;
}

.sqrt .root {
    font-size: 1.8rem;
    line-height: 1;
    margin-right: 2px;
}

.sqrt .number {
    font-size: 1rem;
    line-height: 1;
    margin-top: -8px;
    font-size: 0.9rem; /* Reduced from 1rem */
}
