/* ==============================================
   P&W Page - Main Styles (Dark Mode)
   ============================================== */

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

:root {
    /* Light Colors */
    --primary-color: #6366f1;
    --secondary-color: #22c55e;
    --tertiary-color: #ef4444;
    --accent-orange: #f97316;
    --accent-pink: #ec4899;
    --accent-cyan: #06b6d4;
    
    /* Dark Mode Colors */
    --bg-dark: #0f172a;
    --bg-darker: #0a0f1f;
    --bg-surface: #1e293b;
    --bg-surface-light: #334155;
    --border-dark: #475569;
    --border-darker: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    
    --transition: all 0.3s ease;
}

/* Dark Mode (Default) */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
}

.pw-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--bg-darker);
}

/* Header */
.pw-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #7c3aed 100%);
    color: white;
    padding: 1.5rem 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pw-header h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.menu-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.5rem;
    transition: var(--transition);
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Carousel Hero Banner */
.carousel-hero {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    background-color: var(--bg-surface);
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: crisp-edges;
    -ms-interpolation-mode: nearest-neighbor;
}

.carousel-slide.active {
    opacity: 1;
}

/* Carousel Overlay */
.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    z-index: 5;
    background: rgba(15, 23, 42, 0.3);
}

.carousel-overlay h2 {
    font-size: 3.5rem;
    font-weight: 900;
    color: white;
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
    letter-spacing: -1px;
}

/* Navigation Buttons on Carousel */
.carousel-nav-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 900px;
}

.section-btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(99, 102, 241, 0.15);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-btn:hover {
    background: rgba(99, 102, 241, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
}

.section-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.8), 
                0 0 60px rgba(99, 102, 241, 0.5);
    color: white;
    font-weight: 700;
}

.section-btn span {
    display: block;
}


.carousel-nav {
    display: none; /* Hidden per user request */
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: white;
    padding: 1rem 1.5rem;
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 6px;
    z-index: 10;
    transition: var(--transition);
}

.carousel-nav:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: white;
}

.carousel-prev {
    left: 2rem;
}

.carousel-next {
    right: 2rem;
}

.carousel-indicators {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1rem;
    z-index: 10;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: var(--transition);
}

.indicator.active {
    background: white;
    border-color: white;
}

/* Content Layout */
.pw-content {
    display: block;
    padding: 2rem 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    flex: 1;
}

/* Sidebar - Hidden */
.pw-sidebar {
    display: none;
}

.pw-nav {
    display: none;
}

/* Main Content */
.pw-main {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    width: 100%;
}

.content-section {
    background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-surface-light) 100%);
    border: 1px solid var(--border-dark);
    border-radius: 12px;
    padding: 2.5rem;
    scroll-margin-top: 180px;
    transition: var(--transition);
    overflow: visible;
    position: relative;
    display: none;
}

.content-section.active-section {
    display: block;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-cyan));
}

.section-header {
    position: relative;
    z-index: 1;
}

.section-header h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.content-subsection {
    margin-top: 1.5rem;
    position: relative;
    z-index: 1;
}

.content-subsection p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.items-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.item-card {
    background: var(--bg-dark);
    padding: 0;
    border-radius: 10px;
    border: 1px solid var(--border-dark);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.item-card {
    background: var(--bg-dark);
    padding: 0;
    border-radius: 10px;
    border: 1px solid var(--border-dark);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Projects layout: side-by-side image and description */
#projects-list .item-card {
    flex-direction: row;
    min-height: 300px;
}

#projects-list .item-card .card-image {
    width: 40%;
    min-width: 300px;
    height: 100%;
    object-fit: cover;
    flex-shrink: 0;
}

#projects-list .item-card > div {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
}

#projects-list .item-card h4 {
    margin-bottom: 1rem;
}

#projects-list .item-card p {
    line-height: 1.6;
}

.item-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-cyan));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
    z-index: 10;
}

.item-card:hover::before {
    transform: scaleX(1);
}

.item-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary-color);
    background: var(--bg-surface);
    box-shadow: 0 12px 24px rgba(99, 102, 241, 0.2);
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.item-card h4 {
    color: var(--primary-color);
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    margin-left: 1.75rem;
    margin-right: 1.75rem;
    font-size: 1.1rem;
    font-weight: 700;
}

