@import url('https://fonts.googleapis.com/css2?family=Averia+Serif+Libre:ital,wght@0,300;0,400;0,700;1,300;1,400;1,700&family=Work+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&display=swap');

/* --- DESIGN SYSTEM TOKENS --- */
:root {
    /* Color Palette */
    --primary: #0053a4;
    --primary-hover: #003e7a;
    --secondary: #a6be4b;
    --secondary-hover: #8da638;
    --dark: #0f172a;
    --light: #f8fafc;
    --border: #dedede;
    --white: #ffffff;
    --accent: #d69100;
    --gray-500: #64748b;
    --gray-400: #94a3b8;
    --gray-300: #cbd5e1;
    --gray-100: #f1f5f9;
    
    /* Theme color variables (Light mode default) */
    --bg-page: var(--light);
    --text-page: var(--dark);
    --text-muted: var(--gray-500);
    --bg-card: var(--white);
    --border-card: var(--border);
    --bg-header: rgba(255, 255, 255, 0.85);
    --border-header: rgba(226, 232, 240, 0.8);
    --text-card-heading: var(--dark);
    --bg-sponsor-tier: #f8fafc;
    --bg-alt: var(--gray-100);
}

    
    /* Gradients */
    --gradient-hero: radial-gradient(circle at 80% 20%, rgba(0, 83, 164, 0.22) 0%, transparent 55%), radial-gradient(circle at 20% 80%, rgba(166, 190, 75, 0.25) 0%, transparent 60%), #080c16;
    --gradient-accent: linear-gradient(135deg, #0053a4 0%, #a6be4b 100%);
    --gradient-gold: linear-gradient(135deg, #fef08a 0%, #ca8a04 100%);
    --gradient-silver: linear-gradient(135deg, #f1f5f9 0%, #94a3b8 100%);
    --gradient-bronze: linear-gradient(135deg, #ffedd5 0%, #c2410c 100%);
    
    /* Fonts */
    --font-heading: 'Averia Serif Libre', serif;
    --font-body: 'Work Sans', sans-serif;
    
    /* Shadow & Radius */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    
    /* Animations */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- RESET & BASICS --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background-color: var(--bg-page);
    color: var(--text-page);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body {
    overflow-x: hidden;
    line-height: 1.6;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

ul, ol {
    list-style: none;
}

button, input, select {
    font-family: inherit;
}

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-card-heading);
    transition: color 0.3s ease;
}

h1 { font-size: 3rem; letter-spacing: -0.02em; }
h2 { font-size: 2.25rem; letter-spacing: -0.01em; margin-bottom: 1rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.25rem; }

p {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    transition: color 0.3s ease;
}

/* --- UTILITIES --- */
.container {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0;
}

.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.bg-dark { background-color: var(--dark); color: var(--white); }
.bg-light { background-color: var(--light); }
.bg-white { background-color: var(--white); }

/* --- HEADER & NAVIGATION --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--bg-header);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-header);
    transition: var(--transition), background-color 0.3s ease, border-color 0.3s ease;
}

header.scrolled {
    background-color: var(--bg-header);
    box-shadow: var(--shadow-md);
    padding: 0.5rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    transition: var(--transition);
}

header.scrolled .nav-container {
    height: 70px;
}

.logo-wrapper {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 60px;
    width: auto;
    transition: var(--transition);
}

header.scrolled .logo-img {
    height: 50px;
}

.header-psf-logo-wrapper {
    display: flex;
    align-items: center;
    height: 70px;
    transition: var(--transition);
}

.header-psf-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
    transition: var(--transition);
}

header.scrolled .header-psf-logo-wrapper {
    height: 60px;
}

header.scrolled .header-psf-logo {
    height: 50px;
}

@media (max-width: 768px) {
    .header-psf-logo-wrapper {
        height: 60px;
    }
    .header-psf-logo {
        height: 50px;
    }
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1.75rem;
}

.nav-link {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background-color: var(--primary);
    transition: var(--transition);
    border-radius: var(--radius-full);
}

.nav-link.active {
    color: var(--primary);
}

.nav-link:hover {
    color: var(--primary);
}

.nav-link.active::after,
.nav-link:hover::after {
    width: 100%;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 0.875rem;
    box-shadow: var(--shadow-sm);
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--secondary);
    color: var(--white);
}

.btn-secondary:hover {
    background-color: var(--secondary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--white);
    color: var(--white);
}

.btn-outline:hover {
    background-color: var(--white);
    color: var(--dark);
}



/* Mobile Menu Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.mobile-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--dark);
    border-radius: 3px;
    transition: var(--transition);
}

/* --- HERO SECTION --- */
.hero {
    position: relative;
    margin-top: 80px;
    padding: 40px 0 80px 0;
    background: var(--gradient-hero);
    color: var(--white);
    overflow: hidden;
    min-height: 55vh;
    display: flex;
    align-items: center;
}

.hero-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('assets/general/Experience-Peravoor.webp');
    background-size: cover;
    background-position: center;
    opacity: 0.85;
    mix-blend-mode: overlay;
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 12px rgba(0,0,0,0.35);
    color: var(--primary);
}

.hero-badge-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.813rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-red {
    background-color: var(--primary);
    border-color: var(--primary);
}

.hero-logos {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-logos-row {
    display: flex;
    gap: 2rem;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    align-items: center;
}

@media (max-width: 1024px) {
    .hero-logos-row {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-logos-row {
        flex-wrap: wrap;
        gap: 1rem;
        justify-content: center;
    }
    .hero-logos-row .hero-logo-card {
        width: 140px !important;
        height: 200px !important;
    }
}

.hero-logo-item {
    height: 70px;
    width: auto;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.2));
}

.hero-banner-card {
    background-color: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-xl);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-banner-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(237,45,36,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.banner-img {
    width: 100%;
    max-width: 280px;
    margin: 0 auto 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}

.hero-banner-card h3 {
    margin-bottom: 0.75rem;
}

.hero-banner-card p {
    color: var(--gray-300);
    font-size: 0.938rem;
}

/* Close Registration Alert */
.closed-alert {
    background-color: rgba(239, 68, 68, 0.15);
    border: 1px dashed #ef4444;
    border-radius: var(--radius-md);
    padding: 1rem;
    margin: 0.5rem 0 1.5rem 0;
    color: #fca5a5;
    background-color: rgba(239, 68, 68, 0.15);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
}


/* --- SECTION DECORATION & LAYOUTS --- */
section {
    padding: 30px 0;
    position: relative;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4.5rem;
}

.section-tag {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary);
    margin-bottom: 0.5rem;
    display: inline-block;
}

.section-header h2 {
    font-size: 2.75rem;
    font-weight: 800;
    color: var(--text-card-heading);
    position: relative;
    padding-bottom: 1.25rem;
    transition: color 0.3s ease;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--primary);
    border-radius: var(--radius-full);
}

/* --- OVERVIEW & EXPERIENCE --- */
.overview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.overview-text p {
    font-size: 1.125rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.experience-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
    align-items: center;
}

.highlight-box {
    background-color: var(--bg-card);
    border-left: 5px solid var(--primary);
    padding: 2rem;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    box-shadow: var(--shadow-md);
    margin: 2rem 0;
    transition: background-color 0.3s ease;
}

.highlight-box h4 {
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.img-frame {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.img-frame img {
    width: 100%;
    transition: var(--transition-slow);
}

.img-frame:hover img {
    transform: scale(1.05);
}

/* Cards / Core Features Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.card {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition), background-color 0.3s ease, border-color 0.3s ease;
    border: 1px solid var(--border-card);
    position: relative;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary);
}

.card-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(237, 45, 36, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.card h3 {
    font-size: 1.35rem;
    margin-bottom: 1rem;
}

/* --- TRAVEL & TIMELINES --- */
.travel-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.travel-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-card);
    transition: var(--transition), background-color 0.3s ease, border-color 0.3s ease;
}

.travel-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--secondary);
}

