/* General Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    color: var(--color-text);
    background-color: var(--color-background);
    line-height: 1.6;
    overflow-x: hidden; /* Prevent horizontal scroll */
    width: 100%;
    max-width: 100vw;
}

/* Prevent text overflow globally */
h1, h2, h3, h4, h5, h6, p, div, span, a, li {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
}

/* Ensure all elements respect max width */
* {
    max-width: 100%;
}

/* Prevent images from overflowing */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Prevent long URLs from breaking layout */
a {
    overflow-wrap: break-word;
    word-break: break-word;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: clamp(1.75rem, 5vw, 2.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2rem); }
h3 { font-size: clamp(1.25rem, 3.5vw, 1.75rem); }
h4 { font-size: clamp(1.1rem, 3vw, 1.5rem); }

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-secondary);
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
}

@media (max-width: 576px) {
    .container {
        padding: 0 0.75rem;
    }
}

/* Header */
.site-header {
    background: white;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.site-header .navbar-brand h1 {
    font-size: 1.75rem;
    color: var(--color-primary);
    margin: 0;
    font-weight: 700;
}

.site-header .nav-link {
    color: var(--color-text);
    font-weight: 500;
    padding: 0.75rem 1rem;
    transition: color var(--transition-fast);
}

.site-header .nav-link:hover {
    color: var(--color-primary);
}

/* Main Content */
.main-content {
    min-height: 70vh;
    padding: 2rem 0;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--color-dark) 0%, var(--color-secondary) 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
    margin-bottom: 3rem;
}

.hero-title {
    font-size: clamp(1.75rem, 6vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.hero-description {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
    padding: 0 1rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--color-dark) 0%, var(--color-secondary) 100%);
    color: white;
    padding: 3rem 0;
    text-align: center;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: white;
}

/* Section Title */
.section-title {
    font-size: 2rem;
    color: var(--color-secondary);
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--color-accent);
    display: inline-block;
}

/* Buttons */
.btn-primary {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: all var(--transition-normal);
}

.btn-primary:hover {
    background-color: var(--color-secondary);
    border-color: var(--color-secondary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-read-more {
    background-color: var(--color-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    display: inline-block;
    transition: all var(--transition-normal);
}

.btn-read-more:hover {
    background-color: var(--color-secondary);
    color: white;
    transform: translateY(-2px);
}

/* Footer */
.site-footer {
    background: var(--color-dark);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.site-footer h3 {
    color: var(--color-accent);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.site-footer h4 {
    color: var(--color-light);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.site-footer p {
    color: rgba(255, 255, 255, 0.8);
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--color-accent);
}

.footer-bottom {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

/* Content Page */
.content-page {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

.content-page h2 {
    color: var(--color-primary);
    margin-top: 2rem;
}

.content-page h2:first-child {
    margin-top: 0;
}

.content-page ul {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.content-page li {
    margin-bottom: 0.5rem;
}

/* Responsive */

/* Tablets and smaller laptops */
@media (max-width: 992px) {
    .hero-section {
        padding: 3rem 0;
    }

    .page-header {
        padding: 2rem 0;
    }

    .main-content {
        padding: 1.5rem 0;
    }
}

/* Tablets */
@media (max-width: 768px) {
    body {
        font-size: 15px;
    }

    .hero-section {
        padding: 2.5rem 0;
    }

    .page-header {
        padding: 1.5rem 0;
    }

    .page-header h1 {
        font-size: clamp(1.5rem, 5vw, 2rem);
        padding: 0 1rem;
    }

    .section-title {
        font-size: clamp(1.25rem, 4vw, 1.5rem);
    }

    .content-page {
        padding: 1.5rem;
    }

    .site-header .navbar-brand h1 {
        font-size: 1.5rem;
    }
}

/* Mobile devices */
@media (max-width: 576px) {
    body {
        font-size: 14px;
    }

    .hero-section {
        padding: 2rem 0.5rem;
    }

    .page-header {
        padding: 1.5rem 0.5rem;
    }

    .page-header h1 {
        font-size: clamp(1.25rem, 5vw, 1.75rem);
        line-height: 1.3;
    }

    .page-header p {
        font-size: 0.9rem;
        padding: 0 0.5rem;
    }

    .content-page {
        padding: 1rem;
        border-radius: 0;
    }

    .btn-primary,
    .btn-read-more {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }

    .site-footer {
        padding: 2rem 0 1rem;
    }

    .site-header .nav-link {
        padding: 0.5rem 0.75rem;
    }
}

/* Very small mobile devices */
@media (max-width: 375px) {
    .container {
        padding: 0 0.5rem;
    }

    .hero-title,
    .page-header h1 {
        font-size: 1.25rem;
    }

    .hero-description {
        font-size: 0.875rem;
    }

    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }
    h3 { font-size: 1.1rem; }
    h4 { font-size: 1rem; }
}
