/* =============================================
   HERO.CSS - Hero i Navbar styles
   ============================================= */

/* === BASE STYLES === */

* { box-sizing: border-box; }

html, body {
    width: 100%;
    max-width: 100%;
    background-color: var(--deep-abyss);
    color: var(--storm-foam);
    margin: 0;
    padding: 0;
    overflow-x: clip;
    font-family: var(--font-liquid);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* === SVG FILTER DEFINITIONS === */
.svg-filters { position: absolute; width: 0; height: 0; }

/* === HERO SECTION: THE STORM === */
.hero-flux {
    height: 100vh;
    height: 100svh;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Wideo w tle z efektem "Mokrej Szyby" */
.hero-bg-container {
    position: absolute;
    inset: 0;
    opacity: 1;
}

.hero-bg-container::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(15,23,42,0.4), rgba(15,23,42,0.2));
    display: block;
}

.hero-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.1);
}

.hero-content {
    z-index: 10;
    text-align: center;
    mix-blend-mode: normal;
}

.hero-title {
    font-family: var(--font-hull);
    font-size: 10vw;
    line-height: 0.9;
    text-transform: uppercase;
    color: #fff;
    margin: 0;
    letter-spacing: -0.02em;
    opacity: 1;
    text-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.1rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-top: 2rem;
    color: rgba(255,255,255,0.9);
    font-weight: 600;
    text-shadow: 0 5px 15px rgba(0,0,0,0.3);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* === META LABEL === */
.meta-label {
    font-family: monospace;
    color: var(--wet-concrete);
    font-size: 0.9rem;
    margin-bottom: 2rem;
    display: block;
    border-left: 2px solid var(--rusty-beacon);
    padding-left: 15px;
}

/* === FLUX BUTTON === */
.flux-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 25px;
    border: 1px solid var(--storm-foam);
    color: var(--deep-abyss);
    background: var(--storm-foam);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: 800;
    font-size: 0.85rem;
    position: relative;
    overflow: hidden;
    transition: color 0.4s cubic-bezier(0.7, 0, 0.3, 1);
    cursor: pointer;
    z-index: 1;
    white-space: nowrap;
    box-sizing: border-box;
}

.flux-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--deep-abyss);
    transition: left 0.4s cubic-bezier(0.7, 0, 0.3, 1);
    z-index: -1;
}

/* Przyciski sticky bara są CIEMNE z jasnym tekstem. Dziedziczona animacja
   ::before (jasne tło) sprawiała, że na hover/klik tło robiło się białe a tekst
   znikał. Dajemy im CIEMNĄ nakładkę (zamiast jasnej), więc biały tekst zostaje
   czytelny. .sticky-phone-btn jest przezroczysty — wyłączamy ::before całkiem. */
.sticky-reserve-btn::before,
.sticky-btn::before {
    background: #333 !important;
}
.sticky-phone-btn::before {
    display: none !important;
}

.flux-btn:hover {
    color: var(--storm-foam);
}

/* Bezpiecznik czytelności: standardowy .flux-btn na hover ma JASNE tło (::before
   slide), więc tekst musi być ciemny. Niektóre dynamiczne przyciski
   "Rezerwuj Labę/Ahoj" dziedziczyły biały kolor → tekst znikał. Wykluczamy
   warianty, które MAJĄ WŁASNE, celowe kolory hover (sticky bar: reserve/phone/
   sticky-btn — ciemne tło + jasny tekst; oraz --white). */
.flux-btn:not(.sticky-reserve-btn):not(.sticky-btn):not(.sticky-phone-btn):not(.flux-btn--white):hover,
.flux-btn:not(.sticky-reserve-btn):not(.sticky-btn):not(.sticky-phone-btn):not(.flux-btn--white):hover * {
    color: var(--storm-foam) !important;
}

.flux-btn:hover::before {
    left: 0;
}

/* Special style for Hero CTA: White -> Black (slide animation) */
#hero-cta {
    background: white !important;
    color: var(--storm-foam) !important;
    border: 1px solid var(--storm-foam) !important;
}

#hero-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--storm-foam) !important;
    z-index: -1;
    transition: left 0.4s cubic-bezier(0.7, 0, 0.3, 1);
}

#hero-cta:hover {
    color: white !important;
}

#hero-cta:hover::before {
    left: 0;
}

/* === NOWOCZESNA RAMA "VIEWFINDER" === */
.laba-visual {
    position: relative;
    height: 70vh;
    z-index: 10;
}