.item-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-left: 1.75rem;
    margin-right: 1.75rem;
    margin-bottom: 1.75rem;
}

/* Subsection Items */
.subsection-item {
    background: var(--bg-surface);
    border-left: 4px solid var(--primary-color);
    padding: 2rem;
    border-radius: 10px;
    margin: 1.5rem 0;
    display: none;
    scroll-margin-top: 180px;
    border: 1px solid var(--border-dark);
    overflow: hidden;
}

.subsection-item.active {
    display: block;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.subsection-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: block;
}

/* Tall/vertical image suitable for flyers */
.subsection-image-vertical {
    width: 100%;
    max-width: 480px;
    height: 1200px; /* tall flyer aspect */
    object-fit: cover;
    margin-left: auto;
    margin-right: auto;
    display: block;
    border-radius: 8px;
}

/* Side-by-side layout for the weekly schedule (image left, text right) */
.subsection-side-by-side {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}
.subsection-side-by-side .subsection-image-wrap {
    flex: 0 0 320px;
}
.subsection-side-by-side .subsection-image-wrap .subsection-image-vertical {
    width: 100%;
    height: auto;
    max-height: 760px; /* reasonable tall display */
    object-fit: cover;
    margin: 0;
    display: block;
}
.subsection-side-by-side .subsection-side-content {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (max-width: 900px) {
    .subsection-side-by-side {
        flex-direction: column;
    }
    .subsection-side-by-side .subsection-image-wrap {
        flex: none;
        width: 100%;
    }
    .subsection-side-by-side .subsection-image-wrap .subsection-image-vertical {
        height: 420px;
        max-height: 420px;
    }
}

/* Form embed styling */
.form-embed {
    width: 100%;
    max-width: 900px;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
}
.form-embed iframe {
    width: 100%;
    height: 800px;
    border: 1px solid var(--border-dark);
    border-radius: 8px;
    background: white;
}
.form-placeholder {
    padding: 1rem;
    background: var(--bg-dark);
    border: 1px dashed var(--border-dark);
    color: var(--text-secondary);
    border-radius: 8px;
}

.subsection-item h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.subsection-item p {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Get Involved Grid */
.get-involved-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.involvement-card {
    background: var(--bg-dark);
    padding: 0;
    border-radius: 10px;
    border: 1px solid var(--border-dark);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow: hidden;
    cursor: pointer;
}

.involvement-card:hover {
    background: var(--bg-surface);
    border-color: var(--primary-color);
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(99, 102, 241, 0.2);
}

.involvement-card h3 {
    color: var(--primary-color);
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    margin-top: 1rem;
    margin-left: 2rem;
    margin-right: 2rem;
}

.involvement-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
    margin-left: 2rem;
    margin-right: 2rem;
    margin-top: 0.5rem;
    flex-grow: 1;
}

.card-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    padding: 0.75rem 0;
    margin: 0;
    margin-left: 2rem;
    margin-right: 2rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
    display: inline-block;
}

.card-link:hover {
    border-bottom-color: var(--primary-color);
}

/* Section-specific Colors */
#overview {
    border-top-color: var(--primary-color);
}

#overview::before {
    background: linear-gradient(90deg, var(--primary-color), var(--accent-cyan));
}

#workshops {
    border-top-color: var(--secondary-color);
}

#workshops::before {
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-cyan));
}

#projects {
    border-top-color: var(--tertiary-color);
}

#projects::before {
    background: linear-gradient(90deg, var(--tertiary-color), var(--accent-orange));
}

#committee {
    border-top-color: var(--accent-orange);
}

#committee::before {
    background: linear-gradient(90deg, var(--accent-orange), var(--accent-pink));
}

#resources {
    border-top-color: var(--accent-cyan);
}

#resources::before {
    background: linear-gradient(90deg, var(--accent-cyan), var(--secondary-color));
}

