/**
 * Greco Theme - Lokalizacja Photo Hero
 * 4 image variants handled via JS (light/dark x desktop/mobile)
 * Transparent header support + matches wizualizacja.png
 */

/* ========================================
   Transparent header on locations archive
   (same pattern as homepage .home)
   ======================================== */

body.post-type-archive-lokalizacje {
    padding-top: 0 !important;
    background: var(--greco-bg-gradient);
    transition: background 0.3s ease, color 0.3s ease;
}

body.post-type-archive-lokalizacje .site-main {
    background: var(--greco-bg-gradient);
    color: var(--greco-text);
}

body.post-type-archive-lokalizacje .wp-site-blocks > * {
    margin-block-start: 0 !important;
}

body.post-type-archive-lokalizacje .wp-site-blocks {
    gap: 0 !important;
}

body.post-type-archive-lokalizacje .site-main {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

body.post-type-archive-lokalizacje .site-main > * {
    margin-block-start: 0 !important;
}

/* Hero must break out of constrained container */
body.post-type-archive-lokalizacje .locations-hero--photo {
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
    width: 100vw !important;
    max-width: 100vw !important;
}

body.post-type-archive-lokalizacje .site-header:not(.header-scrolled) {
    background: transparent !important;
    box-shadow: none;
    border-bottom-color: transparent;
}

body.post-type-archive-lokalizacje .site-header:not(.header-scrolled) .header-wrapper {
    background: transparent !important;
    background-color: transparent !important;
}

body.post-type-archive-lokalizacje .site-header:not(.header-scrolled) .site-logo {
    filter: brightness(0) invert(1);
}

body.post-type-archive-lokalizacje .site-header:not(.header-scrolled) .main-navigation .menu-item > a:not(.sub-menu a),
body.post-type-archive-lokalizacje .site-header:not(.header-scrolled) .nav-menu > li > a,
body.post-type-archive-lokalizacje .site-header:not(.header-scrolled) .nav-menu > li > .menu-item-label {
    color: #FFFFFF;
}

body.post-type-archive-lokalizacje .site-header:not(.header-scrolled) .nav-menu > li > a:hover,
body.post-type-archive-lokalizacje .site-header:not(.header-scrolled) .nav-menu > li > .menu-item-label:hover {
    color: rgba(255, 255, 255, 0.7);
}

body.post-type-archive-lokalizacje .site-header:not(.header-scrolled) .dropdown-trigger {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
}

body.post-type-archive-lokalizacje .site-header:not(.header-scrolled) .dropdown-icon,
body.post-type-archive-lokalizacje .site-header:not(.header-scrolled) .dropdown-chevron {
    color: #FFFFFF;
}

body.post-type-archive-lokalizacje .site-header:not(.header-scrolled) .dropdown-text {
    color: #FFFFFF;
}

body.post-type-archive-lokalizacje .site-header:not(.header-scrolled) .theme-toggle {
    color: #FFFFFF;
    border-color: rgba(255, 255, 255, 0.25);
}

body.post-type-archive-lokalizacje .site-header:not(.header-scrolled) .mobile-menu-toggle {
    color: #FFFFFF;
}

/* ========================================
   Photo Hero — Container
   ======================================== */

.locations-hero--photo {
    position: relative;
    overflow: hidden;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--wp--preset--spacing--60, 3rem);
    /* Extra top padding so content clears the transparent header */
    padding-top: 80px;
}

/* ========================================
   Background image layer
   Show food at bottom, not sky at top
   ======================================== */

.locations-hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-size: cover;
    background-position: center 70%;
    background-repeat: no-repeat;
    transition: background-image 0.5s ease;
}

/* ========================================
   Overlay
   ======================================== */

.locations-hero__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        180deg,
        rgba(10, 31, 51, 0.55) 0%,
        rgba(10, 31, 51, 0.40) 40%,
        rgba(10, 31, 51, 0.30) 100%
    );
}

.dark-mode .locations-hero__overlay {
    background: linear-gradient(
        180deg,
        rgba(26, 32, 40, 0.65) 0%,
        rgba(42, 52, 64, 0.50) 40%,
        rgba(58, 69, 85, 0.40) 100%
    );
}

/* ========================================
   Content wrapper
   ======================================== */

.locations-hero__content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: clamp(2rem, 5vw, 4rem) 1.5rem;
    text-align: center;
}

