* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #fff;
    color: #171717;
    font-family: Arial, Helvetica, sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

header {
    border-bottom: 1px solid #222;
}

.top {
    max-width: 1100px;
    margin: auto;
    padding: 22px 20px 16px;
    text-align: center;
}

.logo {
    font-family: Georgia, serif;
    font-size: 38px;
    font-weight: bold;
    letter-spacing: -1px;
}

.logo span {
    color: #d71920;
}

nav {
    border-top: 1px solid #ddd;
    padding: 11px 20px;
    text-align: center;
    font-size: 13px;
    font-weight: bold;
}

nav a {
    margin: 0 14px;
}

nav a:hover {
    color: #d71920;
}

main {
    max-width: 1100px;
    margin: 30px auto;
    padding: 0 20px;
}

.breaking {
    width: 100%;
    overflow: hidden;
    border-bottom: 3px solid #222;
    padding-bottom: 9px;
    margin-bottom: 22px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    white-space: nowrap;
}

.breaking-track {
    display: block;
    width: max-content;
    will-change: transform;
}

.breaking-item {
    display: block;
}

.breaking-item b {
    color: #d71920;
}

.layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 28px;
}

.main-news {
    border-bottom: 1px solid #bbb;
    padding-bottom: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 500px;
}

.main-image {
    width: 100%;
    height: 350px;
    overflow: hidden;
    background: #ddd;
}

.main-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news img {
    display: block;
    width: 100%;
    height: 120px;
    object-fit: cover;
    background: #ddd;
}

.main-news h1 {
    font: bold 38px/1.05 Georgia, serif;
    margin: 14px 0 8px;
}

.main-news p,
.news p {
    color: #555;
    line-height: 1.45;
    margin: 0;
}

.main-news h1,
.latest h2,
.news h2 {
    transition: color 0.2s ease;
}

.main-news h1:hover,
.latest h2:hover,
.news h2:hover {
    color: #d71920;
}

.side {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.news {
    border-bottom: 1px solid #bbb;
    padding-bottom: 18px;
}

.news img {
    height: 120px;
}

.news h2 {
    font: bold 22px/1.15 Georgia, serif;
    margin: 9px 0 6px;
}

.category {
    font-size: 11px;
    color: #d71920;
    font-weight: bold;
    text-transform: uppercase;
}

.image-placeholder {
    height: 120px;
    background: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
}

body.dark-mode .image-placeholder {
    background: #222;
    color: #777;
}

.section {
    border-bottom: 3px solid #222;
    margin-top: 35px;
    padding-bottom: 8px;
    font: bold 24px Georgia, serif;
}

.caption {
    font-size: 11px;
    color: #777;
    margin-top: 6px;
    line-height: 1.4;
}

body.dark-mode .caption {
    color: #999;
}

.latest {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 30px;
}

.latest article {
    padding: 17px 0;
    border-bottom: 1px solid #ccc;
}

.latest h2 {
    font: bold 20px/1.2 Georgia, serif;
    margin: 5px 0;
}

.date {
    font-size: 11px;
    color: #777;
    margin-top: 8px;
}

/* FOOTER */

footer {    
    margin-top: 35px;
    padding: 22px 18px 14px;
    background: #111;
    color: #fff;
    text-align: center;
}

footer > strong {
    font-family: Georgia, serif;
    display: block;
    font-size: 20px;
    margin-bottom: 3px;
}

footer > br + span {
    font-size: 13px;
    opacity: 0.65;
}

.footer-content {
    max-width: 700px;
    margin: 18px auto 14px;
    padding: 15px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 55px;
    border-top: 1px solid rgba(255,255,255,0.12);
    border-bottom: 1px solid rgba(255,255,255,0.12);
}

.footer-section {
    min-width: 140px;
}

.footer-title {
    margin-bottom: 9px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.6;
}

.thanks-logos,
.social-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.thanks-logos img,
.social-logos img {
    width: 26px;
    height: 26px;
    object-fit: contain;
}

body.theme-ready footer {
    transition: background 0.3s, color 0.3s;
}

/* YouTube maior */
.social-logos .youtube-logo {
    width: 34px;
    height: 34px;
}

/* X */
.social-logos .x-logo {
    width: 27px;
    height: 27px;
}

/* NEWSLETTER */

.newsletter-footer form {
    display: flex;
    justify-content: center;
}

.newsletter-footer input {
    width: 135px;
    padding: 7px 9px;
    border: 1px solid #ccc;
    border-radius: 4px 0 0 4px;
    outline: none;
    font-size: 12px;
}

.newsletter-footer button {
    padding: 7px 10px;
    border: 0;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
}

.footer-copy {
    font-size: 11px;
    opacity: 0.45;
}

body:not(.dark-mode) footer {
    background: #fff;
    color: #111;
}

body:not(.dark-mode) .footer-content {
    border-color: rgba(0, 0, 0, 0.12);
}

body:not(.dark-mode) .footer-title {
    opacity: 0.65;
}

body:not(.dark-mode) .footer-copy {
    opacity: 0.5;
}

/* X preto no light mode */
body:not(.dark-mode) .x-logo {
    filter: brightness(0);
}

body.dark-mode footer {
    background: #111;
    color: #fff;
}

body.dark-mode .footer-content {
    border-color: rgba(255,255,255,0.12);
}

body.dark-mode .x-logo {
    filter: none;
}

@media (max-width: 650px) {
    .footer-content {
        flex-direction: column;
        gap: 18px;
        padding: 15px 0;
    }

    .footer-section {
        min-width: 0;
    }

    .newsletter-footer form {
        width: auto;
    }
}

/* DARK MODE */

body.dark-mode {
    background: #111;
    color: #eee;
}

body.dark-mode header {
    border-color: #333;
}

body.dark-mode nav {
    border-color: #333;
}

body.dark-mode nav a {
    color: #eee;
}

body.dark-mode nav a:hover {
    color: #d71920;
}

body.dark-mode .breaking {
    border-color: #ddd;
}

body.dark-mode .main-news,
body.dark-mode .news,
body.dark-mode .latest article {
    border-color: #444;
}

body.dark-mode .main-news p,
body.dark-mode .news p {
    color: #bbb;
}

body.dark-mode .date {
    color: #999;
}

body.dark-mode .section {
    border-color: #ddd;
}

body.dark-mode footer {
    border-color: #333;
    color: #999;
}


/* BOTÃO DO TEMA */

#theme-toggle,
#language-toggle {
    position: fixed;
    top: 18px;
    width: 40px;
    height: 40px;
    padding: 0;
    box-sizing: border-box;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #aaa;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;

    transition: transform 0.15s ease;
}

