/* ==========================================================================
   header.css — top bar, logo, desktop & mobile navigation.
   Extracted from the old inline <style> in inc/menu2026.php.
   Depends on tokens from base.css.
   ========================================================================== */

/* Header Container */
.header-container {
    background: var(--white);
    position: relative;
    z-index: 1000;
}

/* Top Bar - Desktop Version */
.top-bar-desktop {
    display: none;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    max-width: 100%;
    margin: 0;
}

@media (min-width: 992px) {
    .top-bar-desktop {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
}

.top-bar-content {
    display: flex;
    align-items: center;
    gap: 30px;
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
}

/* Logo */
.logo-container {
    flex-shrink: 0;
}

.logo {
    height: 50px;
    width: auto;
    object-fit: contain;
}

/* Location */
.location-container {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--dark-gray);
    font-weight: 500;
    font-size: 20px;
    flex-shrink: 0;
}

.location-icon{
  width: 30px;
  height: 30px;
  object-fit: contain;
  display: inline-block;
  flex-shrink: 0;
}

/* Phone */
.phone-container {
    margin-left: auto;
    flex-shrink: 0;
}

.phone-link {
    color: var(--dark-gray);
    font-weight: 600;
    font-size: 18px;
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.phone-link:hover {
    color: var(--primary-blue);
}

.phone-icon{
  width: 30px;
  height: 30px;
  display: inline-block;
  flex: 0 0 30px;
  background: url("/img/phonecall.png") center / contain no-repeat;
}
@media (max-width: 991px){
  .phone-icon{
    width: 30px;
    height: 30px;
    display: inline-block;
    flex: 0 0 24px;
    background-image: url("/img/phonecallmob.png");
  }
}

/* CTA Button */
.cta-container {
    flex-shrink: 0;
}

.cta-button {
    background: linear-gradient(135deg, var(--accent-orange) 0%, #FF8C42 100%);
    color: var(--white);
    border: none;
    padding: 12px 24px;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.2);
    white-space: nowrap;
}

.cta-button:hover {
    background: linear-gradient(135deg, #E55A2E 0%, #FF7B35 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.3);
}

/* Top Bar - Mobile Version */
.top-bar-mobile {
    padding: 8px 7px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
	background: #2C318C;
}

@media (min-width: 992px) {
    .top-bar-mobile {
        display: none;
    }
}

/* Mobile First Row - Location */
.mobile-location-row {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
    color: white;
    font-weight: 500;
    font-size: 14px;
    justify-content: center;	
}

/* Mobile Second Row - Phone & CTA */
.mobile-cta-row {
    display: flex;
    gap: 12px;
}

.mobile-cta-row .phone-link {
    flex: 1;
    min-width: 0;
    justify-content: center;
	color: white;
}

.mobile-cta-row .cta-button {
    flex: 0.7;
    min-width: 0;
    text-align: center;
    padding: 12px 15px;
    font-size: 18px;
}

/* Menu Bar */
.menu-bar {
    background: var(--white);
    border-radius: 0 0 var(--border-radius-xl) var(--border-radius-xl);
    box-shadow: var(--shadow-md);
    margin-top: 5px;
    overflow: visible;
    position: relative;
    z-index: 1000;
}

/* Mobile Menu Header */
.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: var(--white);
    position: relative;
    z-index: 1002;
}

@media (min-width: 992px) {
    .mobile-menu-header {
        display: none;
    }
}

/* Hamburger Menu - INCREASED BY 30% */
.hamburger-menu {
    display: flex;
    flex-direction: column;
    gap: 5.2px; /* Increased from 3px by 30% */
    width: 35px; /* Increased from 24px by 30% */
    height: 35px; /* Increased from 24px by 30% */
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    flex-shrink: 0;
    z-index: 1003;
    justify-content: center;
}

.hamburger-line {
    width: 100%;
    height: 3px; /* Increased from 2px by 30% */
    background: var(--dark-gray);
    border-radius: 2px;
    transition: var(--transition);
}

.hamburger-menu.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px); /* Increased from 3px by 30% */
}

.hamburger-menu.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px); /* Increased from 3px by 30% */
}

/* Mobile Logo Container - INCREASED BY 30% */
.mobile-logo-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
}

.mobile-logo-center .logo {
    height: 55px; /* Increased from 35px by 30% */
}

/* Mobile Navigation - ADDED ROUNDED CORNERS */
.mobile-nav {
    position: fixed;
    top: 0;
    left: -100%;
    width: 85%;
    height: 100%;
    background: var(--white);
    z-index: 1000;
    transition: var(--transition);
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    padding-top: 0;
    border-radius: 0 var(--border-radius-xl) var(--border-radius-xl) 0; /* Added rounded corners */
}

