/* Expert CCW - Main Stylesheet */
/* Optimized for Performance and Modern Web Standards */

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

body {
    font-family: 'Arial', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    font-display: swap;
}

/* Improved Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
}

/* Skip Navigation Link for Accessibility */
.skip-nav {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 9999;
}

.skip-nav:focus {
    top: 6px;
}

/* Header Styles */
header {
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5282 100%);
    color: white;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: #ffffff;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.nav-links a:hover,
.nav-links a.active,
.nav-links a:focus {
    color: #dc2626;
    background-color: rgba(255,255,255,0.1);
    outline: 2px solid transparent;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero and Page Header Styles */
.hero, .page-header {
    background: linear-gradient(rgba(30, 58, 95, 0.8), rgba(44, 82, 130, 0.8)),
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><rect fill="%23f0f4f8" width="1200" height="600"/><polygon fill="%23e2e8f0" points="0,400 400,350 800,380 1200,320 1200,600 0,600"/><polygon fill="%23cbd5e0" points="0,450 300,420 600,440 900,400 1200,380 1200,600 0,600"/></svg>');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 150px 2rem 100px;
    margin-top: 80px;
}

.hero h1, .page-header h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle, .page-header p {
    font-size: clamp(1rem, 3vw, 1.3rem);
    margin-bottom: 2rem;
    color: #e2e8f0;
}

/* Button Styles */
.cta-button {
    display: inline-block;
    background: linear-gradient(45deg, #dc2626, #b91c1c);
    color: white;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
    border: none;
    cursor: pointer;
}

.cta-button:hover,
.cta-button:focus {
    background: linear-gradient(45deg, #b91c1c, #991b1b);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4);
    outline: 2px solid transparent;
}

/* Card Styles */
.service-card, .credential-card, .class-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card:hover, .credential-card:hover, .class-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.service-card::before, .class-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #dc2626, #1e3a5f);
}

/* Grid Layouts */
.services-grid, .credentials-grid, .classes-grid, .testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Testimonials Styles */
.testimonials {
    background: #f8f9fa;
    padding: 80px 2rem;
}

.testimonials-container {
    max-width: 1200px;
    margin: 0 auto;
}

.testimonial-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    text-align: center;
    position: relative;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 4rem;
    color: #dc2626;
    opacity: 0.3;
    font-family: Georgia, serif;
}

.stars {
    color: #fbbf24;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.testimonial-card blockquote {
    font-size: 1.1rem;
    font-style: italic;
    color: #4b5563;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.testimonial-card cite {
    font-weight: bold;
    color: #1e3a5f;
    font-style: normal;
}

/* Enhanced Class Listings */
.upcoming-classes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.class-listing {
    background: rgba(255,255,255,0.95);
    padding: 1.5rem;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    text-align: center;
    border: 2px solid rgba(255,255,255,0.3);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.class-listing h3 {
    color: #1e3a5f;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 700;
}

.class-listing .class-info {
    line-height: 1.8;
    margin-bottom: 0;
    color: #4b5563;
}

.class-listing strong {
    color: #1e3a5f;
    font-size: 1.2rem;
    font-weight: 700;
    display: block;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: rgba(30, 58, 95, 0.1);
    border-radius: 6px;
}

/* Section Styles */
.section-title {
    text-align: center;
    font-size: clamp(2rem, 4vw, 2.5rem);
    margin-bottom: 3rem;
    color: #1e3a5f;
    font-weight: 700;
}

.main-content, .services-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 2rem;
}

/* Footer Styles */
footer {
    background: #1f2937;
    color: white;
    padding: 40px 2rem 20px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: #dc2626;
}

.footer-section p, .footer-section a {
    color: #d1d5db;
    text-decoration: none;
    line-height: 1.6;
}

.footer-section a:hover, .footer-section a:focus {
    color: white;
    outline: 2px solid transparent;
}

.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #374151;
    color: #9ca3af;
}

/* Utility Classes */
.text-center { text-align: center; }
.mb-2 { margin-bottom: 2rem; }
.mt-2 { margin-top: 2rem; }

/* Focus Styles for Accessibility */
*:focus {
    outline: 2px solid #dc2626;
    outline-offset: 2px;
}

/* Loading Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #1e3a5f;
        flex-direction: column;
        gap: 0;
        padding: 1rem 0;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        display: block;
        padding: 1rem 2rem;
        width: 100%;
        text-align: left;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero, .page-header {
        padding: 120px 1rem 80px;
    }

    .services-grid, .credentials-grid, .classes-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .main-content, .services-container {
        padding: 60px 1rem;
    }

    /* Enhanced mobile class listings */
    .upcoming-classes {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .class-listing {
        background: white;
        border: 2px solid #e5e7eb;
        padding: 2rem 1.5rem;
    }

    .class-listing h3 {
        color: #1e3a5f;
        font-size: 1.4rem;
    }

    .class-listing strong {
        color: #1e3a5f;
        background: #f0f4f8;
        border: 1px solid #cbd5e0;
        font-size: 1.3rem;
        padding: 1rem;
        margin-top: 1rem;
    }
}

@media (max-width: 480px) {
    nav {
        padding: 0 1rem;
    }

    .service-card, .credential-card, .class-card {
        padding: 1.5rem;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .cta-button {
        border: 2px solid white;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}