/* public/assets/css/style.css — Frontend moderno */

/* ===== Design tokens ===== */
:root {
    --brand: #4F46E5;
    --brand-dark: #3730A3;
    --brand-light: #EEF2FF;
    --accent: #E11D48;
    --ink: #0F172A;
    --ink-soft: #475569;
    --paper: #F8FAFC;
    --card-radius: 1rem;
    --font-ui: 'Figtree', 'Segoe UI', system-ui, sans-serif;
    --font-display: 'Newsreader', Georgia, serif;
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.10);
    --shadow-lg: 0 16px 48px rgba(15, 23, 42, 0.14);
}

body.frontend {
    background: var(--paper);
    font-family: var(--font-ui);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
}

/* ===== Top bar ===== */
.topbar {
    background: var(--ink);
    color: #CBD5E1;
    padding: 0.4rem 0;
    font-size: 0.85rem;
}

.topbar-link {
    color: #CBD5E1;
    text-decoration: none;
    transition: color 0.2s ease;
}

.topbar-link:hover { color: #fff; }

.topbar-divider {
    width: 1px;
    height: 14px;
    background: rgba(255, 255, 255, 0.2);
}

/* ===== Navbar ===== */
.main-navbar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    padding: 0.7rem 0;
    transition: box-shadow 0.3s ease;
}

.main-navbar.scrolled { box-shadow: var(--shadow-md); }

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    text-decoration: none;
}

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--brand) 0%, #7C3AED 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

.brand-text {
    font-family: var(--font-ui);
    font-weight: 400;
    font-size: 1.25rem;
    color: var(--ink);
    letter-spacing: -0.02em;
}

.brand-text strong { font-weight: 800; }

.main-navbar .nav-link {
    color: var(--ink-soft);
    font-weight: 500;
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    transition: all 0.2s ease;
}

.main-navbar .nav-link:hover {
    color: var(--brand);
    background: var(--brand-light);
}

/* Busca na navbar */
.search-form {
    position: relative;
    display: flex;
    align-items: center;
}

.search-form i {
    position: absolute;
    left: 14px;
    color: #94A3B8;
    font-size: 0.9rem;
    pointer-events: none;
}

.search-form input {
    border: 1px solid transparent;
    background: #F1F5F9;
    border-radius: 999px;
    padding: 0.45rem 1rem 0.45rem 2.3rem;
    width: 170px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    outline: none;
}

.search-form input:focus {
    width: 230px;
    background: #fff;
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

.btn-cta {
    background: linear-gradient(135deg, var(--brand) 0%, #7C3AED 100%);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 0.5rem 1.25rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.30);
    transition: all 0.2s ease;
}

.btn-cta:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.40);
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 999px;
    border: 1px solid #E2E8F0;
    padding: 0.35rem 0.9rem;
    font-weight: 500;
    color: var(--ink);
}

.user-btn-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
}

/* ===== Breaking ticker ===== */
.breaking-bar {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 999px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.breaking-label {
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.55rem 1.1rem;
    border-radius: 999px;
    margin: 4px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.breaking-label .pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
    animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.7); }
}

.ticker {
    overflow: hidden;
    flex: 1;
    mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}

.ticker-track {
    display: inline-flex;
    gap: 3rem;
    white-space: nowrap;
    animation: ticker 40s linear infinite;
    padding-right: 3rem;
}

.ticker-track:hover { animation-play-state: paused; }

.ticker-track a {
    color: var(--ink-soft);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.ticker-track a:hover { color: var(--brand); }

.ticker-track a::before {
    content: '●';
    color: var(--accent);
    font-size: 0.6rem;
    margin-right: 0.6rem;
    vertical-align: middle;
}

@keyframes ticker {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* ===== Hero mosaico ===== */
.hero-grid {
    display: grid;
    grid-template-columns: 1.7fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 1rem;
    min-height: 460px;
}

.hero-card {
    position: relative;
    border-radius: var(--card-radius);
    overflow: hidden;
    display: block;
    text-decoration: none;
    background: var(--ink);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s ease;
}

.hero-card:hover { box-shadow: var(--shadow-lg); }

.hero-card.hero-main { grid-row: span 2; }

.hero-card img,
.hero-card .hero-fallback {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(.2, .8, .2, 1);
}

.hero-card:hover img { transform: scale(1.05); }

.hero-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1E293B 0%, #4F46E5 130%);
    color: rgba(255, 255, 255, 0.25);
    font-size: 4rem;
}

.hero-card .hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(2, 6, 23, 0.55) 65%, rgba(2, 6, 23, 0.92) 100%);
}

