/* ==========================================================================
   Aparajito Events Page Styles (WEB-INF/css/events.css)
   Dedicated, responsive styling for the Events page (/events & /event).
   Comprises:
     - Design tokens, shared resets, and header navigation styles
     - Hero Banner: Solid Full-Width Black Banner (#000000)
     - Main Event Showcase Section (#C7CBEA) with Overlapping Cards:
         * Showcase 1: Chotoder Bioscope (Image Left, Card Right)
         * Showcase 2: Play With Clay (Image Left, Card Right)
         * Showcase 3: Raja Khabe Pithe (Card Left, Image Right)
     - Event Gallery & Category Filters:
         * Centered Filters: ALL vs C.B.V.T TRAINING
         * 3-Column Desktop Grid inside White Container
     - Mobile Navigation & Responsive Media Queries
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design System & CSS Variables
   -------------------------------------------------------------------------- */
:root {
    /* Color Palette */
    --color-primary: #3b5998;
    --color-primary-hover: #2d4373;
    --color-text-dark: #111111;
    --color-text-charcoal: #222222;
    --color-text-muted: #4b5563;
    --color-header-bg: #fdfdfd;
    --color-header-border: #ececee;

    /* Theme Palette for Events Page Content */
    --color-events-bg: #c7cbea;           /* Authentic pale lavender matching reference */
    --color-banner-bg: #000000;
    --color-card-bg: #ffffff;
    --color-filter-active-bg: #222222;
    --color-filter-active-text: #ffffff;

    /* Typography */
    --font-heading: 'Roboto Condensed', 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-body: 'Roboto', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;

    /* Layout & Sizing */
    --container-max-width: 1280px;
    --transition-fast: 0.18s ease;
    --transition-normal: 0.28s ease;
}

/* --------------------------------------------------------------------------
   2. Global Resets & Document Defaults
   -------------------------------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    color: var(--color-text-dark);
    background-color: var(--color-events-bg);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Accessible Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 10px;
    background: #000000;
    color: #ffffff;
    padding: 8px 16px;
    z-index: 1000;
    text-decoration: none;
    font-weight: 700;
    border-radius: 4px;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 10px;
}

/* Container Utility */
.events-container {
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 clamp(1.25rem, 3.5vw, 2.5rem);
}

/* --------------------------------------------------------------------------
   3. Shared Header Navigation Bar (header.jsp)
   -------------------------------------------------------------------------- */
.site-header {
    width: 100%;
    background-color: var(--color-header-bg);
    border-bottom: 1px solid var(--color-header-border);
    position: relative;
    z-index: 100;
}

.header-inner {
    max-width: 1380px;
    margin: 0 auto;
    padding: 10px clamp(1.25rem, 3.5vw, 2.75rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.header-logo-area {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    outline: none;
}

.site-logo-img {
    display: block;
    width: auto;
    height: 95px;
    max-height: 105px;
    object-fit: contain;
    transition: transform var(--transition-fast, 0.2s ease);
}

.site-logo-img:hover {
    transform: scale(1.03);
}

.logo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    cursor: pointer;
}

.logo-placeholder-frame {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    border: 2px solid #111111;
    border-radius: 4px;
    padding: 6px 14px;
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.logo-symbol-glyph {
    color: var(--color-primary);
    font-size: 1.1rem;
    line-height: 1;
}

.logo-text {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: 0.08em;
    color: #111111;
}

.logo-badge-label {
    position: absolute;
    bottom: -7px;
    background: #ffd166;
    color: #111111;
    font-size: 0.48rem;
    font-weight: 800;
    padding: 1px 4px;
    border-radius: 2px;
    letter-spacing: 0.05em;
    border: 1px solid #111111;
}

/* Desktop Navigation */
.desktop-nav {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: clamp(1.2rem, 2.2vw, 2.6rem);
}

.nav-item {
    position: relative;
}

.nav-link {
    display: inline-block;
    font-size: clamp(0.95rem, 1.1vw, 1.05rem);
    font-weight: 500;
    color: var(--color-text-dark);
    text-decoration: none;
    padding: 6px 2px;
    position: relative;
    transition: color var(--transition-fast);
    outline: none;
}

.nav-link:hover {
    color: var(--color-primary);
}

.nav-link.active {
    color: #4747d7;
    font-weight: 700;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background-color: #4747d7;
    border-radius: 2px;
}

.nav-link:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 4px;
    border-radius: 2px;
}

/* Header Right Area */
.header-right-area {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-shrink: 0;
}

.social-placeholders-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.social-placeholder-item {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #f1f3f7;
    color: #4b5563;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

.social-placeholder-item:hover {
    background-color: var(--color-primary);
    color: #ffffff;
    transform: translateY(-2px);
}

.social-placeholder-item.youtube:hover {
    background-color: #ff0000;
}

.social-placeholder-item.facebook:hover {
    background-color: #1877f2;
}

.social-placeholder-item.instagram:hover {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
}

.social-placeholder-item:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 3px;
}

.social-icon-svg {
    display: block;
}

.anniversary-badge-area {
    display: flex;
    align-items: center;
}

.anniversary-badge-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffe082 0%, #ffb300 70%, #d89600 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(184, 134, 11, 0.4);
    border: 1.5px solid #fff8e1;
    cursor: default;
    transition: transform var(--transition-fast);
}

