/**
 * Responsive Header Styles
 * 
 * @package Ranchi_Car_Rental
 * @version 1.0.0
 */

/* ========================================
   SEARCH STYLES
======================================== */

/* Desktop Search Styles */
.desktop-search-section {
    flex: 1;
    max-width: 300px;
    margin: 0 1rem;
}

.desktop-search-form {
    width: 100%;
}

.desktop-search-input-group {
    position: relative;
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.desktop-search-input-group:focus-within {
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.desktop-search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    font-size: 0.9rem;
    color: #374151;
    outline: none;
}

.desktop-search-input::placeholder {
    color: #9ca3af;
}

.desktop-search-btn {
    padding: 0.75rem 1rem;
    background: #22c55e;
    border: none;
    color: white;
    cursor: pointer;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.desktop-search-btn:hover {
    background: #16a34a;
}

.desktop-search-btn i {
    font-size: 0.9rem;
}

/* Mobile Search Styles */
.mobile-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.mobile-search-toggle {
    background: none;
    border: none;
    color: #374151;
    font-size: 1.2rem;
    padding: 0.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-search-toggle:hover {
    color: #22c55e;
}

.mobile-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-search-overlay.active {
    display: flex;
    opacity: 1;
}

.mobile-search-container {
    background: white;
    width: 100%;
    height: 100%;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    animation: slideInFromTop 0.3s ease;
}

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

.mobile-search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.mobile-search-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
}

.mobile-search-close {
    background: none;
    border: none;
    color: #64748b;
    font-size: 1.2rem;
    padding: 0.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.mobile-search-close:hover {
    color: #ef4444;
}

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

.mobile-search-input-group {
    position: relative;
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.mobile-search-input-group:focus-within {
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.mobile-search-input {
    flex: 1;
    padding: 1rem;
    border: none;
    background: transparent;
    font-size: 1rem;
    color: #374151;
    outline: none;
}

.mobile-search-input::placeholder {
    color: #9ca3af;
}

.mobile-search-submit {
    padding: 1rem;
    background: #22c55e;
    border: none;
    color: white;
    cursor: pointer;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-search-submit:hover {
    background: #16a34a;
}

.mobile-search-submit i {
    font-size: 1rem;
}

.mobile-search-suggestions {
    flex: 1;
}

.mobile-search-suggestions-title {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 1rem;
}

.mobile-search-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.mobile-search-tag {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-search-tag:hover {
    background: #22c55e;
    color: white;
    border-color: #22c55e;
}

/* ========================================
   BASE HEADER STYLES
======================================== */

/* Prevent header overflow */
* {
    box-sizing: border-box;
}

.desktop-header,
.tablet-header,
.mobile-header {
    max-width: 100vw;
    overflow-x: hidden;
}

/* Ensure desktop header is visible on large screens */
@media (min-width: 1200px) {
    .desktop-header {
        display: block !important;
        background: #ffffff !important;
        border-bottom: 1px solid #e2e8f0 !important;
    }
}

/* Common header styles */
.desktop-header,
.tablet-header,
.mobile-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
    box-sizing: border-box;
}

.desktop-header.scrolled,
.tablet-header.scrolled,
.mobile-header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* ========================================
   DESKTOP HEADER STYLES (1200px+)
======================================== */

.desktop-header {
    display: none;
}

/* Force desktop header to show on large screens */
@media screen and (min-width: 1200px) {
    .desktop-header {
        display: block !important;
    }
}

.desktop-header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    flex-wrap: nowrap;
    width: 100%;
    box-sizing: border-box;
    overflow: visible;
    gap: 1rem;
}

.desktop-header-container > * {
    flex-shrink: 0;
}

/* Desktop Logo */
.desktop-logo-section {
    flex-shrink: 0;
}

.desktop-logo-link {
    display: block;
    text-decoration: none;
}

.desktop-logo {
    max-height: 60px;
    width: auto;
    transition: all 0.3s ease;
}

.desktop-site-title {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    color: #0F172A;
}

.desktop-site-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.desktop-site-title a:hover {
    color: #22C55E;
}

/* Desktop Navigation */
.desktop-navigation {
    flex: 0 1 auto;
    display: flex;
    justify-content: center;
    min-width: 0;
    overflow: visible;
    max-width: 60%;
}

.desktop-nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
    flex-wrap: nowrap;
    width: 100%;
    justify-content: center;
    min-width: 0;
}


.desktop-nav-menu li {
    position: relative;
}

.desktop-nav-menu a {
    display: flex;
    align-items: center;
    padding: 0.3rem 0.4rem;
    color: #64748B;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    border-radius: 6px;
    white-space: nowrap;
    flex-shrink: 0;
}

.desktop-nav-menu a:hover {
    color: #22C55E;
    background: rgba(34, 197, 94, 0.1);
    transform: translateY(-2px);
}

.desktop-nav-menu a i {
    margin-right: 0.25rem;
    font-size: 0.75rem;
}

/* Desktop Actions */
.desktop-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
    align-items: center;
    min-width: 0;
}

.desktop-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    min-width: 90px;
    white-space: nowrap;
    flex-shrink: 0;
}

.desktop-btn i {
    margin-right: 0.3rem;
    font-size: 0.75rem;
}

.desktop-btn-outline {
    color: #64748B;
    border-color: #E2E8F0;
    background: transparent;
}

.desktop-btn-outline:hover {
    color: #22C55E;
    border-color: #22C55E;
    background: rgba(34, 197, 94, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.3);
}

.desktop-btn-primary {
    color: white;
    background: #22C55E;
    border-color: #22C55E;
}

.desktop-btn-primary:hover {
    background: #16A34A;
    border-color: #16A34A;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.5);
}

/* ========================================
   TABLET HEADER STYLES (768px - 1199px)
======================================== */

.tablet-header {
    display: none;
}

.tablet-header-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 75px;
    flex-wrap: nowrap;
}

/* Tablet Logo */
.tablet-logo-section {
    flex-shrink: 0;
}

.tablet-logo-link {
    display: block;
    text-decoration: none;
}

.tablet-logo {
    max-height: 55px;
    width: auto;
    transition: all 0.3s ease;
}

.tablet-site-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #0F172A;
}