.mobile-nav.open {
    left: 0;
}

.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.mobile-nav-overlay.active {
    display: block;
}

/* Mobile navigation header with close button */
.mobile-nav-header {
    position: sticky;
    top: 0;
    background: var(--white);
    padding: 12px 20px;
    text-align: right;
    z-index: 1002;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border-radius: 0 var(--border-radius-xl) 0 0; /* Added rounded corner */
}

.mobile-close-menu {
    background: none;
    border: none;
    font-size: 32px;
    color: var(--dark-gray);
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: var(--transition);
}

.mobile-close-menu:hover {
    color: var(--primary-blue);
}

/* Desktop Menu - ADDED PADDING TO PREVENT HOVER BACKGROUND FROM COVERING ROUNDED CORNERS */
.desktop-menu {
    display: none;
    background: var(--white);
    border-top: 3px solid var(--logo-blue);
    position: relative;
    z-index: 1000;
    border-radius: 0 0 var(--border-radius-xl) var(--border-radius-xl);
    padding: 0 15px; /* Added padding to prevent hover background from covering rounded corners */
}

@media (min-width: 992px) {
    .desktop-menu {
        display: block;
    }
}

.menu-container {
    display: flex;
    justify-content: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5px;
    gap: 0;
}

.menu-item {
    position: relative;
    flex: 0 1 auto;
    min-width: 0;
    text-align: center;
    border-right: 1px solid var(--menu-border);
}

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

.menu-item > a, .menu-item > .desktop-toggle {
    display: block;
    padding: 16px 8px;
    color: var(--dark-gray);
    text-decoration: none;
    font-size: 13px; /* Уменьшен с 14px */
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    white-space: nowrap;
    background: transparent;
    height: 100%;
    border: none;
    width: 100%;
    text-align: center;
    font-family: inherit;
}

.menu-item > a {
    overflow: visible;
    text-overflow: clip;
}

.menu-item > a:hover, .menu-item > .desktop-toggle:hover {
    background: var(--light-blue);
    color: var(--primary-blue);
}

/* Active menu item */
.menu-item > a.active,
.menu-item > .desktop-toggle.active {
    color: var(--primary-blue);
    background: linear-gradient(to bottom, transparent 90%, var(--primary-blue) 90%);
}

/* First level dropdown menu */
.sub-menu-desktop {
    position: absolute;
    top: 100%;
    left: 0;
    width: 220px;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    border-radius: 0 0 var(--border-radius-md) var(--border-radius-md);
    display: none;
    z-index: 1001;
    transform: translateY(-10px);
    opacity: 0;
    transition: var(--transition);
    border: 1px solid var(--menu-border);
    border-top: 3px solid var(--logo-blue);
}

.menu-item:hover .sub-menu-desktop {
    display: block;
    transform: translateY(0);
    opacity: 1;
}

.sub-item {
    position: relative;
    border-bottom: 1px solid var(--menu-border);
    transition: background-color 0.2s ease;
}

.sub-item:last-child {
    border-bottom: none;
}

.sub-item > a, .sub-item > .desktop-toggle {
    display: block;
    padding: 12px 16px;
    color: var(--dark-gray);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    text-align: left;
    border: none;
    background: transparent;
    width: 100%;
    font-family: inherit;
}

.sub-item > a:hover, .sub-item > .desktop-toggle:hover {
    background: var(--light-blue);
    color: var(--primary-blue);
    padding-left: 20px;
}

/* Second level nested menu */
.sub-menu-inner {
    position: absolute;
    top: 0;
    left: 100%;
    width: 220px;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    border-radius: 0 var(--border-radius-md) var(--border-radius-md) var(--border-radius-md);
    display: none;
    z-index: 1002;
    border: 1px solid var(--menu-border);
    border-left: 3px solid var(--logo-blue);
}

.sub-item:hover .sub-menu-inner {
    display: block;
}

.sub-menu-inner a {
    display: block;
    padding: 12px 16px;
    color: var(--dark-gray);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
    text-align: left;
}

.sub-menu-inner a:hover {
    background: var(--light-blue);
    color: var(--primary-blue);
    padding-left: 20px;
}

/* Dropdown indicator */
.menu-item > .desktop-toggle::after,
.sub-item > .desktop-toggle::after {
    content: "▼";
    font-size: 10px;
    margin-left: 5px;
    opacity: 0.7;
    transition: transform 0.2s ease;
}

