/*
Theme Name: zeeBusiness Child
Theme URI: https://madronawinemerchants.com
Description: Responsive child theme for zeeBusiness with mobile-first improvements
Author: Madrona Wine Merchants
Author URI: https://madronawinemerchants.com
Template: zeebusiness
Version: 1.0.4
*/

/* ============================================
   MOBILE MENU TOGGLE BUTTON
   Hidden on desktop, shown on mobile
   ============================================ */

.mobile-menu-toggle {
    display: none; /* Hidden by default (desktop) */
    width: 100%;
    padding: 15px 20px;
    background: #c41010; /* Match theme red */
    color: #fff;
    border: none;
    font-size: 18px;
    font-weight: bold;
    text-align: left;
    cursor: pointer;
    font-family: Arial, Tahoma, Verdana;
}

.mobile-menu-toggle:hover {
    background: #a00e0e;
}

.mobile-menu-toggle .menu-icon {
    font-size: 24px;
    margin-right: 10px;
}

/* ============================================
   MOBILE RESPONSIVE FIXES
   Applied only on screens under 768px
   ============================================ */

@media screen and (max-width: 767px) {
    /* Show mobile menu toggle button */
    .mobile-menu-toggle {
        display: block !important;
    }

    /* Hide navigation by default on mobile (before JS loads) */
    #navi ul {
        display: none;
    }

    /* Show when JS adds the open class */
    .mobile-nav-open #navi ul {
        display: block !important;
    }

    /* Reset fixed width on mobile */
    #wrapper {
        width: 100% !important;
        margin: 10px auto !important;
        border-left: none !important;
        border-right: none !important;
    }

    /* Stack layout vertically on mobile */
    #header,
    #wrap,
    #content,
    #sidebar {
        width: 100% !important;
        float: none !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Better content padding on mobile */
    #content {
        padding: 10px !important;
    }

    #sidebar {
        margin-top: 20px;
        padding: 10px !important;
    }

    /* Mobile navigation container */
    #navi {
        width: 100% !important;
        padding: 0 !important;
        margin-top: 0 !important;
    }

    /* Navigation list styles */
    #nav {
        width: 100% !important;
    }

    #nav li {
        display: block !important;
        float: none !important;
        width: 100% !important;
    }

    #nav li a {
        display: block !important;
        padding: 15px 20px !important;
        margin: 0 !important;
        border-right: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
        font-size: 16px !important;
        background: #c41010 !important; /* Keep red background on mobile */
        color: #fff !important; /* Ensure white text */
    }

    #nav li a:hover {
        background: #a00e0e !important;
        color: #fff !important;
    }

    /* Dropdown menus on mobile */
    #nav ul {
        position: static !important;
        display: block !important;
        width: 100% !important;
        border: none !important;
        background: transparent !important;
    }

    #nav ul li a {
        padding-left: 30px !important;
        background: rgba(0, 0, 0, 0.2) !important;
        border-left: 3px solid rgba(255, 255, 255, 0.3) !important;
    }

    /* Top navigation mobile */
    #topnavi {
        float: none !important;
        width: 100% !important;
        margin: 10px 0 !important;
        text-align: center;
        background: #f5f5f5;
        padding: 5px 0;
    }

    #topnav {
        text-align: center;
    }

    #topnav li {
        display: inline-block !important;
        float: none !important;
    }

    #topnav li a {
        display: inline-block !important;
        padding: 8px 12px !important;
        font-size: 0.85em !important;
        background: transparent !important;
        color: #333 !important;
    }

    #topnav li a:hover {
        background: #c41010 !important;
        color: #fff !important;
    }

    /* Logo area mobile */
    #logo {
        float: none !important;
        text-align: center;
        margin: 10px auto !important;
        width: 100% !important;
    }

    #logo img {
        max-width: 90%;
        height: auto !important;
    }

    #logo h1 {
        font-size: 1.5em !important;
        padding: 10px !important;
    }

    /* Header wrapper */
    #head {
        margin: 10px 0 !important;
        width: 100% !important;
    }

    /* Improve text readability on mobile */
    body {
        font-size: 16px !important;
    }

    .entry {
        font-size: 16px !important;
        line-height: 1.6 !important;
    }

    .post-title {
        font-size: 1.6em !important;
        line-height: 1.3 !important;
    }

    h1, h2, h3 {
        line-height: 1.3 !important;
    }

    /* Responsive images */
    img,
    .wp-post-image {
        max-width: 100% !important;
        height: auto !important;
    }

    /* Custom header image */
    #custom_header {
        width: 100% !important;
    }

    #custom_header img {
        width: 100% !important;
        height: auto !important;
    }

    /* Form elements mobile friendly */
    input[type="text"],
    input[type="email"],
    input[type="search"],
    textarea,
    #s {
        width: 90% !important;
        max-width: 100% !important;
        font-size: 16px !important;
        padding: 10px !important;
        box-sizing: border-box !important;
    }

    /* Search form */
    #searchsubmit {
        padding: 10px 15px !important;
        font-size: 14px !important;
        margin: 5px !important;
    }

    /* Footer widgets stack on mobile */
    #bottombar {
        padding: 10px !important;
    }

    #bottombar_left,
    #bottombar_center,
    #bottombar_right {
        float: none !important;
        width: 100% !important;
        margin: 10px 0 !important;
        padding: 0 10px !important;
    }

    /* Tables scroll on mobile */
    table {
        display: block;
        overflow-x: auto;
        width: 100% !important;
    }

    /* Comments spacing on mobile */
    #comments .children {
        margin-left: 10px !important;
    }

    .commentlist .comment {
        padding: 10px !important;
    }

    .comment-author img {
        max-width: 60px;
    }

    /* Sidebar widgets on mobile */
    #sidebar ul li div,
    #sidebar ul li ul {
        padding: 10px !important;
    }

    /* Post meta mobile */
    .postinfo,
    .postmeta {
        font-size: 0.85em !important;
        padding: 8px !important;
    }

    /* Gallery mobile */
    .gallery-item {
        width: 50% !important;
    }

    /* Footer navigation mobile */
    #footer {
        padding: 10px !important;
    }

    #foot_navi {
        float: none !important;
        width: 100% !important;
        text-align: center;
    }

    #foot_navi ul li {
        float: none !important;
        display: inline-block;
        margin: 5px !important;
    }

    /* Credit link mobile */
    .credit_link {
        text-align: center;
        margin: 10px 0 !important;
        height: auto !important;
    }

    /* Post elements */
    .post {
        margin: 10px 0 20px 0 !important;
    }

    /* More link button */
    .more-link {
        display: inline-block;
        margin: 10px 0;
    }
}

