/**
 * WindFire Designs - Global Stylesheet
 * Modern, responsive design for all pages
 * Features hamburger navigation for all devices
 *
 * Copyright © 2000 - ∞ WindFire Designs
 */

/* ===========================
   CSS Reset and Base Styles
   =========================== */

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

/* ===========================
   CSS Variables
   =========================== */

:root {
    --primary-color: #000000;
    --secondary-color: #757575;
    --background-color: #ffffff;
    --nav-background: rgba(255, 255, 255, 0.95);
    --hover-background: rgba(0, 0, 0, 0.1);
    --max-width: 1200px;
    --spacing-xs: 10px;
    --spacing-sm: 20px;
    --spacing-md: 40px;
    --spacing-lg: 60px;
    --border-radius: 7px;
}

/* ===========================
   Body and Base Typography
   =========================== */

body {
    font-family: "Trebuchet MS", Helvetica, sans-serif;
    font-size: 16px;
    color: var(--secondary-color);
    background-color: var(--background-color);
    line-height: 1.6;
}

/* ===========================
   Accessibility
   =========================== */

.skip-link {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    z-index: 1000;
}

.skip-link:focus {
    position: fixed;
    left: 10px;
    top: 10px;
    width: auto;
    height: auto;
    overflow: visible;
    z-index: 10000;
}

.visually-hidden {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ===========================
   Global Navigation - Hamburger Only
   =========================== */

.global-nav {
    position: sticky;
    top: 0;
    background: var(--nav-background);
    background-image: url("../images/index-images/white-silk-macro.jpg");
    background-size: cover;
    background-position: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
    border-radius: var(--border-radius);
    margin-bottom: var(--spacing-sm);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 75px;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.nav-logo:hover,
.nav-logo:focus {
    opacity: 0.7;
}

/* ===========================
   Hamburger Menu Button
   =========================== */

.menu-toggle {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    background: none;
    border: 2px solid var(--primary-color);
    padding: 0.6rem;
    z-index: 101;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.menu-toggle:hover,
.menu-toggle:focus {
    background-color: var(--hover-background);
    transform: scale(1.05);
}

.menu-toggle span {
    width: 28px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-6px, 6px);
}

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

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

/* Menu Label Next to Hamburger */
.menu-label {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-right: 0.5rem;
}

/* ===========================
   Slide-out Menu Panel
   =========================== */

.nav-menu-panel {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 400px;
    max-width: 90vw;
    background: var(--nav-background);
    box-shadow: -2px 0 20px rgba(0, 0, 0, 0.2);
    transition: right 0.3s ease;
    overflow-y: auto;
    z-index: 1000;
    padding: 80px 0 40px;
}

.nav-menu-panel.active {
    right: 0;
}

/* Menu Overlay */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    z-index: 99;
}

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

/* Close Button in Menu */
.menu-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--primary-color);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.menu-close:hover,
.menu-close:focus {
    background-color: var(--hover-background);
}

/* ===========================
   Menu Structure
   =========================== */

.menu-header {
    padding: 0 30px 20px;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 20px;
}

.menu-header h2 {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: normal;
}

/* Menu Sections */
.menu-section {
    padding: 15px 30px;
}

.menu-section-title {
    font-size: 0.85rem;
    font-weight: bold;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #e0e0e0;
}

.nav-menu {
    list-style: none;
}

.nav-menu li {
    margin: 5px 0;
}

.nav-menu a {
    display: block;
    color: var(--primary-color);
    text-decoration: none;
    padding: 12px 15px;
    border-radius: 5px;
    transition: all 0.3s ease;
    font-size: 1.05rem;
}

.nav-menu a:hover,
.nav-menu a:focus {
    background-color: var(--hover-background);
    padding-left: 20px;
}

.nav-menu .current {
    background-color: var(--primary-color);
    color: white;
}

.nav-menu .current:hover,
.nav-menu .current:focus {
    background-color: #333;
}

