/* ================================
   File: /public_html/css/header/responsive.css
   Version: 2.0.1
   Last Updated: 2025-01-12
   
   RESPONSIVE STYLES
   All media queries and mobile/tablet adjustments
   Organized from largest to smallest breakpoints
   DOES NOT target .custom-language-switcher - that's handled by language-switcher.css
   
   v2.0.1 - Added small mobile size for mic button
   v2.0.0 - Added mobile search icon support, removed old mobile search bar
   ================================ */

/* ============================
   BASE HAMBURGER STYLES (Desktop Hidden)
   ============================ */

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    min-width: 48px;
    min-height: 48px;
    position: relative;
}

.hamburger span {
    display: block;
    width: 28px;
    height: 4px;
    background-color: #2c3e50;
    margin: 4px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* Large Desktop - Reduce gaps to prevent wrapping */
@media (max-width: 1200px) {
    .nav-controls {
        gap: 10px;
    }
    
    nav ul {
        gap: 15px;
    }
    
    .header-search-form {
        min-width: 180px;
        max-width: 200px;
    }
}

/* Tablet Styles */
@media (max-width: 968px) {
    .nav-controls {
        gap: 8px;
    }
    
    nav ul {
        gap: 12px;
    }
    
    /* Tablet search adjustments */
    .header-search-form {
        min-width: 160px;
        max-width: 180px;
    }
    
    .header-search-input {
        font-size: 13px;
        padding: 6px 10px;
    }
    
    .header-search-button {
        width: 28px;
        height: 28px;
    }
}

/* Medium screens - tighter spacing */
@media (max-width: 900px) {
    .nav-controls {
        gap: 6px;
    }
    
    nav ul {
        gap: 10px;
    }
    
    nav ul li a {
        font-size: 14px;
        padding: 8px 0;
    }
    
    .header-search-form {
        min-width: 140px;
        max-width: 160px;
    }
}

/* ================================
   MOBILE STYLES (768px and below)
   ================================ */
@media (max-width: 768px) {
    /* Header container adjustments */
    header .container {
        padding: 8px 15px;
        gap: 8px;
    }
    
    /* Logo section adjustments */
    .logo-section {
        flex: 1;
        flex-shrink: 0;
        min-width: 180px; /* Slightly reduced to make room for search icon */
        margin-right: 8px;
        overflow: visible;
        z-index: 10;
    }
    
    /* Logo adjustments */
    header .logo {
        margin-right: 0;
    }
    
    header .logo img {
        height: 35px;
        margin-right: 10px;
    }
    
    header .logo span {
        font-size: 1.5em;
        font-weight: 600;
        color: #2c3e50;
        white-space: nowrap;
        overflow: visible;
        text-overflow: unset;
        position: relative;
        z-index: 10;
    }
    
    header h1 {
        font-size: 1.5em;
    }

    /* ============================
       MOBILE NAVIGATION
       ============================ */
    
    /* Mobile menu container - ONLY target desktop nav, not mobile-menu-nav */
    header nav.desktop-nav,
    #navMenu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: #ffffff;
        transition: left 0.3s ease;
        z-index: 999;
        overflow-y: auto;
        padding: 0;
    }
    
    /* Active mobile menu */
    header nav.desktop-nav.active,
    #navMenu.active {
        left: 0;
    }
    
    /* Mobile menu list styling */
    header nav.desktop-nav ul,
    #navMenu ul {
        flex-direction: column;
        padding: 20px;
        gap: 0;
    }
    
    header nav.desktop-nav ul li,
    #navMenu ul li {
        border-bottom: 1px solid #e0e0e0;
    }
    
    header nav.desktop-nav ul li:last-child,
    #navMenu ul li:last-child {
        border-bottom: none;
    }
    
    header nav.desktop-nav ul li a,
    #navMenu ul li a {
        display: block;
        padding: 15px 0;
        font-size: 16px;
    }
    
    /* Mobile dropdown toggle styles */
    header nav.desktop-nav ul li .dropdown-toggle,
    #navMenu ul li .dropdown-toggle {
        display: block;
        width: 100%;
        height: 56px;
        padding: 0 20px;
        margin: 0;
        border: none;
        background: inherit;
        font-size: 16px;
        font-weight: 500;
        color: #374151;
        text-decoration: none;
        box-sizing: border-box;
        line-height: 56px;
        text-align: left;
        cursor: pointer;
        position: relative;
    }
    
    /* Hide dropdown text, show content via ::before */
    .dropdown-toggle .dropdown-text {
        display: none;
    }
    
    .dropdown-menu-item--explore .dropdown-toggle::before {
        content: "Explore";
    }
    
    .dropdown-menu-item--categories .dropdown-toggle::before {
        content: "Categories";
    }
    
    .dropdown-menu-item--tags .dropdown-toggle::before {
        content: "Tags";
    }
    
    .dropdown-toggle::before {
        position: absolute;
        left: 20px;
        top: 0;
        height: 56px;
        line-height: 56px;
        font-size: 16px;
        font-weight: 500;
        color: inherit;
    }
    
    .dropdown-toggle .dropdown-arrow {
        position: absolute;
        right: 20px;
        top: 50%;
        margin-top: -7px;
        margin-left: 0;
        font-size: 14px;
        opacity: 0.6;
        display: block;
        line-height: 1;
        transition: all 0.3s ease;
    }
    
    /* ============================
       HAMBURGER MENU - MOBILE
       ============================ */
    
    .hamburger {
        display: flex;
        margin-right: -15px;
        padding: 8px;
        min-width: 44px;
        min-height: 44px;
    }
    
    .hamburger span {
        width: 26px;
        height: 3px;
        margin: 3px 0;
    }
    
    /* Hamburger active animation */
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(7px, 7px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
    
    /* ============================
       NAVIGATION CONTROLS
       ============================ */
    
    .nav-controls {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-shrink: 0;
        flex-wrap: nowrap;
        min-width: 0;
        margin-left: auto;
        background: transparent;
        padding-right: 0;
        z-index: 2;
    }
    
    /* ============================
       SEARCH - MOBILE
       ============================ */
    
    /* Hide desktop search */
    .desktop-only,
    .header-search {
        display: none;
    }
    
    /* Show mobile search icon in header */
    .mobile-search-icon {
        display: flex;
    }
}

