/* ==========================================================================
   ISLA CATANDUANES PORTAL: portal-styles.css (v2, consolidated)
   --------------------------------------------------------------------------
   CONTENTS
     1.  Design tokens
     2.  Base helpers
     3.  Header & navigation (solid by default, transparent over heroes)
     4.  Logo
     5.  Legacy hero (.portal-hero) & hero buttons
     6.  Hero event slider (.hs-)
     7.  Homepage sections
     8.  Event grid, search & filters
     9.  Municipality directory & explorer
    10.  Event submission form
    11.  Single event page (.se-), full width
    12.  Footer

   HOW THE HEADER WORKS
     Pages that open with a hero (home, single events, or any page that
     contains .portal-hero / .hs-slider) get a transparent header with white
     menu text. Every other page gets a solid white header with dark text,
     so the menu is always readable. Edit the one selector list in
     section 3 to change which pages get the transparent header.
   ========================================================================== */


/* ==========================================================================
   1. DESIGN TOKENS
   ========================================================================== */
:root {
    --portal-primary: #008080;        /* Island Teal */
    --portal-primary-dark: #005959;
    --portal-accent: #ff6b6b;         /* Coral Accent */
    --portal-bg: #f8fafc;
    --portal-card-bg: #ffffff;
    --portal-text-main: #1e293b;
    --portal-text-muted: #64748b;
    --portal-radius: 16px;
    --portal-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.08);
    --portal-shadow-hover: 0 20px 40px -10px rgba(0, 0, 0, 0.16);

    /* Single event content width (raise or lower to taste) */
    --se-max: 1320px;

    /* Header defaults = solid white. Overridden on hero pages in section 3. */
    --header-pos: relative;
    --header-bg: #ffffff;
    --header-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    --header-top: 0px;
    --admin-offset: 0px;
    --nav-text: #1e293b;
    --nav-current: #008080;
}


/* ==========================================================================
   2. BASE HELPERS
   ========================================================================== */
/* Stops the 100vw hero trick from causing sideways scrolling */
body.home,
body.single-provincial_event,
body:has(.mp-hero) {
    overflow-x: hidden;
    overflow-x: clip;
}


/* ==========================================================================
   3. HEADER & NAVIGATION
   ========================================================================== */

/* 3a. Pages that open with a hero: header floats transparent over it */
body:is(.home, .single-provincial_event, :has(.portal-hero), :has(.hs-slider), :has(.mp-hero)) {
    --header-pos: absolute;
    --header-bg: transparent;
    --header-shadow: none;
    --header-top: var(--admin-offset);
    --nav-text: #ffffff;
    --nav-current: #ffffff;
}

/* Single events: soft dark fade so the menu stays readable on any photo */
body.single-provincial_event {
    --header-bg: linear-gradient(rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0));
}

/* Keep the floating header clear of the WordPress admin bar */
body.admin-bar { --admin-offset: 32px; }
@media (max-width: 782px) {
    body.admin-bar { --admin-offset: 46px; }
}

/* 3b. Header bar */
.site-header {
    position: var(--header-pos) !important;
    top: var(--header-top);
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--header-bg) !important;
    box-shadow: var(--header-shadow) !important;
    border: none !important;
}

