/* =====================================================
   PRK BUSINESS SOLUTIONS - EVENTS PAGE
  
===================================================== */

/* NOTE: @import must be the very first rule in a CSS file */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=EB+Garamond:ital,wght@0,400;0,500;1,400;1,500&family=Montserrat:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

/* ---------- 1. VARIABLES ---------- */
:root {
    /* brand */
    --sky: #0ea5e9;
    --sky-dark: #0284c7;
    --sky-soft: #e0f2fe;
    --red: #e11d2e;
    --red-dark: #b91624;
    --red-soft: #fee2e5;
    --pink: #ff6b7d;
    --navy: hsl(244, 72%, 37%);
    --navy-deep: hsl(244, 72%, 12%);

    /* neutrals */
    --ink: #1e303b;
    --muted: #64748b;
    --line: #e5e7ef;
    --bg: #f9f9fb;
    --white: #ffffff;

    /* events */
    --ev-accent: #f2496b;
    --ev-accent-dark: #d8335a;
    --ev-title: #1f2a37;
    --ev-text: #5b6470;
    --ev-muted: #8a8f9a;
    --ev-line: #e8e8ee;

    /* type */
    --font-heading: 'Plus Jakarta Sans', 'DM Sans', system-ui, sans-serif;
    --font-body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-display: 'Montserrat', 'DM Sans', sans-serif;
    --font-serif: 'EB Garamond', Georgia, serif;

    /* shape + depth */
    --radius: 20px;
    --radius-lg: 28px;
    --shadow-sm: 0 4px 16px rgba(15, 23, 42, .06);
    --shadow-md: 0 14px 34px rgba(15, 23, 42, .10);
    --shadow-lg: 0 28px 60px -20px rgba(40, 33, 160, .35);
    --ease: cubic-bezier(.22, .8, .24, 1);
}

/* ---------- 2. BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
}
body.modal-lock,
body.modal-open { overflow: hidden; }

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--navy);
    line-height: 1.12;
    margin: 0;
}
p { margin: 0; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; list-style: none; }


[hidden] { display: none !important; }

a:focus-visible,
button:focus-visible,
.event-card:focus-visible {
    outline: 3px solid var(--sky);
    outline-offset: 3px;
}

.container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- 3. ANIMATIONS ---------- */
.js .reveal { opacity: 0; }
.js .reveal.in,
.js .reveal.visible { opacity: 1; animation: revealUp .9s var(--ease) backwards; }

@keyframes revealUp {
    from { opacity: 0; transform: translateY(40px); }
    to   { opacity: 1; transform: none; }
}
@keyframes popIn {
    from { opacity: 0; transform: scale(.94) translateY(22px); }
    to   { opacity: 1; transform: none; }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* =====================================================
   4. NAVBAR 
===================================================== */
.navbar {
    --nav-red: #e8283a;
    --nav-text: #111111;
    position: sticky;
    top: 0;
    z-index: 1030;
    padding: 14px 0;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 2px 18px rgba(20, 22, 58, .08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-family: 'Outfit', system-ui, sans-serif;
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand-name {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    letter-spacing: .5px;
}
.brand-name .prk {
    font-family: 'Outfit', sans-serif;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: .5px;
    color: #38bdf8 !important;
}
.brand-name .business {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: var(--nav-red) !important;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}
.nav-links a {
    position: relative;
    padding: 8px 14px;
    font-size: 15px;
    font-weight: 500;
    color: var(--nav-text);
    transition: color .25s ease;
}
.nav-links a:hover,
.nav-links a:focus,
.nav-links a:active,
.nav-links a.active,
.nav-links a[aria-current="page"] {
    color: var(--nav-red);
}
.nav-links a.active,
.nav-links a[aria-current="page"] { font-weight: 600; }

.nav-links a::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 0;
    height: 2px;
    border-radius: 2px;
    background: var(--nav-red);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .3s ease;
}
.nav-links a:hover::after,
.nav-links a.active::after,
.nav-links a[aria-current="page"]::after {
    transform: scaleX(1);
}

.nav-links a.nav-contact {
    margin-left: 16px;
    padding: 11px 26px;
    border-radius: 50px;
    background: linear-gradient(135deg, #e8283a, #d41f2f);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 8px 20px rgba(232, 40, 58, .35);
    transition: all .3s ease;
}
.nav-links a.nav-contact::after { display: none; }
.nav-links a.nav-contact:hover {
    background: linear-gradient(135deg, #f0303f, #c81c2b);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(232, 40, 58, .5);
}

.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--nav-text);
    font-size: 28px;
    line-height: 1;
    padding: 0;
    cursor: pointer;
}

@media (max-width: 860px) {
    .nav-toggle { display: block; }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px 20px 16px;
        background: #fff;
        border-top: 1px solid var(--line);
        box-shadow: 0 20px 30px rgba(15, 23, 42, .08);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: opacity .3s, transform .3s, visibility .3s;
    }
    .nav-links.open,
    .nav-links.active { opacity: 1; visibility: visible; transform: none; }

    .nav-links a { padding: 13px 4px; border-bottom: 1px solid var(--line); }
    .nav-links a::after { display: none; }
    .nav-links a.nav-contact {
        margin: 14px 0 0;
        text-align: center;
        border-bottom: 0;
        color: #fff;
    }

    .brand-name .prk { font-size: 22px; }
    .brand-name .business { font-size: 17px; }
}

/* =====================================================
   5. HERO 
===================================================== */
.events-hero {
    position: relative;
    padding: 170px 20px 130px;
    text-align: center;
    color: #fff;
    isolation: isolate;
    background:
        linear-gradient(180deg, rgba(10, 10, 30, .10) 0%, rgba(14, 12, 60, .25) 100%),
        url('../images/team.jpeg') center / cover no-repeat;
}
.events-hero::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 70px;
    background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .06));
    z-index: -1;
}
.events-hero-inner { max-width: 660px; margin: 0 auto; }

