/*
Theme Name: Tokarstwo Czapracki
Author: Dawid
Description: Autorski motyw z obsługą ACF dla tokarstwa w drewnie.
Version: 1.2
*/

:root {
    --primary: #8d6e63;
    --primary-dark: #5d4037;
    --accent: #d4a373;
    --dark: #1a1a1a;
    --light: #f8f9fa;
    --white: #ffffff;
    --text: #444444;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; width: 100%; }
body { 
    font-family: 'Montserrat', sans-serif; 
    line-height: 1.7; 
    color: var(--text); 
    overflow-x: hidden; 
    width: 100%;
    padding-top: 75px; /* Dodaj tę linię - dostosuj wartość do wysokości swojego menu */
}


h1, h2, h3, h4, h5, h6 { 
    font-family: 'Playfair Display', serif; 
    color: var(--dark); 
}

.no-scroll { overflow: hidden; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.bg-light { background-color: var(--light); }
.center { text-align: center; }

/* --- SPLASH SCREEN --- */
.no-scroll { overflow: hidden; height: 100vh; touch-action: none; }

#splash-screen {
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100vh; 
    z-index: 99999; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    /* Tło zostało przeniesione do HTML (ACF), więc stąd je usuwamy */
    transition: opacity 0.8s ease, visibility 0.8s;
}

/* Klasa dodawana przez JS w momencie kliknięcia (efekt przejścia) */
.splash-hidden {
    opacity: 0;
    visibility: hidden;
}

.splash-content { display: flex; flex-direction: column; align-items: center; width: 100%; }
.logo-spacer { height: 45vh; min-height: 200px; max-height: 500px; }

#enter-btn {
    font-size: 1rem; padding: 12px 35px; text-transform: uppercase; letter-spacing: 2px;
    background-color: var(--accent); color: var(--white); text-decoration: none; 
    border-radius: 5px; font-weight: 700; box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    transition: all 0.4s ease; animation: pulse 2.5s infinite;
}
@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.03); } 100% { transform: scale(1); } }
/* --- NAWIGACJA --- */
nav {
    background: var(--white);
    padding: 15px 0;
    position: fixed; /* Zmieniono ze sticky na fixed */
    top: 0;
    left: 0;
    width: 100%; /* Wymagane przy position: fixed */
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}
.nav-flex { display: flex; justify-content: space-between; align-items: center; }
.logo { line-height: 1; font-weight: 700; font-size: 1.4rem; color: var(--primary-dark); font-family: 'Montserrat', sans-serif; }
.logo span { color: var(--accent); font-family: 'Playfair Display', serif; }
.logo small { display: block; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 2px; color: #999; font-family: 'Montserrat', sans-serif; }
.nav-links { display: flex; list-style: none; align-items: center; }
.nav-links li a { text-decoration: none; color: var(--dark); font-weight: 600; margin-left: 30px; transition: 0.3s; font-size: 0.9rem; font-family: 'Montserrat', sans-serif; }
.nav-links li a:hover { color: var(--primary); }
.nav-btn {
    background: transparent; /* Usuwa brązowe tło/ramkę */
    color: var(--dark);      /* Zmienia kolor tekstu na ciemny, taki jak w innych linkach */
    padding: 0;             /* Usuwa wewnętrzne odstępy przycisku */
    border: none;           /* Gwarantuje brak jakichkolwiek obramowań */
}
/* Styl dla aktywnego linku w menu */
.nav-links li a.active {
    border: 2px solid var(--primary); /* Brązowa obwódka */
    border-radius: 5px;
    padding: 5px 15px;
    color: var(--primary) !important;
    transition: all 0.3s ease;
}

/* Opcjonalnie: usuń standardowy hover, gdy link jest aktywny, żeby nie „skakał” */
.nav-links li a.active:hover {
    background-color: var(--primary);
    color: var(--white) !important;
}

/* Przycisk Hamburger (domyślnie ukryty na komputerach) */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--primary-dark);
    cursor: pointer;
}