.site-header .inside-header,
.site-header .main-navigation,
.site-header nav#site-navigation,
.site-header .main-navigation ul {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

/* 3c. Menu links */
.site-header .main-navigation a,
.site-header .main-navigation .menu-toggle {
    color: var(--nav-text) !important;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.site-header .main-navigation .current-menu-item > a {
    color: var(--nav-current) !important;
}

.site-header .main-navigation a:hover {
    color: var(--portal-primary) !important;
}

/* 3d. Dropdowns (selector is more specific than the transparent rule above) */
.site-header .main-navigation ul ul {
    background-color: #0f172a !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2) !important;
}

.site-header .main-navigation ul ul a {
    color: #ffffff !important;
}

.site-header .main-navigation ul ul a:hover {
    background-color: var(--portal-primary) !important;
    color: #ffffff !important;
}

/* 3e. Mobile menu panel: always dark with white links */
.site-header .main-navigation.toggled .main-nav > ul {
    background: #0f172a !important;
}

.site-header .main-navigation.toggled .main-nav > ul a {
    color: #ffffff !important;
}

/* 3f. Single events: line the logo and menu up with the content width */
.single-provincial_event .site-header .inside-header {
    max-width: var(--se-max) !important;
}


/* ==========================================================================
   4. LOGO
   ========================================================================== */
.site-logo img,
.header-image img,
.site-branding img {
    height: auto !important;
    width: auto !important;
    max-height: 50px !important;
    object-fit: contain !important;
    aspect-ratio: auto !important;
}


/* ==========================================================================
   5. LEGACY HERO (.portal-hero) & HERO BUTTONS
   ========================================================================== */
.portal-hero {
    position: relative;
    background: linear-gradient(rgba(15, 23, 42, 0.45), rgba(15, 23, 42, 0.65)), url('https://images.unsplash.com/photo-1507525428034-b723cf961d3e?auto=format&fit=crop&w=1920&q=85') no-repeat center center/cover;
    padding: 160px 20px 100px;
    text-align: center;
    color: #ffffff;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    box-sizing: border-box;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.portal-hero h1 {
    font-size: clamp(2.2rem, 4.5vw, 3.5rem);
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 16px;
    line-height: 1.2;
}

.portal-hero p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    max-width: 700px;
    margin: 0 auto 30px;
    color: #f1f5f9;
    line-height: 1.6;
}

.hero-btn {
    display: inline-block;
    background: var(--portal-primary);
    color: #ffffff;
    padding: 12px 28px;
    border-radius: 30px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
    box-shadow: 0 4px 15px rgba(0, 128, 128, 0.3);
}

.hero-btn:hover {
    background: var(--portal-primary-dark);
    color: #ffffff;
    transform: translateY(-2px);
}

/* Used by the hero event slider */
.hero-btn-primary {
    display: inline-block;
    background: var(--portal-primary);
    color: #ffffff !important;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(0, 128, 128, 0.4);
}

.hero-btn-primary:hover {
    background: var(--portal-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 128, 128, 0.6);
}

.hero-btn-secondary {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #ffffff !important;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.25s ease;
}

.hero-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}


/* ==========================================================================
   6. HERO EVENT SLIDER (.hs-)
   ========================================================================== */
.hs-slider {
    position: relative;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    height: clamp(560px, 85vh, 760px);
    overflow: hidden;
    background: #0f172a;
}

.hs-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.9s ease, visibility 0.9s ease;
    display: flex;
    align-items: center;
}

.hs-slide.is-active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

.hs-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0.55) 50%, rgba(15, 23, 42, 0.2) 100%);
}

.hs-content {
    position: relative;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 120px 72px 90px; /* top clears the transparent header */
    box-sizing: border-box;
    color: #ffffff;
}

.hs-badge {
    display: inline-block;
    background: var(--portal-primary);
    color: #ffffff;
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.hs-title {
    font-size: clamp(2rem, 4.5vw, 3.6rem);
    font-weight: 800;
    line-height: 1.15;
    color: #ffffff;
    max-width: 720px;
    margin: 0 0 16px;
}

.hs-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    font-size: 1rem;
    font-weight: 600;
    color: #e2e8f0;
    margin: 0 0 14px;
}

.hs-excerpt {
    max-width: 600px;
    font-size: 1.05rem;
    line-height: 1.6;
    color: #cbd5e1;
    margin: 0 0 28px;
}

.hs-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.hs-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    background: rgba(15, 23, 42, 0.45) !important;
    color: #ffffff !important;
    font-size: 1.1rem;
    cursor: pointer;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: background 0.2s ease;
}

.hs-arrow:hover { background: var(--portal-primary) !important; }
.hs-prev { left: 20px; }
.hs-next { right: 20px; }

.hs-dots {
    position: absolute;
    bottom: 28px;
    left: 0;
    right: 0;
    z-index: 5;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.hs-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border-radius: 50%;
    border: none !important;
    background: rgba(255, 255, 255, 0.45) !important;
    cursor: pointer;
    transition: all 0.25s ease;
}