.events-hero h1 {
    margin: 0 0 22px;
    font-family: var(--font-display);
    font-size: clamp(34px, 6vw, 60px);
    font-weight: 500;
    letter-spacing: .5em;
    padding-left: .5em;
    color: #fff;
    text-shadow: 0 6px 30px rgba(0, 0, 0, .35);
}
.events-hero .hero-description {
    margin: 0 auto;
    max-width: 52ch;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 19px;
    line-height: 1.75;
    color: rgba(255, 255, 255, .92);
}
.hero-dots-static {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 36px;
}
.hero-dots-static span {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .4);
}
.hero-dots-static span.on { background: var(--pink); width: 22px; border-radius: 6px; }

/* =====================================================
   6. LIST SECTION + TOP BAR
===================================================== */
.events-list {
    padding: 60px 0 100px;
    background: #fff;
    font-family: var(--font-body);
}

.events-bar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 44px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--ev-line);
}
.events-title { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.events-title h2 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    color: var(--ev-title);
}
.events-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--sky-soft);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--sky-dark);
}

.event-filters { display: flex; gap: 26px; flex-wrap: wrap; }
.filter-chip {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 0 0 8px;
    border: 0;
    background: none;
    cursor: pointer;
    color: #b5b5be;
    font-family: inherit;
    transition: color .2s;
}
.filter-chip::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 2px;
    border-radius: 2px;
    background: var(--ev-accent);
    transform: scaleX(0);
    transition: transform .3s var(--ease);
}
.filter-chip i    { font-size: 22px; }
.filter-chip span { font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; }
.filter-chip:hover,
.filter-chip.active { color: var(--ev-accent); }
.filter-chip.active::after { transform: scaleX(1); }

/* =====================================================
   7. EVENT CARDS  
===================================================== */
.events-list .events-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 56px 40px;
}

.events-list .event-card {
    position: relative;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.events-list .event-card:focus-visible { outline: 2px solid var(--ev-accent); outline-offset: 8px; }

/* filter hide */
.events-list .event-card[hidden],
.events-list .event-card.hide,
.events-list .event-card.is-hidden { display: none !important; }

/* .event-content wrapper disappears so every piece can be ordered */
.events-list .event-content { display: contents; }

/* popup ka hidden text card mein kabhi na dikhe */
.events-list .event-detail { display: none !important; }

/* text pieces: same width, left aligned */
.events-list .event-content > h3,
.events-list .event-content > p {
    width: 84%;
    background: #fff;
}

/* ---- image (poori image clickable, chips click ko block nahi karte) ---- */
.events-list .event-image {
    order: 1;
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3.1;
    background: #eceef3;
    border-radius: 14px;
}
.events-list .event-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .7s var(--ease);
}
.events-list .event-card:hover .event-image img { transform: scale(1.05); }

/* soft dark fade at the top & bottom so chips are always readable */
.events-list .event-image::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(10, 10, 30, .35) 0%, transparent 32%),
        linear-gradient(0deg,   rgba(10, 10, 30, .30) 0%, transparent 30%);
}

.event-image-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    font-size: 46px;
    color: #a5abb8;
}

/* ---- PHOTO COUNT chip  ---- */
.events-list .photo-count,
.photo-count {
    position: absolute;
    top: 12px;
    right: 12px;
    bottom: auto;
    left: auto;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: auto;
    height: auto;
    min-width: 0;
    max-width: 90px;
    margin: 0;
    padding: 5px 11px;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 999px;
    background: rgba(15, 23, 42, .55);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    color: #fff;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: .2px;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .22);
    pointer-events: none;
    transform: none;
}
.photo-count i,
.photo-count svg {
    width: auto;
    height: auto;
    font-size: 12px;
    line-height: 1;
}

/* ---- title ---- */
.events-list .event-content > h3 {
    order: 2;
    position: relative;
    z-index: 2;
    margin: -40px 0 0;
    padding: 22px 22px 0 0;
    font-family: var(--font-heading);
    font-size: 19px;
    font-weight: 800;
    line-height: 1.3;
    color: var(--ev-title);
    transition: color .25s;
}
.events-list .event-card:hover .event-content > h3 { color: var(--ev-accent); }