@media (max-width: 992px) {
    .mobile-menu-toggle { 
        display: block; 
    }
    
    .nav-flex { 
        flex-wrap: wrap; 
    }
    
    .nav-links {
        display: none; /* Ukryte do momentu kliknięcia */
        flex-direction: column;
        width: 100%;
        background: var(--white);
        position: absolute;
        top: 100%;
        left: 0;
        padding: 20px 0;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links li { 
        width: 100%; 
        text-align: center; 
        margin: 10px 0; 
    }
    
    .nav-links li a { 
        margin-left: 0; 
        font-size: 1.1rem; 
        display: block; 
        padding: 10px; 
    }
    
    .nav-links li a.nav-btn {
        display: inline-block;
        margin-top: 10px;
    }
}

/* --- HERO --- */
.hero { 
    display: flex; 
    align-items: center; 
    color: var(--white); 
    padding: 40px 0; 
}

/* Kontener musi pozwolić zawartości przesunąć się w prawo */
.hero .container {
    width: 100%;
    display: flex;
    justify-content: flex-start; /* Wypycha blok tekstu do prawej strony */
}

.hero-content { 
    max-width: 1200px; /* Zwiększamy szerokość, by tekst zmieścił się w linii */
    text-align: left; /* Sam tekst wewnątrz bloku pozostaje do lewej (jak na foto) */
}

.hero-title { 
    font-family: 'Playfair Display', serif; 
    font-size: 3.5rem; /* Delikatne zmniejszenie, by łatwiej zmieścić linię */
    line-height: 1.1; 
    margin-bottom: 25px; 
    font-weight: 700; 
}

.hero-title .white-text { 
    display: block; 
    color: #ffffff; 
}

.hero-title .accent-text { 
    display: block; 
    color: var(--accent); 
    white-space: nowrap; /* KLUCZ: To wymusza tekst w jednej linii */
}



.hero-description { 
    font-family: 'Montserrat', sans-serif; 
    font-size: 1.05rem; 
    max-width: 600px; 
    line-height: 1.6; 
    color: rgba(255, 255, 255, 0.9); 
    margin-left: 0; /* Opis trzyma się lewej strony bloku hero-content */
}

/* Responsywność - na komórkach tekst musi się łamać, żeby nie uciekł za ekran */
@media (max-width: 992px) { 
    .hero .container { justify-content: center; }
    .hero-content { text-align: center; }
    .hero-title { font-size: 2.5rem; }
    .hero-title .accent-text { white-space: normal; } /* Pozwalamy na łamanie na małych ekranach */
    .hero-description { margin: 0 auto; }
}
@media (max-width: 768px) { .hero-title { font-size: 2.5rem; } }

/* --- SEKCJE OGÓLNE --- */
section { padding: 80px 0; }
.section-subtitle { display: block; color: var(--accent); text-transform: uppercase; font-weight: 700; letter-spacing: 2px; margin-bottom: 10px; font-size: 0.8rem; }
.section-header h2 { margin-bottom: 40px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.stat-card { background: var(--primary); color: var(--white); padding: 40px; margin-bottom: 20px; border-radius: 10px; }
.stat-card h3 { color: var(--white); margin-bottom: 10px; }

/* --- OFERTA I PODSUMOWANIE --- */
.offer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.offer-card { background: var(--white); padding: 40px; border-radius: 10px; transition: 0.3s; border-bottom: 4px solid transparent; }
.offer-card:hover { transform: translateY(-10px); border-bottom-color: var(--accent); box-shadow: 0 10px 30px rgba(0,0,0,0.05); }

/* Podsumowanie oferty z ACF */
.summary-grid-layout { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; margin-bottom: 30px; }
.personalization-footer { border-top: 1px solid #eee; padding-top: 30px; margin-top: 20px; text-align: center; }
.personalization-footer h4 { font-weight: 700; margin-bottom: 10px; }

/* --- GALERIA HTML (Siatka główna) --- */
.gallery-grid { 
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* To centruje elementy, gdy jest ich mniej niż szerokość kontenera */
    gap: 25px; 
    margin-top: 40px; 
}

.gallery-item { 
    position: relative; 
    height: 350px; 
    /* Obliczamy szerokość: 50% minus połowa odstępu (gap), aby mieściły się dwa w rzędzie */
    width: calc(50% - 13px); 
    min-width: 300px; /* Minimalna szerokość, by na mniejszych ekranach nie były zbyt wąskie */
    overflow: hidden; 
    border-radius: 12px; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.1); 
    cursor: pointer;
    background-color: var(--dark);
}

.gallery-item img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: transform 0.6s ease; /* Płynniejsza animacja jak w oryginale */
    display: block; 
}

.gallery-item .overlay { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(93, 64, 55, 0.8); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    opacity: 0; 
    transition: 0.4s; 
}

.gallery-item .overlay span { 
    color: var(--white); 
    font-family: 'Montserrat', sans-serif; /* Powrót do czcionki z oryginału */
    font-weight: 700;
    font-size: 1rem; 
    text-transform: uppercase; 
    letter-spacing: 2px; 
    padding: 12px 25px; 
    text-align: center; 
    border: 2px solid var(--white); /* Dodana ramka z oryginału */
    transform: translateY(20px); /* Efekt wjeżdżania z dołu */
    transition: 0.4s;
}

.gallery-item:hover img { 
    transform: scale(1.05); 
}

.gallery-item:hover .overlay { 
    opacity: 1; 
}

.gallery-item:hover .overlay span { 
    transform: translateY(0); /* Zakończenie efektu wjeżdżania */
}

/* Responsywność galerii */
@media (max-width: 768px) {
    .gallery-grid { 
        gap: 20px; 
    }
    .gallery-item { 
        width: 100%; /* Na komórkach jedno zdjęcie pod drugim */
        height: 300px; 
    }
}

/* --- MODAL / LIGHTBOX (Odświeżony, przeniesiony z Twojego HTML) --- */
.modal { display: none; position: fixed; z-index: 10001; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.9); align-items: center; justify-content: center; }
.modal-content { max-width: 80%; max-height: 80vh; border: 3px solid var(--accent); border-radius: 5px; }
.close-modal { position: absolute; top: 30px; right: 40px; color: white; font-size: 50px; font-weight: bold; cursor: pointer; }
.modal-nav { position: absolute; width: 100%; display: flex; justify-content: space-between; padding: 0 50px; }
.modal-nav button { background: rgba(212, 163, 115, 0.5); border: none; color: white; font-size: 30px; padding: 15px 20px; cursor: pointer; border-radius: 50%; transition: 0.3s; }
.modal-nav button:hover { background: var(--accent); }

