/*
Theme Name: Kumo Foundation
Theme URI: https://kumodevelopment.com
Author: Brent Jaye / Kumo Development
Author URI: https://kumodevelopment.com
Description: Universal foundational theme for Kumo Development, LOAR PLLC, SOAR Skills, and family sites. Production-ready design system with consistent brand identity.
Version: 1.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kumo-foundation
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, full-width-template
*/

/* 
 * IMPORTANT: This file contains WordPress core styles plus mobile navigation.
 * Main theme styles should still compile from /assets/main.scss to /build/css/style.min.css
 * This file includes the critical mobile nav CSS that was missing.
 */

/* ============================================================================
   WordPress Core Alignment Classes
   ============================================================================ */

.alignnone {
    margin: 5px 20px 20px 0;
}

.aligncenter,
div.aligncenter {
    display: block;
    margin: 5px auto 20px auto;
}

.alignright {
    float: right;
    margin: 5px 0 20px 20px;
}

.alignleft {
    float: left;
    margin: 5px 20px 20px 0;
}

a img.alignright {
    float: right;
    margin: 5px 0 20px 20px;
}

a img.alignnone {
    margin: 5px 20px 20px 0;
}

a img.alignleft {
    float: left;
    margin: 5px 20px 20px 0;
}

a img.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.wp-caption {
    max-width: 100%;
}

.wp-caption.alignnone {
    margin: 5px 20px 20px 0;
}

.wp-caption.alignleft {
    margin: 5px 20px 20px 0;
}

.wp-caption.alignright {
    margin: 5px 0 20px 20px;
}

.wp-caption img {
    border: 0 none;
    height: auto;
    margin: 0;
    max-width: 100%;
    padding: 0;
    width: auto;
}

.wp-caption p.wp-caption-text {
    font-size: 1.3rem;
    line-height: 1.5;
    margin: 0;
    padding: 10px 0;
    color: var(--text-muted, #666);
}

/* ============================================================================
   Screen Reader Text & Accessibility
   ============================================================================ */

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    clip-path: none;
    color: #21759b;
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--brand-primary, #00a8e8);
    color: white;
    padding: 8px 12px;
    text-decoration: none;
    z-index: 100000;
}

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

/* ============================================================================
   MOBILE NAVIGATION STYLES (CRITICAL - THIS WAS MISSING)
   These styles make the hamburger menu actually work
   ============================================================================ */

/* Hamburger button base styles */
.hamburger {
    display: none; /* Hidden on desktop by default */
    background: none;
    border: none;
    padding: 0;
    width: 30px;
    height: 24px;
    position: relative;
    cursor: pointer;
    z-index: 1001;
    transition: opacity 0.2s ease;
}

.hamburger:hover {
    opacity: 0.7;
}

.hamburger span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: var(--text-primary, #000);
    border-radius: 3px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: 0.25s ease-in-out;
}

.hamburger span:nth-child(1) {
    top: 0;
}

.hamburger span:nth-child(2) {
    top: 10px;
}

.hamburger span:nth-child(3) {
    top: 20px;
}