/* short pink line title ke neeche */
.events-list .event-content > h3::after {
    content: "";
    display: block;
    width: 38px;
    height: 2px;
    margin-top: 14px;
    border-radius: 2px;
    background: var(--ev-accent);
}

/* ---- description (max 3 lines) ---- */
.events-list .event-content > p {
    order: 5;
    margin: 0;
    padding: 14px 0 0;
    font-family: var(--font-body);
    font-size: 13.5px;
    line-height: 1.75;
    color: var(--ev-text);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---- VIEW PHOTOS link (CSS se) ---- */
.events-list .event-card::after {
    content: "View photos  \2192";
    order: 6;
    padding-top: 16px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--ev-accent);
    transition: color .2s, letter-spacing .25s var(--ease);
}
.events-list .event-card:hover::after {
    color: var(--ev-accent-dark);
    letter-spacing: 2px;
}

/* reveal safe + empty states */
.events-list .reveal { opacity: 1; transform: none; }

.no-events,
.no-events-message {
    grid-column: 1 / -1;
    padding: 70px 0;
    text-align: center;
    color: var(--ev-muted);
}
.no-events i,
.no-events-message i {
    display: block;
    margin-bottom: 10px;
    font-size: 38px;
    color: var(--ev-accent);
}
.no-events-message h3 { color: var(--ev-title); margin-bottom: 6px; }

/* =====================================================
   8. POPUP (MODAL) + PHOTO GALLERY
===================================================== */
.event-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: fadeIn .3s ease;
}

.event-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(12, 10, 46, .66);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.event-modal-content {
    position: relative;
    width: 100%;
    max-width: 820px;
    max-height: calc(100vh - 48px);
    max-height: calc(100dvh - 48px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-lg);
    animation: popIn .45s var(--ease);
}

.event-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 5;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .95);
    color: var(--navy);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: background .25s, color .25s, transform .25s;
}
.event-modal-close:hover { background: var(--red); color: #fff; transform: rotate(90deg); }

/* ---- gallery ---- */
.gallery {
    flex: 0 0 auto;
    background: var(--navy-deep);
}

.gallery-stage {
    position: relative;
    width: 100%;
    height: min(52vh, 420px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    touch-action: pan-y;
}
.gallery-stage img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .9);
    color: var(--navy);
    font-size: 18px;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: background .25s, color .25s, transform .25s;
}
.gallery-nav:hover {
    background: var(--ev-accent);
    color: #fff;
    transform: translateY(-50%) scale(1.08);
}
.gallery-prev { left: 12px; }
.gallery-next { right: 12px; }

.event-modal-content .gallery-counter,
.gallery-counter {
    position: absolute;
    top: 14px;
    left: 14px;
    bottom: auto;
    right: auto;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    width: auto;
    height: auto;
    margin: 0;
    padding: 6px 14px;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 999px;
    background: rgba(15, 23, 42, .6);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    color: #fff;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: .5px;
    white-space: nowrap;
    pointer-events: none;
}

.gallery-thumbs {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    overflow-x: auto;
    background: var(--navy-deep);
    scrollbar-width: thin;
}
.gallery-thumbs button {
    flex: 0 0 auto;
    width: 64px;
    height: 64px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    background: none;
    cursor: pointer;
    opacity: .55;
    transition: opacity .2s, border-color .2s;
}
.gallery-thumbs button:hover { opacity: .9; }
.gallery-thumbs button.active { border-color: var(--ev-accent); opacity: 1; }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }

/* Hide arrows, counter, and thumbs if there is only one photo. */
.gallery.single .gallery-nav,
.gallery.single .gallery-counter,
.gallery.single .gallery-thumbs { display: none; }

/* ---- popup text ---- */
.event-modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 24px 32px 32px;
    scrollbar-width: thin;
}

.event-modal-body h2 {
    margin-bottom: 12px;
    font-size: clamp(22px, 3.6vw, 30px);
    font-weight: 800;
    color: var(--navy);
}

.event-modal-body p {
    font-family: var(--font-serif);
    font-size: 19px;
    line-height: 1.8;
    color: #3f3f46;
}
.event-modal-body p + p { margin-top: 14px; }

/* =====================================================
   9. RESPONSIVE
===================================================== */
@media (max-width: 1024px) {
    .events-list .events-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 32px; }
}

@media (max-width: 640px) {
    .events-hero { padding: 130px 20px 90px; }
    .events-hero .hero-description { font-size: 17px; }

    .events-list { padding: 40px 0 70px; }
    .events-list .events-grid { grid-template-columns: 1fr; gap: 44px; }
    .events-list .event-content > h3,
    .events-list .event-content > p { width: 90%; }

    .event-modal { padding: 12px; }
    .event-modal-content { max-height: calc(100dvh - 24px); border-radius: 22px; }
    .gallery-stage { height: min(42vh, 320px); }
    .gallery-nav { width: 38px; height: 38px; font-size: 15px; }
    .gallery-thumbs button { width: 52px; height: 52px; }
    .event-modal-body { padding: 20px 20px 26px; }
    .event-modal-body p { font-size: 17px; }
}

/* =====================================================
   10. REDUCED MOTION
===================================================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}