/* ================================
   SMALL MOBILE (480px and below)
   ================================ */
@media (max-width: 480px) {
    /* Header container adjustments */
    header .container {
        padding: 6px 12px;
        gap: 6px;
    }
    
    /* Logo section adjustments */
    .logo-section {
        flex: 1;
        flex-shrink: 0;
        min-width: 160px; /* Reduced for very small screens */
        margin-right: 6px;
        overflow: visible;
        z-index: 10;
    }
    
    /* Logo adjustments */
    header .logo {
        margin-right: 0;
    }
    
    header .logo img {
        height: 32px;
        margin-right: 8px;
    }
    
    header .logo span {
        font-size: 1.4em;
        font-weight: 600;
        color: #2c3e50;
        white-space: nowrap;
        overflow: visible;
        text-overflow: unset;
        position: relative;
        z-index: 10;
    }
    
    header h1 {
        font-size: 1.3em;
    }
    
    /* Navigation controls spacing */
    .nav-controls {
        gap: 6px;
        background: transparent;
        padding-right: 0;
        z-index: 2;
    }
    
    /* Mobile search icon - slightly smaller */
    .mobile-search-icon {
        width: 38px;
        height: 38px;
    }
    
    .mobile-search-icon svg {
        width: 18px;
        height: 18px;
    }
    
    /* Hamburger for very small screens */
    .hamburger {
        margin-right: -12px;
        min-width: 44px;
        min-height: 44px;
        padding: 8px;
    }
    
    .hamburger span {
        width: 24px;
        height: 3px;
        margin: 3px 0;
    }
    
    /* Adjust navigation positioning */
    header nav.desktop-nav,
    #navMenu {
        top: 60px;
        height: calc(100vh - 60px);
    }
    
    /* Mobile search overlay adjustments */
    .mobile-search-header {
        padding: 6px 10px;
        gap: 6px;
        min-height: 52px;
    }
    
    .mobile-search-back {
        width: 36px;
        height: 36px;
    }
    
    .mobile-search-submit {
        width: 36px;
        height: 36px;
    }
    
    .mobile-search-overlay .mobile-search-input {
        padding: 8px 12px;
    }
}