/* --- 1. GLOBAL STYLES & VARIABLES --- */

/* A modern CSS reset for a more intuitive box model */
html {
  box-sizing: border-box;
  border-radius: 5px;
}
*, *:before, *:after {
  box-sizing: inherit;
}

/* Defines the color palette and reusable properties based on neobrutalism.dev */
:root {
    --background-color: #FFFFFF;
    --main-text-color: #000000;
    --accent-color: #F5C632; /* Vibrant yellow from neobrutalism.dev */
    --border-thickness: 2px;
    --border-style: var(--border-thickness) solid var(--main-text-color);
    --hard-shadow: 4px 4px 0px var(--main-text-color);
}

/* Basic styles for the entire page */
body {
    font-family: 'IBM Plex Mono', monospace;
    margin: 0;
    line-height: 1.6;
    background-color: var(--background-color);
}

/* This is the main wrapper that allows the dark mode toggle to work */
.site-root {
    background-color: var(--background-color);
    color: var(--main-text-color);
    min-height: 100vh;
    transition: background-color 0.2s, color 0.2s;
}

/* A container to center content and limit its width */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    font-weight: 700;
}


/* --- 2. DARK MODE TOGGLE --- */

.darkmode-toggle {
    display: none;
}

/* When checked, redefine theme variables for both the main site and the sidebar */
#darkmode-toggle:checked ~ .site-root,
#darkmode-toggle:checked ~ .sidebar {
    --background-color: #1a1a1a;
    --main-text-color: #f0f0f0;
    --accent-color: #7EC4CF; /* Use a different accent for dark mode */
}

/* Icon visibility for the toggle button */
#darkmode-toggle:checked ~ .site-root .moon-icon { display: none; }
#darkmode-toggle:checked ~ .site-root .sun-icon { display: inline; }


/* --- 3. REUSABLE COMPONENTS --- */

/* Shared hover effect for all interactive components, based on neobrutalism.dev */
.cta-button, .darkmode-btn, .hamburger-menu, .card, .icon-item {
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    border-radius: 5px;
}

.cta-button:hover, .darkmode-btn:hover, .hamburger-menu:hover, .icon-item:hover,
.card:has(.card-btn:hover) {
    transform: translate(4px, 4px);
    box-shadow: none;
}


/* --- 4. LAYOUT & SECTIONS --- */

/* --- NAVBAR --- */
.navbar {
    background: var(--background-color);
    padding: 1rem 0;
    border-bottom: var(--border-style);
    position: sticky;
    top: 0;
    z-index: 100;
}
.navbar .container { display: flex; justify-content: space-between; align-items: center; }
.logo a { color: var(--main-text-color); text-decoration: none; font-size: 1.5rem; }
.nav-links { list-style: none; display: flex; align-items: center; margin: 0; padding: 0; }
.nav-links li { margin-left: 25px; }
.nav-links a { color: var(--main-text-color); text-decoration: none; font-weight: 700; }

/* --- SIDEBAR --- */
.sidebar-toggle { display: none; }
.hamburger-menu {
    display: none;
    cursor: pointer;
    padding: 5px;
    border: var(--border-style);
    background: var(--background-color);
    box-shadow: var(--hard-shadow);
}
.hamburger-menu div { width: 25px; height: 3px; background: var(--main-text-color); margin: 5px 0; }
.sidebar {
    position: fixed;
    top: 0;
    right: -280px;
    width: 250px;
    height: 100%;
    background: var(--background-color);
    border-left: var(--border-style);
    padding: 80px 15px 15px;
    transition: right 0.3s ease;
    z-index: 200;
}
#sidebar-toggle:checked ~ .sidebar { right: 0; }
.sidebar ul { list-style: none; padding: 0; }
.sidebar li { padding: 15px 0; }
.sidebar a { color: var(--main-text-color); text-decoration: none; font-size: 1.2rem; font-weight: 700; }
.close-sidebar { position: absolute; top: 20px; right: 20px; font-size: 2rem; cursor: pointer; }

/* --- DARK MODE BUTTON --- */
.darkmode-btn {
    cursor: pointer;
    padding: 5px;
    border: var(--border-style);
    background: var(--background-color);
    box-shadow: var(--hard-shadow);
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.darkmode-icon { width: 24px; height: 24px; stroke: var(--main-text-color); fill: none; stroke-width: var(--border-thickness); }
.moon-icon { display: inline; }
.sun-icon { display: none; }

/* --- HERO SECTION --- */
.hero {
    border-bottom: var(--border-style);
    position: relative;
    background-image: url('https://img.freepik.com/premium-photo/river-landscape-mountains_925962-6088.jpg');
    background-size: cover;
    background-position: center;
}
.hero::before { content: ''; position: absolute; inset: 0; background-color: rgba(0, 0, 0, 0.5); z-index: 1; }
.hero-content {
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px 20px;
    position: relative;
    z-index: 2;
    color: #FFFFFF;
}
.hero-content h1 {
    font-size: 3rem;
    margin: 0;
    background: var(--background-color);
    padding: 10px 20px;
    border: var(--border-style);
    color: var(--main-text-color);
    border-radius: 5px;
}
.hero-content p { font-size: 1.2rem; margin-top: 1rem; }
.cta-button {
    background: var(--accent-color);
    color: var(--main-text-color);
    border: var(--border-style);
    padding: 10px 20px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--hard-shadow);
}