.travel-distance {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.travel-location {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-page);
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
}

.info-sections-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 4rem;
}

.info-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-card);
    transition: var(--transition), background-color 0.3s ease, border-color 0.3s ease;
}

.info-card h3 {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-card);
    color: var(--secondary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.schedule-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.schedule-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1rem;
    border-bottom: 1px dashed var(--border-card);
}

.schedule-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.schedule-time {
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--primary);
    font-size: 1.125rem;
    background-color: rgba(237, 45, 36, 0.05);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
}

.schedule-title {
    font-weight: 600;
    color: var(--text-card-heading);
    text-align: right;
    transition: color 0.3s ease;
}

/* Contact Info list style */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.contact-item {
    background-color: var(--bg-alt);
    padding: 1.25rem;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    transition: background-color 0.3s ease;
}

.contact-label {
    font-size: 0.813rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--gray-500);
}

.contact-value {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-card-heading);
    transition: color 0.3s ease;
}

/* --- REGISTRATION TABLES --- */
.table-wrapper {
    overflow-x: auto;
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 3rem;
    border: 1px solid var(--border-card);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    min-width: 600px;
}

th {
    background-color: var(--secondary);
    color: var(--white);
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    padding: 1.25rem 1.5rem;
}

td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-card);
    color: var(--text-page);
    font-size: 0.938rem;
    font-weight: 500;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