/* --- MINIATURKI W OKNIE MODALNYM --- */
#thumbnails-container.modal { align-items: flex-start; padding: 50px 20px; overflow-y: auto; }
.modal-content-grid { background: var(--dark); width: 100%; max-width: 1000px; margin: 0 auto; padding: 30px; border-radius: 15px; border: 1px solid var(--accent); }
#close-thumbnails { position: fixed; top: 20px; right: 30px; z-index: 10005; color: white; cursor: pointer; font-size: 50px; }
.thumbnails-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 15px; }
.thumb-item { aspect-ratio: 1/1; overflow: hidden; border-radius: 8px; cursor: pointer; border: 2px solid transparent; transition: 0.3s; }
.thumb-item:hover { border-color: var(--accent); transform: scale(1.05); }
.thumb-item img { width: 100%; height: 100%; object-fit: cover; }

/* --- KONTAKT --- */
.contact-wrapper { display: flex; flex-direction: row; gap: 50px; margin-top: 50px; align-items: flex-start; }
.contact-form-col { flex: 1.1; order: 1; background: var(--light); padding: 40px; border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); }
.contact-info-col { flex: 0.9; order: 2; width: 100%; }

/* Formularz CF7 - czysty kod bez important */
.wpcf7 form .wpcf7-form-control:not(.wpcf7-submit) { width: 100%; padding: 15px; margin-bottom: 20px; border: 1px solid #e0e0e0; border-radius: 8px; font-family: 'Montserrat', sans-serif; font-size: 1rem; background: var(--white); color: var(--text); transition: 0.3s; }
.wpcf7 form .wpcf7-form-control:focus { border-color: var(--accent); outline: none; }
.wpcf7 form input[type="submit"] { background-color: var(--accent); color: white; width: 100%; padding: 18px; font-size: 1rem; font-weight: 700; font-family: 'Montserrat', sans-serif; text-transform: uppercase; border: none; border-radius: 8px; cursor: pointer; transition: 0.3s; margin-top: 10px; display: block; -webkit-appearance: none; }
.wpcf7 form input[type="submit"]:hover { transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0,0,0,0.1); filter: brightness(1.1); }
.wpcf7 form p { margin: 0; padding: 0; }

/* Kafelki Kontaktowe */
.contact-tile { display: flex; align-items: center; padding: 25px; background: var(--white); border-radius: 12px; text-decoration: none; color: var(--dark); margin-bottom: 20px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); transition: 0.3s ease; border: 1px solid #eee; }
.contact-tile:hover { background: var(--accent); color: var(--white); transform: translateX(10px); }
.contact-tile .icon-circle { width: 50px; height: 50px; background: var(--light); border-radius: 50%; display: flex; justify-content: center; align-items: center; margin-right: 20px; font-size: 1.2rem; transition: 0.3s; }
.contact-tile:hover .icon-circle { background: rgba(255,255,255,0.2); }
.contact-tile small { display: block; font-size: 0.75rem; text-transform: uppercase; opacity: 0.7; letter-spacing: 1px; }
.contact-tile span { font-weight: 700; font-size: 1.1rem; }

