/* Top Bar */
.top-bar {
    background: #246277;
    color: white;
    padding: 8px 30px;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    overflow: hidden;
    max-height: 50px;
    transition: var(--transition);
}

#header-placeholder.scrolled .top-bar {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
}

.top-bar-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-info {
    display: flex;
    gap: 20px;
}

.top-info span, .top-info a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
    opacity: 0.9;
}

.top-social {
    display: flex;
    gap: 15px;
}

.top-social a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    opacity: 0.8;
    transition: var(--transition);
}

.top-social a:hover {
    opacity: 1;
    color: var(--accent-color);
}

/* Header Styles */
#header-placeholder {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
}

header {
    height: var(--header-height);
    background: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: var(--transition);
}



header.scrolled {
    height: 80px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
}

.logo-container {
    height: 100%;
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}

.logo-container img {
    height: 70px;
    width: auto;
    max-width: 280px;
    object-fit: contain;
    transition: var(--transition);
}

header.scrolled .logo-container img {
    height: 55px;
}

/* Navigation */
nav {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 40px;
}

.nav-links li a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 500;
    font-size: 1.1rem;
    position: relative; /* CRITICAL for underline positioning */
    transition: var(--transition);
}

.nav-links li a::after {
    content: '';
    position: absolute;
    bottom: -8px; /* Positioned at the bottom of the text */
    left: 0;
    width: 0;
    height: 3px; /* Slightly thicker for visibility */
    background: var(--accent-color);
    transition: var(--transition);
}

.nav-links li a:hover {
    color: var(--accent-color);
}

.nav-links li a:hover::after {
    width: 100%;
}

/* Dropdown Menu */
.has-dropdown {
    position: relative;
}

.has-dropdown > a {
    display: flex;
    align-items: center;
    gap: 5px;
}

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    list-style: none;
    padding: 15px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    border-radius: 0 0 10px 10px;
}

.has-dropdown:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown li a {
    padding: 10px 25px;
    display: block;
    color: var(--primary-color);
    font-size: 0.95rem;
    font-weight: 400;
}

.dropdown li a::after {
    display: none; /* No underline for dropdown links */
}

.dropdown li a:hover {
    background: #f9f9f9;
    color: var(--accent-color);
    padding-left: 30px;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 25px;
    flex: 0 0 auto; /* Keep natural size on the right */
}

.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.3rem;
    color: var(--primary-color);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-btn:hover {
    color: var(--accent-color);
    transform: scale(1.1);
}

/* Search Container */
.search-container {
    display: flex;
    align-items: center;
    position: relative;
    background: rgba(0,0,0,0.03);
    border-radius: 50px;
    padding: 2px;
    transition: var(--transition);
    border: 1px solid transparent;
}

.search-container:focus-within {
    background: white;
    border-color: var(--accent-color);
    box-shadow: 0 0 15px rgba(212, 117, 34, 0.1);
}

.search-container input {
    width: 0;
    opacity: 0;
    border: none;
    outline: none;
    background: none;
    padding: 0;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-container.active input {
    width: 200px;
    padding: 0 15px 0 20px;
    opacity: 1;
}

.search-container .action-btn {
    padding: 8px;
    border-radius: 50%;
    z-index: 2;
}

@media (max-width: 1200px) {
    .search-container.active input {
        width: 150px;
    }
}

@media (max-width: 480px) {
    .search-container.active input {
        width: 120px;
    }
}

.mobile-menu-btn {
    display: none;
}

/* Mobile Menu Overlay */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: white;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    transition: all 0.5s cubic-bezier(0.77, 0, 0.175, 1);
}

.mobile-nav.active {
    right: 0;
}

.mobile-nav-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 6%;
    border-bottom: 1px solid #f0e6df;
}

.mobile-logo img {
    height: 48px;
    width: auto;
    object-fit: contain;
}

.mobile-menu-links {
    list-style: none;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    margin: 40px 0;
    flex: 1;
    justify-content: center;
}

.mobile-menu-links li {
    width: 100%;
    text-align: center;
}

.mobile-link, .mobile-link-title {
    text-decoration: none;
    font-size: 2rem;
    font-family: 'Playfair Display', serif;
    color: #2c1810;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    padding: 5px 25px;
    display: inline-block;
}

.mobile-link:hover, .mobile-link-title:hover {
    color: var(--accent-color, #E88D23);
    transform: scale(1.05);
}

.mobile-link.active, .mobile-link-title.active {
    color: var(--accent-color, #E88D23);
}

.mobile-link.active::after, .mobile-link-title.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 25px;
    right: 25px;
    height: 3px;
    background: var(--accent-color, #E88D23);
    border-radius: 2px;
}

.mobile-nav-footer {
    width: 100%;
    padding: 30px 8%;
    background: #fdfaf6;
    border-top: 1px solid #f0e6df;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    text-align: center;
}

.mobile-address, .mobile-phone {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.92rem;
    color: #666;
    line-height: 1.5;
    max-width: 320px;
}

.mobile-address svg, .mobile-phone svg {
    color: var(--primary-red, #1B3565);
    flex-shrink: 0;
}

.mobile-phone a {
    color: #2c1810;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.mobile-phone a:hover {
    color: var(--primary-red, #1B3565);
}

/* Responsive */
@media (max-width: 992px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }
}
@media (max-width: 768px) {
    .top-bar {
        display: none;
    }
    
    :root {
        --header-height: 70px !important;
    }

    header {
        height: 70px !important;
        padding: 0 20px !important;
    }

    .logo-container img {
        height: 42px !important;
        max-width: 200px;
    }
    
    header.scrolled .logo-container img {
        height: 38px !important;
    }
}
@media (max-width: 480px) {
    header {
        padding: 0 4% !important;
    }
    
    .logo-container img {
        height: 38px !important;
        max-width: 150px;
    }
    
    header.scrolled .logo-container img {
        height: 35px !important;
    }
}

/* Mobile Accordion Styles */
.mobile-menu-links {
    gap: 15px !important;
    margin: 20px 0 !important;
}

.mobile-link, .mobile-link-title {
    font-size: 1.5rem !important;
    padding: 5px 15px !important;
}

.has-mobile-dropdown {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mobile-link-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

.mobile-dropdown-toggle {
    background: none;
    border: none;
    color: #2c1810;
    cursor: pointer;
    padding: 5px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.has-mobile-dropdown.active .mobile-dropdown-toggle {
    transform: rotate(180deg);
}

.mobile-dropdown {
    display: none;
    list-style: none;
    padding: 5px 0 10px;
    flex-direction: column;
    gap: 10px;
    width: 80%;
    max-width: 300px;
    background-color: #fdfaf6;
    border-radius: 10px;
    margin-top: 5px;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.03);
    border: 1px solid #f0e6df;
}

.has-mobile-dropdown.active .mobile-dropdown {
    display: flex;
}

.mobile-sublink {
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    color: #555;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
    padding: 6px 15px;
    font-weight: 500;
}

.mobile-sublink:hover {
    color: var(--accent-color, #E88D23);
}