.laba-mask {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
}

/* Techniczne znaczniki w rogach (Viewfinder) */
.laba-visual::before, .laba-visual::after,
.laba-mask::after, .laba-mask::before {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    border: 1px solid var(--rusty-beacon);
    transition: all 0.4s cubic-bezier(0.2, 0, 0.2, 1);
    z-index: 20;
    pointer-events: none;
    opacity: 0.6;
}

/* Zewnętrzne rogi (Lekko odsunięte) */
.laba-visual::before { top: -20px; left: -20px; border-right: none; border-bottom: none; }
.laba-visual::after { bottom: -20px; right: -20px; border-left: none; border-top: none; }

/* Wewnętrzne znaczniki (Krzyże celownicze w rogach maski) */
.laba-mask::before { top: 0; right: 0; border: none; border-right: 4px solid var(--rusty-beacon); height: 15px; width: 0; }
.laba-mask::after { bottom: 0; left: 0; border: none; border-left: 4px solid var(--rusty-beacon); height: 15px; width: 0; }

/* Reakcja na hover - Aktywacja systemu */
.laba-visual:hover::before { top: -10px; left: -10px; opacity: 1; border-width: 2px; }
.laba-visual:hover::after { bottom: -10px; right: -10px; opacity: 1; border-width: 2px; }

.laba-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* === KAPITAN SECTION: VERTICAL FLUX === */
.kapitan-section {
    min-height: 100vh;
    min-height: 100svh;
    padding: 10vh 5vw;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5vw;
    align-items: center;
    position: relative;
    direction: rtl;
}

/* Fix direction for text content */
.kapitan-section > * { direction: ltr; }

.slice-visual {
    position: relative;
    height: 70vh;
    width: 100%;
    display: flex;
    gap: 10px;
}

.slice-strip {
    flex: 1;
    height: 100%;
    position: relative;
    overflow: hidden;
    transition: flex 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    border-right: 1px solid rgba(255,255,255,0.1);
}

.slice-strip:last-child { border: none; }

.slice-img {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 300%;
    object-fit: cover;
    filter: grayscale(100%) sepia(20%);
    transition: all 0.5s;
}

/* Pozycjonowanie obrazka wewnątrz pasków, żeby tworzył całość */
.slice-strip:nth-child(1) .slice-img { left: 0; }
.slice-strip:nth-child(2) .slice-img { left: -100%; }
.slice-strip:nth-child(3) .slice-img { left: -200%; }

/* Interakcja */
.slice-visual:hover .slice-strip {
    flex: 1;
}

.slice-visual:hover .slice-strip:hover {
    flex: 2;
}

.slice-visual:hover .slice-img {
    filter: grayscale(0%) sepia(0%);
    transform: scale(1.05);
}

.bg-watermark-left {
    position: absolute;
    top: 50%;
    left: -10%;
    font-family: var(--font-hull);
    font-size: 20rem;
    color: rgba(0,0,0,0.03);
    pointer-events: none;
    z-index: 1;
    transform: rotate(-90deg) translateY(-50%);
}

/* === NAVIGATION === */
.navbar {
    position: fixed;
    top: -100px;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 15px 0;
    background-color: transparent;
    transition: top 0.4s ease, background-color 0.3s, padding 0.3s;
}

