/*
Theme Name: Blue and Orange Exchange
Theme URI: https://example.com/
Author: Boise State Community
Description: An ADA-compliant, mobile-first marketplace theme aligned with Boise State University design patterns.
Version: 1.7.0
License: GNU General Public License v2 or later
Text Domain: blue-orange-exchange
*/

/* ==========================================
   COLOR PALETTE & CSS VARIABLES
   ========================================== */
:root {
    --bsu-blue: #0033A0;       
    --bsu-blue-dark: #001A33;  
    --bsu-orange: #D64309;     
    --bsu-orange-dark: #A33104;
    --bg-light: #f8fafc;
    --card-bg: #ffffff;
    --text-dark: #1e293b;
    --text-muted: #475569;
    --border-color: #cbd5e1;
    --focus-ring: #D64309;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    overflow-x: hidden;
    width: 100%;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    font-family: "Gotham", "Montserrat", "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    line-height: 1.6;
}

/* ==========================================
   ACCESSIBILITY UTILITIES
   ========================================== */
.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;
}

.skip-link {
    background-color: var(--bsu-orange);
    color: #ffffff;
    font-weight: bold;
    left: 50%;
    padding: 0.75rem 1.5rem;
    position: absolute;
    transform: translateY(-100%) translateX(-50%);
    transition: transform 0.3s ease;
    z-index: 10000;
    border-radius: 0 0 4px 4px;
    text-decoration: none;
}

.skip-link:focus {
    transform: translateY(0) translateX(-50%);
}

:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 3px;
}

/* ==========================================
   FULL-BLEED GLOBAL HEADER (WHITE BAR)
   ========================================== */
.bsu-global-header {
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    width: 100%;
}

.global-header-inner {
    display: flex;
    justify-content: space-between; /* Drives logo far-left, menu/actions far-right */
    align-items: center;
    width: 100%;
    max-width: none;
    height: 95px;       /* Increased header height from 75px to 95px */
    padding-left: 2rem; /* Left edge spacing for logo */
    padding-right: 0;   /* Allows action buttons to span to right border */
}

/* Logo Alignment & Sizing */
.bsu-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    height: 100%;
}

.bsu-header-logo {
    height: 58px;       /* Scaled logo size proportionally from 48px to 58px */
    width: auto;
    display: block;
}

/* Right-Aligned Navigation Bar */
.header-right-actions {
    display: flex;
    align-items: center;
    height: 100%;
    margin-left: auto;
}

.global-utility-nav {
    display: flex;
    list-style: none;
    gap: 1.75rem;
    margin: 0 2rem 0 0;
    padding: 0;
}

.global-utility-nav a {
    color: var(--text-dark);
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.global-utility-nav a:hover {
    color: var(--bsu-orange);
}

/* Full-Height Vertical Divider Action Buttons */
.header-action-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: transparent;
    border: none;
    border-left: 1px solid #e2e8f0; /* Vertical separator line */
    height: 100%;
    padding: 0 1.75rem;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-dark);
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.header-action-btn:hover {
    background-color: var(--bg-light);
}

.header-action-btn.search-toggle {
    color: var(--bsu-orange); /* Signature Boise State orange search text */
}

.header-action-btn.search-toggle svg {
    stroke: var(--bsu-orange); /* Orange search icon */
}