.hs-dot.is-active {
    background: #ffffff !important;
    width: 28px;
    border-radius: 6px;
}

@media (max-width: 768px) {
    .hs-slider { height: clamp(540px, 90vh, 700px); }
    .hs-content { padding: 110px 24px 80px; }
    .hs-arrow { display: none; } /* swipe on mobile */
    .hs-overlay { background: linear-gradient(180deg, rgba(15, 23, 42, 0.55), rgba(15, 23, 42, 0.85)); }
}

@media (prefers-reduced-motion: reduce) {
    .hs-slide { transition: none; }
}


/* ==========================================================================
   7. HOMEPAGE SECTIONS
   ========================================================================== */
.portal-section .section-title,
.portal-section .section-subtitle {
    text-align: center !important;
}

.portal-section .section-title {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 8px;
}

.portal-section .section-subtitle {
    color: var(--portal-text-muted);
    font-size: 1rem;
    margin-bottom: 32px;
}

.portal-section#events-grid {
    max-width: 1280px;
    margin: 0 auto;
    padding: 40px 24px;
    box-sizing: border-box;
}


/* ==========================================================================
   8. EVENT GRID, SEARCH & FILTERS
   ========================================================================== */
.event-filter-wrapper {
    margin-bottom: 30px;
}

.search-box-container {
    max-width: 520px;
    margin: 0 auto 24px !important;
}

#event-search-input {
    width: 100%;
    padding: 12px 20px;
    border-radius: 30px;
    border: 2px solid #e2e8f0;
    font-size: 0.95rem;
    background: #ffffff;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

#event-search-input:focus {
    outline: none;
    border-color: var(--portal-primary);
    box-shadow: 0 4px 14px rgba(0, 128, 128, 0.15);
}

.municipality-filter-bar {
    display: flex;
    justify-content: center !important;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 35px;
}

.filter-btn {
    background: #f1f5f9 !important;
    color: #334155 !important;
    border: 1px solid #cbd5e1 !important;
    padding: 8px 18px !important;
    border-radius: 30px !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
}

.filter-btn.active {
    background: var(--portal-primary) !important;
    color: #ffffff !important;
    border-color: var(--portal-primary) !important;
    box-shadow: 0 4px 12px rgba(0, 128, 128, 0.3);
}

.event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin: 30px 0 60px;
    padding: 0 4px;
}

.event-card {
    background: var(--portal-card-bg);
    border-radius: var(--portal-radius);
    overflow: hidden;
    box-shadow: var(--portal-shadow);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    border: 1px solid #f1f5f9;
}

.event-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--portal-shadow-hover);
}