tr:last-child td {
    border-bottom: none;
}

tr:nth-child(even) td {
    background-color: var(--bg-alt);
}

/* Badge values in tables */
.table-badge {
    background-color: rgba(43, 56, 143, 0.1);
    color: var(--secondary);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
}

.prize-rank {
    font-weight: 800;
    color: var(--text-card-heading);
    transition: color 0.3s ease;
}

.rank-1st { color: #ca8a04; }
.rank-2nd { color: #475569; }
.rank-3rd { color: #ea580c; }

/* --- GALLERY --- */
.gallery-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 3rem;
}

.gallery-tab {
    background-color: var(--white);
    border: 1px solid var(--border);
    padding: 0.625rem 1.5rem;
    border-radius: var(--radius-full);
    font-family: var(--font-heading);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.gallery-tab.active,
.gallery-tab:hover {
    background-color: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 4 / 3;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    display: none; /* Controlled by JS for tabs */
}

.gallery-item.show {
    display: block;
    animation: fadeIn 0.4s ease forwards;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-icon {
    display: none !important;
}

/* Animated border gradient for gallery items on hover */
.gallery-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: var(--radius-md);
    padding: 4px; /* Border thickness */
    background: linear-gradient(135deg, var(--primary), var(--accent), var(--secondary), var(--primary));
    background-size: 300% 300%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 5;
    pointer-events: none;
}

.gallery-item:hover::before {
    opacity: 1;
    animation: gallery-border-glow 3s ease infinite;
}

@keyframes gallery-border-glow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Lightbox Modal */
.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.95);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    max-width: 90%;
    max-height: 80%;
    position: relative;
}

.lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-xl);
    background-color: var(--white);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: var(--white);
    font-size: 2rem;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    border-radius: var(--radius-full);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    z-index: 1010;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--white);
    font-size: 2.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-full);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    z-index: 1010;
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
.lightbox-nav:hover { color: var(--primary); }

/* --- SPONSORS --- */
.sponsors-section {
    background-color: var(--bg-sponsor-tier);
    border-top: 1px solid var(--border-card);
    border-bottom: 1px solid var(--border-card);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.sponsors-section .container {
    max-width: 1600px;
}

.sponsor-tier {
    margin-bottom: 4.5rem;
}

.sponsor-tier:last-child {
    margin-bottom: 0;
}

.sponsor-tier-title {
    text-align: center;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--gray-500);
    margin-bottom: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.sponsor-tier-title::before,
.sponsor-tier-title::after {
    content: '';
    height: 1px;
    background-color: var(--border);
    width: 60px;
    display: inline-block;
}

.sponsors-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 2rem !important;
}

.sponsor-item {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 180px !important;
    height: 90px !important;
    background-color: var(--bg-card) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03) !important;
    border: 1px solid var(--border-card) !important;
    padding: 12px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important, background-color 0.3s ease !important, border-color 0.3s ease !important;
}

.sponsor-item img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    opacity: 0.95 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.sponsor-item:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04) !important;
    border-color: var(--primary) !important;
}

.sponsor-item:hover img {
    opacity: 1 !important;
    transform: scale(1.03) !important;
}