.anniversary-badge-placeholder:hover {
    transform: scale(1.05);
}

.badge-ring {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1;
}

.badge-number {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 800;
    color: #4a2c00;
    letter-spacing: -0.02em;
}

.badge-ordinal {
    font-size: 0.55rem;
    font-weight: 700;
    vertical-align: super;
}

.badge-subtext {
    font-size: 0.44rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #5d3800;
    margin-top: 1px;
}

.hamburger-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 38px;
    height: 38px;
    background: #f1f3f7;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    padding: 8px 7px;
    box-sizing: border-box;
    transition: background-color var(--transition-fast);
}

.hamburger-toggle:hover {
    background-color: #e2e8f0;
}

.hamburger-toggle:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.hamburger-bar {
    width: 100%;
    height: 3px;
    background-color: var(--color-text-dark);
    border-radius: 3px;
    transition: transform var(--transition-normal), opacity var(--transition-normal);
}

.mobile-nav-drawer {
    display: none;
}

/* --------------------------------------------------------------------------
   4. Events Hero Banner (Solid Full-Width Black #000000)
   -------------------------------------------------------------------------- */
.events-hero-banner {
    width: 100%;
    background-color: var(--color-banner-bg);
    min-height: 290px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem;
    text-align: center;
    position: relative;
    box-sizing: border-box;
}

.events-hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.75rem, 6.2vw, 5.25rem); /* 76-84px on desktop, scaling to 42px on mobile */
    font-weight: 700;
    line-height: 1.1;
    color: #ffffff;
    margin: 0;
    letter-spacing: -0.01em;
}

/* --------------------------------------------------------------------------
   5. Main Event Showcase Section (#C7CBEA) with Overlapping Cards
   -------------------------------------------------------------------------- */
.events-main-section {
    width: 100%;
    background-color: var(--color-events-bg);
    padding: clamp(3.5rem, 6vw, 6rem) 0 clamp(4rem, 6.5vw, 6.5rem) 0;
}

.showcases-wrapper {
    display: flex;
    flex-direction: column;
    gap: clamp(4rem, 7vw, 7rem);
    margin-bottom: clamp(4rem, 7vw, 7.5rem);
}

/* Individual Showcase Row */
.showcase-row {
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
}

/* Standard: Image Left, Card Right overlapping */
.showcase-row.standard {
    flex-direction: row;
}

.showcase-row.standard .showcase-media {
    width: 66%;
    max-width: 820px;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.showcase-row.standard .showcase-card {
    width: 46%;
    max-width: 530px;
    margin-left: -12%;
    position: relative;
    z-index: 2;
}

/* Reverse: Card Left, Image Right overlapping (Showcase 3: Raja Khabe Pithe) */
.showcase-row.reverse {
    flex-direction: row-reverse;
}

.showcase-row.reverse .showcase-media {
    width: 66%;
    max-width: 820px;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.showcase-row.reverse .showcase-card {
    width: 46%;
    max-width: 530px;
    margin-right: -12%;
    position: relative;
    z-index: 2;
}

/* Showcase Media Card */
.showcase-img-card {
    width: 100%;
    background-color: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border-radius: 2px;
    overflow: hidden;
    display: flex;
}

.showcase-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Showcase Information Card */
.showcase-card {
    background-color: var(--color-card-bg);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.09);
    padding: clamp(2.25rem, 3.8vw, 3.75rem);
    border-radius: 2px;
    box-sizing: border-box;
}

.showcase-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 3vw, 2.85rem);
    font-weight: 700;
    line-height: 1.15;
    color: var(--color-text-charcoal);
    margin: 0;
    letter-spacing: -0.015em;
}

.showcase-divider {
    width: 100%;
    height: 1px;
    background-color: #222222;
    margin: 1.25rem 0 1.5rem 0;
}

.showcase-desc {
    font-family: var(--font-body);
    font-size: clamp(1rem, 1.1vw, 1.125rem);
    line-height: 1.75;
    color: var(--color-text-muted);
    margin: 0;
}

/* --------------------------------------------------------------------------
   6. Event Gallery Container and Category Filters
   -------------------------------------------------------------------------- */
.gallery-section-container {
    width: 100%;
    background-color: #ffffff;
    border-radius: 4px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.06);
    padding: clamp(2.5rem, 4.5vw, 4rem) clamp(1.5rem, 3vw, 2.75rem);
    box-sizing: border-box;
}

/* Category Filter Navigation */
.gallery-filter-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: clamp(2.5rem, 4vw, 3.5rem);
}

.gallery-filter-btn {
    border: none;
    cursor: pointer;
    padding: 10px 22px;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 2px;
    transition: background-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
    background-color: #ffffff;
    color: #222222;
}