.event-card-image {
    height: 220px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.event-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.event-card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.event-meta-top {
    margin-bottom: 10px;
}

.event-date {
    font-size: 0.825rem;
    font-weight: 600;
    color: var(--portal-primary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.event-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 12px;
}

.event-title a {
    color: var(--portal-text-main);
    text-decoration: none;
    transition: color 0.2s ease;
}

.event-title a:hover {
    color: var(--portal-primary);
}

.event-excerpt {
    font-size: 0.925rem;
    color: var(--portal-text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.event-card-footer {
    border-top: 1px solid #f1f5f9;
    padding-top: 16px;
}

.event-btn {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--portal-primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.event-btn:hover {
    color: var(--portal-primary-dark);
}


/* ==========================================================================
   9. MUNICIPALITY DIRECTORY & EXPLORER
   ========================================================================== */
/* Municipalities directory page (.mp-): matches the single event page */
body:has(.mp-hero) #page,
body:has(.mp-hero) #content,
body:has(.mp-hero) .site-content {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

html body:has(.mp-hero),
body:has(.mp-hero) #page,
body:has(.mp-hero) .site-content {
    background-color: #f8fafc !important;
}

body:has(.mp-hero) .inside-article,
body:has(.mp-hero) .entry-content {
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
}

body:has(.mp-hero) .entry-header,
body:has(.mp-hero) .page-header,
body:has(.mp-hero) #right-sidebar,
body:has(.mp-hero) #left-sidebar {
    display: none !important;
}

body:has(.mp-hero) #primary { width: 100% !important; float: none !important; }

.mp-hero {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    box-sizing: border-box;
    padding: 150px 40px 110px;
    color: #ffffff;
    background:
        radial-gradient(900px 400px at 85% 0%, rgba(0, 128, 128, 0.45), transparent 70%),
        linear-gradient(135deg, #0f172a 0%, #0b3b46 100%);
}

.mp-hero-inner { max-width: var(--se-max); margin: 0 auto; }

.mp-title {
    font-size: clamp(2rem, 4.5vw, 3.4rem);
    font-weight: 800;
    line-height: 1.15;
    color: #ffffff;
    max-width: 820px;
    margin: 0 0 16px;
}

.mp-lead {
    font-size: clamp(1rem, 1.6vw, 1.15rem);
    line-height: 1.7;
    color: #cbd5e1;
    max-width: 640px;
    margin: 0 0 28px;
}

.mp-stats { display: flex; flex-wrap: wrap; gap: 12px; }

.mp-stat {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #e2e8f0;
}

.mp-stat strong { color: #ffffff; font-size: 1rem; margin-right: 4px; }

.mp-wrap {
    max-width: var(--se-max);
    margin: -50px auto 0;
    padding: 0 40px 80px;
    box-sizing: border-box;
    position: relative;
    z-index: 2;
}

.mp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 30px;
}

.mp-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--portal-card-bg);
    border: 1px solid #f1f5f9;
    border-radius: var(--portal-radius);
    overflow: hidden;
    box-shadow: var(--portal-shadow);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.mp-card:hover { transform: translateY(-6px); box-shadow: var(--portal-shadow-hover); }

.mp-card-media {
    position: relative;
    height: 200px;
    background: linear-gradient(135deg, #0b3b46, #008080) center / cover no-repeat;
    display: flex;
    align-items: flex-end;
}

.mp-card-media::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(15, 23, 42, 0.05) 30%, rgba(15, 23, 42, 0.78));
}

.mp-card-ph {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -60%);
    font-size: 3rem;
    opacity: 0.55;
}

.mp-count {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 1;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.mp-card-name {
    position: relative;
    z-index: 1;
    margin: 0;
    padding: 0 22px 18px;
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.2;
    color: #ffffff;
}

.mp-card-body { padding: 22px 22px 8px; display: flex; flex-direction: column; flex-grow: 1; }

.mp-card-desc {
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--portal-text-muted);
    margin: 0 0 18px;
}

.mp-next {
    margin-top: auto;
    background: #f0fdfa;
    border-left: 4px solid var(--portal-primary);
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.mp-next-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--portal-primary);
}

.mp-next-title { font-size: 0.95rem; color: #0f172a; line-height: 1.35; }
.mp-next-date { font-size: 0.85rem; color: var(--portal-text-muted); }

.mp-card-footer { padding: 16px 22px 22px; }

.mp-link {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--portal-primary);
    text-decoration: none;
}

/* Whole card is clickable through the link */
.mp-link::after { content: ""; position: absolute; inset: 0; z-index: 2; }
.mp-link:hover { color: var(--portal-primary-dark); }
.mp-card:focus-within { outline: 3px solid var(--portal-primary); outline-offset: 2px; }

.mp-cta {
    margin-top: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-left: 5px solid var(--portal-primary);
    border-radius: var(--portal-radius);
    padding: 32px 36px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.mp-cta-title { font-size: 1.4rem; font-weight: 800; color: #0f172a; margin: 0 0 6px; }
.mp-cta-text { margin: 0; max-width: 560px; color: var(--portal-text-muted); line-height: 1.6; }
.mp-cta-btn { display: inline-block; padding: 12px 32px; white-space: nowrap; }

@media (max-width: 900px) {
    .mp-hero { padding: 130px 20px 90px; }
    .mp-wrap { padding: 0 20px 60px; margin-top: -40px; }
    .mp-grid { grid-template-columns: 1fr; }
    .mp-cta { padding: 26px 22px; }
}


/* Single municipality page additions */
.mp-hero--town { background-size: cover; background-position: center; }
.mp-hero--town .mp-stats { margin-top: 4px; }

.mp-section-head { margin: 10px 0 0; }
.mp-section-title { font-size: 1.6rem; font-weight: 800; color: #0f172a; margin: 0; }
.mp-hero--town + .mp-wrap { margin-top: 0; padding-top: 50px; }

.mp-wrap .event-grid { margin: 24px 0 56px; padding: 0; }

.mp-event-venue { font-size: 0.875rem; color: var(--portal-text-muted); margin: -4px 0 10px; }

.mp-event-card--live .event-badge { background: var(--portal-primary); border-color: var(--portal-primary); }
.mp-past .mp-event-card { opacity: 0.8; }
.mp-past .event-card-image { filter: grayscale(0.7); }
.mp-past .mp-event-card:hover { opacity: 1; }
.mp-past .mp-event-card:hover .event-card-image { filter: none; }

.mp-none {
    background: #ffffff;
    border: 1px dashed #cbd5e1;
    border-radius: var(--portal-radius);
    padding: 50px 30px;
    text-align: center;
    margin-bottom: 40px;
}
.mp-none p { color: var(--portal-text-muted); margin: 10px 0 22px; }

.mp-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 10px; }
.mp-chip {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #0f172a;
    padding: 9px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}
.mp-chip:hover { background: var(--portal-primary); border-color: var(--portal-primary); color: #ffffff; }

/* Homepage explorer */
.interactive-map-container {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 40px 24px;
    margin: 40px 0;
    text-align: center;
}

.map-heading {
    font-size: 1.8rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 6px;
}

.map-subheading {
    color: var(--portal-text-muted);
    margin-bottom: 30px;
}

.municipality-interactive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.town-interactive-card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 18px;
    text-decoration: none;
    text-align: left;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

.town-interactive-card:hover {
    transform: translateY(-3px);
    border-color: var(--portal-primary);
    box-shadow: 0 8px 20px rgba(0, 128, 128, 0.12);
}

.town-badge-mini {
    font-size: 0.7rem;
    color: var(--portal-primary);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.town-interactive-card h4 {
    font-size: 1.1rem;
    color: #0f172a;
    margin: 0 0 4px;
}

.town-interactive-card p {
    font-size: 0.8rem;
    color: var(--portal-text-muted);
    margin: 0 0 12px;
    flex-grow: 1;
}

.town-action-btn {
    font-size: 0.825rem;
    font-weight: 700;
    color: var(--portal-primary);
}


/* ==========================================================================
   10. EVENT SUBMISSION FORM
   ========================================================================== */
.event-submit-form {
    max-width: 700px;
    margin: 0 auto;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.event-submit-form label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--portal-text-main);
    margin-bottom: 6px;
}

.event-submit-form input,
.event-submit-form select,
.event-submit-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.95rem;
    box-sizing: border-box;
}

.event-submit-form input:focus,
.event-submit-form select:focus,
.event-submit-form textarea:focus {
    outline: none;
    border-color: var(--portal-primary);
}

.submit-btn {
    background: var(--portal-primary);
    color: #ffffff;
    border: none;
    padding: 12px 28px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s ease;
}

.submit-btn:hover {
    background: var(--portal-primary-dark);
}

.submit-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
}

.submit-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
}

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


/* ==========================================================================
   11. SINGLE EVENT PAGE (.se-), FULL WIDTH
   ========================================================================== */

/* 11a. Release GeneratePress's contained layout; one background everywhere */
.single-provincial_event #page,
.single-provincial_event #content,
.single-provincial_event .site-content {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

html body.single-provincial_event,
.single-provincial_event #page,
.single-provincial_event .site-content,
.single-provincial_event .se-page {
    background-color: #f8fafc !important;
}

.single-provincial_event #right-sidebar,
.single-provincial_event #left-sidebar {
    display: none !important;
}

.se-page {
    width: 100%;
    flex: 1 1 100%;
    min-width: 0;
}

/* Safety net: hides the old injected details bar if that snippet is still
   active. Safe to delete once the "Inject Event Metadata Bar" snippet is off. */
.se-prose .event-hero-meta {
    display: none !important;
}

/* 11b. Hero slideshow */
.se-hero {
    position: relative;
    z-index: 1;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    padding: 150px 40px 120px;
    box-sizing: border-box;
    color: #ffffff;
    overflow: hidden;
    background: #0f172a;
}

.se-hero-slides { position: absolute; inset: 0; z-index: 0; }

.se-hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease;
}

.se-hero-slide.is-active { opacity: 1; }

/* Slow zoom while a slide is showing (stops when paused or reduced-motion) */
.se-hero--slider .se-hero-slide.is-active { animation: se-kenburns 9s ease-out both; }
.se-hero--slider.is-paused .se-hero-slide.is-active { animation: none; }

@keyframes se-kenburns {
    from { transform: scale(1); }
    to   { transform: scale(1.06); }
}

.se-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(rgba(15, 23, 42, 0.55), rgba(15, 23, 42, 0.8));
    pointer-events: none;
}

