/* Header Component Styles */

/* CSS Variables */
:root {
    --header-bg: #ffffff;
    --header-text: #333333;
    --header-accent: #c9302c;
    --header-accent-dark: #a02622;
    --header-border: #e0e0e0;
    --header-shadow: 0 2px 4px rgba(0,0,0,0.1);
    --header-height: 60px;
    --header-top-height: 36px;
}

/* Top Bar */
.header-top-bar {
    background-color: #f8f8f8;
    border-bottom: 1px solid var(--header-border);
    font-size: 0.875rem;
}

.header-social {
    display: flex;
    gap: 1rem;
}

.social-link {
    color: var(--header-text);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.social-link:hover {
    color: var(--header-accent);
    opacity: 1;
}

.header-actions {
    display: flex;
    gap: 1.5rem;
}

.header-link {
    color: var(--header-text);
    text-decoration: none;
    transition: color 0.3s ease;
}

.header-link:hover {
    color: var(--header-accent);
}

/* Main Header */
.header-main {
    background-color: var(--header-bg);
    box-shadow: var(--header-shadow);
    position: relative;
    z-index: 100;
}

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

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 0.75rem;
}

.logo-image {
    height: 70px;
    width: auto;
    max-width: 200px;
}

.logo-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--header-text);
    display: block;
}

@media (max-width: 768px) {
    .logo-text {
        font-size: 1.25rem;
    }
}

/* Search Bar */
.header-search {
    position: relative;
}

.search-form {
    width: 100%;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 100%;
    padding: 0.625rem 3rem 0.625rem 1rem;
    border: 2px solid var(--header-border);
    border-radius: 25px;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    outline: none;
}

.search-input:focus {
    border-color: var(--header-accent);
    box-shadow: 0 0 0 3px rgba(201, 48, 44, 0.1);
}

.search-button {
    position: absolute;
    right: 0.5rem;
    background-color: var(--header-accent);
    color: white;
    border: none;
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-button:hover {
    background-color: var(--header-accent-dark);
}

/* Search Suggestions */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--header-border);
    border-radius: 8px;
    margin-top: 0.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
}

.search-suggestion-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--header-border);
    transition: background-color 0.2s ease;
}

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

.search-suggestion-item:hover {
    background-color: #f8f8f8;
}

/* Navigation */
.header-nav {
    background-color: white;
    border-bottom: 1px solid var(--header-border);
    position: sticky;
    top: 0;
    z-index: 99;
}

.nav-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: inline-block;
    padding: 1rem 0;
    color: var(--header-text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background-color: var(--header-accent);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--header-accent);
}

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

/* CTA Button */
.nav-cta {
    margin-left: 1rem;
}

.nav-link-cta {
    background-color: var(--header-accent);
    color: white !important;
    padding: 0.5rem 1.25rem !important;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.nav-link-cta:hover {
    background-color: var(--header-accent-dark);
    transform: translateY(-1px);
}

.nav-link-cta::after {
    display: none;
}

/* Dropdown Menus */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border: 1px solid var(--header-border);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    min-width: 200px;
    margin-top: 0.5rem;
}

.nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
}

.dropdown-list {
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
}

.dropdown-list li {
    padding: 0;
}

.dropdown-list a {
    display: block;
    padding: 0.5rem 1.5rem;
    color: var(--header-text);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.dropdown-list a:hover {
    background-color: #f8f8f8;
    color: var(--header-accent);
}

/* Mega Menu */
.mega-menu {
    width: 800px;
    max-width: 90vw;
    left: -200px;
}

.mega-menu-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    padding: 2rem;
}

.mega-menu-column {
    min-width: 0;
}

.mega-menu-title {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--header-accent);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--header-border);
}

.mega-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mega-menu-list li {
    margin-bottom: 0.5rem;
}

.mega-menu-list a {
    color: var(--header-text);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
    display: block;
    padding: 0.25rem 0;
}

.mega-menu-list a:hover {
    color: var(--header-accent);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background-color: var(--header-text);
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

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

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: white;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: left 0.3s ease;
    overflow-y: auto;
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu-content {
    padding: 1.5rem;
}

.mobile-search-form {
    display: flex;
    margin-bottom: 2rem;
}

.mobile-search-input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid var(--header-border);
    border-right: none;
    border-radius: 4px 0 0 4px;
    outline: none;
}

.mobile-search-button {
    background-color: var(--header-accent);
    color: white;
    border: none;
    padding: 0 1rem;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.mobile-nav {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
}

.mobile-nav > li {
    border-bottom: 1px solid var(--header-border);
}

.mobile-nav a {
    display: block;
    padding: 1rem 0;
    color: var(--header-text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.mobile-nav a:hover {
    color: var(--header-accent);
}

.mobile-submenu {
    list-style: none;
    padding: 0 0 0 1.5rem;
    margin: 0;
    display: none;
}

.mobile-submenu.active {
    display: block;
}

.mobile-submenu a {
    font-weight: normal;
    font-size: 0.875rem;
    padding: 0.75rem 0;
}

.mobile-cta {
    color: var(--header-accent) !important;
    font-weight: 600 !important;
}

.mobile-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.mobile-action-link {
    flex: 1;
    text-align: center;
    padding: 0.75rem;
    border: 1px solid var(--header-border);
    border-radius: 4px;
    color: var(--header-text);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.mobile-action-link:hover {
    border-color: var(--header-accent);
    color: var(--header-accent);
}

.mobile-social {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.mobile-social a {
    color: var(--header-text);
    opacity: 0.6;
    font-size: 1.25rem;
    transition: all 0.2s ease;
}

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

/* Sticky Header */
.site-header.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    animation: slideDown 0.3s ease;
}

.site-header.sticky .header-top-bar {
    display: none;
}

.site-header.sticky .header-main {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

.header-spacer {
    display: none;
    height: var(--header-height);
}

.header-spacer.active {
    display: block;
}

/* Responsive */
@media (max-width: 1024px) {
    .header-nav {
        display: none;
    }
    
    .mega-menu {
        width: 600px;
    }
    
    .mega-menu-content {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .header-top-bar {
        display: none;
    }
    
    .header-search {
        display: none !important;
    }
    
    .logo-image {
        height: 50px;
    }
}