/* === GLOBAL STYLES === */
html, body {
    background-color: #000;
    color: #fff;
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    font-size: 16px; /* Base size for desktop */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header alignment fixes */
.w3-content {
    max-width: 100% !important;
    padding: 0 !important; /* Remove all padding from w3-content */
    flex: 1 0 auto; /* Push footer to bottom */
}

.w3-container {
    padding-left: 0;
    padding-right: 0;
}

/* Header container alignment */
header.w3-container {
    padding: 20px 15px 0 15px !important; /* Consistent padding */
    margin: 0 auto;
    max-width: 1200px; /* Match the w3-content max-width */
}

/* Center the header content properly */
header.w3-container.w3-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Header title alignment */
header h1 a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    padding: 0 15px; /* Add consistent padding */
}

/* Body content alignment */
.w3-container .content-section {
    margin: 0 auto;
    max-width: 100%;
    text-align: left;
    padding: 0 15px; /* Consistent padding with header */
    width: 100%;
    box-sizing: border-box;
}

/* Ensure content wrapper has proper alignment */
.content-wrapper {
    margin: 0 auto;
    max-width: 1200px; /* Match header max-width */
}

/* === HEADINGS === */
h1, h2, h3, h4, h5 {
    color: #fff;
    font-weight: bold;
}

h1 {
    font-size: 2.2rem;
    margin-bottom: 20px;
    text-align: center;
}

h2 {
    border-bottom: 1px solid #333;
    padding-bottom: 15px;
    margin: 40px 0 25px 0;
    text-align: left;
    font-size: 1.8rem;
}

/* === CONTENT SECTIONS === */
.content-section {
    margin-bottom: 50px;
    text-align: left;
    width: 100%;
}

.content-section p {
    max-width: 100%;
    line-height: 1.7;
    margin: 0 0 20px 0;
    text-align: left;
    font-size: 1.1rem;
}

/* Header image responsiveness for mobile */
header h1 a img {
    max-width: 100%;
    height: auto;
}

/* === IMAGE STYLING === */
img {
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(255, 255, 255, 0.2);
    transition: transform 0.3s;
    max-width: 100%;
    height: auto;
}

img:hover {
    transform: scale(1.02);
}

.intro-image {
    text-align: center;
    margin: 40px 0;
}

.intro-image img {
    max-width: 100%;
}

.image-full {
    text-align: center;
    margin: 40px 0;
}

.image-left {
    float: left;
    margin: 0 25px 15px 0;
    max-width: 50%;
}

.image-right {
    float: right;
    margin: 0 0 15px 25px;
    max-width: 50%;
}

/* === NAVIGATION STYLES === */
.nav-links {
    text-align: center;
    margin: 50px 0;
}

.nav-links a {
    display: inline-block;
    margin: 0 15px;
    padding: 12px 25px;
    background-color: #222;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
    font-size: 1.1rem;
}

.nav-links a:hover {
    background-color: #444;
}

/* === FOOTER === */
footer {
    margin-top: auto;
    padding: 20px 0;
    color: #666;
    text-align: center;
    border-top: none; /* Remove the line */
}

footer p {
    font-size: 0.8rem; /* 100% smaller than default */
    margin: 0;
}

footer a {
    color: #666;
    text-decoration: none;
}

footer a:hover {
    color: #fff;
    text-decoration: underline;
}

/* === UTILITY CLASSES === */
.text-center {
    text-align: center;
}

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

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

.clearfix::after {
    content: "";
    clear: both;
    display: table;
}

/* === DESKTOP-SPECIFIC STYLES === */
@media screen and (min-width: 992px) {
    .w3-container .content-section {
        max-width: 800px;
        margin: 0 auto; /* Center content on desktop */
        padding: 0 20px; /* Slightly more padding on desktop */
    }
    
    header.w3-container {
        padding: 20px 20px 0 20px !important; /* Match content padding */
    }
    
    .content-section p {
        font-size: 1.1rem;
        line-height: 1.7;
    }
}

/* === RESPONSIVE DESIGN FOR MOBILE === */
@media screen and (max-width: 991px) {
    html, body {
        font-size: 20px;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
        margin: 35px 0 20px 0;
    }
    
    .content-section p {
        font-size: 1.2rem;
    }
    
    /* Ensure header doesn't overflow on mobile */
    header h1 a {
        flex-wrap: wrap;
        text-align: center;
    }
    
    header h1 a img {
        max-height: 60px; /* Limit logo size on mobile */
        margin-right: 10px;
    }
}

@media screen and (max-width: 768px) {
    html, body {
        font-size: 22px;
    }
    
    h1 {
        font-size: 2.2rem; /* Slightly smaller on mobile */
    }
    
    h2 {
        font-size: 1.9rem;
    }
    
    /* Header adjustments for mobile */
    header h1 a {
        padding: 0 10px;
    }
    
    header h1 a img {
        max-height: 50px;
        margin-right: 8px;
    }
}

@media screen and (max-width: 600px) {
    html, body {
        font-size: 20px; /* Slightly smaller for very small screens */
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.7rem;
        margin: 30px 0 18px 0;
    }
    
    .content-section p {
        font-size: 1.1rem;
    }
    
    /* Further header adjustments for very small screens */
    header h1 a {
        flex-direction: column;
        text-align: center;
    }
    
    header h1 a img {
        margin-right: 0;
        margin-bottom: 10px;
        max-height: 45px;
    }
    
    /* Ensure content doesn't touch screen edges */
    .w3-container .content-section {
        padding: 0 10px;
    }
    
    /* Footer adjustments for mobile */
    footer {
        padding: 15px 0;
    }
    
    footer p {
        font-size: 0.7rem;
    }
}

/* Very small devices (phones in portrait) */
@media screen and (max-width: 400px) {
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.6rem;
    }
    
    header h1 a img {
        max-height: 40px;
    }
    
    footer p {
        font-size: 0.65rem;
    }
}

/* Viewport meta tag reinforcement */
@viewport {
    width: device-width;
    zoom: 1.0;
}

/* Sticky footer (recap) */
html, body { height: 100%; }
body { min-height: 100vh; display: flex; flex-direction: column; }
.w3-content { flex: 1; display: flex; flex-direction: column; }
footer { margin-top: auto; }
