/* Global Styles */
:root {
    --bg-color: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --accent-color: #334155;
    --accent-glow: #64748b;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.1);
    --glass-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    --card-hover-bg: rgba(248, 250, 252, 0.9);
    --font-family: 'Outfit', sans-serif;
    --nav-active-bg: rgba(0, 0, 0, 0.05);
    --nav-active-text: #0f172a;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
}

/* Background Animation */
.background-globes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.globe {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 10s infinite ease-in-out;
}

.globe-1 {
    width: 400px;
    height: 400px;
    background: #e2e8f0;
    top: -100px;
    left: -100px;
}

.globe-2 {
    width: 500px;
    height: 500px;
    background: #cbd5e1;
    bottom: -150px;
    right: -100px;
    animation-delay: -2s;
}

.globe-3 {
    width: 300px;
    height: 300px;
    background: #94a3b8;
    top: 40%;
    left: 40%;
    animation-delay: -4s;
    opacity: 0.2;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(20px, -20px);
    }
}

/* Glassmorphism Utilities */
.glass-header,
.glass-card,
.nav-btn {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

/* Header & Nav */
header {
    position: sticky;
    top: 20px;
    margin: 0 auto;
    width: 90%;
    max-width: 1200px;
    border-radius: 16px;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    background: linear-gradient(135deg, #0f172a, #475569);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

nav {
    display: flex;
    gap: 1rem;
}

.nav-btn {
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    background: transparent;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
}

.nav-btn:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.05);
}

.nav-btn.active {
    background: var(--nav-active-bg);
    color: var(--nav-active-text);
    border-color: rgba(0, 0, 0, 0.1);
}

/* Dropdown Menu */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 0.5rem;
    z-index: 1000;
    /* backdrop-filter: blur(16px); - Removed for opaque background */
    /* -webkit-backdrop-filter: blur(16px); */
    border: 1px solid var(--glass-border);
    margin-top: 0.5rem;
}

/* Invisible bridge for hover */
.dropdown-content::before {
    content: '';
    position: absolute;
    top: -0.5rem;
    left: 0;
    width: 100%;
    height: 0.5rem;
    background: transparent;
}

.dropdown:hover .dropdown-content,
.dropdown:focus-within .dropdown-content,
.dropdown.show .dropdown-content {
    display: block;
    animation: fadeInCentered 0.2s ease-out;
}

@keyframes fadeInCentered {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 0.8rem 1rem;
    text-align: center;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.dropdown-item:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.05);
}

.dropdown-item.active {
    background: var(--nav-active-bg);
    color: var(--nav-active-text);
}

/* PDF Container */
.pdf-container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    overflow: hidden;
    padding: 0;
    /* Remove padding for iframe full/clean look */
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    aspect-ratio: 210/297;
    /* A4 Ratio */
    height: auto;
    min-height: 500px;
    /* Ensure visibility on mobile */
}

@media screen and (max-width: 768px) {
    .pdf-container {
        height: 80vh;
        /* Maximize height on mobile */
        aspect-ratio: auto;
        /* Allow height to override ratio */
    }
}

.pdf-container iframe {
    border: none;
    display: block;
    width: 100%;
    height: 100%;
}

/* Main Content */
.container {
    max-width: 1200px;
    margin: 80px auto 2rem;
    padding: 0 1rem;
    position: relative;
    z-index: 10;
}

/* Quiz Styles */
/* Quiz Styles */
#start-quiz-btn {
    background-color: #000000;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 3rem;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
    letter-spacing: 1px;
}

#start-quiz-btn:hover {
    background-color: #222;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 2rem;
}

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

.quiz-option-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    padding: 1rem;
    border-radius: 12px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80px;
}

.quiz-option-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.quiz-option-img {
    max-width: 100%;
    max-height: 150px;
    border-radius: 8px;
    object-fit: contain;
}

.selected-option {
    border: 2px solid var(--accent);
    background: rgba(255, 255, 255, 0.3) !important;
    transform: scale(1.02);
}

/* Results Summary Styles */
.results-list {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 1rem;
}

.result-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 4px solid transparent;
}

.result-item.correct {
    border-left-color: #4caf50;
    background: rgba(76, 175, 80, 0.1);
}

.result-item.incorrect {
    border-left-color: #f44336;
    background: rgba(244, 67, 54, 0.1);
}

