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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Inter', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    padding-top: 44px;
    background: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden; /* Prevent horizontal scroll */
    width: 100%;
    max-width: 100vw; /* Ensure body doesn't exceed viewport width */
}

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

/* Section Headings */
section h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-align: center;
    color: #1e293b;
    font-weight: 800;
    letter-spacing: -0.02em;
    position: relative;
    display: inline-block;
    width: 100%;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    color: #64748b;
    font-size: 1.1rem;
    margin-top: 1.5rem;
    margin-bottom: 3rem;
}

/* Divider */
.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #667eea, #764ba2, transparent);
    margin: 3rem 0;
    position: relative;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.95rem;
    }
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5568d3 0%, #653a8f 100%);
}

.btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
}

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

/* Responsive container adjustments */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }
}

/* Global mobile fixes */
@media (max-width: 768px) {
    /* Ensure images don't overflow */
    img {
        max-width: 100%;
        height: auto;
    }

    /* Prevent text overflow */
    h1, h2, h3, h4, h5, h6 {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* Ensure tables are scrollable on mobile */
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
    }

    /* Fix for any fixed width elements */
    * {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    /* Smaller font sizes for very small screens */
    body {
        font-size: 15px;
        padding-top: 44px; /* Account for fixed navbar */
    }

    /* Ensure buttons are touch-friendly */
    button, a.btn, .btn {
        min-height: 44px; /* iOS touch target size */
        min-width: 44px;
        padding: 0.625rem 1.25rem;
    }
    
    section h2 {
        font-size: 1.75rem;
        margin-bottom: 0.35rem;
        padding: 0 0.5rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    section h2::after {
        width: 50px;
        height: 3px;
        bottom: -6px;
    }
    
    .section-subtitle {
        font-size: 0.95rem;
        margin-top: 0.75rem;
        margin-bottom: 1.5rem;
        padding: 0 0.75rem;
        line-height: 1.5;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .divider {
        margin: 1.5rem 0;
    }

    /* Prevent horizontal scroll */
    html, body {
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
    }

    * {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    section h2 {
        font-size: 2rem;
        margin-bottom: 0.4rem;
    }
    
    section h2::after {
        width: 60px;
        height: 3px;
        bottom: -8px;
    }
    
    .section-subtitle {
        font-size: 1rem;
        margin-top: 1rem;
        margin-bottom: 2rem;
        padding: 0 1rem;
    }
    
    .divider {
        margin: 2rem 0;
    }
}