/* WhatsApp i Mapa */
.whatsapp-banner { display: flex; align-items: center; background: #25D366; color: white; padding: 20px; border-radius: 12px; text-decoration: none; transition: 0.3s; margin-bottom: 20px; }
.whatsapp-banner:hover { filter: brightness(1.1); }
.wa-icon { font-size: 2rem; margin-right: 20px; }
.wa-text strong { display: block; font-size: 1.1rem; }
.wa-text span { font-size: 0.85rem; opacity: 0.9; }
.map-container-new iframe { width: 100% !important; height: 100% !important; border: none; border-radius: 12px; }

/* --- STOPKA --- */
footer { background: var(--dark); color: #bbb; padding: 60px 0 20px; text-align: center; }

@media (max-width: 992px) {
    .grid-2, .contact-wrapper { flex-direction: column; grid-template-columns: 1fr; }
    .contact-form-col { order: 2; }
    .contact-info-col { order: 1; }
}

@media (max-width: 768px) {
    #splash-screen {
        /* Kolor pasujący do najciemniejszych elementów drewna na foto */
        background-color: #2a2621 !important; 
        background-size: contain !important;
        background-position: center 20% !important;
        background-repeat: no-repeat !important;
        
        /* Dodajemy cień/gradient, który maskuje górę i dół zdjęcia */
        box-shadow: inset 0 150px 100px -100px #2a2621, 
                    inset 0 -150px 100px -100px #2a2621;
    }

    .logo-spacer {
        height: 35vh !important;
    }
}



/* Responsywne ustawienia dla menu i body */
body {
    padding-top: 75px; /* Domyślny odstęp dla desktopu */
}

@media (max-width: 768px) {
    body {
        padding-top: 60px; /* Mniejszy odstęp na telefonach, jeśli menu jest niższe */
    }

    .nav-links li a.active {
        padding: 4px 10px; /* Mniejszy padding na mobile, aby linki się mieściły */
        font-size: 0.9rem;
        border-width: 1px; /* Cieńsza ramka na małych ekranach */
    }
}

/* Zapobieganie przesunięciom poziomym przy fixed menu */
nav {
    width: 100%;
    left: 0;
    right: 0;
}

/* Główne tło banera */
.cmplz-cookiebanner {
    background-color: var(--dark) !important; /* Twoja czerń #1a1a1a */
    font-family: 'Montserrat', sans-serif !important;
    border-radius: 10px 10px 0 0; /* Zaokrąglone górne rogi */
    padding: 20px !important;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.2);
}

/* Tekst w banerze */
.cmplz-cookiebanner .cmplz-message, 
.cmplz-cookiebanner .cmplz-categories-wrap {
    color: var(--white) !important;
    font-size: 0.9rem !important;
    line-height: 1.6 !important;
}

/* Linki (np. do polityki prywatności) */
.cmplz-cookiebanner a {
    color: var(--accent) !important; /* Twój złoty #d4a373 */
    text-decoration: underline !important;
}

/* Przyciski (Akceptuj) */
.cmplz-cookiebanner .cmplz-btn.cmplz-accept {
    background-color: var(--accent) !important;
    color: var(--white) !important;
    border-radius: 5px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    padding: 12px 25px !important;
    border: none !important;
    transition: 0.3s !important;
}

.cmplz-cookiebanner .cmplz-btn.cmplz-accept:hover {
    filter: brightness(1.1) !important;
}

/* Przycisk ustawień / odmowy (jeśli używasz) */
.cmplz-cookiebanner .cmplz-btn.cmplz-deny, 
.cmplz-cookiebanner .cmplz-btn.cmplz-save {
    background-color: transparent !important;
    color: var(--white) !important;
    border: 1px solid var(--white) !important;
    border-radius: 5px !important;
    margin-right: 10px !important;
}

/* Dostosowanie do telefonów */
@media (max-width: 768px) {
    .cmplz-cookiebanner {
        padding: 15px !important;
    }
    .cmplz-cookiebanner .cmplz-buttons {
        flex-direction: column !important;
        gap: 10px;
    }
    .cmplz-btn {
        width: 100% !important;
        text-align: center;
    }
}