.result-question {
    font-weight: bold;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.result-detail {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.text-success {
    color: #4caf50;
    font-weight: bold;
}

.text-danger {
    color: #f44336;
    font-weight: bold;
}

/* Custom Scrollbar for results */
.results-list::-webkit-scrollbar {
    width: 8px;
}

.results-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.results-list::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    font-weight: 600;
    color: var(--primary);
}

.question-card h3 {
    margin-bottom: 1rem;
    color: var(--text);
}

.btn-success {
    background: #10b981;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-success:hover {
    background: #059669;
    transform: translateY(-2px);
}

.btn-danger {
    background: #ef4444;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
}


.section {
    display: none;
    /* Controlled by JS */
}

.section.active {
    display: block;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hidden {
    display: none !important;
}


.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--text-secondary);
}

.subsection-title {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--accent-glow);
    padding-left: 0.5rem;
    border-left: 4px solid var(--accent-color);
}

/* About Section */
.about-card {
    padding: 4rem;
    border-radius: 24px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.about-card h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #0f172a, #64748b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.company-crest {
    width: 300px;
    height: auto;
    margin: 0 auto 2rem auto;
    display: block;
}

.lead-text {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

.vision-box {
    background: rgba(255, 255, 255, 0.5);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.vision-box h3 {
    color: var(--accent-glow);
}

.social-box {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.social-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    color: var(--text-primary);
    transition: all 0.3s ease;
    border: 1px solid var(--glass-border);
}

.social-icon:hover {
    transform: translateY(-3px);
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    color: var(--accent-color);
}

.social-icon svg {
    width: 24px;
    height: 24px;
}

/* Toggleable Email Button Styles */
.email-container {
    cursor: pointer;
    overflow: hidden;
    width: 48px;
    /* Start as circle */
    border-radius: 24px;
    /* Ensure pill shape capability */
    transition: width 0.4s ease, background 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
    white-space: nowrap;
    justify-content: flex-start;
    /* Align icon to left when expanded */
    padding-left: 11px;
    /* Center icon (48px width -> 12px padding roughly, adjusted for border) */
    /* actually, let's keep justify-center and use padding trick or absolute icon? */
    /* Better approach for smooth expansion: flex container */
    position: relative;
    padding: 0;
}

/* Reset padding and justification for the icon to stay centered when closed */
.email-container {
    justify-content: flex-start;
    padding-left: 0;
}

/* Center the icon visually in the closed state */
.email-container svg {
    min-width: 24px;
    margin-left: 11px;
    /* (48 - 24 - 2(border)) / 2 = 11px */
    margin-right: 11px;
}

.email-text {
    opacity: 0;
    max-width: 0;
    pointer-events: none;
    /* Prevent selecting hidden text */
    transition: opacity 0.3s ease 0.1s, max-width 0.4s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.email-container.expanded {
    width: auto;
    /* Allow auto width */
    min-width: 250px;
    /* Min width for typical email */
    padding-right: 1rem;
    /* Space at end */
    background: var(--text-primary);
    color: white;
    border-color: transparent;
}

.email-container.expanded .email-text {
    opacity: 1;
    max-width: 300px;
    /* Arbitrary large limit */
    pointer-events: auto;
    margin-left: 0.5rem;
}

.email-container.expanded:hover {
    background: var(--accent-color);
    color: white;
}

/* Members Grid */
.members-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media(min-width: 768px) {
    .members-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.member-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: transform 0.3s ease, background 0.3s ease;
}

.member-card:hover {
    transform: translateY(-5px);
    background: var(--card-hover-bg);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
}

.member-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-color);
}

.member-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.member-role {
    color: var(--accent-glow);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

/* Events Table */
.table-container {
    border-radius: 20px;
    overflow: hidden;
    padding: 1rem;
    overflow-x: auto;
    /* Enable horizontal scroll for mobile */
}

.events-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
    /* Ensure table doesn't squish too much */
}

.events-table th,
.events-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

.events-table th {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.events-table tr {
    transition: background 0.2s ease;
    cursor: pointer;
}

.events-table tbody tr:hover {
    background: rgba(0, 0, 0, 0.02);
}

.events-table tbody tr:last-child td {
    border-bottom: none;
}

.view-btn {
    background: transparent;
    color: var(--accent-glow);
    border: 1px solid var(--accent-glow);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.view-btn:hover {
    background: var(--accent-glow);
    color: white;
}

/* Dialog */
dialog {
    margin: auto;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--text-primary);
    max-width: 500px;
    width: 90%;
}

dialog::backdrop {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
}

.dialog-content {
    background: #ffffff;
    border: 1px solid var(--glass-border);
    padding: 2rem;
    border-radius: 24px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.close-btn:hover {
    color: #000;
}

.dialog-content h2 {
    margin-bottom: 1.5rem;
    padding-right: 2rem;
}

.dialog-details {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--text-secondary);
}

.detail-item .icon {
    font-size: 1.2rem;
}

.fb-link {
    display: table;
    /* or block with width fit-content */
    margin: 1rem auto 0 auto;
    /* Center horizontally */
    padding: 0.8rem 1.5rem;
    background-color: #0f172a;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background-color 0.2s;
}

.fb-link:hover {
    background-color: #334155;
}

.dialog-content hr {
    border: 0;
    height: 1px;
    background: var(--glass-border);
    margin-bottom: 1.5rem;
}

.dialog-content p {
    line-height: 1.7;
}

/* Gallery Styles */
.gallery-container {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
}

.gallery-entry {
    position: relative;
    width: 100%;
    height: 200px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--glass-border);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-entry:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.gallery-entry img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(4px);
    transition: filter 0.3s ease;
}

.gallery-entry:hover img {
    filter: blur(2px);
}

.gallery-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    background: rgba(0, 0, 0, 0.4);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    backdrop-filter: blur(4px);
    pointer-events: none;
    /* Let clicks pass through to container */
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Specific Styles for General Gallery (No Blur, 3 Columns) */
#general-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

#general-gallery-grid .gallery-entry img {
    filter: none;
}

