/* ===============================================
   TOPCAR CUSTOM MENU - STICKY HEADER
   =============================================== */

/* Header Container */
.topcar-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 99999 !important;
    padding: 15px 0;
    transition: all 0.3s ease;
}

.topcar-header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo Styles */
.topcar-logo {
    display: flex;
    align-items: center;
    z-index: 10;
}

.topcar-logo a,
.topcar-logo img {
    max-height: 40px;
    max-width: 150px;
    height: auto;
    width: auto;
    display: block;
}

.topcar-logo-link {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.topcar-logo-link:hover {
    color: #d3ae54;
}

/* Desktop Navigation */
.topcar-nav-desktop {
    display: flex;
    align-items: center;
    gap: 25px;
}

.topcar-nav-link {
    color: #333;
    text-decoration: none;
    font-size: 16px;
    font-weight: 700;
    transition: color 0.3s ease;
    position: relative;
}

.topcar-nav-link:hover {
    color: #d3ae54 !important;
}

.topcar-nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #d3ae54;
    transition: width 0.3s ease;
}

.topcar-nav-link:hover::after {
    width: 100%;
}

/* Button Styles */
.topcar-btn {
    padding: 12px 24px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    white-space: nowrap;
}

/* Outline Button (Zarezerwuj termin) */
.topcar-btn-outline {
    border: 2px solid #d3ae54;
    color: #d3ae54;
    background-color: transparent;
}

.topcar-btn-outline:hover {
    background-color: #d3ae54 !important;
    border-color: #d3ae54 !important;
    color: #ffffff !important;
}

/* Filled Button (Zadzwoń teraz) */
.topcar-btn-filled {
    border: 2px solid #d3ae54;
    background-color: #d3ae54;
    color: #ffffff;
}

.topcar-btn-filled:hover {
    background-color: transparent !important;
    border-color: #d3ae54 !important;
    color: #d3ae54 !important;
}

/* Hamburger Menu (Mobile) */
.topcar-hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    background: transparent !important;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 100001 !important;
    position: fixed;
    right: 20px;
    top: 18px;
    outline: none !important;
    box-shadow: none !important;
}

.topcar-hamburger:focus,
.topcar-hamburger:active,
.topcar-hamburger:hover {
    background: transparent !important;
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

.topcar-hamburger span {
    width: 100%;
    height: 3px;
    background-color: #333 !important;
    border-radius: 3px;
    transition: all 0.3s ease;
    display: block;
}

.topcar-hamburger.active span:nth-child(1) {
    transform: translateY(10.5px) rotate(45deg);
}

.topcar-hamburger.active span:nth-child(2) {
    opacity: 0;
}

.topcar-hamburger.active span:nth-child(3) {
    transform: translateY(-10.5px) rotate(-45deg);
}

/* Mobile Drawer */
.topcar-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background-color: #ffffff;
    z-index: 100000 !important;
    transition: right 0.4s ease;
    overflow-y: auto;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
}

.topcar-drawer.active {
    right: 0;
}

.topcar-drawer-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
    position: relative;
    z-index: 100003;
}

.topcar-drawer-logo {
    display: flex;
    align-items: center;
}

.topcar-drawer-logo a,
.topcar-drawer-logo img {
    max-height: 35px;
    max-width: 120px;
    height: auto;
    width: auto;
    display: block;
}



/* Drawer Navigation */
.topcar-drawer-nav {
    display: flex;
    flex-direction: column;
    padding: 30px 20px;
    gap: 10px;
}

.topcar-drawer-link {
    color: #333;
    text-decoration: none;
    font-size: 16px;
    font-weight: 700;
    padding: 15px 10px;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    text-align: left;
}

.topcar-drawer-link:hover {
    color: #d3ae54 !important;
    padding-left: 20px;
}

/* Drawer Buttons */
.topcar-drawer-btn-outline {
    border: 2px solid #d3ae54;
    color: #d3ae54;
    background-color: transparent;
    border-radius: 5px;
    margin-top: 10px;
    text-align: center;
    padding: 12px 24px !important;
    font-size: 16px;
    font-weight: 600;
}

.topcar-drawer-btn-outline:hover {
    background-color: #d3ae54 !important;
    border-color: #d3ae54 !important;
    color: #ffffff !important;
}

.topcar-drawer-btn-filled {
    border: 2px solid #d3ae54;
    background-color: #d3ae54;
    color: #ffffff;
    border-radius: 5px;
    margin-top: 5px;
    text-align: center;
    padding: 12px 24px !important;
    font-size: 16px;
    font-weight: 600;
}

.topcar-drawer-btn-filled:hover {
    background-color: transparent !important;
    border-color: #d3ae54 !important;
    color: #d3ae54 !important;
}

/* Body Padding to Account for Fixed Header */
body {
    padding-top: 80px;
}

