/*
 Theme Name:   Houzez Child
 Theme URI:    https://example.com/
 Description:  Motyw potomny dla Houzez
 Author:       Twój Autor
 Author URI:   https://example.com/
 Template:     houzez
 Version:      1.0.1
*/

/* =========================================================
   1. RESET & ZMIENNE
========================================================= */
:root {
    --primary-gold: #c59b27;
    --primary-gold-hover: #a8811d;
    --gold-light: #fbf7ee;
    --dark-color: #121820;
    --dark-surface: #1e2632;
    --text-gray: #556070;
    --light-bg: #f8fafc;
    --border-color: #e2e8f0;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.08);
    --transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--dark-color);
    background-color: var(--light-bg);
    line-height: 1.6;
    overflow-x: hidden;
}


/* =========================================================
   2. HEADER DESKTOP - PASEK GÓRNY (TOP BAR)
========================================================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.top-bar {
    background-color: var(--dark-color);
    color: #94a3b8;
    font-size: 0.825rem;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.container_top {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.slogan {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #cbd5e1;
    font-weight: 500;
}

.slogan i {
    color: var(--primary-gold);
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.top-info-item {
    color: #94a3b8;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.top-info-item:hover {
    color: var(--primary-gold);
}

.social-links {
    display: flex;
    align-items: center;
    gap: 10px;
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    padding-left: 20px;
}

.social-icon {
    color: #94a3b8;
    text-decoration: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    transition: var(--transition);
    font-size: 0.85rem;
}

.social-icon:hover {
    background: var(--primary-gold);
    color: #ffffff;
    transform: translateY(-2px);
}


/* =========================================================
   3. HEADER DESKTOP - GŁÓWNA NAWIGACJA
========================================================= */
.main-nav {
    padding: 16px 0;
    background: #ffffff;
}

.main-nav .container_top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-graphic {
    height: 48px;
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 32px;
    margin: 0;
}

.nav-menu .menu-item {
    position: relative;
}

/* Wymuszenie kolorów linków (nadpisywanie motywu Houzez) */
.site-header .nav-menu .menu-item>a {
    text-decoration: none;
    color: var(--dark-color) !important;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.site-header .nav-menu .menu-item>a:hover,
.site-header .nav-menu .current-menu-item>a,
.site-header .nav-menu .current-menu-ancestor>a {
    color: var(--primary-gold) !important;
}

/* Animowana kreska na dole */
.nav-menu>.menu-item>a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: var(--primary-gold);
    transition: var(--transition);
    border-radius: 2px;
}

.nav-menu>.menu-item:hover>a::after,
.nav-menu>.current-menu-item>a::after,
.nav-menu>.current-menu-ancestor>a::after {
    width: 100%;
}

/* Strzałka Dropdown (FontAwesome) */
.nav-menu .menu-item-has-children>a::before {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.75rem;
    margin-left: 6px;
    transition: var(--transition);
    order: 2;
}

.nav-menu .menu-item-has-children:hover>a::before {
    transform: rotate(180deg);
}


/* =========================================================
   4. HEADER DESKTOP - ROZWIJANE PODMENU (DROPDOWN)
========================================================= */
.nav-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 240px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    padding: 12px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    list-style: none;
    z-index: 1000;
}

.nav-menu .menu-item:hover>.sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.site-header .nav-menu .sub-menu a {
    display: block;
    padding: 10px 20px;
    color: var(--text-gray) !important;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.site-header .nav-menu .sub-menu a:hover,
.site-header .nav-menu .sub-menu .current-menu-item>a {
    background: var(--gold-light) !important;
    color: var(--primary-gold) !important;
    padding-left: 24px;
}

/* FIX: Ostatnie podmenu (Kontakt) otwiera się w lewo, żeby nie ucinało ekranu */
.site-header .nav-menu .menu-item:last-child .sub-menu {
    left: auto !important;
    right: 0 !important;
}


/* =========================================================
   5. HEADER DESKTOP - PRZYCISK CTA (ZADZWOŃ)
========================================================= */
.nav-cta {
    display: flex;
    align-items: center;
}

.phone-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--primary-gold);
    color: #ffffff !important;
    padding: 12px 22px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.925rem;
    box-shadow: 0 4px 14px rgba(197, 155, 39, 0.35);
    transition: var(--transition);
}

.phone-btn:hover {
    background: var(--primary-gold-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(197, 155, 39, 0.45);
}

.phone-btn i {
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.22);
    padding: 6px;
    border-radius: 50%;
}