/* Tier Specific Sizes */
.tier-title .sponsor-item {
    width: 280px !important;
    height: 130px !important;
    padding: 16px !important;
    border-radius: var(--radius-lg) !important;
}
.tier-title .sponsor-item img {
    width: 100%;
    height: 100%;
}

/* --- FOOTER --- */
footer {
    background-color: var(--dark);
    color: var(--white);
    padding: 80px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand h2 {
    color: var(--white);
    font-size: 1.75rem;
    margin-bottom: 1.25rem;
}

.footer-brand p {
    color: var(--gray-400);
    font-size: 0.938rem;
    line-height: 1.7;
}

.footer-nav h3,
.footer-contact h3 {
    color: var(--white);
    font-size: 1.125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-link {
    color: var(--gray-400);
    font-weight: 500;
    font-size: 0.938rem;
}

.footer-link:hover {
    color: var(--primary);
    padding-left: 5px;
}

.footer-contact-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.938rem;
    color: var(--gray-400);
}

.footer-contact-item a:hover {
    color: var(--primary);
}

.footer-contact-icon {
    color: var(--primary);
    font-weight: bold;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.copyright {
    font-size: 0.875rem;
    color: var(--gray-400);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background-color: rgba(255,255,255,0.05);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: var(--transition);
}

.social-link:hover {
    background-color: var(--primary);
    transform: translateY(-3px);
}

/* --- ANIMATIONS --- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 1024px) {
    .container { padding: 0 1.5rem; }
    h1 { font-size: 2.75rem; }
    .hero-grid { grid-template-columns: 1fr; gap: 4rem; }
    .hero-content { text-align: center; }
    .hero-badge-container, .hero-logos { justify-content: center; }
    .overview-grid, .experience-grid { grid-template-columns: 1fr; gap: 3rem; }
    .cards-grid { grid-template-columns: repeat(2, 1fr); }
    .travel-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    header { padding: 0.5rem 0; }
    .hero { margin-top: 96px; }
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--bg-card);
        flex-direction: column;
        align-items: stretch;
        padding: 2rem 1.5rem;
        gap: 1.5rem;
        box-shadow: var(--shadow-lg);
        transition: var(--transition);
    }
    
    .nav-menu.open {
        left: 0;
    }
    
    .mobile-toggle {
        display: flex;
    }
    
    .mobile-toggle.open span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }
    
    .mobile-toggle.open span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-toggle.open span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }
    
    .cards-grid, .info-sections-grid, .travel-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    .section-header h2 {
        font-size: 2.25rem;
    }
    
    .lightbox-nav {
        font-size: 1.75rem;
    }
    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }
}

@media (max-width: 480px) {
    .container { padding: 0 1rem; }
    h1 { font-size: 2.25rem; }
    .hero-content h1 { font-size: 2.25rem; }
    .btn { width: 100%; }
    .gallery-grid { grid-template-columns: 1fr; }
    .lightbox-prev, .lightbox-next {
        position: static;
        transform: none;
        margin: 0 1rem;
    }
    .lightbox-controls {
        display: flex;
        justify-content: center;
        margin-top: 1rem;
    }
}

/* --- ANIMATION UTILITIES --- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
}

.animate-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger Delays */
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }
.delay-500 { transition-delay: 500ms; }

/* Keyframe Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse-soft {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

.hero-content {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.hero-badge-container {
    animation: fadeInDown 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.hero-image {
    animation: fadeInRight 0.9s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.closed-alert span {
    display: inline-block;
    animation: pulse-soft 2s infinite ease-in-out;
}

/* --- GALLERY YEAR SECTIONS --- */
.gallery-year-section {
    margin-bottom: 4rem;
    display: none;
}
.gallery-year-section.show {
    display: block;
}
.gallery-year-heading {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: left;
    border-left: 4px solid var(--accent);
    padding-left: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* --- REGISTRATION MODAL --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.modal-card {
    background-color: #1e293b;
    border: 1px solid #334155;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: modalReveal 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalReveal {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    color: #94a3b8;
    font-size: 2rem;
    font-weight: 300;
    cursor: pointer;
    background: transparent;
    border: none;
    transition: color 0.2s;
    line-height: 1;
}

.modal-close:hover {
    color: #f1f5f9;
}

.modal-header {
    padding: 2rem 2rem 1.25rem;
    border-bottom: 1px solid #334155;
}

.modal-header h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #ef4444;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.modal-body {
    padding: 2rem;
}

.modal-notice {
    font-size: 1.1rem;
    color: #cbd5e1;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.modal-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: #38bdf8;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.modal-table-wrapper {
    overflow-x: auto;
    margin-bottom: 2rem;
    border-radius: 8px;
    border: 1px solid #334155;
}

.modal-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.95rem;
}