.menu-item:hover > .desktop-toggle::after,
.sub-item:hover > .desktop-toggle::after {
    transform: rotate(180deg);
    opacity: 1;
}

/* Right edge positioning fix */
.sub-menu-desktop.right-aligned {
    left: auto;
    right: 0;
}

.sub-menu-inner.right-aligned {
    left: auto;
    right: 100%;
    border-radius: var(--border-radius-md) 0 var(--border-radius-md) var(--border-radius-md);
    border-left: none;
    border-right: 3px solid var(--logo-blue);
}

@media (min-width: 1200px) {
    .menu-item > a, .menu-item > .desktop-toggle {
        font-size: 14px; /* Уменьшен с 15px */
        padding: 18px 12px;
    }
    
    .sub-menu-desktop {
        width: 250px;
    }
    
    .sub-menu-inner {
        width: 250px;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .menu-item > a, .menu-item > .desktop-toggle {
        font-size: 12px; /* Уменьшен с 13px */
        padding: 14px 6px;
    }
    
    /* Add specific padding for menu items to prevent text overflow */
    .menu-item:nth-child(1) > a,
    .menu-item:nth-child(1) > .desktop-toggle {
        padding: 14px 10px;
    }
    
    .menu-item:nth-child(2) > a,
    .menu-item:nth-child(2) > .desktop-toggle {
        padding: 14px 8px;
    }
    
    .menu-item:nth-child(3) > a,
    .menu-item:nth-child(3) > .desktop-toggle {
        padding: 14px 10px;
    }
    
    .menu-item:nth-child(4) > a,
    .menu-item:nth-child(4) > .desktop-toggle {
        padding: 14px 6px;
    }
    
    .menu-item:nth-child(5) > a,
    .menu-item:nth-child(5) > .desktop-toggle {
        padding: 14px 4px;
    }
    
    .menu-item:nth-child(6) > a,
    .menu-item:nth-child(6) > .desktop-toggle {
        padding: 14px 6px;
    }
    
    .menu-item:nth-child(7) > a,
    .menu-item:nth-child(7) > .desktop-toggle {
        padding: 14px 10px;
    }
    
    .menu-item:nth-child(8) > a,
    .menu-item:nth-child(8) > .desktop-toggle {
        padding: 14px 4px;
    }
    
    .menu-item:nth-child(9) > a,
    .menu-item:nth-child(9) > .desktop-toggle {
        padding: 14px 4px;
    }
    
    .menu-item:nth-child(10) > a,
    .menu-item:nth-child(10) > .desktop-toggle {
        padding: 14px 6px;
    }
    
    .menu-item:nth-child(11) > a,
    .menu-item:nth-child(11) > .desktop-toggle {
        padding: 14px 8px;
    }
}

@media (max-width: 991px) {
    .desktop-menu {
        display: none;
    }
}

/* Mobile menu styles */
.mobile-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav li {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.mobile-nav a, .mobile-nav .toggle {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    color: var(--dark-gray);
    text-decoration: none;
    font-size: 16px;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    font-family: inherit;
    white-space: normal;
    word-break: break-word;
    line-height: 1.4;
}

.mobile-nav a:hover, .mobile-nav .toggle:hover {
    background: var(--light-blue);
    color: var(--primary-blue);
}

.menu-icon {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    object-fit: contain;
    flex-shrink: 0;
}

.mobile-nav .toggle .arrow {
    margin-left: auto;
    transition: var(--transition);
    color: var(--medium-gray);
    font-size: 12px;
    flex-shrink: 0;
    margin-left: 10px;
}

.mobile-nav .toggle.open .arrow {
    transform: rotate(180deg);
    color: var(--primary-blue);
}

.sub-menu {
    display: none;
    background: var(--light-gray);
}

.sub-menu.open {
    display: block;
}

/* Utility classes */
body.menu-open {
    overflow: hidden;
}

.mobile-menu-right-space {
    width: 24px;
    flex-shrink: 0;
}

.mobile-phone-container {
    flex: 1;
    display: flex;
    justify-content: center;
	color: white;
}

/* Fix for long menu items in mobile */
@media (max-width: 991px) {
    .mobile-nav a, .mobile-nav .toggle {
        padding: 14px 20px;
        font-size: 15px;
    }
    
    .mobile-nav .toggle {
        align-items: flex-start;
    }
    
    .mobile-nav .toggle span:first-of-type {
        flex: 1;
        text-align: left;
    }
}