/* ================= RESET ================= */
html{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:"Segoe UI",sans-serif;
    scroll-behavior:smooth;
}

/* ================= BACKGROUND ================= */
body{
    background:
    radial-gradient(circle at top left, rgba(255,215,0,0.5), transparent 55%),
    radial-gradient(circle at bottom right, rgba(183,28,28,0.6), transparent 60%),
    linear-gradient(160deg,#FFF3C4,#FFE082,#F5B7B1,#C62828);
    background-attachment:fixed;
}

/* ================= NAVBAR ================= */
.navbar{
    position:fixed;
    top:10px;
    left:0;
    right:0;
    margin:auto;
    width:95%;
    max-width:1200px;
    padding:10px 18px;
    border-radius:20px;
    backdrop-filter:blur(16px);
    background:rgba(255,255,255,0.3);
    display:flex;
    align-items:center;
    justify-content:space-between;
    z-index:1000;
}
.logo{
    display:flex;
    align-items:center;
    gap:10px;
}

.logo img{
    width:70px;
    height:50px;
    border-radius:50%;
}
.menu-toggle{
    display:none;
    font-size:26px;
    color:#8E0000;
    cursor:pointer;
}

/* CENTER NAV LINKS */
.nav-links{
    display:flex;
    gap:30px;
    margin:auto;
}

.nav-links a{
    text-decoration:none;
    font-weight:600;
    color:#8E0000;
    transition:0.3s;
}

.nav-links a:hover{
    color:#C62828;
}

/* NAV SOCIAL ICONS */
.nav-social{
    display:flex;
    gap:15px;
}

.nav-social a{
    color:#8E0000;
    font-size:18px;
    transition:0.3s;
}

.nav-social a:hover{
    color:#C62828;
    transform:scale(1.3);
}

/* BUTTON (general) */
.btn{
    display:inline-block;
    margin-top:20px;
    padding:10px 25px;
    background:#8E0000;
    color:white;
    border-radius:25px;
    text-decoration:none;
    transition:0.3s;
}

.btn:hover{
    background:#C62828;
}

/* ===== BIG HOME SPONSOR SLIDER ===== */
.slider{
    width:100%;
    max-width:1000px;
    height:300px;
    margin:60px auto;
    overflow:hidden;
    border-radius:25px;
    box-shadow:0 20px 40px rgba(0,0,0,0.15);
    position:relative;
}

.slide-track{
    display:flex;
    transition:transform 0.8s ease-in-out;
}

.slide{
    min-width:100%;
    height:300px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:white;
}

.slide img{
    max-width:80%;
    max-height:80%;
    object-fit:contain;
}

/* ================= SECTION ================= */
section{
    min-height:100vh;
    padding:120px 10% 60px;
}

.section-box{
    background:rgba(255,255,255,0.95);
    padding:50px;
    border-radius:30px;
    box-shadow:0 25px 50px rgba(0,0,0,0.2);
}

h1{
    text-align:center;
    margin-bottom:20px;
    color:#9A0000;
}

/* ================= SCROLL REVEAL ================= */
.reveal{
    opacity:0;
    transform:translateY(60px);
    transition:all 0.8s ease;
}

.reveal.active{
    opacity:1;
    transform:translateY(0);
}

/* ================= ABOUT ================= */
.about-text h3{
    margin-top:25px;
    margin-bottom:10px;
    font-size:22px;
    color:#b71c1c;
}

.about-text ul{
    margin-left:20px;
    margin-bottom:15px;
}

.about-text li{
    margin-bottom:8px;
}

/* ===== FULL SPONSOR SECTION ===== */
.sponsor-full{
    margin:100px 0;
    text-align:center;
}

.sponsor-logo img{
    width:260px;
    margin-bottom:15px;
}

.sponsor-logo h2{
    margin-bottom:30px;
    font-size:24px;
    font-weight:600;
}

/* ===== MEDIA SLIDER ===== */
.media-slider{
    width:100%;
    max-width:1200px;
    height:450px;
    margin:0 auto;
    overflow:hidden;
    border-radius:25px;
    box-shadow:0 25px 60px rgba(0,0,0,0.15);
}

.media-track{
    display:flex;
    transition:transform 0.8s ease-in-out;
}

.media-slide{
    min-width:100%;
    height:450px;
}

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

/* ===== MOBILE ===== */
@media(max-width:768px){
    .media-slider{
        height:260px;
    }
    .media-slide{
        height:260px;
    }
    .sponsor-logo img{
        width:180px;
    }
}

/* ================= EVENTS (ENHANCED) ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
}

.event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* bigger cards, fill section */
    gap: 25px;
    padding: 20px;
    width: 100%;
}