#theme-toggle {
    right: 20px;
    color: #111;
    font-size: 18px;
}

#language-toggle {
    right: 68px;
    overflow: hidden;
}

#language-toggle img {
    width: 24px;
    height: 18px;
    object-fit: cover;
    display: block;
}

#theme-toggle:active,
#language-toggle:active {
    transform: scale(0.9);
}

body.dark-mode #theme-toggle,
body.dark-mode #language-toggle {
    background: #222;
    border-color: #555;
}

body.dark-mode #theme-toggle {
    color: #fff;
}

/* TRANSIÇÃO DO TEMA */

body.theme-ready,
body.theme-ready header,
body.theme-ready nav,
body.theme-ready nav a,
body.theme-ready .main-news,
body.theme-ready .main-news p,
body.theme-ready .news,
body.theme-ready .news p,
body.theme-ready .latest article,
body.theme-ready .date,
body.theme-ready .image-placeholder,
body.theme-ready .section,
body.theme-ready footer,
body.theme-ready #theme-toggle {
    transition:
        background-color 0.35s ease,
        color 0.35s ease,
        border-color 0.35s ease;
}


/* MOBILE */
@media (max-width: 700px) {

    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    main {
        width: 100%;
        margin: 18px auto;
        padding: 0 12px;
    }

    .top {
        padding: 16px 12px 10px;
    }

    .logo {
        font-size: 27px;
    }

    nav {
        padding: 8px 8px;
        font-size: 10px;
    }

    nav a {
        display: inline-block;
        margin: 3px 5px;
    }

    #theme-toggle {
        top: 12px;
        right: 12px;
    }

    #language-toggle {
        top: 12px;
        right: 60px;
    }

    .breaking {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        margin-bottom: 16px;
        padding-bottom: 6px;
        font-size: 10px;
    }

    .breaking-track {
        width: 100%;
        transform: none !important;
    }

    .breaking-item {
        width: 100%;
        white-space: normal;
        line-height: 1.3;
    }

    .layout,
    .latest {
        grid-template-columns: 1fr;
    }

    .main-news img {
        height: 160px;
    }

    .main-news h1 {
        font-size: 25px;
        line-height: 1.08;
        margin: 10px 0 6px;
    }

    .main-news p,
    .news p {
        font-size: 13px;
    }

    .side {
        margin-top: 4px;
        gap: 12px;
    }

    .news {
        padding-bottom: 12px;
    }


    .main-image {
        height: 220px;
    }

    .main-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .news img {
        width: 100%;
        height: 120px;
        display: block;
        object-fit: cover;
    }


    .news h2 {
        font-size: 18px;
    }

    .section {
        margin-top: 25px;
        padding-bottom: 6px;
        font-size: 20px;
    }

    .latest {
        gap: 0;
    }

    .latest article {
        padding: 12px 0;
    }

    .latest h2 {
        font-size: 17px;
    }

    .date {
        font-size: 10px;
    }

    footer {
        margin-top: 28px;
        padding: 18px 12px;
    }
}