/**
 * Foundation Styles for ExamHub Theme
 * Contains only the essential base styles extracted from style.css
 * These are universal styles that would apply to any theme variation
 */

/* ============================================
   CSS RESET AND BASE ELEMENTS
   ============================================ */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Base Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 1rem 0;
    color: #1a1a1a;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.125rem; }

p {
    margin: 0 0 1rem 0;
}

a {
    text-decoration: none;
    transition: color 0.2s ease;
}

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

/* ============================================
   BASIC LAYOUT STRUCTURE
   ============================================ */

.site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    padding: 2rem 0;
}

.content-area {
    width: 100%;
    flex: 1;
}

.site-main {
    width: 100%;
    padding: 2rem 0;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

/* Focus Styles */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Screen Reader Only */
.screen-reader-text,
.sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Skip Links */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 1rem;
    z-index: 999999;
    text-decoration: underline;
}

.skip-link:focus {
    left: 1rem;
    background: #000;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

/* ============================================
   BASIC RESPONSIVE TYPOGRAPHY
   ============================================ */

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    h4 { font-size: 1.25rem; }
    h5 { font-size: 1.125rem; }
    h6 { font-size: 1rem; }
}

@media (max-width: 480px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    .main-content {
        padding: 1rem 0;
    }
    
    .site-main {
        padding: 1rem 0;
    }
}

/* ============================================
   PRINT FOUNDATION
   ============================================ */

@media print {
    body {
        background: white !important;
        color: black !important;
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
        color: black !important;
    }
    
    p {
        orphans: 3;
        widows: 3;
    }
    
    a {
        color: black !important;
        text-decoration: underline !important;
    }
}

/* ============================================
   HIGH CONTRAST MODE FOUNDATION
   ============================================ */

@media (prefers-contrast: high) {
    a:focus,
    button:focus,
    input:focus,
    textarea:focus,
    select:focus {
        outline-width: 3px;
        outline-color: #000;
    }
}

/* ============================================
   REDUCED MOTION FOUNDATION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}