.event-box {
    background: #ffffff;
    border-radius: 25px;
    overflow: hidden;
    text-align: center;
    padding-bottom: 25px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    transition: all 0.4s ease;
    opacity: 0;
    transform: translateY(40px);
    width: 100%;
}

.event-box:hover {
    transform: translateY(-12px) scale(1.02); /* added subtle scale */
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.event-box img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.event-box:hover img {
    transform: scale(1.08);
}

.event-box h3 {
    margin: 15px 0 10px;
    font-size: 20px;
}

/* Enhanced button style */
.event-box a {
    display: inline-block;
    margin-top: 10px;
    padding: 12px 28px; /* slightly larger */
    background: linear-gradient(45deg, #ff9800, #ff5722);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(255,87,34,0.3);
}

.event-box a:hover {
    background: linear-gradient(45deg, #ff5722, #ff9800);
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(255,87,34,0.4);
}

.event-box.show {
    opacity: 1;
    transform: translateY(0);
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 992px) {
    .event-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 20px;
    }
    .event-box img {
        height: 240px;
    }
}

@media (max-width: 768px) {
    .event-grid {
        grid-template-columns: 1fr;
        padding: 15px;
        gap: 20px;
    }
    .event-box {
        border-radius: 20px;
    }
    .event-box img {
        height: 220px;
    }
    .event-box h3 {
        font-size: 18px;
    }
    .event-box a {
        padding: 8px 18px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .event-grid {
        padding: 12px;
    }
    .event-box img {
        height: 200px;
    }
    .event-box h3 {
        font-size: 16px;
    }
}

/* ================= GALLERY GRID ================= */
.main-gallery-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 50px;
    font-weight: 700;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 30px;
}

.gallery-item {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

.gallery-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

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

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

.gallery-title {
    padding: 15px 15px 5px;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #8E0000;
}

.gallery-description {
    padding: 0 15px 20px;
    margin: 0;
    color: #555;
    font-size: 0.9rem;
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* ================= FOOTER ================= */
footer{
    background:#7B0000;
    color:white;
    text-align:center;
    padding:40px 20px;
}

.social-icons{
    margin-top:15px;
}

.social-icons a{
    color:white;
    font-size:22px;
    margin:0 10px;
    transition:0.3s;
}

.social-icons a:hover{
    color:#FFD700;
    transform:scale(1.3);
}

/* ================= RESPONSIVE ================= */
@media(max-width:768px){
    .navbar{
        flex-direction:row;
        justify-content:space-between;
        padding:10px 15px;
    }
    .menu-toggle{
        display:block;
    }
    .nav-menu{
        position:absolute;
        top:70px;
        left:0;
        width:100%;
        background:rgba(255,255,255,0.95);
        border-radius:20px;
        padding:20px;
        display:none;
        flex-direction:column;
        align-items:center;
        box-shadow:0 20px 40px rgba(0,0,0,0.2);
    }
    .nav-menu.active{
        display:flex;
    }
    .nav-links{
        flex-direction:column;
        gap:15px;
        margin-bottom:15px;
    }
    .nav-social{
        justify-content:center;
    }
    .nav-menu{
        flex-direction:column;
    }
}

/* ===== DESKTOP NAV LAYOUT ===== */
.nav-menu{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:40px;
}

.nav-links{
    display:flex;
    gap:25px;
}

.nav-social{
    display:flex;
    gap:15px;
}

/* ================= REGISTRATION PAGE ================= */
.back-btn{
    display:inline-block;
    margin-bottom:20px;
    text-decoration:none;
    color:#8E0000;
    font-weight:600;
    font-size:14px;
    transition:0.3s;
}

.back-btn:hover{
    color:#C62828;
}

.form-section{
    min-height:100vh;
    padding:140px 10% 60px;
    display:flex;
    justify-content:center;
    align-items:center;
}

.form-box{
    background:rgba(255,255,255,0.95);
    padding:50px;
    border-radius:30px;
    box-shadow:0 25px 50px rgba(0,0,0,0.2);
    width:600px;
    max-width:100%;
}

.form-box h1{
    text-align:center;
    margin-bottom:30px;
    color:#9A0000;
}

.form-group{
    margin-bottom:20px;
}

.form-group label{
    font-weight:600;
    color:#8E0000;
}

.form-group input,
.form-group select,
.form-group textarea{
    width:100%;
    padding:12px;
    margin-top:8px;
    border-radius:12px;
    border:1px solid #ccc;
    outline:none;
    font-size:14px;
    transition:0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus{
    border:1px solid #C62828;
}

.form-box button{
    width:100%;
    padding:14px;
    background:#8E0000;
    color:white;
    border:none;
    border-radius:25px;
    font-size:16px;
    cursor:pointer;
    transition:0.3s;
}

.form-box button:hover{
    background:#C62828;
}

.success{
    display:none;
    margin-top:20px;
    text-align:center;
    color:green;
    font-weight:bold;
}

.form-buttons{
    display:flex;
    gap:15px;
    margin-top:10px;
}

.form-buttons button{
    flex:1;
    padding:14px;
    border:none;
    border-radius:25px;
    font-size:16px;
    cursor:pointer;
    transition:0.3s;
}

.submit-btn{
    background:#8E0000;
    color:white;
}

.submit-btn:hover{
    background:#C62828;
}

.reset-btn{
    background:#dddddd;
    color:#333;
}

.reset-btn:hover{
    background:#0afa4e;
}

body{
    font-family: 'Poppins', sans-serif;
}

.section-box h1{
    font-family: 'Playfair Display', serif;
    font-size: 42px;
    letter-spacing: 1px;
}

.about-text h3{
    font-family: 'Playfair Display', serif;
}

.form-section,
.form-box {
    opacity: 1 !important;
    transform: none !important;
}

.logo-layout{
    flex-direction:column;
    align-items:center;
    text-align:center;
}

.about-logo img{
    width:200px;
    margin-bottom:30px;
}

.about-text{
    max-width:900px;
    text-align:left;
}

.thematic-list{
    margin-left:20px;
    line-height:1.8;
}

.thematic-list li{
    margin-bottom:18px;
}

@media(max-width:768px){
    .events-container{
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .event-card{
        width: 90%;
        margin: 20px auto;
    }
    .menu-toggle{
        display:block;
    }
    .nav-menu{
        display:none !important;
        position:absolute;
        top:70px;
        left:0;
        width:100%;
        background:white;
        border-radius:20px;
        padding:25px 0;
        flex-direction:column;
        align-items:center;
        gap:20px;
        box-shadow:0 15px 35px rgba(0,0,0,0.2);
    }
    .nav-menu.active{
        display:flex !important;
    }
    .nav-links{
        flex-direction:column;
        gap:18px;
        align-items:center;
    }
    .nav-social{
        margin-top:15px;
        justify-content:center;
    }
}

/* ================= CONTACT FORM ================= */
.contact-form {
    max-width: 700px;
    margin: auto;
}

.contact-social {
    text-align: center;
    margin-top: 40px;
}

.contact-social h3 {
    margin-bottom: 15px;
    color: #8E0000;
    font-family: 'Playfair Display', serif;
}

.social-icons-contact {
    display: flex;
    justify-content: center;
    gap: 25px;
}

.social-icons-contact a {
    font-size: 28px;
    color: #8E0000;
    transition: 0.3s ease;
}

.social-icons-contact a:hover {
    color: #C62828;
    transform: scale(1.3);
}

.contact-details {
    text-align: center;
    margin-top: 25px;
    font-size: 18px;
    color: #333;
}

.contact-details p {
    margin: 8px 0;
}

.contact-details i {
    color: #8E0000;
    margin-right: 10px;
}

#contactFormContainer {
    transition: opacity 0.3s ease;
}
#contactFormContainer[style*="block"] {
    opacity: 1;
}
#contactFormContainer[style*="none"] {
    opacity: 0;
}

/* ===== HIDE DYNAMIC EVENTS CONTAINER WHEN EMPTY ===== */
#dynamicEvents:empty {
    display: none;
}
.event-box { opacity: 1 !important; transform: none !important; }