.navbar:hover {
    padding: 20px 0;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

.navbar.scrolled {
    top: 0;
    background-color: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(15px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    padding: 8px 0;
}

.navbar.scrolled:hover {
    padding: 15px 0;
}

.navbar-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 4vw;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.logo {
    font-family: var(--font-hull);
    font-size: 1.5rem;
    text-transform: uppercase;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.05em;
    white-space: nowrap;
    flex-shrink: 0;
    transition: font-size 0.3s, color 0.3s;
}

.navbar.scrolled .logo {
    color: var(--storm-foam);
    font-size: 1rem;
}

.nav-menu {
    list-style: none;
    display: flex;
    /* Płynny odstęp — kurczy się z szerokością okna, więc menu mieści się
       dłużej bez skoków. */
    gap: clamp(10px, 1.4vw, 22px);
    align-items: center;
    margin: 0;
    flex-wrap: nowrap;
    justify-content: flex-end;
}

/* KASKADA DOPASOWANIA (desktop): płynny font + odstępy (clamp), a o zwinięciu
   do hamburgera decyduje JS (mobile-nav.js) mierząc realne dopasowanie.
   UWAGA: NIE chowamy napisu "Moje rezerwacje" przez media query — zmiana
   szerokości menu „w locie" tworzyła drugą strefę dopasowania i powodowała
   migotanie (hamburger ↔ menu ↔ hamburger). Font kurczy się płynnie (clamp),
   więc jest jedno czyste przejście. */
@media (min-width: 769px) and (max-width: 1100px) {
    .navbar-container {
        padding: 0 2.5vw;
    }
    .logo {
        font-size: clamp(1.1rem, 1.6vw, 1.5rem);
    }
}

.nav-menu a {
    text-decoration: none;
    color: #fff;
    /* Płynny rozmiar — zmniejsza się z szerokością okna, więc całe menu
       mieści się dłużej w jednej linii zanim trzeba cokolwiek chować. */
    font-size: clamp(0.68rem, 0.55rem + 0.4vw, 0.8rem);
    font-family: var(--font-liquid);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.9;
    transition: all 0.3s;
    white-space: nowrap;
}

.nav-menu a:hover {
    opacity: 1;
    color: var(--rusty-beacon);
}

.navbar.scrolled .nav-menu a {
    color: var(--storm-foam);
}

.navbar.scrolled .nav-menu a:hover {
    color: var(--rusty-beacon);
}

.nav-cta {
    padding: 12px 30px;
    font-size: 0.9rem;
    background: var(--rusty-beacon);
    color: #fff !important;
    border-radius: 2px;
    font-weight: 700;
    opacity: 1 !important;
    box-shadow: 0 10px 20px rgba(214, 64, 0, 0.2);
    transition: all 0.3s;
}

.nav-cta:hover {
    background: var(--storm-foam);
    transform: translateY(-2px);
}

.navbar.scrolled .nav-cta {
    padding: 6px 15px;
    font-size: 0.8rem;
    box-shadow: none;
}

.navbar.scrolled:hover .nav-cta {
    padding: 12px 30px;
    font-size: 0.9rem;
    box-shadow: 0 10px 20px rgba(214, 64, 0, 0.2);
}

/* Mobile Toggle (Simple version) */
.menu-toggle {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    order: 3;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
}

.navbar.scrolled .menu-toggle span {
    background: var(--storm-foam);
}

/* Mobile nav action buttons - hidden on desktop */
.mobile-nav-actions {
    display: none;
    align-items: center;
    gap: 0.5rem;
    order: 3;
}

.mobile-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 4px;
    font-family: var(--font-hull);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.mobile-nav-call {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.5);
    color: #fff;
    padding: 8px;
}

.mobile-nav-call svg {
    width: 18px;
    height: 18px;
}

.mobile-nav-book {
    background: var(--rusty-beacon);
    color: #fff;
    border: none;
}

.navbar.scrolled .mobile-nav-call {
    border-color: var(--storm-foam);
    color: var(--storm-foam);
}

.navbar.scrolled .mobile-nav-book {
    background: var(--rusty-beacon);
    color: #fff;
}

/* Fix for sticky navbar overlaying section content on scroll */
section,
#zarezerwuj,
#apartament-laba,
#ogrod,
#lokalizacja,
#goscie-section,
#faq-section,
#kontakt {
    scroll-margin-top: 120px;
}

/* === EDITORIAL TYPO LIST (NO PHOTO) === */
.sc-25-container {
    position: relative;
    width: 100%;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.sc-25-list {
    width: 100%;
    z-index: 2;
}

/* === LOCATION GRID LAYOUT === */
.location-grid-container {
    width: 100%;
    padding: 0 var(--space-lg);
}

.sc-25-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md) var(--space-2xl);
    width: 100%;
}

@media (max-width: 768px) {
    .sc-25-grid {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
    }
}

/* === Account icon in navbar === */
.nav-account-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    opacity: 0.7;
    transition: opacity 0.2s, color 0.2s;
    padding: 4px;
    margin-left: 4px;
}

.nav-account-link:hover {
    opacity: 1;
}

.nav-account-link.logged-in {
    opacity: 1;
    color: var(--rusty-beacon) !important;
}

.nav-account-link.logged-in svg {
    stroke: var(--rusty-beacon);
}

.navbar.scrolled .nav-account-link.logged-in svg {
    stroke: var(--rusty-beacon);
}

/* "Moje rezerwacje" text label — visible on desktop, inherits nav typography */
.nav-account-text {
    display: inline;
}