.hero-card .hero-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1.5rem;
    z-index: 1;
}

.hero-main .hero-content { padding: 2rem; }

.hero-card h2, .hero-card h3 {
    font-family: var(--font-display);
    color: #fff;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.4rem;
}

.hero-main h2 { font-size: clamp(1.5rem, 3vw, 2.3rem); }
.hero-card h3 { font-size: 1.1rem; }

.hero-card .hero-summary {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.95rem;
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-meta {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.8rem;
    display: flex;
    gap: 1rem;
    margin-top: 0.6rem;
}

/* ===== Badges/chips ===== */
.chip {
    display: inline-block;
    background: var(--brand);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    margin-bottom: 0.6rem;
}

.chip-soft {
    background: var(--brand-light);
    color: var(--brand);
}

/* ===== Section titles ===== */
.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.section-heading h2, .section-heading h4 {
    font-family: var(--font-ui);
    font-weight: 800;
    font-size: 1.35rem;
    letter-spacing: -0.02em;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.section-heading h2::before, .section-heading h4::before {
    content: '';
    width: 5px;
    height: 24px;
    border-radius: 4px;
    background: linear-gradient(180deg, var(--brand), #7C3AED);
}

.section-link {
    color: var(--brand);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.section-link:hover { text-decoration: underline; }

/* ===== News cards ===== */
.news-card {
    border: none;
    border-radius: var(--card-radius);
    overflow: hidden;
    background: #fff;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s cubic-bezier(.2, .8, .2, 1), box-shadow 0.3s ease;
    height: 100%;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.news-card .thumb {
    position: relative;
    height: 190px;
    overflow: hidden;
    background: linear-gradient(135deg, #E2E8F0, #CBD5E1);
}

.news-card .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(.2, .8, .2, 1);
}

.news-card:hover .thumb img { transform: scale(1.06); }

.news-card .thumb .thumb-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #94A3B8;
    font-size: 2.5rem;
}

.news-card .card-title a {
    color: var(--ink);
    text-decoration: none;
    font-weight: 700;
    line-height: 1.35;
}

.news-card .card-title a:hover { color: var(--brand); }

.news-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    color: #94A3B8;
    font-size: 0.8rem;
}

/* ===== Lista trending ===== */
.trend-list .trend-item {
    display: flex;
    gap: 1rem;
    padding: 0.85rem 1.25rem;
    text-decoration: none;
    border-bottom: 1px solid #F1F5F9;
    transition: background 0.2s ease;
}

.trend-list .trend-item:last-child { border-bottom: none; }
.trend-list .trend-item:hover { background: var(--brand-light); }

.trend-number {
    font-family: var(--font-display);
    font-size: 1.9rem;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(180deg, var(--brand), #A5B4FC);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    min-width: 34px;
}

.trend-item .trend-title {
    color: var(--ink);
    font-weight: 600;
    font-size: 0.92rem;
    line-height: 1.35;
}

.trend-item small { color: #94A3B8; }

/* ===== Sidebar cards ===== */
.side-card {
    background: #fff;
    border-radius: var(--card-radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.side-card .side-card-header {
    padding: 1rem 1.25rem 0.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ===== Newsletter CTA ===== */
.newsletter-cta {
    background: linear-gradient(135deg, var(--brand) 0%, #7C3AED 60%, #9333EA 100%);
    border-radius: var(--card-radius);
    color: #fff;
    padding: 1.75rem;
    position: relative;
    overflow: hidden;
}

.newsletter-cta::after {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.newsletter-cta input {
    border: none;
    border-radius: 999px;
    padding: 0.6rem 1.1rem;
    width: 100%;
    outline: none;
    font-size: 0.9rem;
}

.newsletter-cta button {
    background: var(--ink);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 0.6rem 1.4rem;
    font-weight: 600;
    white-space: nowrap;
    transition: transform 0.2s ease;
}

.newsletter-cta button:hover { transform: translateY(-1px); }

/* ===== Lista compacta (categorias na home) ===== */
.compact-list {
    background: #fff;
    border-radius: var(--card-radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.compact-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.25rem;
    text-decoration: none;
    color: var(--ink);
    font-weight: 500;
    border-bottom: 1px solid #F1F5F9;
    transition: all 0.2s ease;
}

.compact-list a:last-child { border-bottom: none; }

.compact-list a:hover {
    background: var(--brand-light);
    padding-left: 1.55rem;
    color: var(--brand);
}

/* ===== Artigo (página da notícia) ===== */
.article-title {
    font-family: var(--font-display);
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.15;
}

.news-content {
    line-height: 1.85;
    font-size: 1.1rem;
    color: #1E293B;
}

.news-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1rem 0;
}

.news-content h2, .news-content h3, .news-content h4 {
    font-family: var(--font-display);
    font-weight: 700;
    margin-top: 1.75rem;
}

.news-content blockquote {
    border-left: 4px solid var(--brand);
    background: var(--brand-light);
    border-radius: 0 12px 12px 0;
    padding: 1rem 1.25rem;
    margin: 1.25rem 0;
    font-style: italic;
}

/* ===== Páginas Sobre/Contato ===== */
.page-hero {
    background: linear-gradient(135deg, var(--ink) 0%, #1E1B4B 60%, var(--brand-dark) 100%);
    border-radius: var(--card-radius);
    color: #fff;
    padding: 3.5rem 2rem;
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: rgba(124, 58, 237, 0.25);
    filter: blur(10px);
}

.page-hero h1 {
    font-family: var(--font-display);
    font-weight: 800;
    letter-spacing: -0.01em;
}

.page-hero p {
    color: rgba(255, 255, 255, 0.75);
    max-width: 640px;
}

.feature-card {
    background: #fff;
    border-radius: var(--card-radius);
    box-shadow: var(--shadow-sm);
    padding: 1.75rem;
    height: 100%;
    transition: transform 0.3s cubic-bezier(.2, .8, .2, 1), box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    background: var(--brand-light);
    color: var(--brand);
}

.stat-number {
    font-family: var(--font-display);
    font-size: 2.4rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--brand), #9333EA);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ===== Footer ===== */
.site-footer {
    background: var(--ink);
    color: #94A3B8;
}

.footer-brand .brand-text { color: #fff; }

.footer-text { color: #94A3B8; font-size: 0.95rem; }

.footer-title {
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li { margin-bottom: 0.55rem; }

.footer-links a {
    color: #94A3B8;
    text-decoration: none;
    font-size: 0.92rem;
    transition: all 0.2s ease;
}

.footer-links a:hover { color: #fff; padding-left: 4px; }

.footer-social {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.07);
    color: #CBD5E1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s ease;
}

.footer-social:hover {
    background: var(--brand);
    color: #fff;
    transform: translateY(-2px);
}

.footer-newsletter {
    display: flex;
    gap: 0.5rem;
}

.footer-newsletter input {
    flex: 1;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: #fff;
    padding: 0.55rem 0.9rem;
    font-size: 0.9rem;
    outline: none;
}

.footer-newsletter input::placeholder { color: #64748B; }

.footer-newsletter input:focus { border-color: var(--brand); }

.footer-newsletter button {
    background: var(--brand);
    border: none;
    color: #fff;
    border-radius: 10px;
    padding: 0.55rem 0.95rem;
    transition: background 0.2s ease;
}

.footer-newsletter button:hover { background: var(--brand-dark); }

.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.08); }

/* ===== Voltar ao topo ===== */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    background: var(--brand);
    color: #fff;
    font-size: 1.2rem;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1050;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover { background: var(--brand-dark); }

/* ===== Responsivo ===== */
@media (max-width: 991px) {
    .hero-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        min-height: 0;
    }
    .hero-card { min-height: 220px; }
    .hero-card.hero-main { min-height: 320px; grid-row: auto; }
    .search-form input { width: 100%; }
    .search-form { width: 100%; margin: 0.5rem 0; }
}
