/* Visual minimalista, responsivo e focado em leitura mobile. */
:root {
    --bg: #f7f8fa;
    --surface: #ffffff;
    --text: #202124;
    --muted: #5f6368;
    --line: #e5e7eb;
    --primary: #1a73e8;
    --primary-hover: #1558b0;
    --soft: #f1f3f4;
    --shadow: 0 10px 28px rgba(60, 64, 67, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: var(--bg);
    font-family: Arial, Helvetica, sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
}

.header-search {
    display: none;
    flex: 1;
    max-width: 620px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    box-shadow: 0 1px 6px rgba(60, 64, 67, 0.12);
}

.header-search input {
    width: 100%;
    height: 38px;
    padding: 0 14px;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 15px;
}

.header-search button {
    height: 38px;
    padding: 0 16px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: var(--primary);
    font-weight: 700;
    cursor: pointer;
}

.brand {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    font-size: 16px;
    font-weight: 700;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    color: #ffffff;
    background: var(--primary);
    flex: 0 0 auto;
}

.nav {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font-size: 14px;
    white-space: nowrap;
}

.nav a:hover {
    color: var(--primary);
}

.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    margin: 4px 0;
    border-radius: 999px;
    background: var(--text);
}

.hero {
    display: grid;
    align-items: center;
    min-height: 430px;
    padding: 44px 18px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.hero-copy {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1 {
    margin: 0 auto 24px;
    max-width: 720px;
    color: var(--text);
    font-size: 34px;
    line-height: 1.12;
    letter-spacing: 0;
}

.search-box {
    display: grid;
    grid-template-columns: 1fr auto;
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    padding: 6px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: var(--shadow);
}

.search-box input {
    min-width: 0;
    height: 48px;
    padding: 0 18px;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
    font-size: 16px;
}

.search-box button {
    min-width: 96px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: var(--primary);
    font-weight: 700;
    cursor: pointer;
}

.search-box button:hover {
    background: var(--primary-hover);
}

.section {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 34px 18px;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.section-heading h2 {
    margin: 0;
    font-size: 22px;
    line-height: 1.2;
}

.section-heading span {
    color: var(--muted);
    font-size: 13px;
}

.notice,
.empty-state {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--muted);
    background: var(--surface);
}

.news-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.news-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.news-card:hover {
    border-color: #cbd5e1;
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.news-source {
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.news-card h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.32;
}

.news-card h3 a:hover {
    color: var(--primary);
}

.news-card p {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.55;
}

.news-card time {
    margin-top: auto;
    color: var(--muted);
    font-size: 12px;
}

.article-page {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 28px 18px 44px;
}

.article-box {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
}

.article-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.article-actions a {
    display: inline-flex;
    padding: 9px 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    background: var(--soft);
    font-size: 14px;
    font-weight: 700;
}

.article-actions a:hover {
    color: var(--primary);
    border-color: #c7d2fe;
}

.article-box h1 {
    margin: 0 0 14px;
    max-width: none;
    text-align: left;
    font-size: 30px;
}

.article-box time {
    display: block;
    margin-bottom: 22px;
    color: var(--muted);
    font-size: 13px;
}

.article-box p {
    margin: 0;
    color: var(--text);
    font-size: 17px;
    line-height: 1.7;
}

.source-link {
    display: inline-flex;
    margin-top: 22px;
    padding: 12px 16px;
    border-radius: 999px;
    color: #ffffff;
    background: var(--primary);
    font-size: 14px;
    font-weight: 700;
}

.source-link:hover {
    background: var(--primary-hover);
}

.search-page {
    min-height: calc(100vh - 136px);
    padding: 24px 14px 42px;
    background: var(--surface);
}

.search-panel {
    max-width: 720px;
    margin: 0 auto 26px;
    text-align: center;
}

.search-panel h1 {
    margin-bottom: 22px;
    font-size: 44px;
    font-weight: 500;
}

.search-box-dark {
    border-radius: 999px;
    box-shadow: 0 2px 10px rgba(60, 64, 67, 0.15);
}

.search-results-panel {
    max-width: 820px;
    margin: 0 auto;
    padding: 0;
    background: transparent;
}

.search-empty {
    max-width: 520px;
    margin: 18vh auto 0;
    text-align: center;
}

.search-title {
    margin: 0 auto 22px;
    color: var(--muted);
    font-size: 16px;
    text-align: center;
}

.search-title strong {
    color: var(--text);
}

.gsc-control-cse {
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    font-family: Arial, Helvetica, sans-serif !important;
}

.gsc-webResult.gsc-result {
    margin-bottom: 18px !important;
    padding: 0 0 18px !important;
    border-bottom: 1px solid var(--line) !important;
}

.gs-title,
.gs-title b {
    color: #1a0dab !important;
    font-size: 18px !important;
    line-height: 1.3 !important;
}

.gs-snippet {
    color: #4d5156 !important;
    font-size: 14px !important;
    line-height: 1.45 !important;
}

.gsc-url-top,
.gsc-url-bottom {
    color: #188038 !important;
    font-size: 13px !important;
}

.footer {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 22px 18px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    background: var(--surface);
    font-size: 13px;
    text-align: center;
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 14px;
}

.footer-nav a:hover,
.text-link:hover {
    color: var(--primary);
}

.admin-page {
    min-height: calc(100vh - 136px);
    padding: 24px 14px 42px;
}

.admin-shell {
    max-width: 1040px;
    margin: 0 auto;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
}

.admin-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.admin-heading h1 {
    margin: 0;
    font-size: 28px;
    text-align: left;
}

.admin-form {
    display: grid;
    gap: 16px;
}

.admin-grid {
    grid-template-columns: 1fr;
}

.admin-form label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.admin-form input,
.admin-form textarea {
    width: 100%;
    padding: 12px 13px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--text);
    background: #ffffff;
    font: inherit;
}

.admin-form textarea {
    resize: vertical;
}

.admin-form button {
    width: fit-content;
    padding: 12px 18px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: var(--primary);
    font-weight: 700;
    cursor: pointer;
}

.admin-form button:hover {
    background: var(--primary-hover);
}

.wide {
    grid-column: 1 / -1;
}

.cron-box {
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--soft);
}

.cron-box code {
    overflow-x: auto;
    white-space: nowrap;
}

.success {
    border-color: #bbf7d0;
    color: #166534;
    background: #f0fdf4;
}

.danger {
    border-color: #fecaca;
    color: #991b1b;
    background: #fef2f2;
}

@media (max-width: 520px) {
    .topbar {
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: center;
    }

    .header-search {
        display: grid;
        grid-template-columns: 1fr auto;
        width: 100%;
        grid-column: 1 / -1;
        order: 2;
    }

    .menu-toggle {
        display: block;
    }

    .nav {
        display: none;
        width: 100%;
        grid-column: 1 / -1;
        flex-direction: column;
        align-items: stretch;
        justify-content: space-between;
        gap: 0;
        padding: 8px;
        border: 1px solid var(--line);
        border-radius: 12px;
        background: var(--surface);
        box-shadow: var(--shadow);
        order: 3;
    }

    .nav.is-open {
        display: flex;
    }

    .nav a {
        padding: 12px;
        border-radius: 9px;
    }

    .nav a:hover {
        background: var(--soft);
    }

    h1 {
        font-size: 31px;
    }

    .search-box {
        grid-template-columns: 1fr;
        border-radius: 18px;
    }

    .search-box input {
        text-align: center;
    }

    .search-box button {
        width: 100%;
        border-radius: 14px;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-heading {
        flex-direction: column;
    }
}

@media (min-width: 760px) {
    .topbar {
        padding: 16px 34px;
    }

    .header-search {
        display: grid;
        grid-template-columns: 1fr auto;
    }

    .hero {
        min-height: 500px;
        padding: 64px 34px;
    }

    h1 {
        font-size: 52px;
    }

    .news-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .article-page {
        padding-top: 46px;
    }

    .article-box {
        padding: 34px;
    }

    .article-box h1 {
        font-size: 44px;
    }

    .footer {
        align-items: center;
        flex-direction: row;
        justify-content: space-between;
        padding-left: 34px;
        padding-right: 34px;
        text-align: left;
    }

    .admin-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1080px) {
    .news-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