.gallery-filter-btn:hover {
    background-color: #f1f3f7;
}

.gallery-filter-btn.active {
    background-color: var(--color-filter-active-bg);
    color: var(--color-filter-active-text);
}

.gallery-filter-btn:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* 3-Column Desktop Gallery Grid */
.events-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(16px, 1.8vw, 24px);
    width: 100%;
}

.gallery-card {
    position: relative;
    border-radius: 2px;
    overflow: hidden;
    background-color: #f4f6fa;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), opacity 0.3s ease;
}

.gallery-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.gallery-card.hidden {
    display: none !important;
}

.gallery-img-wrapper {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.gallery-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-card:hover .gallery-photo {
    transform: scale(1.03);
}

/* --------------------------------------------------------------------------
   7. Responsive Media Queries
   -------------------------------------------------------------------------- */

/* Tablet & Intermediate Desktop (992px to 1199px) */
@media (max-width: 1199px) {
    .showcase-row.standard .showcase-media,
    .showcase-row.reverse .showcase-media {
        width: 62%;
    }

    .showcase-row.standard .showcase-card,
    .showcase-row.reverse .showcase-card {
        width: 48%;
    }

    .events-gallery-grid {
        gap: 16px;
    }
}

/* Tablet Screens (768px to 991px) */
@media (max-width: 991px) {
    .header-inner {
        padding: 10px 1.25rem;
    }

    .desktop-nav {
        display: none;
    }

    .hamburger-toggle {
        display: flex;
    }

    .mobile-nav-drawer {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 1000;
    }

    .mobile-nav-drawer[hidden] {
        display: none;
    }

    .mobile-nav-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(4px);
    }

    .mobile-nav-panel {
        position: absolute;
        top: 0;
        right: 0;
        width: min(320px, 85vw);
        height: 100%;
        background-color: #ffffff;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.25);
        display: flex;
        flex-direction: column;
        padding: 1.5rem;
        box-sizing: border-box;
        overflow-y: auto;
    }

    .mobile-nav-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-bottom: 1rem;
        border-bottom: 1px solid #e2e8f0;
        margin-bottom: 1.5rem;
    }

    .mobile-nav-title {
        font-family: var(--font-heading);
        font-weight: 700;
        font-size: 1.35rem;
        color: #111111;
    }

    .mobile-nav-close {
        background: transparent;
        border: none;
        font-size: 1.85rem;
        line-height: 1;
        cursor: pointer;
        color: #4b5563;
        padding: 4px;
        transition: color var(--transition-fast);
    }

    .mobile-nav-close:hover {
        color: #000000;
    }

    .mobile-nav-list {
        list-style: none;
        margin: 0;
        padding: 0;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .mobile-nav-link {
        display: block;
        padding: 10px 14px;
        font-size: 1.05rem;
        font-weight: 600;
        color: #1f2937;
        text-decoration: none;
        border-radius: 6px;
        transition: background-color var(--transition-fast), color var(--transition-fast);
    }

    .mobile-nav-link:hover,
    .mobile-nav-link.active {
        background-color: #eef2fb;
        color: var(--color-primary);
    }

    .mobile-nav-footer {
        margin-top: auto;
        padding-top: 1.5rem;
        border-top: 1px solid #e2e8f0;
    }

    .mobile-social-group {
        display: flex;
        gap: 0.75rem;
        justify-content: center;
    }

    /* Stack showcase images and text cards vertically on tablet */
    .showcase-row,
    .showcase-row.standard,
    .showcase-row.reverse {
        flex-direction: column;
        align-items: center;
    }

    .showcase-row.standard .showcase-media,
    .showcase-row.reverse .showcase-media {
        width: 100%;
        max-width: 100%;
    }

    .showcase-row.standard .showcase-card,
    .showcase-row.reverse .showcase-card {
        width: 90%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
        margin-top: -40px; /* Slight vertical overlap when stacked */
        z-index: 2;
    }

    /* 2 Columns on Tablet */
    .events-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

/* Mobile Screens (Below 768px) */
@media (max-width: 767px) {
    .events-hero-banner {
        min-height: 220px;
        padding: 2rem 1rem;
    }

    .events-hero-title {
        font-size: clamp(2.4rem, 10vw, 3.25rem); /* 42px - 52px */
    }

    .events-main-section {
        padding: 2.5rem 0 3.5rem 0;
    }

    .showcases-wrapper {
        gap: 3.5rem;
        margin-bottom: 3.5rem;
    }

    .showcase-row.standard .showcase-card,
    .showcase-row.reverse .showcase-card {
        width: 95%;
        margin-top: -30px;
        padding: 1.75rem 1.5rem;
    }

    .showcase-title {
        font-size: 1.85rem;
    }

    .showcase-divider {
        margin: 1rem 0 1.25rem 0;
    }

    .gallery-section-container {
        padding: 2rem 1rem;
    }

    .gallery-filter-nav {
        margin-bottom: 2rem;
    }

    /* 1 Column on Mobile */
    .events-gallery-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}