/* =========================================================
   6. PRZYCISK HAMBURGER MENU (WIDOCZNY TYLKO NA MOBILE)
========================================================= */
.mobile-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.hamburger-icon {
    width: 26px;
    height: 18px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger-icon span {
    display: block;
    height: 2.5px;
    width: 100%;
    background-color: var(--dark-color);
    border-radius: 4px;
    transition: var(--transition);
}

.mobile-toggle.active .hamburger-icon span:nth-child(1) {
    transform: translateY(7.7px) rotate(45deg);
    background-color: #ffffff;
}

.mobile-toggle.active .hamburger-icon span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.mobile-toggle.active .hamburger-icon span:nth-child(3) {
    transform: translateY(-7.7px) rotate(-45deg);
    background-color: #ffffff;
}


/* =========================================================
   7. MOBILNE MENU - WYCIEMNIENIE TŁA (BACKDROP)
========================================================= */
.mobile-backdrop {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(18, 24, 32, 0.6) !important;
    backdrop-filter: blur(4px);
    z-index: 9999998 !important;
    /* Wymuszony bardzo wysoki z-index */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease !important;
}

.mobile-backdrop.active {
    opacity: 1 !important;
    visibility: visible !important;
}


/* =========================================================
   8. MOBILNE MENU - WYSUWANY PANEL (Wersja PANCERNA)
========================================================= */
.mobile-drawer {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    /* Chowamy element przesuwając go w prawo o pełną szerokość okna */
    right: -120vw !important;
    width: 85vw !important;
    /* Wymuszenie szerokości na jednostkach okna */
    max-width: 380px !important;
    height: 100vh !important;
    height: 100dvh !important;
    /* Poprawka pod mobilne Safari i paski adresu */
    background: var(--dark-color) !important;
    color: #ffffff !important;
    z-index: 2147483647 !important;
    /* Maksymalna możliwa wartość z-index w HTML */
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    padding: 32px 24px !important;

    /* ZABIJAMY TRANSFORMACJĘ - używamy tylko właściwości RIGHT */
    transform: none !important;
    transition: right 0.35s ease-in-out !important;
    visibility: visible !important;
    opacity: 1 !important;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5) !important;
    overflow-y: auto !important;
    clip-path: none !important;
    /* Zdejmuje wszelkie maski Elementora */
    margin: 0 !important;
}

.mobile-drawer.active {
    /* Menu wjeżdża dosłownie przyklejając się do prawej krawędzi */
    right: 0 !important;
    transform: none !important;
}

/* =========================================================
   9. MOBILNE MENU - NAWIGACJA WEWNĄTRZ DRAWERA
========================================================= */
.drawer-nav {
    margin: 24px 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.drawer-nav .menu-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.drawer-nav .menu-item>a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    color: #cbd5e1 !important;
    font-size: 1.05rem;
    font-weight: 600;
    padding: 14px 8px;
    transition: var(--transition);
    border-radius: 8px;
}

.drawer-nav .menu-item>a:hover,
.drawer-nav .current-menu-item>a {
    color: var(--primary-gold) !important;
    background: rgba(255, 255, 255, 0.03);
}

/* Strzałka akordeonu generowana przez JS */
.drawer-arrow {
    padding: 4px 10px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.drawer-nav .menu-item.open>a>.drawer-arrow {
    transform: rotate(180deg);
    color: var(--primary-gold);
}

/* Mobilne podmenu (Akordeon) */
.drawer-nav .sub-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease-in-out;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    margin-top: 4px;
    list-style: none;
}

.drawer-nav .sub-menu a {
    display: block;
    padding: 10px 16px 10px 24px;
    color: #94a3b8 !important;
    text-decoration: none;
    font-size: 0.925rem;
    font-weight: 500;
    transition: var(--transition);
}

.drawer-nav .sub-menu a:hover {
    color: var(--primary-gold) !important;
    padding-left: 28px;
}


/* =========================================================
   10. MOBILNE MENU - STOPKA (KONTAKT)
========================================================= */
.drawer-footer {
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: auto;
    /* Wypycha stopkę na dół, jeśli menu jest krótkie */
}

.drawer-cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--primary-gold);
    color: #ffffff !important;
    text-decoration: none;
    padding: 14px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 4px 15px rgba(197, 155, 39, 0.3);
    transition: var(--transition);
}

.drawer-cta-btn:hover {
    background: var(--primary-gold-hover);
}

.drawer-contact-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.85rem;
    color: #94a3b8;
}

.drawer-contact-info a {
    color: #cbd5e1 !important;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.drawer-socials {
    display: flex;
    gap: 12px;
    margin-top: 6px;
}

.drawer-social-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition);
}

.drawer-social-btn:hover {
    background: var(--primary-gold);
}


@media (max-width: 992px) {

    /* Ukrywanie elementów desktopowych na urządzeniach mobilnych */
    .top-bar {
        display: none !important;
    }

    .nav-menu,
    .nav-cta {
        display: none !important;
    }

    /* Pokaż przycisk hamburgera */
    .mobile-toggle {
        display: block;
    }
}


body[data-elementor-device-mode="mobile"] aside#mobileDrawer.mobile-drawer,
body[data-elementor-device-mode="tablet"] aside#mobileDrawer.mobile-drawer {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

body[data-elementor-device-mode="mobile"] aside#mobileDrawer.mobile-drawer.active,
body[data-elementor-device-mode="tablet"] aside#mobileDrawer.mobile-drawer.active {
    transform: translateX(0) !important;
    display: block !important;
}

body[data-elementor-device-mode="mobile"] div#mobileBackdrop.mobile-backdrop.active,
body[data-elementor-device-mode="tablet"] div#mobileBackdrop.mobile-backdrop.active {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

@media (max-width: 992px) {

    body[data-elementor-device-mode="mobile"] aside#mobileDrawer.mobile-drawer.active,
    body[data-elementor-device-mode="tablet"] aside#mobileDrawer.mobile-drawer.active {
        transform: translateX(0) !important;
        display: block !important;
        position: absolute !important;
        right: 0 !important;
    }
}