/**
 * Holland House - shared.css
 * Wspólne style dla wszystkich szablonów: nawigacja, footer, helpery.
 * Ładowane przez wp_enqueue_style w functions.php (zawsze, na każdej stronie).
 */

:root {
    --gold: #027a4d;
    --dark: #0f0f0f;
    --marble: #f4f4f4;
    --text-gray: #888;
    --transition-smooth: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ===== Navigation - layout containera ===== */
#main-nav {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 10001 !important;
    display: block !important;
    padding: 0 !important;
    background: transparent;
    transition: background 0.8s ease;
}

#main-nav.scrolled {
    background: rgba(15, 15, 15, 0.98) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(2, 122, 77, 0.15);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 5%;
    width: 100%;
    box-sizing: border-box;
}

.logo-img {
    height: 70px;
    width: auto;
    display: block;
    transition: var(--transition-smooth);
}

#main-nav.scrolled .logo-img { height: 55px; }

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-links li { list-style: none; }

.nav-links a {
    color: white;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 2px;
    font-weight: 600;
    transition: color 0.3s;
}

.nav-links a:hover { color: var(--gold); }

.hamburger {
    cursor: pointer;
    color: white;
    font-size: 1.5rem;
    display: none;
    padding: 10px;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
}

@media (max-width: 1024px) {
    .nav-container { padding: 5px 5%; }
    .logo-img { height: 50px; }
    .nav-links { display: none !important; }
    .hamburger {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        z-index: 9999 !important;
    }
}

/* ===== Mobile menu ===== */
.mobile-menu {
    position: fixed;
    inset: 0;
    background: var(--dark);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px;
    transform: translateY(-100%);
    transition: var(--transition-smooth);
}

.mobile-menu.active { transform: translateY(0); }

.mobile-menu a {
    color: white;
    font-size: 1.5rem;
    text-decoration: none;
    font-family: 'Playfair Display', serif;
}

/* ===== Ticker (tylko Home) ===== */
.ticker-wrap {
    width: 100%;
    height: 40px;
    background: linear-gradient(90deg, #bf953f 0%, #fcf6ba 50%, #b38728 100%);
    overflow: hidden;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1001;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.ticker {
    display: flex;
    white-space: nowrap;
    animation: ticker 30s linear infinite;
}

.ticker:hover { animation-play-state: paused; }

.ticker-item {
    display: inline-block;
    padding: 0 50px;
    font-size: 0.8rem;
    color: var(--dark);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
}

.ticker-item span {
    color: rgba(0, 0, 0, 0.5);
    margin-right: 15px;
    font-weight: 400;
}

@keyframes ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ===== Sticky mobile bar (tylko Home) ===== */
.sticky-mobile-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: #0f0f0f;
    border-top: 1px solid var(--gold);
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
}

.sticky-item {
    padding: 12px 5px;
    text-align: center;
    text-decoration: none;
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #ffffff !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border-right: 1px solid rgba(197, 160, 89, 0.2);
}

.sticky-item i {
    font-size: 1.1rem;
    color: var(--gold);
}

.sticky-item:last-child { border-right: none; }

.sticky-item.highlight {
    background: var(--gold) !important;
    color: #ffffff !important;
    font-weight: 800;
}

.sticky-item.highlight i { color: #ffffff !important; }

/* ===== Preloader ===== */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
}

.glitch {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    position: relative;
    color: white;
}

.glitch::before,
.glitch::after {
    content: 'Holland House';
    position: absolute;
    inset: 0;
    opacity: 0.8;
}

.glitch::before {
    color: #ff00c1;
    z-index: -1;
    animation: glitch-anim 0.3s infinite;
}

.glitch::after {
    color: #00fff9;
    z-index: -2;
    animation: glitch-anim 0.3s infinite reverse;
}

@keyframes glitch-anim {
    0%   { transform: translate(0); }
    20%  { transform: translate(-3px, 3px); }
    40%  { transform: translate(-3px, -3px); }
    60%  { transform: translate(3px, 3px); }
    80%  { transform: translate(3px, -3px); }
    100% { transform: translate(0); }
}

@media (max-width: 480px) {
    .glitch { font-size: 2rem; }
    #preloader p { font-size: 0.7rem; }
}

/* ===== Footer ===== */
footer {
    background: #050505;
    padding: 100px 10% 50px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    border-top: 1px solid #222;
    color: var(--marble);
    font-family: 'Montserrat', sans-serif;
}

footer h4 {
    color: var(--gold);
    margin-bottom: 30px;
    text-transform: uppercase;
    font-size: 0.95rem;
    letter-spacing: 2px;
}

footer a {
    color: #888;
    text-decoration: none;
    display: block;
    margin-bottom: 15px;
    transition: 0.3s;
}

footer a:hover { color: var(--gold); }

footer p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.8;
    margin: 0;
}