.se-hero-inner {
    position: relative;
    z-index: 2;
    max-width: var(--se-max);
    margin: 0 auto;
}

/* Slideshow controls: sit in the strip the cards overlap, aligned to content */
.se-hero-controls {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 76px;
    z-index: 3;
    padding: 0 40px;
    box-sizing: border-box;
    pointer-events: none;
}

.se-hero-controls-inner {
    max-width: var(--se-max);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: auto;
}

.se-hero-btn {
    width: 38px;
    height: 38px;
    padding: 0 !important;
    border-radius: 50% !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    background: rgba(15, 23, 42, 0.45) !important;
    color: #ffffff !important;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: background 0.2s ease;
}

.se-hero-btn:hover { background: var(--portal-primary) !important; }
.se-hero-btn:focus-visible,
.se-hero-dot:focus-visible { outline: 3px solid #ffffff; outline-offset: 2px; }

.se-hero-dots { display: flex; align-items: center; gap: 8px; margin: 0 4px; }

.se-hero-dot {
    width: 10px;
    height: 10px;
    padding: 0 !important;
    border-radius: 6px !important;
    border: none !important;
    background: rgba(255, 255, 255, 0.5) !important;
    cursor: pointer;
    transition: all 0.25s ease;
}

.se-hero-dot.is-active { width: 28px; background: #ffffff !important; }

.se-hero-pause { margin-left: 6px; }
.se-hero-pause .ico-play { display: none; }
.se-hero.is-paused .se-hero-pause .ico-pause { display: none; }
.se-hero.is-paused .se-hero-pause .ico-play { display: block; }

@media (prefers-reduced-motion: reduce) {
    .se-hero-slide { transition: none; animation: none !important; }
}

.se-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.85rem;
    margin-bottom: 20px;
    color: #cbd5e1;
}

.se-breadcrumb a { color: #e2e8f0; text-decoration: none; }
.se-breadcrumb a:hover { color: #ffffff; text-decoration: underline; }
.se-breadcrumb .se-current { color: #ffffff; font-weight: 600; }

.se-hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.se-badge {
    background: var(--portal-primary);
    color: #ffffff;
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.se-status {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.se-title {
    font-size: clamp(2rem, 4.5vw, 3.4rem);
    font-weight: 800;
    line-height: 1.15;
    color: #ffffff;
    max-width: 850px;
    margin: 0 0 18px;
}

.se-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 28px;
    font-size: 1.05rem;
    font-weight: 600;
    color: #e2e8f0;
    margin: 0;
}

/* 11c. Body layout */
.se-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 40px;
    max-width: var(--se-max);
    margin: -60px auto 0;
    padding: 0 40px 70px;
    box-sizing: border-box;
    position: relative;
    z-index: 2;
    align-items: start;
}

.se-main {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    margin: 0 !important;
}

.se-prose { font-size: 1.08rem; line-height: 1.85; color: #334155; }
.se-prose > *:first-child { margin-top: 0; }
.se-prose h2 { font-size: 1.5rem; font-weight: 800; color: #0f172a; margin: 1.8em 0 0.6em; }
.se-prose h3 { font-size: 1.2rem; font-weight: 700; color: #0f172a; margin: 1.5em 0 0.5em; }
.se-prose ul { padding-left: 1.2em; }
.se-prose li { margin-bottom: 0.4em; }
.se-prose img { max-width: 100%; height: auto; border-radius: 12px; }

/* 11d. Sidebar card */
.se-sidebar {
    position: sticky;
    top: 24px;
}

.se-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-top: 4px solid var(--portal-primary);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.1);
}

.se-card-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 18px;
}

.se-facts { list-style: none; margin: 0 0 20px; padding: 0; }

.se-facts li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}

.se-facts li:last-child { border-bottom: none; }

.se-fact-icon {
    flex: 0 0 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0fdfa;
    border-radius: 10px;
    font-size: 1.1rem;
}

.se-fact-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--portal-text-muted);
    margin-bottom: 2px;
}

.se-facts strong { font-size: 0.95rem; color: #0f172a; line-height: 1.4; }

.se-inline-link {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--portal-primary);
    text-decoration: none;
    margin-top: 3px;
}

.se-inline-link.se-strong { font-size: 0.95rem; margin-top: 0; }
.se-inline-link:hover { color: var(--portal-primary-dark); text-decoration: underline; }

.se-actions { display: flex; flex-direction: column; gap: 10px; }

.se-btn {
    display: block;
    text-align: center;
    background: var(--portal-primary);
    color: #ffffff !important;
    padding: 12px 18px;
    border-radius: 50px;
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}

.se-btn:hover { background: var(--portal-primary-dark); transform: translateY(-1px); }

.se-btn-outline {
    background: transparent;
    color: var(--portal-primary) !important;
    border: 2px solid var(--portal-primary);
    padding: 10px 18px;
}

.se-btn-outline:hover { background: var(--portal-primary); color: #ffffff !important; }

.se-share { margin-top: 22px; padding-top: 18px; border-top: 1px solid #f1f5f9; }
.se-share-row { display: flex; gap: 10px; margin-top: 8px; }

.se-share-btn {
    flex: 1;
    text-align: center;
    background: #f1f5f9 !important;
    color: #334155 !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 30px !important;
    padding: 8px 14px !important;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.se-share-btn:hover { background: #e2e8f0 !important; }

/* 11e. Related events */
.se-related {
    max-width: var(--se-max);
    margin: 0 auto;
    padding: 0 40px 80px;
    box-sizing: border-box;
}

.se-related-title { font-size: 1.7rem; font-weight: 800; color: #0f172a; margin: 0 0 8px; }
.se-back { margin-top: 10px; }
.se-back a { font-weight: 700; color: var(--portal-primary); text-decoration: none; }
.se-back a:hover { color: var(--portal-primary-dark); }

/* 11f. Tablet & mobile */
@media (max-width: 900px) {
    .se-layout {
        grid-template-columns: 1fr;
        margin-top: -40px;
        padding: 0 20px 60px;
    }
    .se-sidebar { position: static; order: -1; }
    .se-main { padding: 28px 22px; }
    .se-hero { padding: 130px 20px 90px; }
    .se-hero-controls { padding: 0 20px; bottom: 58px; }
    .se-hero-btn { width: 34px; height: 34px; }
    .se-related { padding: 0 20px 60px; }
}


/* ==========================================================================
   12. FOOTER
   ========================================================================== */
.site-footer {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
}

.portal-footer {
    width: 100% !important;
    background: #0f172a;
    color: #94a3b8;
    padding: 60px 20px 30px;
    margin-top: 80px;
    border-top: 4px solid var(--portal-primary);
    box-sizing: border-box;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto 40px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
}

.footer-brand h3 {
    color: #ffffff;
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.footer-brand p {
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-nav h4,
.footer-towns h4 {
    color: #ffffff;
    font-size: 1rem;
    margin-bottom: 16px;
}

.footer-nav ul,
.footer-towns ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-nav li,
.footer-towns li {
    margin-bottom: 10px;
}

.footer-nav a,
.footer-towns a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-nav a:hover,
.footer-towns a:hover {
    color: var(--portal-primary);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 24px;
    border-top: 1px solid #1e293b;
    text-align: center;
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}