/* Mobilny skrót do konta obok hamburgera — ukryty na desktopie. */
.nav-account-mobile {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    color: #fff;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    order: 2;
    margin-left: auto;
    margin-right: 0.6rem;
}
.nav-account-mobile:hover {
    background: rgba(255, 255, 255, 0.12);
}
.navbar.scrolled .nav-account-mobile {
    color: var(--storm-foam);
    border-color: rgba(0, 0, 0, 0.18);
}
.nav-account-mobile.logged-in {
    color: var(--rusty-beacon);
    border-color: var(--rusty-beacon);
}

/* On mobile (≤768px):
   - pokaż skrót konta obok hamburgera
   - w wysuwanym menu (drawer) pokaż tekst "Moje rezerwacje" przy ikonie
     (jest miejsce, więc nie ukrywamy go tam) */
@media (max-width: 768px) {
    .nav-account-mobile {
        display: flex;
    }
    /* W drawerze pokazujemy pełny wpis z tekstem */
    .nav-account-text {
        display: inline;
    }
    .nav-menu .nav-account-link {
        gap: 0.6rem;
    }
}

/* Krok pośredni kaskady (klasa .nav-tight z JS): menu nadal poziome, ale napis
   "Moje rezerwacje" schowany — zostaje wyróżniona okrągła ikona konta. */
.navbar.nav-tight .nav-account-item .nav-account-text {
    display: none;
}
.navbar.nav-tight .nav-account-link {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1.5px solid currentColor;
    opacity: 1;
    padding: 0;
}

/* ═══════════════════════════════════════════════
   NAVBAR — kolaps STEROWANY DOPASOWANIEM (klasa .nav-collapsed z JS)
   Hamburger pojawia się dokładnie gdy menu przestaje się mieścić w jednej
   linii — nie na sztywnym progu szerokości. JS (mobile-nav.js) mierzy
   szerokość i dodaje/zdejmuje .nav-collapsed na #navbar.
   ═══════════════════════════════════════════════ */
.navbar.nav-collapsed .menu-toggle {
    display: flex !important;
}
.navbar.nav-collapsed .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    left: auto;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background-color: var(--canvas, #fff);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    flex-wrap: nowrap;
    padding: 4rem 1.5rem 2rem;
    box-shadow: -8px 0 30px rgba(0,0,0,0.15);
    transition: right 0.3s ease;
    z-index: 998;
    gap: 1.25rem;
    overflow-y: auto;
}
.navbar.nav-collapsed .nav-menu.active {
    right: 0;
    left: auto;
}
.navbar.nav-collapsed .nav-menu a {
    color: var(--storm-foam, #1e293b);
}
.navbar.nav-collapsed .nav-menu .nav-cta {
    display: none;
}
/* W drawerze konto zawsze z tekstem */
.navbar.nav-collapsed .nav-account-text {
    display: inline;
}
/* Skrót konta obok hamburgera widoczny gdy menu zwinięte */
.navbar.nav-collapsed .nav-account-mobile {
    display: flex;
}

/* Fallback bez JS: poniżej 768px zawsze pokaż hamburger (gdyby JS nie zadziałał). */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex !important;
    }
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        left: auto;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: var(--canvas, #fff);
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        flex-wrap: nowrap;
        padding: 4rem 1.5rem 2rem;
        box-shadow: -8px 0 30px rgba(0,0,0,0.15);
        transition: right 0.3s ease;
        z-index: 998;
        gap: 1.25rem;
        overflow-y: auto;
    }
    .nav-menu.active {
        right: 0;
        left: auto;
    }
    .nav-menu a {
        color: var(--storm-foam, #1e293b);
    }
    .nav-menu .nav-cta {
        display: none;
    }
    .nav-account-text {
        display: inline;
    }
    .nav-account-mobile {
        display: flex;
    }
}

/* Bardzo ciasno (≤380px): ukryj okrągły skrót konta obok hamburgera. */
@media (max-width: 380px) {
    .nav-account-mobile {
        display: none;
    }
    .logo {
        font-size: 1.15rem;
    }
}

/* Mobile: navbar przylega do samej góry — mniejszy padding, by nie było
   widocznego odstępu nad logo/hamburgerem przy górnej krawędzi ekranu. */
@media (max-width: 768px) {
    .navbar,
    .navbar:hover,
    .navbar.scrolled,
    .navbar.scrolled:hover {
        padding: 6px 0;
    }
    /* Gdy navbar jest widoczny (scrolled) — dosuń go do samej krawędzi. */
    .navbar.scrolled {
        top: 0;
        margin-top: 0;
    }
}

