* {
    /* Applies styles to every element */
    margin: 0;
    padding: 0;
    font-family: Helvetica, sans-serif;
    -webkit-text-size-adjust: none;
}

/* DEFAULT LAYOUT: LARGE SCREENS (801px and wider) */

body {
    background-color: #f4f4f4;
    color: #333;
    padding: 20px;
}

/* HEADER */

header {
    background-color: #333333;
    color: white;
    text-align: center;
    padding: 25px;
    margin-bottom: 20px;
}

header h1 {
    font-size: 28px;
}

.news-title {
    color: white;
}

.daily-title {
    color: red;
}

/* MAIN NEWS SECTION */

#main-news {
    max-width: 1000px;
    margin: 0 auto 20px auto;
    padding: 20px;
    background-color: #e6e6e6;
}

#main-news h2 {
    font-size: 26px;
    margin-bottom: 20px;
}

#main-news .story {
    border-bottom: none;
    padding: 10px 0;
}

#main-news .story img {
    width: 250px;
    height: 170px;
    object-fit: cover;
    float: left;
    margin-right: 20px;
    margin-bottom: 10px;
}

#main-news .story p {
    font-size: 16px;
    line-height: 1.5;
}

/* OTHER NEWS SECTION */

#news {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    background-color: white;
}

h3 {
    margin-bottom: 20px;
    font-size: 24px;
}

.story {
    border-bottom: 1px solid #ccc;
    padding: 15px 0;
    margin-bottom: 15px;
}

.story img {
    width: 200px;
    height: 140px;
    object-fit: cover;
    float: left;
    margin-right: 20px;
    margin-bottom: 10px;
}

.story p {
    font-size: 16px;
    line-height: 1.5;
}

.clear {
    clear: both;
}


/* MEDIA QUERY 1: MEDIUM / TABLET SCREENS (400px–800px) */

@media screen and (min-width: 400px) and (max-width: 800px) {

    body {
        padding: 10px;
    }

    header {
        padding: 20px;
        margin-bottom: 15px;
    }

    header h1 {
        font-size: 24px;
    }

    #main-news {
        padding: 15px;
    }

    #main-news h2 {
        font-size: 22px;
    }

    #main-news .story img {
        width: 150px;
        height: 110px;
        margin-right: 12px;
    }

    #main-news .story p {
        font-size: 15px;
        line-height: 1.4;
    }

    #news {
        padding: 15px;
    }

    h3 {
        font-size: 22px;
        margin-bottom: 15px;
    }

    .story {
        padding: 12px 0;
        margin-bottom: 10px;
    }

    .story img {
        width: 150px;
        height: 110px;
        margin-right: 12px;
    }

    .story p {
        font-size: 15px;
        line-height: 1.4;
    }
}


/* MEDIA QUERY 2: SMALL MOBILE SCREENS (UNDER 400px) */

@media screen and (max-width: 399px) {

    body {
        padding: 5px;
    }

    header {
        padding: 15px 5px;
        margin-bottom: 10px;
    }

    header h1 {
        font-size: 22px;
    }

    /* MAIN NEWS SECTION */

    #main-news {
        padding: 8px;
        margin-bottom: 10px;
    }

    #main-news h2 {
        font-size: 18px;
        margin-bottom: 10px;
    }

    /* OTHER NEWS SECTION */

    #news {
        padding: 8px;
    }

    h3 {
        font-size: 18px;
        margin-bottom: 10px;
    }

    /* HIDE IMAGES ON SMALL SCREENS */

    #main-news .story img,
    .story img {
        display: none;
    }

    /* REDUCE TEXT SIZE AND SPACING */

    #main-news .story {
        padding: 8px 0;
        margin-bottom: 8px;
    }

    #main-news .story p {
        font-size: 13px;
        line-height: 1.4;
    }

    .story {
        padding: 8px 0;
        margin-bottom: 8px;
    }

    .story p {
        font-size: 13px;
        line-height: 1.4;
    }
}