/* ============================================
   HEADER, FOOTER & MOBILE NAVIGATION STYLES
   Self-contained CSS file
   ============================================ */

/* CSS Variables */
:root {
    --color-bg: #faf8f5;
    --color-primary: #1a3a52;
    --color-accent: #000000;
    --color-text: #2d3748;
    --color-text-dark: #1a202c;
    --color-text-light: #718096;
    --color-card: #ffffff;
    --color-border: #e2e8f0;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    color: #2d3748;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Accessibility: Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Accessibility: Focus styles */
:focus-visible {
    outline: 0.1875rem solid var(--color-accent);
    outline-offset: 0.125rem;
    border-radius: 0.25rem;
}

/* Accessibility: Skip to content link */
.skip-to-content {
    position: absolute;
    top: -2.5rem;
    left: 0.5rem;
    background: var(--color-accent);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0 0 0.25rem 0.25rem;
    text-decoration: none;
    z-index: 9999;
    transition: top 0.3s ease;
}

.skip-to-content:focus {
    top: 0;
}

/* ============================================
   HEADER STYLES
   ============================================ */

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.875rem 3.125rem;
    position: relative;
    z-index: 100;
}

.header-nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.header-nav a {
    color: #2d3748;
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.header-nav a:hover {
    color: #4299e1;
}

.header-nav a::after {
    content: '';
    position: absolute;
    bottom: -0.25rem;
    left: 0;
    width: 0;
    height: 0.125rem;
    background: #4299e1;
    transition: width 0.3s ease;
}

.header-nav a:hover::after {
    width: 100%;
}

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

.logo-name {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.05em;
    color: #000;
}

.logo-tagline {
    font-size: 0.6875rem;
    color: #666;
    margin-top: 0.125rem;
    letter-spacing: 0.15em;
}

.header-link {
    font-size: 0.8125rem;
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.header-link:hover,
.header-link:focus-visible {
    color: #000;
    text-decoration: underline;
    text-underline-offset: 0.1875rem;
}

.header-link:focus-visible {
    outline: 0.125rem solid var(--color-accent);
    outline-offset: 0.25rem;
    border-radius: 0.125rem;
}

/* ============================================
   FOOTER STYLES
   ============================================ */

footer {
    text-align: center;
    padding: 0 1.25rem 1.875rem 1.25rem;
    color: #666;
    font-size: 0.75rem;
    line-height: 1.4;
}

.footer-separator {
    width: 100%;
    height: 0.0625rem;
    background: #e0e0e0;
    margin-bottom: 1.5625rem;
}

.footer-copyright {
    margin-bottom: 1.25rem;
    max-width: 50rem;
    margin-left: auto;
    margin-right: auto;
}

.footer-links {
    margin-top: 1.25rem;
}

footer a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #000;
}

/* ============================================
   MOBILE BOTTOM NAVIGATION
   ============================================ */

.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 -0.125rem 1rem rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 0.5rem 0 calc(0.5rem + env(safe-area-inset-bottom));
    border-top: 0.0625rem solid #e2e8f0;
}

.mobile-nav-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 100%;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #4a5568;
    font-size: 0.6875rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    min-width: 4.5rem;
    -webkit-tap-highlight-color: transparent;
}

.mobile-nav-item:active {
    transform: scale(0.95);
}

.mobile-nav-icon {
    width: 1.5rem;
    height: 1.5rem;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-nav-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mobile-nav-label {
    line-height: 1.2;
    text-align: center;
}

/* ============================================
   RESPONSIVE STYLES
   ============================================ */

@media (max-width: 48rem) {
    .header-nav {
        display: none;
    }

    .mobile-bottom-nav {
        display: block;
    }

    body {
        padding-bottom: calc(4rem + env(safe-area-inset-bottom));
    }

    header {
        padding: 1.25rem 1.875rem;
    }

    footer {
        padding: 0 1rem 1.5rem 1rem;
    }
}

@media (max-width: 40rem) {
    header {
        padding: 1rem 1.25rem;
    }
}

@media (max-width: 23.4375rem) {
    header {
        padding: 1rem 1.25rem;
    }
}

/* Accessibility: High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --color-border: #000000;
        --color-text: #000000;
        --color-text-dark: #000000;
    }
}