/* --- CONTENT SECTIONS --- */
.content-section { padding: 60px 0; display: flex; align-items: stretch; gap: 40px; }
.content-section.reverse { flex-direction: row-reverse; }
.text-content { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.text-content h2, p{ text-align: center; }
.text-content p, .text-content ol { font-size: clamp(1rem, 0.8rem + 1vw, 1.5rem); }
.image-content { flex: 1; border: var(--border-style); box-shadow: var(--hard-shadow); }
.image-content img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* --- CARD SECTIONS --- */
.card-section { padding: 40px 0; }
.card-section h2 { text-align: center; }
.card-holder {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 20px;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-color) var(--background-color);
}
.card-holder::-webkit-scrollbar { height: 12px; }
.card-holder::-webkit-scrollbar-track { background: var(--background-color); border-top: var(--border-style); border-bottom: var(--border-style); }
.card-holder::-webkit-scrollbar-thumb { background-color: var(--accent-color); border: var(--border-style); }
.card {
    background: var(--background-color);
    width: 300px;
    height: 420px;
    flex-shrink: 0;
    border: var(--border-style);
    box-shadow: var(--hard-shadow);
    display: grid;
    grid-template-rows: 180px auto 1fr auto;
}
.card-img { width: 100%; height: 180px; object-fit: cover; border-bottom: var(--border-style); min-height: 0;}
.card-title { margin: 0; padding: 10px; border-bottom: var(--border-style); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;}
.card-text { padding: 10px; overflow: hidden; min-height: 0; }
.card-btn {
    display: block;
    width: 100%;
    padding: 10px;
    background: var(--accent-color);
    color: var(--main-text-color);
    border: none;
    border-top: var(--border-style);
    cursor: pointer;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}
.more-link { display: block; text-align: right; margin-top: 20px; font-weight: 700; color: var(--main-text-color); }

/* --- RESOURCES SECTION --- */
.resources { text-align: center; padding: 40px 0 60px; }
.icon-grid { display: flex; justify-content: space-around; gap: 20px; margin-top: 20px; flex-wrap: wrap; }
.icon-item {
    background-color: var(--background-color);
    border: var(--border-style);
    padding: 20px;
    width: 200px;
    box-shadow: var(--hard-shadow);
    cursor: pointer;
}
.icon-item .icon { font-size: 3rem; font-weight: 700; }

/* --- FOOTER --- */
footer {
    background: var(--accent-color);
    color: var(--main-text-color);
    padding: 40px 0;
    border-top: var(--border-style);
}
.footer-columns { display: flex; justify-content: space-between; gap: 40px; }
.footer-column { flex: 1; padding: 0 20px; border-right: var(--border-style); }
.footer-column:last-child { border-right: none; }
.footer-column h3 { margin-top: 0; font-size: 1.4rem; text-align: center; }
.footer-column ul { list-style: none; padding: 0; }
.footer-column .bulleted-list { list-style: disc; padding-left: 20px; }
.footer-column a { color: var(--main-text-color); text-decoration: none; }
.social-icons { text-align: center; margin-bottom: 20px; }
.social-icons span { font-size: 2rem; margin: 0 10px; font-weight: 700; }


/* --- 5. MEDIA QUERIES (MOBILE) --- */
@media (max-width: 840px) {
    .nav-links { display: none; }
    .hamburger-menu { display: block; }
    .content-section, .content-section.reverse { flex-direction: column; padding: 0; }
    .content-section .image-content {
        position: relative;
        width: 100%;
        height: 400px;
        border: none;
        box-shadow: none;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .content-section .image-content img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
    .content-section .text-content {
        position: relative;
        z-index: 2;
        background: var(--background-color);
        padding: 20px;
        border: var(--border-style);
        margin: 20px;
    }
    .footer-columns { flex-direction: column; text-align: center; }
    .footer-column {
        border-right: none;
        border-bottom: var(--border-style);
        padding: 0 0 20px 0;
        margin-bottom: 20px;
    }
    .footer-column:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
    .footer-column .bulleted-list { display: inline-block; text-align: left; }
}