/* Submenu Items */
.nav-submenu {
    list-style: none;
    padding-left: 15px;
    margin-top: 5px;
}

.nav-submenu a {
    font-size: 0.95rem;
    padding: 8px 15px;
    color: var(--secondary-color);
}

.nav-submenu a:hover,
.nav-submenu a:focus {
    color: var(--primary-color);
}

/* Menu Contact Section */
.menu-contact {
    padding: 20px 30px;
    margin-top: 20px;
    border-top: 2px solid #e0e0e0;
    background-color: rgba(0, 0, 0, 0.02);
}

.menu-contact h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.menu-contact p {
    font-size: 0.9rem;
    margin: 5px 0;
    color: var(--secondary-color);
}

.menu-contact a {
    color: var(--primary-color);
    text-decoration: none;
}

.menu-contact a:hover {
    text-decoration: underline;
}

/* ===========================
   Horizontal Contextual Navigation
   =========================== */

.horizontal-context-nav {
    background: #ffffff;
    border-bottom: 1px solid #000000;
    border-top: 1px solid #e5e5e5;
    padding: 0;
}

.horizontal-context-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
}

.context-section-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #666;
    font-weight: 600;
    padding-right: 12px;
    border-right: 1px solid #d0d0d0;
    white-space: nowrap;
}

.horizontal-context-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    list-style: none;
    margin: 0;
    padding: 8px 0;
    flex: 1;
}

.horizontal-context-menu li {
    margin: 0;
}

.horizontal-context-menu a {
    display: block;
    padding: 6px 16px;
    color: #000000;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 400;
    border-right: 1px solid #d0d0d0;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.horizontal-context-menu li:last-child a {
    border-right: none;
}

.horizontal-context-menu a:hover {
    background: #000000;
    color: #ffffff;
}

.horizontal-context-menu a:focus {
    outline: 2px solid #000000;
    outline-offset: -2px;
}

.horizontal-context-menu a.current {
    background: #000000;
    color: #ffffff;
    font-weight: 600;
}

/* Responsive: Compact on tablet */
@media (max-width: 768px) {
    .context-section-label {
        font-size: 0.7rem;
        padding-right: 8px;
    }

    .horizontal-context-menu {
        gap: 1px;
    }

    .horizontal-context-menu a {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
}

/* Responsive: Horizontal scroll on mobile (space-efficient) */
@media (max-width: 640px) {
    .horizontal-context-container {
        flex-direction: row;
        align-items: center;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 8px;
        padding: 8px 20px;
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
        scrollbar-width: thin;
    }

    .context-section-label {
        border-right: 1px solid #d0d0d0;
        padding-right: 8px;
        padding-bottom: 0;
        flex-shrink: 0; /* Don't shrink the label */
        font-size: 0.7rem;
    }

    .horizontal-context-menu {
        flex-direction: row;
        width: auto;
        padding: 0;
        gap: 2px;
        flex-wrap: nowrap; /* Don't wrap - scroll instead */
    }

    .horizontal-context-menu li {
        flex-shrink: 0; /* Prevent items from shrinking */
    }

    .horizontal-context-menu a {
        border-right: 1px solid #d0d0d0;
        border-bottom: none;
        padding: 6px 12px;
        font-size: 0.85rem;
        white-space: nowrap;
    }

    /* Subtle scroll indicator hint */
    .horizontal-context-container::after {
        content: "→";
        position: sticky;
        right: 0;
        background: linear-gradient(to left, white 50%, transparent);
        padding-left: 20px;
        color: #666;
        font-size: 1.1rem;
        pointer-events: none;
    }
}

/* ===========================
   Main Container
   =========================== */

.main-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

/* ===========================
   Site Header
   =========================== */

.site-header {
    text-align: center;
    padding: var(--spacing-md) var(--spacing-sm);
    padding-left: 140px; /* Leave room for logo (120px + 20px margin) */
    background-image: url("../images/WindFire-Designs-logo-2015.png");
    background-repeat: no-repeat;
    background-position: 15px 15px;
    background-size: 120px;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: var(--border-radius);
}

.site-header h1 {
    font-size: 2.2rem;
    font-weight: normal;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.site-header h2 {
    font-size: 1.75rem;
    font-weight: normal;
    color: var(--primary-color);
}

/* ===========================
   Section Headers
   =========================== */

.section-header {
    text-align: center;
    padding: var(--spacing-md) var(--spacing-sm);
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-bottom: var(--spacing-md);
    border-radius: var(--border-radius);
}

.section-header h3 {
    font-size: 2.2rem;
    font-weight: normal;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.section-header h2 {
    font-size: 1.75rem;
    font-weight: normal;
    color: var(--primary-color);
}

/* ===========================
   Image Grid
   =========================== */

.image-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 3px;
    margin: var(--spacing-sm) 0;
}

.image-grid a {
    display: block;
    overflow: hidden;
    border-radius: var(--border-radius);
}

.image-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: var(--border-radius);
    transition: transform 0.3s ease;
}

.image-grid a:hover img,
.image-grid a:focus img {
    transform: scale(1.05);
}

/* ===========================
   Content Sections
   =========================== */

.content-section {
    margin: var(--spacing-lg) 0;
}

/* Two Column Layout */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-sm);
    margin: var(--spacing-md) 0;
}