.tablet-site-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.tablet-site-title a:hover {
    color: #22C55E;
}

/* Tablet Navigation */
.tablet-navigation {
    flex: 1;
    display: flex;
    justify-content: center;
    margin: 0 2rem;
}

.tablet-nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1.5rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.tablet-nav-menu::-webkit-scrollbar {
    display: none;
}

.tablet-nav-menu li {
    position: relative;
}

.tablet-nav-menu a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #64748B;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border-radius: 6px;
    white-space: nowrap;
}

.tablet-nav-menu a:hover {
    color: #22C55E;
    background: rgba(34, 197, 94, 0.1);
    transform: translateY(-1px);
}

.tablet-nav-menu a i {
    margin-right: 0.5rem;
    font-size: 0.9rem;
}

/* Tablet Actions */
.tablet-actions {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
    align-items: center;
}

.tablet-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    min-width: 100px;
    white-space: nowrap;
}

.tablet-btn i {
    margin-right: 0.5rem;
    font-size: 0.9rem;
}

.tablet-btn-outline {
    color: #64748B;
    border-color: #E2E8F0;
    background: transparent;
}

.tablet-btn-outline:hover {
    color: #22C55E;
    border-color: #22C55E;
    background: rgba(34, 197, 94, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.2);
}

.tablet-btn-primary {
    color: white;
    background: #22C55E;
    border-color: #22C55E;
}

.tablet-btn-primary:hover {
    background: #16A34A;
    border-color: #16A34A;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
}

/* ========================================
   MOBILE HEADER STYLES (up to 767px)
======================================== */

.mobile-header {
    display: none;
}

.mobile-header-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 65px;
    flex-wrap: nowrap;
}

/* Mobile Logo */
.mobile-logo-section {
    flex-shrink: 0;
}

.mobile-logo-link {
    display: block;
    text-decoration: none;
}

.mobile-logo {
    max-height: 45px;
    width: auto;
    transition: all 0.3s ease;
}

.mobile-site-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: #0F172A;
}

.mobile-site-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.mobile-site-title a:hover {
    color: #22C55E;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: flex;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    position: relative;
    z-index: 1001;
    align-items: center;
    justify-content: center;
}

.mobile-hamburger {
    display: flex;
    flex-direction: column;
    width: 24px;
    height: 18px;
    justify-content: space-between;
}

