:root {
    --bg-main: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    
    /* Vibrant accents */
    --color-design: #e11d48;
    --color-esports: #ea580c;
    --color-sudoku: #0284c7;
    --color-techquiz: #7c3aed;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
}

/* Header & Logos */
.site-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2.5rem 1.5rem 1.8rem;
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
}


.top-partners {
    display: inline-flex;
    align-items: center;
    gap: 1.75rem;
    padding: 0;
    background: transparent;
    margin-bottom: 1.25rem;
}

.divider {
    width: 1px;
    height: 28px;
    background: #cbd5e1;
}

/* Individual Logo Classes */
.logo-graphic-era {
    height: 42px;
    width: auto;
    object-fit: contain;
    background: transparent;
    border: none;
    filter: none;
}

.logo-tech-geeks {
    height: 100px;
    width: auto;
    object-fit: contain;
    background: transparent;
    border: none;
    filter: none;
}

.event-brand {
    text-align: center;
}

.logo-engineerx {
    height: clamp(55px, 8vw, 80px);
    width: auto;
    object-fit: contain;
}

.tagline {
    font-size: 0.8rem;
    letter-spacing: 3.5px;
    font-weight: 700;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* Container & Titles */
.container {
    max-width: 1360px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
}

.section-title {
    text-align: center;
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 800;
    margin-bottom: 2rem;
}

/* Responsive Event Grid */
.events-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

@media (max-width: 1180px) {
    .events-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* Card Structure & 3D Flip */
.event-card {
    perspective: 1000px;
    height: 100%;
}

.event-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    display: grid;
}

.event-card-inner.flipped {
    transform: rotateY(180deg);
}

.event-card-front,
.event-card-back {
    grid-area: 1 / 1;
    backface-visibility: hidden;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.event-card:hover .event-card-front {
    border-color: #cbd5e1;
    box-shadow: 0 10px 20px -3px rgba(0, 0, 0, 0.08);
}

.event-card-back {
    transform: rotateY(180deg);
    padding: 0.5rem;
    justify-content: center;
}

/* Poster Fit Optimization */
.poster-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 9/16;
    background: #f1f5f9;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.poster-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-height: none;
    display: block;
}

/* Card Content */
.event-info {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.event-info h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.event-info p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.45;
    margin-bottom: 1.2rem;
    flex-grow: 1;
}

.details-list {
    list-style: none;
    text-align: left;
    font-size: 0.88rem;
    color: var(--text-muted);
    margin: 0.8rem 0 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.details-list strong {
    color: var(--text-primary);
}

.contact-sublist {
    margin-top: 0.25rem;
    padding-left: 1.25rem;
    list-style-type: disc;
}

.contact-sublist li {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Button UI */
.btn-group {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 0.6rem;
    margin-top: auto;
}

.card-details-btn,
.card-register-btn {
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 6px;
    padding: 0.65rem;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-details-btn {
    background: #f8fafc;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.card-details-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

/* Accents */
.theme-design .card-register-btn { background: var(--color-design); color: #fff; }
.theme-esports .card-register-btn { background: var(--color-esports); color: #ffffff; }
.theme-sudoku .card-register-btn { background: var(--color-sudoku); color: #fff; }
.theme-techquiz .card-register-btn { background: var(--color-techquiz); color: #fff; }

.card-register-btn:hover {
    filter: brightness(0.92);
    transform: translateY(-1px);
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    border-top: 1px solid var(--border-color);
    background: #ffffff;
}