/* Responsive Design */
@media (max-width: 1024px) {
    .carousel-overlay {
        gap: 2rem;
    }

    .carousel-overlay h2 {
        font-size: 2.5rem;
    }

    .carousel-nav-buttons {
        max-width: 800px;
    }

    .section-btn {
        padding: 0.85rem 1.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .pw-header {
        padding: 1rem;
    }

    .menu-toggle {
        display: none;
    }

    .pw-sidebar {
        display: none;
    }

    .carousel-hero {
        height: 350px;
    }

    .carousel-overlay {
        gap: 1.5rem;
    }

    .carousel-overlay h2 {
        font-size: 2rem;
    }

    .carousel-nav-buttons {
        flex-wrap: wrap;
        max-width: 600px;
    }

    .section-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
    }

    .content-section {
        padding: 1.5rem;
        min-height: calc(100vh - 500px);
    }

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

    .pw-header h1 {
        font-size: 1.5rem;
    }

    .items-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .carousel-hero {
        height: 250px;
    }

    .carousel-overlay h2 {
        font-size: 1.5rem;
    }

    .carousel-nav-buttons {
        gap: 0.5rem;
    }

    .section-btn {
        padding: 0.65rem 1rem;
        font-size: 0.85rem;
    }

    .carousel-indicators {
        bottom: 1rem;
        gap: 0.5rem;
    }

    .indicator {
        width: 10px;
        height: 10px;
    }

    .content-section {
        padding: 1.25rem;
        border-radius: 8px;
        min-height: calc(100vh - 400px);
    }

    .content-section h2 {
        font-size: 1.25rem;
    }

    .items-list {
        gap: 1rem;
    }

    .get-involved-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .involvement-card {
        padding: 1.5rem;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Members Grid and Styling */
.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-dark);
}

.member-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: var(--transition);
    background: var(--bg-surface);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid var(--border-dark);
}

.member-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-color);
    background: var(--bg-dark);
}

.member-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
    margin-bottom: 1rem;
    transition: var(--transition);
}

.member-card:hover .member-image {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.5);
}

.member-info {
    width: 100%;
}

.member-name {
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
}

.member-nickname {
    color: var(--accent-cyan);
    font-size: 0.9rem;
    margin: 0 0 0.5rem 0;
    font-weight: 600;
}

.member-subteam {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0 0 0.75rem 0;
    font-weight: 500;
}

.member-statement {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0.75rem 0 0.75rem 0;
    font-style: italic;
}

.member-links {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 0.75rem;
}

.member-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-dark);
    color: var(--primary-color);
    transition: var(--transition);
    border: 1px solid var(--border-dark);
}

.member-links a:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: scale(1.1);
}

/* Year Filter UI */
.members-year-filter {
    margin: 1rem 0 2rem 0;
    padding: 1.5rem;
    background: var(--bg-surface);
    border-radius: 10px;
    border: 1px solid var(--border-dark);
}

.members-year-filter label {
    display: block;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.year-filter-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.year-filter-btn {
    padding: 0.5rem 1rem;
    background: var(--bg-dark);
    border: 1px solid var(--border-dark);
    color: var(--text-secondary);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.year-filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.year-filter-btn.active {
    background: linear-gradient(90deg, var(--primary-color), var(--accent-cyan));
    color: white;
    border-color: transparent;
}

/* Co-Chairs Section */
.co-chairs-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--primary-color);
}

.co-chairs-section h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
}

.co-chairs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 2rem;
}

.co-chair-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: var(--transition);
    background: linear-gradient(135deg, var(--bg-surface) 0%, rgba(99, 102, 241, 0.1) 100%);
    padding: 1.5rem;
    border-radius: 10px;
    border: 2px solid var(--primary-color);
}

.co-chair-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.3);
}

.co-chair-card .member-image {
    border-color: var(--accent-orange);
}

.co-chair-card:hover .member-image {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.5);
}

.co-chair-years {
    color: var(--accent-orange);
    font-weight: 600;
    font-size: 0.9rem;
    margin: 0.5rem 0 0.75rem 0;
}

/* Members Section Container */
.members-section {
    margin-top: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .members-grid,
    .co-chairs-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1.5rem;
    }

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

    .year-filter-buttons {
        gap: 0.5rem;
    }

    .year-filter-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .members-grid,
    .co-chairs-grid {
        grid-template-columns: 1fr;
    }

    .member-card,
    .co-chair-card {
        padding: 1rem;
    }

    .member-image {
        width: 100px;
        height: 100px;
    }
}


/* Utility Classes */

/* Workshop Grid */
.workshop-grid {
    display: grid;
    gap: 1.5rem;
    /* Force two columns on wide screens, collapse to one on smaller */
    grid-template-columns: repeat(2, 1fr);
    margin-top: 1.5rem;
}