.mobile-hamburger-line {
    width: 100%;
    height: 2px;
    background: #0F172A;
    transition: all 0.3s ease;
    border-radius: 1px;
}

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

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

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

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-container {
    position: absolute;
    top: 0;
    right: 0;
    width: 320px;
    height: 100vh;
    background: #1a1a1a;
    padding: 2rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.mobile-menu-overlay.active .mobile-menu-container {
    transform: translateX(0);
}

/* Mobile Menu Header */
.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-menu-logo-link {
    display: block;
    text-decoration: none;
}

.mobile-menu-logo-img {
    max-height: 40px;
    width: auto;
}

.mobile-menu-title {
    color: white;
    font-size: 1.2rem;
    margin: 0;
}

.mobile-menu-title a {
    color: inherit;
    text-decoration: none;
}

.mobile-menu-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.mobile-menu-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Mobile Navigation */
.mobile-navigation {
    margin-bottom: 2rem;
    flex: 1;
}

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

.mobile-nav-menu li {
    margin-bottom: 0.5rem;
}

.mobile-nav-menu a {
    display: flex;
    align-items: center;
    padding: 1rem;
    color: white;
    text-decoration: none;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.mobile-nav-menu a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #22C55E;
}

.mobile-nav-menu a i {
    margin-right: 1rem;
    width: 20px;
    text-align: center;
}

/* Mobile Menu Footer */
.mobile-menu-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-menu-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    width: 100%;
}

.mobile-menu-btn i {
    margin-right: 0.75rem;
    font-size: 1rem;
}

.mobile-menu-btn-outline {
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
    background: transparent;
}

.mobile-menu-btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.mobile-menu-btn-primary {
    color: white;
    background: #22C55E;
    border-color: #22C55E;
}

.mobile-menu-btn-primary:hover {
    background: #16A34A;
    border-color: #16A34A;
}


/* ========================================
   RESPONSIVE BREAKPOINTS
======================================== */

/* Large Desktop (1200px+) */
@media (min-width: 1200px) {
    .desktop-header {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .tablet-header,
    .mobile-header {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        position: absolute !important;
        left: -9999px !important;
    }
    
    
    .desktop-header-container {
        max-width: 1200px;
        padding: 0 2rem;
    }
}

/* Extra Large Desktop (1400px+) */
@media (min-width: 1400px) {
    .desktop-header-container {
        max-width: 1300px;
        padding: 0 2rem;
    }
    
    .desktop-nav-menu {
        gap: 0.75rem;
    }
    
    .desktop-nav-menu a {
        padding: 0.35rem 0.5rem;
        font-size: 0.85rem;
    }
    
    .desktop-actions {
        gap: 0.75rem;
    }
}

/* Medium Desktop (1024px - 1199px) */
@media (max-width: 1199px) and (min-width: 1024px) {
    .desktop-header-container {
        padding: 0 0.75rem;
        gap: 0.75rem;
    }
    
    .desktop-navigation {
        max-width: 55%;
    }
    
    .desktop-nav-menu {
        gap: 0.4rem;
    }
    
    .desktop-nav-menu a {
        padding: 0.25rem 0.35rem;
        font-size: 0.75rem;
    }
    
    .desktop-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
        min-width: 80px;
    }
    
    .desktop-actions {
        gap: 0.4rem;
    }
}

/* Tablet (768px - 1199px) */
@media (max-width: 1199px) and (min-width: 768px) {
    .desktop-header {
        display: none !important;
    }
    
    .tablet-header {
        display: block !important;
    }
    
    .mobile-header {
        display: none !important;
    }
    
}

/* Mobile (up to 767px) */
@media (max-width: 767px) {
    .desktop-header,
    .tablet-header {
        display: none !important;
    }
    
    .mobile-header {
        display: block !important;
    }
    
}

/* ========================================
   ACCESSIBILITY & ANIMATIONS
======================================== */

/* Screen reader text */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

/* Focus styles for accessibility */
.desktop-btn:focus,
.tablet-btn:focus,
.mobile-menu-toggle:focus,
.mobile-menu-close:focus,
.mobile-menu-btn:focus,
.desktop-nav-menu a:focus,
.tablet-nav-menu a:focus,
.mobile-nav-menu a:focus {
    outline: 2px solid #22C55E;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .desktop-btn-outline,
    .tablet-btn-outline {
        border-width: 3px;
    }
    
    .desktop-nav-menu a:hover,
    .tablet-nav-menu a:hover,
    .mobile-nav-menu a:hover {
        background: #22C55E;
        color: white;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