/* ============================================
   TABLET BREAKPOINT (768px - 1023px)
   Minor adjustments only
   ============================================ */
@media screen and (min-width: 768px) and (max-width: 1023px) {
    /* Ensure mobile menu is hidden on tablet */
    .mobile-menu-toggle {
        display: none !important;
    }

    /* Ensure nav is visible on tablet */
    #navi ul {
        display: block !important;
    }

    #wrapper {
        width: 95% !important;
        max-width: 900px;
    }

    #content {
        width: 60% !important;
    }

    #sidebar {
        width: 35% !important;
        margin-left: 62% !important;
    }
}

/* ============================================
   DESKTOP (1024px and up)
   Ensure mobile elements are hidden
   ============================================ */
@media screen and (min-width: 1024px) {
    .mobile-menu-toggle {
        display: none !important;
    }

    /* Ensure nav is visible on desktop */
    #navi ul {
        display: block !important;
    }
}

/* ============================================
   ACCESSIBILITY IMPROVEMENTS (all sizes)
   ============================================ */

/* Better focus states */
a:focus,
button:focus,
input:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -999px;
    left: 0;
    background: #000;
    color: #fff;
    padding: 10px;
    text-decoration: none;
    z-index: 100000;
}

.skip-link:focus {
    top: 0;
}