.workshop-card {
    background: var(--bg-dark);
    border: 1px solid var(--border-dark);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: stretch;
}

.workshop-image {
    width: 40%;
    min-width: 240px;
    height: 100%;
    object-fit: cover;
    display: block;
}

.workshop-body {
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.workshop-title {
    color: var(--primary-color);
    margin: 0 0 0.5rem 0;
    font-size: 1.15rem;
}

.workshop-date {
    color: var(--accent-cyan);
    font-weight: 600;
    margin: 0 0 0.75rem 0;
}

.workshop-desc {
    color: var(--text-secondary);
    line-height: 1.6;
}

@media (max-width: 850px) {
    .workshop-card {
        flex-direction: column;
    }

    .workshop-image {
        width: 100%;
        height: 220px;
        min-width: unset;
    }
}

/* Edition tabs for multi-year projects (e.g., Chill Cook-off) */
.edition-block {
    margin-top: 1.5rem;
}
.edition-tabs {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.edition-btn {
    background: transparent;
    border: 1px solid var(--border-dark);
    color: var(--text-secondary);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
}
.edition-btn.active {
    background: linear-gradient(90deg, var(--primary-color), var(--accent-cyan));
    color: white;
    border-color: transparent;
}
.edition-card { display: flex; background: var(--bg-dark); border:1px solid var(--border-dark); border-radius:10px; overflow:hidden; margin-bottom:1rem; }
.edition-card .workshop-image { width: 240px; height: 180px; object-fit: cover; }
.edition-card .workshop-body { padding: 0.75rem 1rem; }

/* Ensure workshop grid becomes single column for narrower viewports */
@media (max-width: 1100px) {
    .workshop-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}
.hidden {
    display: none;
}

.visible {
    display: block;
}

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

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

/* Gallery Section */
.gallery-container {
    display: grid;
    gap: 2rem;
    margin-top: 2rem;
}

/* Visual divider and sticky gallery heading */
.global-gallery {
    border-top: 2px solid var(--border-dark);
    padding-top: 1.5rem;
    margin-top: 1.5rem;
}

.gallery-heading {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    /* no sticky behavior by default */
    position: static;
    top: auto;
    background: transparent;
    padding: 0;
    z-index: auto;
}

/* Simple image grid (no captions) */
.gallery-grid.simple {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem;
    align-items: start;
}

.gallery-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

/* Loading spinner for gallery */
.gallery-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem 0;
}

.gallery-spinner {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 4px solid rgba(255,255,255,0.08);
    border-top-color: var(--primary-color);
    animation: spin 1s linear infinite;
}

.gallery-loading-text {
    color: var(--text-secondary);
    font-weight: 600;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.gallery-section-group {
    border: 1px solid var(--border-dark);
    border-radius: 12px;
    padding: 2rem;
    background-color: var(--bg-surface);
    overflow: hidden;
}

.gallery-section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.gallery-section-title::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: var(--accent-cyan);
    border-radius: 50%;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    background-color: var(--bg-dark);
    border: 1px solid var(--border-dark);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.gallery-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.15);
    transform: translateY(-4px);
}

.gallery-item-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.gallery-item-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.gallery-item-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    line-height: 1.3;
}

.gallery-item-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.gallery-item-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    flex: 1;
    margin-bottom: 1rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gallery-item-badge {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: fit-content;
    margin-bottom: 0.75rem;
}

.gallery-item-badge.workshop {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.gallery-item-badge.project {
    background: linear-gradient(135deg, #ec4899, #f472b6);
}

.gallery-item-badge.committee {
    background: linear-gradient(135deg, #06b6d4, #22d3ee);
}

.gallery-item-badge.schedule {
    background: linear-gradient(135deg, #f97316, #fb923c);
}

.gallery-item-date {
    font-size: 0.8rem;
    color: var(--accent-cyan);
    font-weight: 500;
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }

    .gallery-section-group {
        padding: 1.5rem;
    }

    .gallery-item-image {
        height: 180px;
    }

    .gallery-item-content {
        padding: 1rem;
    }
}

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

    .gallery-section-group {
        padding: 1rem;
    }

    .gallery-section-title {
        font-size: 1.2rem;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-surface);
}

::-webkit-scrollbar-thumb {
    background: var(--border-dark);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}
