/* 
 * base.css
 * Core styles and resets for the entire website
 */

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    line-height: 1.15;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f7f9fc;
    margin: 0;
    padding: 0;
}

/* Skip to content link */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: #ff6600;
    color: white;
    padding: 8px 15px;
    z-index: 9999;
    transition: top 0.3s;
}

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

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

/* Common typography */
h1, h2, h3, h4, h5, h6 {
    color: #003366;
    margin-bottom: 1rem;
}

h1 {
    font-size: 28px;
    text-align: center;
    font-weight: bold;
}

p {
    margin-bottom: 1rem;
}

a {
    color: #0056b3;
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: #003d7a;
}

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

/* Common button styles */
.btn {
    display: inline-block;
    padding: 0.9375rem 1.875rem;
    border-radius: 5px;
    font-weight: bold;
    font-size: clamp(0.875rem, 2vw, 1.125rem);
    transition: all 0.3s;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary {
    background-color: #ff6600;
    color: white;
    border: 2px solid #ff6600;
}

.btn-primary:hover {
    background-color: #e65c00;
    transform: translateY(-3px);
    color: white;
    border-color: #e65c00;
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.9);
    color: #003366;
    border: 2px solid transparent;
}

.btn-secondary:hover {
    background-color: white;
    transform: translateY(-3px);
    color: #003366;
    border-color: white;
}

/* Main container */
.main-container { 
    max-width: 800px; 
    margin: 30px auto; 
    background: white; 
    padding: 30px; 
    border-radius: 8px; 
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); 
}

/* Section titles with fluid typography */
.section-title {
    text-align: center;
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    margin-bottom: 0.9375rem;
    color: #003366;
}

.section-subtitle {
    text-align: center;
    font-size: clamp(1rem, 2vw, 1.125rem);
    margin-bottom: 3.125rem;
    color: #666;
}

/* Accessibility enhancements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus states for accessibility */
a:focus, button:focus, input:focus, textarea:focus, [tabindex]:focus {
    outline: 3px solid rgba(0, 86, 179, 0.5);
    outline-offset: 2px;
}

/* Responsive utilities */
@media (max-width: 1200px) {
    html {
        font-size: 16px;
    }
}

@media (max-width: 992px) {
    html {
        font-size: 15px;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    .container {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 13px;
    }
}

/* Fix for iPhone X and newer models with notch */
@supports (padding: max(0px)) {
    .container {
        padding-left: max(20px, env(safe-area-inset-left));
        padding-right: max(20px, env(safe-area-inset-right));
    }
}

/* Print styles */
@media print {
    *,
    *::before,
    *::after {
        background: transparent !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    a,
    a:visited {
        text-decoration: underline;
    }
    
    a[href]::after {
        content: " (" attr(href) ")";
    }
    
    abbr[title]::after {
        content: " (" attr(title) ")";
    }
    
    a[href^="#"]::after,
    a[href^="javascript:"]::after {
        content: "";
    }
    
    pre,
    blockquote {
        border: 1px solid #999;
        page-break-inside: avoid;
    }
    
    thead {
        display: table-header-group;
    }
    
    tr,
    img {
        page-break-inside: avoid;
    }
    
    img {
        max-width: 100% !important;
    }
    
    p,
    h2,
    h3 {
        orphans: 3;
        widows: 3;
    }
    
    h2,
    h3 {
        page-break-after: avoid;
    }
    
    body {
        padding: 2cm;
        font-size: 12pt;
    }
}