.col {
    display: flex;
    flex-direction: column;
}

/* Center images within columns */
.col img {
    margin-left: auto;
    margin-right: auto;
}

/* Ticket Grid Layout - For repair ticket selection */
.ticket-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin: var(--spacing-md) 0;
}

.ticket-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.ticket-item p {
    font-size: 1.56rem;
    margin: 0 0 1rem 0;
}

.ticket-item a {
    text-decoration: none;
}

.ticket-item img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.ticket-item a:hover img,
.ticket-item a:focus img {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ===========================
   Typography
   =========================== */

h1,
h2,
h3,
h4,
h5 {
    font-weight: normal;
    color: var(--primary-color);
    line-height: 1.3;
}

h2 {
    font-size: 1.75rem;
    margin: var(--spacing-sm) 0;
    text-align: center;
}

h3 {
    font-size: 2.2rem;
    margin: var(--spacing-sm) 0;
    text-align: center;
}

h4 {
    font-size: 2.2rem;
    margin: var(--spacing-sm) var(--spacing-md);
    text-align: left;
}

h5 {
    font-size: 1.75rem;
    margin: var(--spacing-sm) var(--spacing-md);
    text-align: left;
}

p {
    font-size: 1.56rem;
    color: var(--primary-color);
    text-align: left;
    margin: var(--spacing-md) var(--spacing-md);
    line-height: 1.6;
}

ul,
ol {
    margin: var(--spacing-md) var(--spacing-md);
    padding-left: 25px;
}

li {
    font-size: 1.44rem;
    color: var(--primary-color);
    text-align: left;
    padding-bottom: 8px;
    line-height: 1.6;
}

/* ===========================
   Images and Videos
   =========================== */

img,
video {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    display: block;
}

.full-width-image,
.full-width-video {
    margin: var(--spacing-sm) 0;
}

video {
    width: 100%;
}

/* Responsive iframe wrapper for YouTube embeds */
.full-width-media {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    margin: var(--spacing-sm) 0;
}

.full-width-media iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ===========================
   Links
   =========================== */

a {
    color: #333;
    transition: color 0.3s ease;
}

a:visited {
    color: #4a4a4a;
}

a:hover,
a:focus {
    color: var(--primary-color);
}

/* ===========================
   Utilities
   =========================== */

.spacer {
    height: 10px;
    margin: var(--spacing-md) 0;
}

/* ===========================
   Search Form
   =========================== */

.search-section {
    text-align: center;
    padding: var(--spacing-md) 0;
}

.search-section form {
    display: inline-block;
}

.search-section input[type="text"] {
    padding: 0.75rem 1rem;
    font-size: 1.1rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    width: 300px;
    max-width: 90%;
    margin-right: 0.5rem;
}

.search-section input[type="submit"] {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-section input[type="submit"]:hover,
.search-section input[type="submit"]:focus {
    background-color: var(--secondary-color);
}

/* ===========================
   PayPal Buttons
   =========================== */

/* Center all PayPal forms site-wide */
form[target="paypal"] {
    text-align: center;
    margin: 1rem auto;
}

/* ===========================
   Footer
   =========================== */

.site-footer {
    text-align: center;
    padding: var(--spacing-md) 0;
    color: var(--secondary-color);
}

/* ===========================
   Responsive Design - Tablet
   =========================== */

@media screen and (max-width: 1024px) {
    .site-header h1 {
        font-size: 1.8rem;
    }

    .site-header h2 {
        font-size: 1.4rem;
    }

    .section-header h3 {
        font-size: 1.8rem;
    }

    .section-header h2 {
        font-size: 1.4rem;
    }

    h3 {
        font-size: 1.8rem;
    }

    h4 {
        font-size: 1.8rem;
    }

    h5 {
        font-size: 1.4rem;
    }

    p {
        font-size: 1.3rem;
    }

    li {
        font-size: 1.2rem;
    }

    .image-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .ticket-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.2rem;
    }

    .ticket-item p {
        font-size: 1.1rem;
    }
}

/* ===========================
   Responsive Design - Mobile
   =========================== */

@media screen and (max-width: 768px) {
    .nav-menu-panel {
        width: 320px;
    }

    .menu-label {
        display: none;
    }

    .two-col {
        grid-template-columns: 1fr;
    }

    .image-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .ticket-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .ticket-item p {
        font-size: 1rem;
    }

    .site-header {
        background-size: 80px;
        background-position: center 10px;
        padding-top: 100px;
        padding-left: var(--spacing-sm); /* Reset to normal padding */
        min-height: auto;
    }

    .section-header {
        padding-top: var(--spacing-sm);
        min-height: auto;
    }

    .site-header h1 {
        font-size: 1.5rem;
    }

    .site-header h2 {
        font-size: 1rem;
    }

    .section-header h3 {
        font-size: 1.2rem;
    }

    .section-header h2 {
        font-size: 1rem;
    }

    h3 {
        font-size: 1.2rem;
    }

    h4 {
        font-size: 1.1rem;
    }

    h5 {
        font-size: 1rem;
    }

    p {
        font-size: 1rem;
        margin: var(--spacing-sm);
    }

    li {
        font-size: 0.95rem;
    }

    .search-section input[type="text"] {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .search-section input[type="submit"] {
        width: 100%;
    }
}

/* ===========================
   Responsive Design - Small Mobile (iPhone and smaller)
   =========================== */

@media screen and (max-width: 480px) {
    .site-header {
        background-size: 60px; /* Smaller logo on very small screens */
        background-position: center 10px;
        padding-top: 80px;
        padding-left: var(--spacing-sm);
    }

    .site-header h1 {
        font-size: 1.2rem;
    }

    .site-header h2 {
        font-size: 0.9rem;
    }

    .section-header h3 {
        font-size: 1.1rem;
    }

    .section-header h2 {
        font-size: 0.9rem;
    }

    h2 {
        font-size: 1rem;
    }

    h3 {
        font-size: 1.1rem;
    }

    h4 {
        font-size: 1rem;
    }

    h5 {
        font-size: 0.9rem;
    }

    p {
        font-size: 0.95rem;
        margin: var(--spacing-sm);
    }

    li {
        font-size: 0.9rem;
    }

    .image-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .ticket-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .ticket-item p {
        font-size: 0.95rem;
        margin-bottom: 0.75rem;
    }

    .nav-logo {
        font-size: 1.2rem;
    }

    .nav-menu-panel {
        width: 280px;
    }
}