/* Hamburger active state - transforms to X */
.hamburger.active span:nth-child(1) {
    top: 10px;
    transform: rotate(135deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    left: -60px;
}

.hamburger.active span:nth-child(3) {
    top: 10px;
    transform: rotate(-135deg);
}

/* Focus styles for accessibility */
.hamburger:focus {
    outline: 2px solid var(--brand-primary, #00a8e8);
    outline-offset: 2px;
}

.hamburger:focus-visible {
    outline: 2px solid var(--brand-primary, #00a8e8);
    outline-offset: 2px;
}

/* ============================================================================
   MOBILE NAVIGATION (screens smaller than 992px)
   ============================================================================ */

@media (max-width: 991px) {
    /* Show hamburger on mobile */
    .hamburger {
        display: block;
    }

    /* Hide desktop CTA on mobile */
    .kumo-headerCta {
        display: none !important;
    }

    /* Mobile navigation - starts hidden off-screen */
    .main-header .navigation {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        max-width: 400px; /* Adjust as needed - can be 100% for full width */
        height: 100vh;
        background: #ffffff;
        transform: translateX(-100%); /* Hidden off-screen to the left */
        transition: transform 0.3s ease-in-out;
        z-index: 1000;
        overflow-y: auto;
        overflow-x: hidden;
        padding: 80px 20px 20px; /* Top padding accounts for header */
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    }

    /* Mobile navigation - shown when .active class is added by JavaScript */
    .main-header .navigation.active {
        transform: translateX(0); /* Slide in from left */
    }

    /* Menu list - vertical stack on mobile */
    .kumo-menu {
        display: flex;
        flex-direction: column;
        gap: 0;
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .kumo-menu li {
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }

    .kumo-menu li:last-child {
        border-bottom: none;
    }

    .kumo-menu li a {
        display: block;
        padding: 15px 0;
        color: var(--text-primary, #000);
        text-decoration: none;
        font-size: 16px;
        font-weight: 500;
        transition: color 0.2s ease;
    }

    .kumo-menu li a:hover,
    .kumo-menu li a:focus {
        color: var(--brand-primary, #00a8e8);
    }

    .kumo-menu li a:focus {
        outline: 2px solid var(--brand-primary, #00a8e8);
        outline-offset: 2px;
    }

    /* Mobile CTA button inside navigation */
    .mob-cta {
        display: block;
        margin-top: 30px;
        padding-top: 30px;
        border-top: 1px solid rgba(0, 0, 0, 0.1);
    }

    .mob-cta .header-cta {
        display: block;
        width: 100%;
        text-align: center;
        padding: 12px 24px;
    }

    /* Submenu styles if you have dropdown menus */
    .kumo-menu .sub-menu {
        display: none;
        padding-left: 20px;
        margin-top: 10px;
    }

    .kumo-menu li.menu-item-has-children > a::after {
        content: ' ›';
        float: right;
    }
}

/* ============================================================================
   DESKTOP NAVIGATION (screens 992px and larger)
   ============================================================================ */

@media (min-width: 992px) {
    /* Hide hamburger on desktop */
    .hamburger {
        display: none !important;
    }

    /* Hide mobile CTA on desktop */
    .mob-cta {
        display: none !important;
    }

    /* Show desktop CTA */
    .kumo-headerCta {
        display: block;
    }

    /* Desktop navigation - reset all mobile styles */
    .main-header .navigation {
        position: static;
        transform: none;
        height: auto;
        width: auto;
        max-width: none;
        padding: 0;
        background: transparent;
        box-shadow: none;
        overflow: visible;
    }

    /* Horizontal menu on desktop */
    .kumo-menu {
        display: flex;
        flex-direction: row;
        gap: 30px; /* Space between menu items */
        align-items: center;
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .kumo-menu li {
        border: none;
        position: relative;
    }

    .kumo-menu li a {
        padding: 0;
        display: inline-block;
    }

    /* Dropdown menu styles for desktop */
    .kumo-menu .sub-menu {
        position: absolute;
        top: 100%;
        left: 0;
        background: #ffffff;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        padding: 10px 0;
        min-width: 200px;
        display: none;
        z-index: 100;
    }

    .kumo-menu li:hover > .sub-menu,
    .kumo-menu li:focus-within > .sub-menu {
        display: block;
    }

    .kumo-menu .sub-menu li {
        display: block;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .kumo-menu .sub-menu li:last-child {
        border-bottom: none;
    }

    .kumo-menu .sub-menu a {
        display: block;
        padding: 10px 20px;
    }
}

/* ============================================================================
   Entry Content & Utilities
   ============================================================================ */

.entry-content {
    padding: 40px 0;
}

.entry-content img {
    max-width: 100%;
    height: auto;
}

/* Clearfix utility */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* ============================================================================
   Additional Accessibility & Print Styles
   ============================================================================ */

/* Ensure focus is visible for keyboard navigation */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--brand-primary, #00a8e8);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .hamburger,
    .main-header .navigation,
    .skip-link {
        display: none !important;
    }
}