#general-gallery-grid .gallery-entry:hover img {
    filter: none;
    transform: scale(1.05);
    /* Slight zoom on hover instead of blur change */
}

@media screen and (max-width: 768px) {
    #general-gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* Lightbox Styles */
.lightbox-dialog {
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
}

.lightbox-dialog::backdrop {
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
}

.lightbox-content {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.lightbox-content img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: fixed;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 3rem;
    z-index: 1001;
    background: transparent;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.lightbox-close:hover {
    color: #cbd5e1;
    transform: scale(1.1);
}

.nav-arrow {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    font-size: 2rem;
    padding: 1rem;
    cursor: pointer;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
    z-index: 1000;
}

.nav-arrow:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.prev-arrow {
    left: 20px;
}

.next-arrow {
    right: 20px;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: auto;
}

/* MOBILE OPTIMIZATIONS */
@media screen and (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
        width: 95%;
    }

    .logo {
        text-align: center;
        font-size: 1.2rem;
    }

    nav {
        width: 100%;
        flex-wrap: wrap;
        /* Allow wrapping instead of scroll to show dropdown */
        justify-content: center;
        overflow: visible;
        /* Ensure dropdowns aren't clipped */
    }

    .nav-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
        white-space: nowrap;
        margin-bottom: 0.5rem;
        /* Add spacing for wrapped lines */
    }

    .about-card {
        padding: 2rem 1.5rem;
    }

    .about-card h1 {
        font-size: 2rem;
    }

    .lead-text {
        font-size: 1rem;
    }

    .member-card {
        flex-direction: column;
        /* Stack image and info */
        text-align: center;
        padding: 2rem;
    }

    .member-img {
        width: 120px;
        height: 120px;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .dialog-content {
        padding: 1.5rem;
    }

    .dialog-content h2 {
        font-size: 1.5rem;
    }
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media(min-width: 768px) {
    .options-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Multi-part Question Layout */
.multipart-split-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    width: 100%;
}

@media(min-width: 900px) {
    .multipart-split-container {
        grid-template-columns: 1fr 1fr;
    }
}

.multipart-options-grid {
    display: grid;
    gap: 1rem;
}

.text-grid {
    grid-template-columns: 1fr;
    /* Text options stacked */
}

.img-grid {
    grid-template-columns: 1fr 1fr;
    /* Image options in 2x2 grid */
}

/* Force equal height for text options to look cleaner */
.text-option-btn {
    height: 100%;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}