.modal-table th, .modal-table td {
    padding: 0.75rem 1rem;
}

.modal-table th {
    background-color: #0f172a;
    color: #94a3b8;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #334155;
}

.modal-table td {
    color: #e2e8f0;
    border-bottom: 1px solid #1e293b;
}

.modal-table tr:last-child td {
    border-bottom: none;
}

.modal-contact {
    border-top: 1px solid #334155;
    padding-top: 1.5rem;
}

.modal-contact p {
    font-size: 0.95rem;
    color: #94a3b8;
    margin-bottom: 0.75rem;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact-links a {
    color: #38bdf8;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.05rem;
    transition: color 0.2s;
    width: fit-content;
}

.contact-links a:hover {
    color: #7dd3fc;
}

/* --- 2023 SPONSORS --- */
.sponsors-grid-2023 .item-2023 {
    width: 140px !important;
    height: 70px !important;
    padding: 8px !important;
    opacity: 0.9 !important;
}

.sponsors-grid-2023 .item-2023:hover {
    opacity: 1 !important;
    transform: translateY(-4px) !important;
    border-color: var(--primary) !important;
}

/* --- ROUTE MAP CARD --- */
.route-map-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md) !important;
}

/* --- SVG LIGHTBOX STYLING --- */
.lightbox-img.is-svg,
.lightbox-img[src$=".svg" i],
.lightbox-img[src*=".svg"] {
    width: 90vw;
    max-width: 1100px;
    height: 80vh; /* Fixed height to resolve zero-height rendering bug */
    object-fit: contain;
    background-color: var(--white);
}



/* --- GALLERY SLIDER --- */
.gallery-slider-wrapper {
    position: relative;
    width: 100%;
    margin-top: 2rem;
    display: flex;
    align-items: center;
}

.gallery-slider-viewport {
    width: 100%;
    overflow: hidden;
    padding: 10px 0; /* padding so cards drop-shadows are not clipped */
}

.gallery-slider-track {
    display: flex;
    gap: 1.5rem;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

/* Base item width inside track */
.gallery-slider-track .gallery-item {
    width: calc((100% - 3 * 1.5rem) / 4) !important; /* 4 items on desktop */
    flex-shrink: 0 !important;
}

@media (max-width: 991px) {
    .gallery-slider-track .gallery-item {
        width: calc((100% - 2 * 1.5rem) / 3) !important; /* 3 items on small desktop/large tablet */
    }
}

@media (max-width: 768px) {
    .gallery-slider-track .gallery-item {
        width: calc((100% - 1 * 1.5rem) / 2) !important; /* 2 items on tablet */
    }
}

@media (max-width: 480px) {
    .gallery-slider-track .gallery-item {
        width: 100% !important; /* 1 item on mobile */
    }
}

/* Slider buttons */
.gallery-slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--text-dark);
    z-index: 10;
    transition: all 0.3s ease;
}

.gallery-slider-btn:hover {
    background-color: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}

.gallery-slider-btn.prev {
    left: 10px;
}

.gallery-slider-btn.next {
    right: 10px;
}

.gallery-slider-btn:disabled {
    opacity: 0;
    pointer-events: none;
}


/* Hide title decorative lines when top-tier sponsors are aligned side-by-side */
.sponsor-tier-title.no-lines::before,
.sponsor-tier-title.no-lines::after {
    display: none !important;
}

/* Premium containers for PSF and Ambassador logos in hero section */
.hero-logo-card {
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    height: 300px;
    width: 210px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-logo-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.hero-logo-card img {
    height: 100%;
    width: auto;
    object-fit: contain;
}


