/* Global Styles | Page-Specific Mobile Styles live in pages.css */

/* ==========================================================================
   Mobile-First Overlays and Side-In Navigation | 
   ========================================================================== */


@media (max-width: 320px) {
    #article-display {
        width: 100%;
        display: flex;
        padding: 0.5rem 0rem 0rem 0rem;
        flex-direction: column;
        overflow-y: auto;
        border-top: 1px solid #e5e7eb;
        border-bottom: 1px solid #e5e7eb;
        border-radius: 0.25rem;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        }
}

@media (max-width: 394px) {

    input {
        font-size: 0.6rem;
    }
}

@media (max-width: 768px) {
/* Never display preview hover box on mobile */
h1, h2, h3, h4, h5, h6 {
    text-align: center;
}

h2 {
    text-align: center;
}

.card-icon {
    display: none;
}

.box{
    display: none;
    width: 100%;
}

.dl-print-text {
    display: none
}

a:hover + .box,.box:hover {
    display: none;
}

.container {
    padding: 0 0.5rem; /* Adjust padding to 0.5rem on smaller screens */
  }
}

.example-item {
    text-align: left;
}

@media (max-width: 930px) {
/* Paragraphs */
p {
    margin: 0 0 1rem 0;
    font-size: 0.8rem;
    line-height: 1.6;
}

    /* Body Styles */
body {
    line-height: 1.6;
    font-size: 12px;
    margin: 0;
    padding: 0; /* Remove global padding from the body on mobile devices */
}

/* Typography */
/* Improved heading hierarchy */
h1, h2, h3, h4, h5, h6 {
    margin: 0 0 1rem 0;
    line-height: 1.2;
}

h1 {
    font-size: 2.25rem; /* 36px */
    text-align: center;
}

h2 {
    text-align: left;
}

h2, .section-title {
    font-size: 1.1rem; 
    padding-bottom: 0.5rem;
}

h3 {
    font-size: 1.5rem; /* 24px */
}

h4 {
    font-size: 1.25rem; /* 20px */
    margin-bottom: 0.8rem;
    text-align: center;
}

h5 {
    text-align: left;
}

.contact-buttons {
    padding-bottom: 0px;
}

.section {
    margin-bottom: 0.5rem;
}

/* Apply the desired padding to the main content area only */
.main-content {
    padding: 0.5rem;
}

/* Main Navigation Wrapper */
.main-navigation {
    position: relative;
}

/* Hamburger and Close Buttons */
.mobile-nav-toggle {
    display: block;
    background: none;
    border: none;
    color: var(--accent-color);
    font-size: 2rem;
    cursor: pointer;
    z-index: 1001;
    position: absolute;
    right: 10px;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.mobile-nav-toggle:hover {
    background-color: rgba(0, 82, 155, 0.1);
}

.close-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 20px;
    color: var(--accent-color);
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1002;
    padding: 5px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.close-btn:hover {
    background-color: rgba(0, 82, 155, 0.1);
}

/* Top-Down Overlay Menu */
.nav-container {
    display: none;
    position: fixed;
    top: 73px;
    right: 3px;
    bottom: 0;
    width: 280px;
    background-color: var(--primary-color);
    backdrop-filter: blur(10px);
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding: 10px 5px 10px;
    z-index: 1000;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
    border-left: 1px solid var(--border);
    border-radius: 4px;
}

.nav-container.is-open {
    width: max-content;
    height: fit-content; 
    display: flex;
    z-index: 1002;
}

/* Navigation Links within Overlay */
.nav-container .nav-item {
    font-size: 1.2rem;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.3s ease;
    text-align: left;
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-container .nav-item:hover,
.nav-container .nav-item:focus {
    background-color: rgba(0, 82, 155, 0.1);
    border-color: var(--accent-color);
    transform: translateX(5px);
}

.nav-container .nav-item.active {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    font-weight: 600;
}

/* Adjust text and icons for mobile */
.nav-container .nav-text {
    display: block;
    font-size: 1.1rem;
}

.nav-container .nav-icon {
    display: inline-block;
    font-size: 18px;
    width: 20px;
    text-align: center;
}

/* Hide dividers in the overlay */
.nav-divider {
    display: none;
}

/* Ensure adequate touch targets */
button, 
.btn, 
.nav-item, 
.btn-social,
.btn-book-session,
input[type="button"],
input[type="submit"] {
    min-height: 44px;
    min-width: 44px;
}

/* Accessibility focus styles */
button:focus,
.btn:focus,
.nav-item:focus,
.btn-social:focus,
.form-input:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Add overlay backdrop when menu is open */
.nav-container.is-open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 280px;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: -1;
    backdrop-filter: blur(2px);
}
}

/* PAGES RESPONSIVE STYLES */

@media (max-width: 930px) {
    .header-title {
        text-align: center;
    }

    .session-radio-box {
    font-size: 1rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    white-space: nowrap;
    justify-content: center;
    text-align: center;
    }

    .tip-header {
        padding: 0.75rem 0.75rem;
    }

    .skill-list {
        font-size: 0.7rem;
        line-height: 1.2;
    }

    .skills-grid {
        gap: 0.5rem;
    }

    .skill-category {
        padding: 0.8rem;
    }

    .skill-category h4 {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }

    .job-header {
        margin-bottom: 0rem;
    }

    .job, .certs-content {
        padding: 0.8rem;
        margin-bottom: 0.5rem; /* Kept existing margin-bottom */
        position: relative; /* Kept existing position */
        text-align: left;
    }

    .job-title {
        font-size: 0.8rem;
    }

    .company {
        font-size: 1rem;
    }

    .dates {
        font-size: 0.7rem;
    }

    .card-title {
        text-align: center;
    }

}

/* Media query for mobile devices */
@media (max-width: 1024px) {
    .sticky-header {
        position: sticky;
        top: 0;
        z-index: 1004;
        background-color: var(--primary-color); /* Or use a CSS variable */
        border-bottom: 1px dotted var(--nav-divider);
        border-radius: 4px;
        opacity: 0.85;
    }
}

/* ==========================================================================
   Desktop Overrides
   ========================================================================== */
@media (min-width: 931px) {
    /* Hide the mobile toggle buttons on desktop */
    .mobile-nav-toggle, .close-btn {
        display: none;
    }

    /* Hide the burger menu assets on desktop */
    .mobile-nav-toggle,
    .close-btn {
        display: none;
    }

    /* Reset navigation to desktop styles */
    .main-navigation .nav-container {
        display: flex;
        flex-direction: row;
        position: static;
        transform: none;
        width: auto;
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(10px);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        padding: 16px 20px;
        border-radius: 6px;
        border: none;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }
       
    .nav-container .nav-icon {
        display: inline-block;
        font-size: 16px;
        width: auto;
    }
    
    .nav-container .nav-text {
        display: block;
        font-size: 14px;
    }
}