/*
Theme Name: Pecka Ogrodzenia Premium
Theme URI: https://ogrodzeniapecka.patrykdziedzic.pl/
Description: Nowoczesny, biznesowy motyw premium dla firmy Pecka Ogrodzenia. Statyczne tło, brak zbędnych ramek i pełna responsywność.
Version: 1.1.6
Author: Patryk Dziedzic
Text Domain: pecka-ogrodzenia
*/

/* --- KONFIGURACJA ZMIENNYCH GLOBALNYCH --- */
:root {
    --bg-dark: #131212;       
    --bg-card: #326647;       
    --bg-card-hover: #131212; 
    --primary-lime: #76b900;  
    --text-light: #ffffff;    
    --glow: rgba(118, 185, 0, 0.25);
}

/* --- RESET I USTAWIENIA BAZOWE --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', sans-serif;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    overflow-x: hidden;
}

/* ==========================================================================
   PASER NAWIGACJI GÓRNEJ (WIDOK DESKTOP / KOMPUTERY)
   ========================================================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    background: rgba(19, 18, 18, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 15px 5%;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.site-navigation {
    display: flex;
    align-items: center;
    flex-grow: 1;
}

.site-navigation ul,
.site-navigation ul.menu-left-aligned,
.site-navigation > div > ul {
    list-style: none;
    display: flex;
    flex-direction: row;
    gap: 40px;
    margin: 0;
    padding: 0;
    justify-content: flex-start;
    margin-right: auto;
}

.site-navigation ul li {
    position: relative;
}

.site-navigation ul li a,
.site-navigation div > ul li a {
    color: #ffffff;
    text-decoration: none;
    font-size: 1.10rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
    display: inline-block;
}

.site-navigation ul li a:hover,
.site-navigation div > ul li a:hover,
.site-navigation ul li.current-menu-item > a {
    color: var(--primary-lime);
}

.header-phone-right {
    flex-shrink: 0;
    margin-left: 20px;
}

.nav-phone-link {
    color: var(--primary-lime);
    text-decoration: none;
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-phone-link:hover {
    color: #ffffff;
}

.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.menu-toggle:hover {
    color: var(--primary-lime);
}

/* --- UKŁAD PODMENU DESKTOP (DROPDOWN DLA PC) --- */
@media (min-width: 993px) {
    .site-navigation ul li ul,
    .site-navigation div > ul li ul {
        display: none; 
        position: absolute;
        top: 100%;
        left: 0;
        background: #0c0d0d; 
        min-width: 240px;
        flex-direction: column;
        gap: 0;
        padding: 10px 0;
        margin: 0;
        border: 1px solid rgba(255, 255, 255, 0.05);
        border-top: 2px solid var(--primary-lime); 
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.75);
        z-index: 99999;
    }

    .site-navigation ul li ul li,
    .site-navigation div > ul li ul li {
        width: 100%;
    }

    .site-navigation ul li ul li a,
    .site-navigation div > ul li ul li a {
        padding: 12px 20px;
        display: block;
        font-size: 0.95rem; 
        text-transform: none; 
        white-space: nowrap;
        color: #ffffff;
        transition: all 0.3s ease;
    }

    .site-navigation ul li ul li a:hover,
    .site-navigation div > ul li ul li a:hover {
        background: rgba(118, 185, 0, 0.1); 
        color: var(--primary-lime);
        padding-left: 25px; 
    }

    .site-navigation ul li:hover > ul,
    .site-navigation div > ul li:hover > ul {
        display: flex; 
    }
}

/* ==========================================================================
   SEKCJA HERO ORAZ SEKCJE STRONY GŁÓWNEJ
   ========================================================================== */
.hero {
    position: relative;
    width: 100%;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: var(--bg-dark);
    padding: 160px 5% 100px 5%; 
}

.hero-content-static {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 900px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.logo-img {
    max-width: 180px;
    width: 100%;
    height: auto;
    margin: 0 auto 30px auto;
    display: block;
    filter: drop-shadow(0 0 10px rgba(118, 185, 0, 0.15));
}

.hero h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 25px;
    line-height: 1.2;
    letter-spacing: -1px;
    color: var(--text-light);
}

.hero h1 span {
    color: var(--primary-lime);
    text-shadow: 0 0 15px var(--glow);
}

