/**
 * GLOBAL STYLES
 * Shared styles across all education site pages
 */

/* ============================================================================
   RESET & BASE STYLES
   ============================================================================ */

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

:root {
    /* Colors - Tony Brandenburg Brand */
    --primary-color: #2EB8B8;
    --primary-dark: #00A3A3;
    --gold: #2EB8B8;
    --gold-light: #dbb84d;
    
    /* Navy */
    --secondary-color: #1a2f4a;
    --secondary-dark: #0f1d2d;
    --navy: #1a2f4a;
    --navy-light: #2d4a6f;
    --navy-dark: #0f1d2d;
    
    /* Text */
    --text-color: #1a1a1a;
    --text-muted: #5a6a7a;
    
    /* Backgrounds */
    --bg-color: #ffffff;
    --bg-gray: #faf8f5;
    --cream: #faf8f5;
    
    --border-color: #e8e6e1;
    
    /* Status Colors */
    --success-color: #2EB8B8;
    --gold: #2EB8B8;
    --error-color: #c9544d;
    --warning-color: #2EB8B8;
    --info-color: #3b82f6;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 20px;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(26,47,74,0.05);
    --shadow-md: 0 4px 12px rgba(26,47,74,0.1);
    --shadow-lg: 0 10px 40px rgba(26,47,74,0.15);
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

body {
    font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-gray);
    color: var(--text-color);
    line-height: 1.7;
    font-size: 17px;
}

/* ============================================================================
   TYPOGRAPHY
   ============================================================================ */

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: var(--spacing-sm);
    color: var(--navy);
}

/* Headings inside dark headers should be white */
header h1, header h2, header h3,
.page-header h1, .page-header h2,
.survey-header h1, .survey-header h2,
.landing-header h1, .landing-header h2,
.landing-intro h1, .landing-intro h2,
.report-header h1, .report-header h2,
.hero h1, .hero h2, .hero p {
    color: white;
}

/* ============================================================================
   SITE HEADER - Standardized page headers across the platform
   ============================================================================ */

.site-header {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    color: white;
    padding: 5rem 2rem;
    text-align: center;
}

.site-header .hero-image {
    width: 150px;
    height: auto;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.site-header h1 {
    font-size: 2.75rem;
    margin: 0 0 0.5rem;
    color: white;
}

.site-header p {
    font-size: 1.3rem;
    margin: 0;
    opacity: 0.9;
    color: white;
}

.site-header .header-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
    display: block;
}

.site-header .header-tagline {
    color: var(--gold);
    font-size: 1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 1rem;
}

/* Responsive adjustments for site header */
@media (max-width: 768px) {
    .site-header {
        padding: 3rem 1.5rem;
    }
    .site-header h1 {
        font-size: 2rem;
    }
    .site-header p {
        font-size: 1.1rem;
    }
    .site-header .header-icon {
        font-size: 3.5rem;
    }
}

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

p {
    margin-bottom: var(--spacing-sm);
}

.text-muted {
    color: var(--text-muted);
}

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

.lead {
    font-size: 1.25rem;
    font-weight: 400;
}

/* ============================================================================
   LAYOUT
   ============================================================================ */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.container-sm {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.section {
    padding: var(--spacing-xl) 0;
}

.grid {
    display: grid;
    gap: var(--spacing-md);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 768px) {
    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }
}

/* ============================================================================
   CARDS
   ============================================================================ */

.card {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
}

.card-header {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    color: var(--secondary-color);
}

.card-body {
    line-height: 1.7;
}

.card-footer {
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-color);
}

/* ============================================================================
   BUTTONS
   ============================================================================ */

.btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    line-height: 1;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: var(--secondary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn-disabled {
    background: #9ca3af;
    color: white;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-disabled:hover {
    transform: none;
    box-shadow: none;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.125rem;
}

/* ============================================================================
   FORMS
   ============================================================================ */

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    color: var(--secondary-color);
}

.form-control {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: border-color var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-control:disabled {
    background: var(--bg-gray);
    cursor: not-allowed;
}

select.form-control {
    cursor: pointer;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.form-text {
    display: block;
    margin-top: var(--spacing-xs);
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ============================================================================
   ALERTS
   ============================================================================ */

.alert {
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
}

.alert-success {
    background: #fef9e7;
    color: #92400e;
    border-left: 4px solid var(--success-color);
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid var(--error-color);
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border-left: 4px solid var(--warning-color);
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border-left: 4px solid var(--info-color);
}

/* ============================================================================
   BADGES
   ============================================================================ */

.badge {
    display: inline-block;
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 12px;
    line-height: 1;
}

.badge-admin {
    background: var(--success-color);
    color: white;
}

.badge-user {
    background: #6b7280;
    color: white;
}

.badge-primary {
    background: var(--primary-color);
    color: white;
}

.badge-secondary {
    background: var(--secondary-color);
    color: white;
}

/* ============================================================================
   LOADING STATES
   ============================================================================ */

.spinner {
    border: 3px solid var(--bg-gray);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    text-align: center;
    margin-top: var(--spacing-sm);
    color: var(--text-muted);
}

/* ============================================================================
   UTILITIES
   ============================================================================ */

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }

.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }

.p-1 { padding: var(--spacing-xs); }
.p-2 { padding: var(--spacing-sm); }
.p-3 { padding: var(--spacing-md); }
.p-4 { padding: var(--spacing-lg); }

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

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.25rem; }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* ============================================================================
   PRINT STYLES
   ============================================================================ */

@media print {
    .no-print,
    button:not(.keep-print),
    .btn:not(.keep-print),
    nav,
    .nav-container,
    .site-nav {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