.footer-credit {
    background: #050505;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 30px 5%;
    text-align: center;
    color: #888;
    font-size: 0.8rem;
    font-family: 'Montserrat', sans-serif;
}

/* Footer credit logo - poprawka rozciągnięcia */
.footer-credit img {
    height: 22px !important;
    width: auto !important;
    max-width: 140px;
}

/* Footer - linki prawne (polityka / regulamin) */
.footer-legal {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

.footer-legal a {
    color: #888;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-legal a:hover {
    color: var(--gold);
}

.footer-legal-sep {
    color: #444;
}

@media (max-width: 1024px) {
    footer {
        grid-template-columns: 1fr;
        padding-bottom: 120px;
    }
    .footer-credit { padding-bottom: 120px; }
}

/* ============================================================
 * CF7 BRIDGE
 * Contact Form 7 owija każde pole w <span class="wpcf7-form-control-wrap">
 * i tworzy własny <form class="wpcf7-form">. Te reguły mapują strukturę CF7
 * na oryginalne style formularzy (kontakt, rezerwacja, newslettery).
 * ============================================================ */

/* Ogólne: wrapper pola jako block */
.wpcf7-form-control-wrap { display: block; }

/* --- Formularz kontaktowy: .contact-form (div) > .wpcf7-form --- */
.contact-form .wpcf7-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}
.contact-form .form-group .wpcf7-form-control-wrap { display: block; width: 100%; }
.contact-form .form-group .wpcf7-form-control { width: 100%; }

/* --- Formularz rezerwacji: .reservation-form-cf7 > .wpcf7-form --- */
.reservation-form-cf7 .form-group .wpcf7-form-control-wrap { display: block; width: 100%; }
.reservation-form-cf7 .form-group .wpcf7-form-control { width: 100%; }
/* Defensywa na ewentualne puste <p> z auto-formatowania CF7 wewnątrz gridu */
.reservation-form-cf7 .form-grid > p:empty { display: none; }
.reservation-form-cf7 .form-grid > p { margin: 0; }

/* --- Newsletter (blog): .newsletter-form (div) > .wpcf7-form --- */
.newsletter-form .wpcf7-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
}
.newsletter-form .wpcf7-form .wpcf7-form-control-wrap { flex: 1; display: block; }
.newsletter-form .wpcf7-form .wpcf7-form-control-wrap input { width: 100%; }

/* --- Newsletter (stopka): .footer-newsletter-form > .wpcf7-form --- */
.footer-newsletter-input {
    width: 100%;
    padding: 15px;
    background: transparent;
    border: 1px solid #333;
    color: white;
    margin-bottom: 10px;
}
.footer-newsletter-form .wpcf7-form-control-wrap { display: block; width: 100%; }

/* --- Komunikaty walidacji i odpowiedzi (ciemny motyw) --- */
.wpcf7 .wpcf7-not-valid-tip {
    color: #ff6b6b;
    font-size: 0.8rem;
    margin-top: 5px;
}
.wpcf7 form .wpcf7-response-output {
    margin: 15px 0 0;
    padding: 12px 18px;
    border-radius: 2px;
    font-size: 0.85rem;
}
/* CF7 spinner - dystans od przycisku */
.wpcf7 .wpcf7-spinner { margin: 0 0 0 12px; }