.hero p {
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    color: var(--text-light);
    margin: 0 auto 45px auto;
    line-height: 1.7;
    max-width: 800px;
    font-weight: 500;
    opacity: 0.9;
}

.btn-cta {
    display: inline-block;
    padding: 18px 48px;
    background: transparent;
    color: var(--primary-lime);
    border: 2px solid var(--primary-lime);
    font-size: 1.15rem;
    font-weight: 800;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 1.5px;
    border-radius: 6px;
    box-shadow: 0 0 15px var(--glow);
    transition: background 0.4s, color 0.4s, box-shadow 0.4s, transform 0.3s;
}

.btn-cta:hover {
    background: var(--primary-lime);
    color: var(--bg-dark);
    box-shadow: 0 0 35px var(--primary-lime);
    transform: translateY(-3px);
}

.page-flat-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    background: transparent;
    padding: 0;
    border: none;
    box-shadow: none;
    border-radius: 0;
}

.section-page-bg {
    background-color: var(--bg-dark);
}

.page .entry-header {
    display: none;
}

.section {
    padding: clamp(60px, 8vw, 120px) 5%;
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 50px;
    text-align: center;
    letter-spacing: -1px;
}

.section-title span {
    color: var(--primary-lime);
    text-shadow: 0 0 12px var(--glow);
}

.text-center-max {
    text-align: center;
    max-width: 850px;
    margin: -25px auto 60px auto;
    line-height: 1.7;
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text-light);
}

/* --- PRODUKTY (KARUZELA SWIPER) --- */
.products-container {
    width: 100%;
    padding: 20px 0 60px 0;
}

.product-card {
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-12px);
    border-color: var(--primary-lime);
    box-shadow: 0 20px 40px rgba(118, 185, 0, 0.2);
}

.product-img-wrapper {
    position: relative;
    width: 100%;
    height: 260px;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.product-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.product-card:hover .product-img-wrapper img {
    transform: scale(1.08);
}

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(18, 19, 19, 0.9);
    color: var(--text-light);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    border: 1px solid var(--primary-lime);
    backdrop-filter: blur(5px);
    z-index: 5;
}

.product-info {
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-info h3 {
    font-size: 1.45rem;
    margin-bottom: 15px;
    font-weight: 700;
    color: var(--text-light);
}

.product-info p {
    color: var(--text-light);
    font-size: 0.98rem;
    line-height: 1.6;
    margin-bottom: 25px;
}

.btn-product-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 13px 20px;
    background: transparent;
    color: var(--text-light);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: all 0.4s ease;
    margin-top: 20px;
}

.btn-product-link i {
    margin-left: 8px;
    transition: transform 0.3s ease;
    color: var(--primary-lime);
}

.product-card:hover .btn-product-link {
    border-color: var(--primary-lime);
}

.btn-product-link:hover {
    background: var(--primary-lime);
    color: var(--bg-dark) !important;
    border-color: var(--primary-lime);
    box-shadow: 0 5px 15px var(--glow);
}

.btn-product-link:hover i {
    transform: translateX(5px);
    color: var(--bg-dark);
}

.product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.product-tags span {
    background: rgba(0, 0, 0, 0.2);
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-light);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* --- USŁUGI --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.service-card {
    background: var(--bg-card);
    padding: 45px 35px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(118,185,0,0.15), transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.service-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary-lime);
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
}

.service-card:hover::before {
    opacity: 1;
}

.service-icon {
    font-size: 2.8rem;
    color: var(--primary-lime);
    margin-bottom: 25px;
    text-shadow: 0 0 15px var(--glow);
}

.service-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    font-weight: 700;
    color: var(--text-light);
}

.service-card p {
    color: var(--text-light);
    font-size: 0.98rem;
    line-height: 1.6;
}

/* --- KONTAKT I MAPA --- */
.contact-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    align-items: stretch;
}

.contact-info-panel {
    background: var(--bg-card);
    padding: clamp(30px, 5vw, 55px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-info-panel:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary-lime);
    transition: all 0.5s ease;
}

.contact-method {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
}

.contact-method i {
    font-size: 2rem;
    color: var(--primary-lime);
    margin-right: 25px;
    width: 45px;
    text-align: center;
}

.contact-method div h4 {
    font-size: 0.85rem;
    color: var(--primary-lime);
    text-transform: uppercase;
    margin-bottom: 4px;
    letter-spacing: 1px;
    font-weight: 600;
}