/* Smooth Scrolling for Anchor Links */
html {
    scroll-behavior: smooth;
}

/* Header Scroll Effect (Optional) */
.topcar-header.scrolled {
    padding: 10px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* Active Navigation Link */
.topcar-nav-link.active {
    color: #d3ae54;
}

.topcar-nav-link.active::after {
    width: 100%;
}

.topcar-drawer-link.active {
    color: #d3ae54;
    font-weight: 600;
}

/* ===============================================
   RESPONSIVE STYLES
   =============================================== */



/* Mobile Devices */
@media screen and (max-width: 964px) {
    .topcar-header {
        padding: 12px 0;
    }

    .topcar-nav-desktop {
        display: none;
    }

    .topcar-hamburger {
        display: flex;
    }

    body {
        padding-top: 70px;
    }
}

/* Small Mobile */
@media screen and (max-width: 480px) {
    .topcar-header-container {
        padding: 0 15px;
    }

    .topcar-logo a,
    .topcar-logo img {
        max-height: 40px;
    }

    .topcar-drawer-nav {
        padding: 20px 15px;
    }

    .topcar-drawer-link {
        font-size: 16px;
    }

    body {
        padding-top: 65px;
    }
}

/* Overlay for Drawer (Optional) */
.topcar-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 99998 !important;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.topcar-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Ukrycie wszystkich przycisków w drawerze */
.topcar-drawer button,
.topcar-drawer .menu-toggle,
.topcar-drawer .close-mobile-menu,
.topcar-drawer .ast-mobile-menu-close {
    display: none !important;
}

/* Ukrycie domyślnych elementów Astra które mogą nakładać się */
.ast-builder-menu-toggle,
.ast-mobile-menu-buttons,
.ast-mobile-header-wrap,
.ast-mobile-popup-drawer,
.ast-mobile-popup-inner,
.ast-desktop-header,
.ast-main-header-wrap,
.site-header,
#masthead,
.ast-mobile-header,
.ast-main-header-bar-wrap,
.main-header-bar,
.ast-header-break-point .ast-mobile-menu-buttons,
.ast-header-break-point .main-header-bar-navigation,
.ast-mobile-popup-content,
.ast-mobile-popup-header,
.close-mobile-menu,
button.menu-toggle,
.menu-toggle,
.ast-button-wrap,
.ast-mobile-menu-close,
.ast-header-mobile-popup-toggle {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* ===============================================
   SELEKTOR JĘZYKA W MENU
   =============================================== */

/* Selektor języka - wspólne style */
.topcar-language-selector-wrapper {
    display: flex;
    align-items: center;
}

.topcar-language-selector {
    padding: 14px 24px !important;
    border: 2px solid #d3ae54 !important;
    border-radius: 5px !important;
    background-color: transparent !important;
    color: #d3ae54 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    height: auto !important;
    min-height: 48px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23d3ae54' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 12px !important;
    padding-right: 36px !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    vertical-align: middle !important;
}

.topcar-language-selector:hover {
    background-color: #d3ae54 !important;
    border-color: #d3ae54 !important;
    color: #ffffff !important;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23ffffff' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") !important;
}

.topcar-language-selector:focus,
.topcar-language-selector:active,
.topcar-language-selector:focus-visible {
    outline: none !important;
    box-shadow: none !important;
    background-color: transparent !important;
    border-color: #d3ae54 !important;
    color: #d3ae54 !important;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23d3ae54' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") !important;
}

/* Option elements */
.topcar-language-selector option {
    background-color: #ffffff !important;
    color: #1a1a1a !important;
    padding: 10px !important;
}

/* Selektor w nawigacji desktop */
.topcar-nav-desktop .topcar-language-selector-wrapper {
    margin-left: 0;
}

/* Selektor w drawerze mobilnym */
.topcar-drawer-language {
    padding: 0 !important;
    margin-top: 5px !important;
}

.topcar-drawer-language .topcar-language-selector {
    width: 100% !important;
    text-align: center !important;
    border-radius: 5px !important;
    margin: 0 !important;
}

.topcar-drawer-language .topcar-language-selector:hover {
    background-color: #d3ae54 !important;
    border-color: #d3ae54 !important;
    color: #ffffff !important;
}

/* Responsywność */
@media screen and (max-width: 964px) {
    .topcar-nav-desktop .topcar-language-selector-wrapper {
        display: none;
    }
}

/* Tablet and Below */
@media screen and (max-width: 1100px) {
    .topcar-nav-desktop {
        gap: 12px;
    }

    .topcar-nav-link {
        font-size: 14px;
    }

    .topcar-btn {
        padding: 10px 18px;
        font-size: 14px;
    }

    .topcar-language-selector {
        padding-top: 12px !important;
        padding-bottom: 12px !important;
        padding-left: 18px !important;
        padding-right: 32px !important;
        font-size: 14px !important;
        min-height: 42px !important;
    }
}