/* General Body Styling */
body {
    background-color: #fcf;
    min-height: 100svh;
    margin: 0;
    padding: 0;
}

/* Main Container */
.container {
    min-height: 100svh;
    padding: 16px;
}

/* Mobile Styles */
@media screen and (min-width: 320px) {
    header {
        background-color: #33c;
        color: #eee;
        height: 100px;
        padding: 10px;
        margin-bottom: 16px; /* Ensure some space below header */
    }

    h1 {
        background-color: rgba(250, 250, 250, 0.4);
        width: 100%;
        height: 80px;
        text-align: center;
        padding: 16px;
        margin: 0 auto;
    }

    /* Main layout adjustments for mobile */
    main {
        display: flex;
        flex-direction: column;
        gap: 16px; /* Add space between sections */
        margin-bottom: 16px;
    }

    /* Navigation styling for mobile */
    nav {
        display: flex;
        gap: 20px;
        text-align: center;
        background-color: #dd8300;
        height: 80px;
        padding: 10px;
        margin-bottom: 16px; /* Add space below navigation */
    }

    nav a {
        position: relative;
        text-decoration: none;
        color: white;
        background-color: rgba(250, 250, 250, 0.4);
        font-size: 1.2rem;
        padding: 5px 0;
        transition: color 0.3s ease;
    }

    /* Add hover effect */
    nav a:hover {
        color: #145919;
    }

    /* Create the underline effect */
    nav a::after {
        content: '';
        position: absolute;
        left: 0;
        bottom: -2px;
        width: 0;
        height: 2px;
        transition: width 0.3s ease;
    }

    /* Expand the underline on hover */
    nav a:hover::after {
        width: 100%;
    }

    /* Factbar Styling */
    .factbar {
        background-color: darkgreen;
        min-height: 80px;
        width: 100%;
        margin-bottom: 16px;
        padding: 16px; /* Add padding for spacing */
    }

    /* Hero Image Styling */
    .hero_img {
        background-color: yellow;
        aspect-ratio: 4/2;
        color: black;
        min-height: 300px;
        margin-bottom: 16px;
        background-image: url(../images/bigdog.jpg);
        background-size: cover;
        background-position: center;
        padding: 16px; /* Add padding inside the hero section */
    }

    /* Article styling */
    article {
        background-color: #eef;
        flex-grow: 1;
        flex-basis: auto;
        min-height: calc(100svh - 180px);
        padding: 16px; /* Add padding for spacing */
    }

    article p {
        color: #222;
        font-family: Verdana, Geneva, Tahoma, sans-serif;
        line-height: 1.6;
        font-size: 1.2em;
        margin: 8px auto 16px auto;
        max-width: 80ch;
    }

    /* Hide some links on mobile */
    .links a:nth-child(4),
    .links a:nth-child(5) {
        display: none;
    }
}

/* Wide Screen Styles */
@media screen and (min-width: 800px) {

    h1 {
        width: 350px;
        margin: 0;
    }

    /* Main layout adjustments for wide screens */
    main {
        flex-direction: row;
        gap: 20px; /* Add gap between the sections */
    }

    /* Show hidden links on wide screens */
    .links a:nth-child(4),
    .links a:nth-child(5) {
        display: inline;
    }

    /* Navigation adjustments for wide screens */
    nav {
        display: flex;
        flex-direction: column;
        gap: 20px;
        text-align: center;
        padding: 16px;
        height: calc(100svh - 100px);
        width: 25%;
        min-width: 80px;
        max-width: 300px;
        margin-right: 16px; /* Ensure spacing from article */
    }

    nav a {
        position: relative;
        text-decoration: none;
        color: white;
        background-color: rgba(250, 250, 250, 0.4);
        font-size: 1.2rem;
        padding: 5px 0;
        transition: color 0.3s ease;
    }

    nav a::after {
        background-color: #552e17;
        transition: width 0.3s ease;
    }

    /* Factbar full width with no margin or padding */
    .factbar {
        width: 100%;
        margin: 0;
        padding: 0;
    }

    /* Article adjustments for wide screens */
    article {
        background-color: #eef;
        flex-grow: 1;
        flex-basis: auto;
        min-height: calc(100svh - 180px);
        padding: 16px; /* Add padding for spacing */
    }

    /* Hero image styling for wide screens */
    .hero_img {
        margin-top: -8px;
        width: 100%;
        height: auto;
    }
}