.contact-method div p {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-light);
}

.contact-method div a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-method div a:hover {
    color: var(--primary-lime);
}

.map-container {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    min-height: 450px;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
    filter: grayscale(0.9) invert(0.92) contrast(1.15);
}

/* ==========================================================================
   NOWOCZESNY, ODCHUDZONY I ZWARTY FOOTER
   ========================================================================== */
footer {
    background-color: #0c0d0d;
    padding: 50px 5% 30px 5%;
    border-top: 1px solid #1a1b1b;
    position: relative;
    width: 100%;
}

.footer-grid {
    max-width: 1400px;
    margin: 0 auto 40px auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 30px;
}

.footer-col h4 {
    font-size: 1rem;
    text-transform: uppercase;
    margin-bottom: 20px;
    color: var(--text-light);
    position: relative;
    display: inline-block;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 25px;
    height: 2px;
    background-color: var(--primary-lime);
}

.footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: #ffffff;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    opacity: 0.8;
    display: inline-block;
}

.footer-col ul li a:hover {
    color: var(--primary-lime);
    opacity: 1;
    padding-left: 4px;
}

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 25px;
    border-top: 1px solid #1a1b1b;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 25px;
    font-size: 0.85rem;
    color: var(--text-light);
}

.footer-bottom p {
    opacity: 0.7;
}