/* ========================================
   Title — dark text in light mode
   ======================================== */

.locations-hero__title {
    font-family: var(--wp--preset--font-family--heading);
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 700;
    font-style: normal;
    color: #fff;
    margin: 0 0 1.25rem;
    line-height: 1.15;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.locations-hero__title strong {
    color: #019CFF;
    font-weight: 700;
    font-style: normal;
}

.dark-mode .locations-hero__title strong {
    color: var(--greco-accent);
}

/* ========================================
   Subtitle
   ======================================== */

.locations-hero__subtitle {
    font-size: clamp(0.95rem, 1.5vw, 1.1rem);
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.65;
    margin: 0 auto 2.5rem;
    max-width: 560px;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.2);
}

/* ========================================
   Filter — integrated in hero
   ======================================== */

.locations-hero__filter {
    max-width: 600px;
    margin: 0 auto;
}

.locations-hero__filter-row {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    align-items: center;
}

/* ========================================
   Search input — solid white
   ======================================== */

.locations-hero__search {
    position: relative;
    width: 100%;
}

.locations-hero__search-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
    z-index: 1;
}

.locations-hero__search-input {
    width: 100%;
    padding: 1rem 1.5rem 1rem 3.25rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 9999px;
    font-size: 1rem;
    font-family: var(--wp--preset--font-family--body);
    background: rgba(255, 255, 255, 0.92);
    color: #1f2937;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
    box-sizing: border-box;
}

.locations-hero__search-input::placeholder {
    color: #9ca3af;
}

.locations-hero__search-input:focus {
    outline: none;
    background: #fff;
    border-color: var(--greco-accent);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15), 0 0 0 3px color-mix(in srgb, var(--greco-accent) 25%, transparent);
}

/* Dark mode search */
.dark-mode .locations-hero__search-input {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

.dark-mode .locations-hero__search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.dark-mode .locations-hero__search-icon {
    color: rgba(255, 255, 255, 0.5);
}

.dark-mode .locations-hero__search-input:focus {
    background: rgba(255, 255, 255, 0.18);
    border-color: var(--greco-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--greco-accent) 30%, transparent);
}

/* ========================================
   City pill buttons
   ======================================== */

.locations-hero__cities {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
}

.locations-hero__city-pill {
    padding: 0.55rem 1.4rem;
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    font-weight: 400;
    font-family: var(--wp--preset--font-family--body);
    cursor: pointer;
    transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
    white-space: nowrap;
}

.locations-hero__city-pill:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
}

.locations-hero__city-pill.is-active {
    background: var(--greco-accent);
    border-color: var(--greco-accent);
    color: var(--greco-accent-on);
    font-weight: 500;
    box-shadow: 0 2px 12px color-mix(in srgb, var(--greco-accent) 35%, transparent);
}

/* Dark mode: keep non-active pills readable on dark hero overlay */
.dark-mode .locations-hero__city-pill {
    color: #fff;
}

.dark-mode .locations-hero__city-pill:hover {
    color: #fff;
}

.dark-mode .locations-hero__city-pill.is-active {
    color: #fff;
}

/* ========================================
   Responsive — Tablet
   ======================================== */

@media (max-width: 768px) {
    .locations-hero--photo {
        min-height: 550px;
        padding-top: 70px;
    }

    .locations-hero__content {
        padding: clamp(2rem, 5vw, 3.5rem) 1.25rem;
    }

    .locations-hero__subtitle {
        margin-bottom: 2rem;
    }

    .locations-hero__cities {
        gap: 0.45rem;
    }

    .locations-hero__city-pill {
        padding: 0.45rem 1.1rem;
        font-size: 0.85rem;
    }
}

/* ========================================
   Responsive — Small mobile
   ======================================== */

@media (max-width: 480px) {
    .locations-hero--photo {
        min-height: 500px;
    }

    .locations-hero__content {
        padding: 2rem 1rem;
    }

    .locations-hero__title {
        font-size: 1.8rem;
    }

    .locations-hero__subtitle {
        font-size: 0.9rem;
        margin-bottom: 1.75rem;
    }

    .locations-hero__search-input {
        padding: 0.85rem 1.25rem 0.85rem 3rem;
        font-size: 0.9rem;
    }

    .locations-hero__city-pill {
        padding: 0.4rem 0.9rem;
        font-size: 0.82rem;
    }
}
