/* Layout CSS - Base Structure */

/* Reset and Base Styles */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Headings - Use Nunito Sans */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
}

body.menu-open {
    overflow: hidden;
}

body.menu-open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: calc(var(--z-sticky) - 2);
    pointer-events: none;
    background-color: rgba(0, 0, 0, 0.1);
}

/* Prevent scrolling and blur effect for page content when logo modal is open (mobile only) */
@media (max-width: 768px) {
    body.logo-modal-open {
        overflow: hidden;
    }

    body.logo-modal-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        z-index: calc(var(--z-sticky) - 2);
        pointer-events: none;
        background-color: rgba(0, 0, 0, 0.1);
    }
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-base);
}

ul, ol {
    list-style: none;
}

/* Container */
.container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

/* Site Content */


/* Section Spacing */
.section {
    padding-top: var(--spacing-4xl);
    padding-bottom: var(--spacing-4xl);
}

@media (max-width: 768px) {
    .section {
        padding-top: var(--spacing-3xl);
        padding-bottom: var(--spacing-3xl);
    }
}

/* Grid Utilities */
.grid {
    display: grid;
    gap: var(--spacing-md);
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

/* Screen Reader Text */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    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;
    color: #21759b;
    display: block;
    font-size: 14px;
    font-weight: bold;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}