.footer-socials {
    display: flex;
    align-items: center;
    gap: 12px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: #181919;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    color: var(--text-light);
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.social-icon:hover {
    color: var(--bg-dark);
    background: var(--primary-lime);
    border-color: var(--primary-lime);
    transform: translateY(-3px);
    box-shadow: 0 0 15px var(--glow);
}

/* ==========================================================================
   URZĘDZENIA MOBILNE (SMARTFONY - SEKCJA ROZWIJANIA SYSTEMU)
   ========================================================================== */
@media (max-width: 992px) {
    .menu-toggle {
        display: block !important;
    }

    .site-navigation {
        position: static !important;
    }

    /* OKNO PANELU MOBILNEGO */
    .site-navigation ul,
    .site-navigation div > ul {
        display: none !important; /* Bezwarunkowo schowane na starcie */
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        background: #131212 !important;
        flex-direction: column !important; 
        gap: 0 !important;
        padding: 10px 0 !important;
        margin: 0 !important;
        border-bottom: 2px solid var(--primary-lime) !important;
        box-shadow: 0 15px 30px rgba(0,0,0,0.6) !important;
        z-index: 999999 !important;
    }

    /* Otwarcie menu głównego po kliknięciu hamburgera */
    .site-navigation.toggled ul,
    .site-navigation.toggled div > ul {
        display: flex !important;
    }

    .site-navigation ul li,
    .site-navigation div > ul li {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        position: static !important; 
    }

    .site-navigation ul li a,
    .site-navigation div > ul li a {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 14px 24px !important; 
        width: 100% !important;
        text-align: left !important;
        font-size: 1rem !important;
        border-bottom: 1px solid rgba(255,255,255,0.03) !important;
        box-sizing: border-box !important;
    }
    
    body.menu-mobile-open {
        overflow: hidden;
    }

    .header-container {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
    
    .header-phone-right {
        margin-left: auto !important;
        padding-right: 15px !important;
    }
    
    .nav-phone-link {
        font-size: 1rem !important;
    }

    .hero { 
        padding-top: 130px; 
        min-height: auto; 
    }
    
    .page-flat-container { 
        padding: 0 15px; 
    }

/* --- POPRAWIONE MENU MOBILNE: PŁASKA LISTA BEZ ROZWIJANIA I BEZ IKON --- */

    /* 1. Wymuszenie stałej widoczności podmenu (zawsze otwarte) */
    .site-navigation ul li ul,
    .site-navigation div > ul li ul {
        display: flex !important; 
        flex-direction: column !important;
        position: static !important; 
        background: #181919 !important; 
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        border: none !important;
        border-left: 4px solid var(--primary-lime) !important; 
        box-shadow: none !important;
    }

    /* 2. Całkowite i twarde wycięcie ikon/strzałek rozwijania */
    .site-navigation ul li a::after,
    .site-navigation div > ul li a::after,
    .site-navigation ul .has-sub-menu-active > a::after,
    .site-navigation div .has-sub-menu-active > a::after,
    .site-navigation ul .has-sub-menu-active.focus > a::after,
    .site-navigation div .has-sub-menu-active.focus > a::after {
        display: none !important;
        content: none !important;
    }

    /* 3. Wygląd i wcięcia linków wewnątrz podmenu */
    .site-navigation ul li ul li a,
    .site-navigation div > ul li ul li a {
        padding: 12px 24px 12px 25px !important; /* Wcięcie o szerokości ramki dla czytelności */
        text-align: left !important;
        font-size: 0.92rem !important;
        text-transform: none !important; 
        border-bottom: 1px solid rgba(255, 255, 255, 0.01) !important;
    }
}

@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    .footer-socials {
        justify-content: center;
        order: -1;
    }
}

/* ==========================================================================
   DUŻE SMARTFONY (PRZEKĄTNA 6,8" - 6,9")
   Dotyczy telefonów typu Samsung Galaxy S23/S24 Ultra, iPhone 15/16 Pro Max
   itp., których szerokość CSS w orientacji pionowej mieści się zwykle
   w przedziale ok. 410px - 500px. Poniższe reguły dostrajają odstępy
   i skalę elementów, które na standardowym breakpoincie 768px/992px
   są wciąż za duże względem faktycznej szerokości ekranu.
   ========================================================================== */
@media (max-width: 500px) {

    /* --- HERO --- */
    .hero {
        padding: 110px 6% 60px 6%;
    }

    .logo-img {
        max-width: 130px;
        margin-bottom: 20px;
    }

    .hero h1 {
        font-size: clamp(1.6rem, 7.5vw, 2.1rem);
        letter-spacing: -0.5px;
        margin-bottom: 18px;
    }

    .hero p {
        font-size: 0.95rem;
        line-height: 1.6;
        margin-bottom: 32px;
    }

    .btn-cta {
        display: block;
        width: 100%;
        padding: 16px 20px;
        font-size: 1rem;
        letter-spacing: 1px;
        text-align: center;
    }

    /* --- SEKCJE OGÓLNE --- */
    .section {
        padding: 50px 6%;
    }

    .section-title {
        font-size: clamp(1.5rem, 7vw, 1.9rem);
        margin-bottom: 30px;
    }

    .text-center-max {
        font-size: 0.92rem;
        line-height: 1.6;
        margin: -10px auto 35px auto;
    }

    /* --- PRODUKTY --- */
    .product-img-wrapper {
        height: 200px;
    }

    .product-info {
        padding: 22px;
    }

    .product-info h3 {
        font-size: 1.25rem;
        margin-bottom: 10px;
    }

    .product-info p {
        font-size: 0.92rem;
        margin-bottom: 18px;
    }

    .btn-product-link {
        padding: 12px 16px;
        margin-top: 14px;
        font-size: 0.85rem;
    }

    /* --- USŁUGI --- */
    .services-grid {
        gap: 20px;
        margin-top: 32px;
    }

    .service-card {
        padding: 30px 22px;
    }

    .service-icon {
        font-size: 2.3rem;
        margin-bottom: 18px;
    }

    .service-card h3 {
        font-size: 1.2rem;
    }

    .service-card p {
        font-size: 0.92rem;
    }

    /* --- KONTAKT I MAPA --- */
    .contact-wrapper {
        gap: 24px;
    }

    .contact-info-panel {
        padding: 26px 22px;
    }

    .contact-method {
        margin-bottom: 22px;
    }

    .contact-method i {
        font-size: 1.5rem;
        margin-right: 14px;
        width: 32px;
    }

    .contact-method div h4 {
        font-size: 0.75rem;
    }

    .contact-method div p {
        font-size: 1.05rem;
    }

    .map-container {
        min-height: 280px;
    }

    /* --- FOOTER --- */
    footer {
        padding: 36px 6% 22px 6%;
    }

    .footer-grid {
        gap: 26px;
        margin-bottom: 28px;
    }

    .footer-col h4 {
        font-size: 0.95rem;
        margin-bottom: 14px;
    }

    .footer-col ul li a {
        font-size: 0.85rem;
    }

    .footer-bottom {
        font-size: 0.8rem;
        padding-top: 18px;
    }

    .social-icon {
        width: 34px;
        height: 34px;
        font-size: 0.9rem;
    }
}
