/* =========================================
   1. CSS Variables & Reset
   ========================================= */
:root {
    --primary-color: #1a56db;
    --primary-hover: #1e40af;
    --secondary-color: #f3f4f6;
    --text-dark: #1f2937;
    --text-light: #4b5563;
    --white: #ffffff;
    --accent: #f59e0b;
    --border-radius: 8px;
    --transition: all 0.3s ease;
    --max-width: 1200px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.7;
    color: var(--text-dark);
    background-color: var(--white);
}

/* =========================================
   2. Typography & Links
   ========================================= */
h1, h2, h3 {
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

h1 { font-size: 2.5rem; font-weight: 800; }
h2 { font-size: 2rem; font-weight: 700; margin-top: 2.5rem; }
h3 { font-size: 1.25rem; font-weight: 600; margin-top: 1.5rem; }

p {
    margin-bottom: 1.25rem;
    color: var(--text-light);
    font-size: 1.05rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.75rem;
    color: var(--text-light);
}

/* =========================================
   3. Layout & Utilities
   ========================================= */
.container {
    width: 90%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1rem;
}

.btn {
    display: inline-block;
    padding: 0.875rem 1.75rem;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: var(--border-radius);
    font-weight: 600;
    text-align: center;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn:hover {
    background-color: var(--primary-hover);
    color: var(--white);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 86, 219, 0.3);
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

/* =========================================
   4. Header & Navigation
   ========================================= */
.site-header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

.main-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
    gap: 2rem;
}

.main-nav a {
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.95rem;
}

.main-nav a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.nav-cta {
    background-color: var(--primary-color);
    color: var(--white) !important;
    padding: 0.5rem 1.25rem;
    border-radius: var(--border-radius);
}

.nav-cta:hover {
    background-color: var(--primary-hover);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.75rem;
    cursor: pointer;
    color: var(--text-dark);
}

/* =========================================
   5. Hero Section
   ========================================= */
.hero {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: var(--white);
    padding: 5rem 0;
    text-align: center;
}

.hero h1 {
    color: var(--white);
    margin-bottom: 1.5rem;
    font-size: 2.75rem;
}

.hero p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 2.5rem auto;
}

.hero .btn {
    background-color: var(--accent);
    color: var(--text-dark);
}

.hero .btn:hover {
    background-color: #d97706;
    color: var(--white);
}

/* =========================================
   6. Article Content
   ========================================= */
.article-content {
    padding: 4rem 1rem;
    max-width: 800px; /* Optimal reading width */
}

.article-content h2 {
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 0.5rem;
}

/* =========================================
   7. Contact Section
   ========================================= */
.contact-section {
    background-color: var(--secondary-color);
    padding: 4rem 0;
    text-align: center;
}

.contact-section h2 {
    margin-top: 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
    text-align: left;
}

.contact-item {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px rgba(0,0,0,0.03);
}

.contact-item h3 {
    margin-top: 0;
    font-size: 1.1rem;
    color: var(--primary-color);
}

.contact-item p {
    margin-bottom: 0;
    font-weight: 500;
}

.contact-cta-wrapper {
    margin-top: 2rem;
}

/* =========================================
   8. Footer
   ========================================= */
.site-footer {
    background-color: var(--text-dark);
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    padding: 2rem 0;
    font-size: 0.9rem;
}

.site-footer p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
}

/* =========================================
   9. Responsive Design (Mobile)
   ========================================= */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.6rem; }
    
    .hero { padding: 3rem 0; }
    .hero h1 { font-size: 2rem; }
    .hero p { font-size: 1rem; }

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

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--white);
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        padding: 1rem 0;
    }

    .main-nav.active {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 1rem;
        padding: 0 1rem;
    }

    .main-nav a {
        display: block;
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--secondary-color);
    }

    .contact-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* =========================================
   10. Accessibility & Animations
   ========================================= */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .fade-in {
        transition: none;
        opacity: 1;
        transform: none;
    }
    html {
        scroll-behavior: auto;
    }
}