.hamburger-icon {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hamburger-icon span {
    display: block;
    width: 18px;
    height: 2px;
    background-color: currentColor;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ==========================================
   SPLIT HERO SECTION
   ========================================== */
.bsu-split-hero {
    display: flex;
    width: 100%;
    min-height: 500px;
}

.hero-image-half {
    width: 50%;
    background-size: cover;
    background-position: center;
    background-color: #cbd5e1;
}

.hero-content-half {
    width: 50%;
    background-color: var(--bsu-blue);
    color: #ffffff;
    padding: 4rem 10%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-title {
    font-size: 4rem;
    font-weight: 900;
    text-transform: uppercase;
    line-height: 1.1;
    margin-bottom: 2rem;
}

.hero-lead {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero-subtext {
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
}

.bsu-btn-orange {
    display: inline-block;
    align-self: flex-start;
    background-color: var(--bsu-orange);
    color: #ffffff;
    text-decoration: none;
    font-weight: 800;
    padding: 1rem 2rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.bsu-btn-orange:hover {
    background-color: var(--bsu-orange-dark);
}

/* ==========================================
   SECONDARY NAVIGATION (MOBILE RESPONSIVE)
   ========================================== */

/* Outer bar container */
.bsu-sub-nav {
    display: block !important;
    background-color: #ffffff !important;
    background-image: none !important; /* Strips grey gloss gradients */
    border: none !important;
    border-bottom: 1px solid #e2e8f0 !important; /* Flat horizontal border */
    box-shadow: none !important; /* Strips button drop shadows */
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Menu list wrapper */
.sub-nav-list {
    display: flex !important;
    align-items: center;
    list-style: none !important;
    margin: 0 auto !important;
    padding: 0 1.5rem !important;
    white-space: nowrap;
    max-width: 1600px;
}

.sub-nav-list li {
    margin: 0 !important;
    padding: 0 !important;
    list-style-type: none !important;
    flex-shrink: 0;
}

/* Individual link resets - removes grey background, bevels, and borders */
.sub-nav-list a,
.sub-nav-list li a {
    display: block !important;
    background: transparent !important; /* Completely removes button background color */
    background-image: none !important; /* Removes button gloss overlay */
    border: none !important; /* Removes button borders */
    border-radius: 0 !important; /* Removes rounded corners */
    box-shadow: none !important; /* Removes 3D box shadows */
    padding: 1.25rem 1.15rem !important;
    color: #334155 !important; /* Dark slate text */
    font-family: "Gotham", "Montserrat", "Open Sans", sans-serif !important;
    font-size: 0.88rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    line-height: 1.2 !important;
    transition: color 0.2s ease !important;
}

/* Hover state */
.sub-nav-list a:hover {
    color: #D64309 !important; /* Signature BSU Orange */
    background: transparent !important;
}

/* First/Active item highlight */
.sub-nav-list li:first-child a,
.sub-nav-list a.active,
.sub-nav-list .current-menu-item > a,
.sub-nav-list .current-page-ancestor > a {
    color: #D64309 !important;
    font-weight: 700 !important;
    background: transparent !important;
    border-bottom: 3px solid #D64309 !important; /* Clean flat orange underline bar */
}

/* ==========================================
   MAIN CONTENT AREA
   ========================================== */
.site-main {
    flex: 1;
    width: 100% !important;
    max-width: 1100px !important;
    margin: 0 auto !important;    /* Centers the content block horizontally */
    padding: 3rem 1.5rem !important;
}

.search-container,
.categories,
.grid {
    width: 100% !important;
    max-width: 100% !important;
}

.search-form-wrap { display: flex; width: 100%; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.search-input { flex: 1; padding: 1rem 1.25rem; border: 1px solid var(--border-color); border-right: none; border-radius: 4px 0 0 4px; font-size: 1rem; min-height: 50px; }
.search-btn { background-color: var(--bsu-blue); color: #ffffff; border: none; padding: 1rem 2rem; border-radius: 0 4px 4px 0; font-weight: bold; font-size: 1rem; text-transform: uppercase; cursor: pointer; transition: background 0.2s ease; }
.search-btn:hover { background-color: var(--bsu-orange); }

/* Categories */
.categories { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 2rem; width: 100%; }
.category-chip { background-color: var(--card-bg); border: 1px solid var(--border-color); color: var(--bsu-blue); padding: 0.5rem 1.25rem; border-radius: 4px; font-weight: 700; font-size: 0.9rem; text-transform: uppercase; text-decoration: none; transition: all 0.2s ease; }
.category-chip:hover, .category-chip.active { background-color: var(--bsu-orange); border-color: var(--bsu-orange); color: #ffffff; }

/* Grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 2rem; width: 100%; }
.card { background: var(--card-bg); border: 1px solid var(--border-color); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); display: flex; flex-direction: column; width: 100%; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.card:hover { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12); }
.card-img-link { display: block; height: 200px; background-color: #e2e8f0; overflow: hidden; border-bottom: 4px solid var(--bsu-orange); }
.card-img-link img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 1.5rem; display: flex; flex-direction: column; flex: 1; }
.card-title { font-size: 1.25rem; font-weight: 800; margin-bottom: 0.5rem; line-height: 1.3; }
.card-title a { color: var(--text-dark); text-decoration: none; transition: color 0.2s ease; }
.card-title a:hover { color: var(--bsu-orange); }
.card-meta { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1.25rem; text-transform: uppercase; font-weight: 600; letter-spacing: 0.05em; }
.card-btn { margin-top: auto; background-color: transparent; color: var(--bsu-blue); text-align: center; padding: 0.75rem 1rem; border: 2px solid var(--bsu-blue); border-radius: 4px; text-decoration: none; font-weight: 700; text-transform: uppercase; transition: all 0.2s ease; }
.card-btn:hover { background-color: var(--bsu-blue); color: #ffffff; }

/* ==========================================
   FULL-WIDTH GLOBAL FOOTER
   ========================================== */
.site-footer,
footer {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 3rem 2rem !important;
    background-color: var(--bsu-blue-dark); /* BSU Dark Navy */
    color: #ffffff;
}

.footer-inner,
.site-footer .container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ==========================================
   MOBILE MENU DRAWER & RESPONSIVE TOGGLES
   ========================================== */
/* Hide hamburger toggle on desktop by default */
.header-action-btn.menu-toggle {
    display: none;
}

.mobile-menu-drawer {
    display: none;
    background-color: #0033A0; /* BSU Blue */
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1rem 0;
}

.mobile-menu-drawer.is-active {
    display: block;
}

.mobile-utility-nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.mobile-utility-nav li a {
    display: block;
    padding: 0.85rem 2rem;
    color: #ffffff;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.mobile-utility-nav li a:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: #D64309;
}

/* Transform Hamburger Icon into an 'X' when open */
.menu-toggle.is-active .hamburger-icon span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}
.menu-toggle.is-active .hamburger-icon span:nth-child(2) {
    opacity: 0;
}
.menu-toggle.is-active .hamburger-icon span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
}

/* Mobile Breakpoints */
@media (max-width: 768px) {
    .global-utility-nav {
        display: none !important; /* Hide desktop utility items on mobile */
    }

    /* Show hamburger toggle only on mobile */
    .header-action-btn.menu-toggle {
        display: flex;
    }
}

/* ==========================================
   HIDE BREADCRUMBS GLOBAL RESET
   ========================================== */
.breadcrumb,
.breadcrumbs,
.site-breadcrumbs,
.rank-math-breadcrumb,
.yoast-breadcrumb,
.woocommerce-breadcrumb {
    display: none !important;
}
/* ==========================================
   HIDE PAGE TITLES GLOBAL RESET
   ========================================== */
.page .entry-title,
.page-title,
.entry-title,
.site-main .entry-title {
    display: none !important;
}
/* ==========================================
   MOBILE & TABLET RESPONSIVE BREAKPOINTS
   ========================================== */
@media (max-width: 1024px) {
    .bsu-split-hero {
        flex-direction: column;
    }
    
    .hero-image-half,
    .hero-content-half {
        width: 100%;
    }
    
    .hero-image-half {
        min-height: 250px;
    }
    
    .hero-content-half {
        padding: 3rem 1.5rem;
    }

    .hero-title {
        font-size: 2.75rem;
    }
}

@media (max-width: 768px) {
    /* Header adjustments */
    .global-header-inner {
        padding-left: 1rem;
        height: 75px; /* Increased mobile header height from 65px to 75px */
    }

    .bsu-header-logo {
        height: 46px; /* Scaled mobile logo from 38px to 46px */
    }

    .global-utility-nav {
        display: none !important; /* Hides top inline links on mobile */
    }

    .header-action-btn {
        padding: 0 1rem;
        font-size: 0.85rem;
    }

    /* Sub-nav horizontal touch scrolling */
    .sub-nav-list {
        padding: 0 1rem !important;
    }

    .sub-nav-list a,
    .sub-nav-list li a {
        padding: 1rem 0.85rem !important;
        font-size: 0.82rem !important;
    }

    /* Hero section */
    .hero-title {
        font-size: 2.25rem;
        margin-bottom: 1rem;
    }

    .hero-lead {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }

    .hero-subtext {
        font-size: 1rem;
        margin-bottom: 1.75rem;
    }

    .bsu-btn-orange {
        width: 100%;
        text-align: center;
        padding: 0.85rem 1.5rem;
    }

    /* Layout & search bar adjustments */
    .site-main {
        padding: 1.5rem 1rem !important;
    }

    .search-form-wrap {
        flex-direction: column;
        box-shadow: none;
        gap: 0.5rem;
    }

    .search-input {
        width: 100%;
        border-radius: 4px;
        border-right: 1px solid var(--border-color);
    }

    .search-btn {
        width: 100%;
        border-radius: 4px;
    }

    /* Category Chips - Enable horizontal scrolling on small screens */
    .categories {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
    }

    .category-chip {
        flex-shrink: 0;
        white-space: nowrap;
    }

    /* Grid cards stack cleanly */
    .grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    /* Footer padding on smaller displays */
    .site-footer,
    footer {
        padding: 2rem 1rem !important;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.85rem;
    }
}

/* ==========================================
   MOBILE & TABLET RESPONSIVE BREAKPOINTS
   ========================================== */
@media (max-width: 768px) {
    /* Footer - 2 Column Layout on Mobile */
    .site-footer,
    footer {
        padding: 2rem 1rem !important;
    }

    .footer-inner,
    .site-footer .container,
    .footer-widgets,
    .footer-navigation {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem 1rem !important;
        align-items: start !important;
    }

    /* Ensures list items inside footer widgets span cleanly */
    .site-footer ul,
    footer ul {
        list-style: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .site-footer ul li,
    footer ul li {
        margin-bottom: 0.5rem !important;
    }
}