/* Header and Navigation Styles */
.header {
    background-color: var(--background);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
}

.header__container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md) var(--spacing-lg);
    min-height: 70px;
}

/* Logo */
.header__logo {
    text-decoration: none;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

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

.header__logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
    line-height: 1;
}

.header__logo:hover {
    color: var(--primary-dark);
}

.header__logo:hover .logo-image {
    transform: scale(1.05);
    transition: transform var(--transition-base);
}

/* Navigation */
.header__nav {
    display: flex;
    align-items: center;
}

.header__nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: var(--spacing-xl);
}

.header__nav .nav-link {
    color: var(--text-primary);
    font-weight: 500;
    padding: var(--spacing-sm) 0;
    position: relative;
    transition: color var(--transition-base);
}

.header__nav .nav-link:hover {
    color: var(--primary-color);
}

.header__nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width var(--transition-base);
}

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

.header__nav .nav-link.active {
    color: var(--primary-color);
}

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

/* Header Actions */
.header__actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.header__action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--border-radius-md);
    transition: all var(--transition-base);
    text-decoration: none;
}

.header__action-btn:hover {
    background-color: var(--background-light);
    color: var(--primary-color);
}

.header__action-btn svg {
    width: 20px;
    height: 20px;
}

/* Mobile Menu Toggle */
.header__menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 24px;
    height: 24px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.header__menu-toggle span {
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    transition: all var(--transition-base);
}

/* Mobile Styles */
@media (max-width: 768px) {
    .header__container {
        padding: var(--spacing-md);
    }
    
    .header__logo h1 {
        font-size: 1.25rem;
    }
    
    .header__nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--background);
        border-top: 1px solid var(--border-light);
        box-shadow: var(--shadow-lg);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-base);
    }
    
    .header__nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .header__nav ul {
        flex-direction: column;
        gap: 0;
        padding: var(--spacing-lg) 0;
    }
    
    .header__nav li {
        width: 100%;
    }
    
    .header__nav .nav-link {
        display: block;
        padding: var(--spacing-md) var(--spacing-lg);
        border-bottom: 1px solid var(--border-light);
    }
    
    .header__nav .nav-link::after {
        display: none;
    }
    
    .header__menu-toggle {
        display: flex;
    }
    
    .header__actions {
        gap: var(--spacing-sm);
    }
    
    .header__action-btn {
        width: 36px;
        height: 36px;
    }
    
    .header__action-btn svg {
        width: 18px;
        height: 18px;
    }
}

/* Additional mobile menu states */
.header__menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.header__menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.header__menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Search Modal Styles */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

.search-modal.active {
    visibility: visible;
    opacity: 1;
}

body.search-modal-open {
    overflow: hidden;
}

.search-modal__backdrop {
    position: absolute;
    top: 70px; /* Start below navbar */
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: -1;
}

.search-modal__content {
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    max-width: 700px;
    margin: 20px auto 0;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 75, 184, 0.15), 0 0 0 1px rgba(0, 75, 184, 0.05);
    overflow: hidden;
    transform: translateY(-20px) scale(0.95);
    transition: transform 0.3s ease;
    z-index: 1;
    border: 1px solid rgba(0, 75, 184, 0.1);
}

.search-modal.active .search-modal__content {
    transform: translateY(0) scale(1);
}

.search-modal__header {
    padding: 2rem 2rem 1.5rem;
    background: linear-gradient(135deg, #004BB8 0%, #1a5cc8 100%);
    position: relative;
    overflow: hidden;
}

.search-modal__header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.search-input-container {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 1rem 1.25rem;
    gap: 0.75rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.search-input-icon {
    width: 22px;
    height: 22px;
    color: #004BB8;
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    border: none;
    background: none;
    outline: none;
    font-size: 1.1rem;
    color: #1e293b;
    font-weight: 500;
}

.search-input::placeholder {
    color: #64748b;
    font-weight: 400;
}

.search-close {
    background: rgba(0, 75, 184, 0.1);
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 10px;
    color: #004BB8;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.search-close:hover {
    background: rgba(0, 75, 184, 0.2);
    transform: scale(1.05);
}

.search-close svg {
    width: 18px;
    height: 18px;
}

.search-modal__body {
    max-height: 400px;
    overflow-y: auto;
    background: white;
}

.search-placeholder {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
}

.search-placeholder svg {
    width: 56px;
    height: 56px;
    margin: 0 auto 1.5rem;
    display: block;
    color: #004BB8;
    opacity: 0.7;
}

.search-placeholder h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.75rem;
}

.search-placeholder p {
    margin: 0;
    font-size: 1rem;
    color: #64748b;
    line-height: 1.6;
}

.search-results {
    padding: 0;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 2rem;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.search-result-item:hover {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    transform: translateX(4px);
    border-left: 4px solid #004BB8;
}

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

.search-result-image {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    object-fit: cover;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.search-result-content {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.5rem;
    font-size: 1.125rem;
}

.search-result-description {
    font-size: 0.95rem;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

.search-no-results {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #fef2f2 0%, #ffffff 100%);
}

.search-no-results svg {
    width: 48px;
    height: 48px;
    margin: 0 auto 1.5rem;
    display: block;
    color: #ef4444;
    opacity: 0.7;
}

.search-no-results h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.75rem;
}

.search-no-results p {
    margin: 0;
    font-size: 0.95rem;
    color: #64748b;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .search-modal__content {
        margin: 20px;
        margin-top: 60px;
        border-radius: 12px;
    }
    
    .search-modal__header {
        padding: 1rem;
    }
    
    .search-input-container {
        padding: 0.6rem 0.75rem;
    }
    
    .search-result-item {
        padding: 0.75rem 1rem;
        gap: 0.75rem;
    }
    
    .search-result-image {
        width: 50px;
        height: 50px;
    }
    
    .search-placeholder {
        padding: 2rem 1rem;
    }
}
