/* ===== VARIÁVEIS - PALETA DE CORES PRIMÁRIAS ===== */
:root {
--vermelho: #BE1311;
    --amarelo: #F9CD0A;
    --azul: #182E5F;
    --laranja: #E4641D;
    --branco: #FFFFFF;
    --cinza-claro: #F8F9FA;
    --cinza-medio: #E9ECEF;
    --cinza-escuro: #495057;
    --preto: #182E5F;
}

/* ===== RESET E BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== BOTÃO VOLTAR FIXO ===== */
.back-btn-fixed{
  position: fixed;
  top: 90px;
  left: 20px;
  z-index: 1500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: var(--branco);
  color: var(--preto);
  border: 2px solid var(--cinza-medio);
  border-radius: 50%;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  font-size: 1.2rem;
  transition: all 0.3s ease;
  padding: 0 !important;
  gap: 0 !important;
  min-width: 50px !important;
  min-height: 50px !important;
}

.back-btn-fixed:hover{
  background: var(--vermelho);
  color: var(--branco);
  border-color: var(--vermelho);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 12px 32px rgba(190, 19, 17, 0.3);
}

@media (max-width: 480px){
  .back-btn-fixed{ top: 80px; left: 10px; width: 45px; height: 45px; font-size: 1.1rem; }
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--cinza-claro);
    color: var(--preto);
    line-height: 1.6;
    padding: 0;
    min-height: 100vh;
    position: relative;
    margin: 0;
}

/* ===== FORMAS GEOMÉTRICAS DECORATIVAS ===== */
body::before {
    content: '';
    position: fixed;
    width: 400px;
    height: 400px;
    background: var(--azul);
    border-radius: 50%;
    top: -200px;
    right: -200px;
    opacity: 0.06;
    z-index: -1;
}

body::after {
    content: '';
    position: fixed;
    width: 350px;
    height: 350px;
    background: var(--vermelho);
    border-radius: 50%;
    bottom: -175px;
    left: -175px;
    opacity: 0.06;
    z-index: -1;
}

/* ===== CONTAINER - COMPOSIÇÃO EQUILIBRADA ===== */
.container {
    max-width: 1000px;
    margin: 0 auto;
    margin-top: 20px;
    padding: 2rem;
}

.my-5 {
    margin-top: 3rem;
    margin-bottom: 3rem;
}

/* ===== TÍTULO PRINCIPAL - DESTAQUE PRIMÁRIO ===== */
h1 {
    font-size: 2.5rem;
    color: var(--preto);
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    position: relative;
    animation: fadeInDown 0.6s ease;
}

h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100px;
    height: 5px;
    background: linear-gradient(90deg, var(--vermelho), var(--amarelo));
    border-radius: 3px;
}

.mb-4 {
    margin-bottom: 2rem;
}

/* ===== CONTADOR DE RESULTADOS ===== */
.lead {
    font-size: 1.2rem;
    color: var(--cinza-escuro);
    font-weight: 500;
    margin-bottom: 1rem;
    animation: fadeIn 0.8s ease;
}

.lead::before {
    content: '🔍';
    margin-right: 0.5rem;
    font-size: 1.3rem;
}

/* ===== LINHA DIVISÓRIA ===== */
hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, var(--azul), var(--amarelo), var(--laranja));
    margin: 2rem 0;
    border-radius: 2px;
    opacity: 0.3;
}

/* ===== CARDS DE NOTÍCIAS - FORMAS GEOMÉTRICAS SIMPLES ===== */
.card {
    background-color: var(--branco);
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    overflow: hidden;
    animation: fadeInUp 0.6s ease;
    animation-fill-mode: both;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.mb-3 {
    margin-bottom: 1.5rem;
}

/* Animação em cascata para os cards */
.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===== CONTEÚDO DO CARD ===== */
.card-body {
    padding: 2rem;
}

.card-title {
    font-size: 1.5rem;
    color: var(--preto);
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.4;
}

h5 {
    margin: 0;
}

/* ===== LISTA DE TAGS - FORMAS EQUILIBRADAS ===== */
.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.bg-primary {
    background: linear-gradient(135deg, var(--azul), var(--laranja));
    color: var(--branco);
}

.badge:hover {
    background: linear-gradient(135deg, var(--vermelho), var(--amarelo));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(230, 57, 70, 0.3);
}

.text-decoration-none {
    text-decoration: none;
}

.me-2 {
    margin-right: 0.5rem;
}

/* ===== DATA DE PUBLICAÇÃO ===== */
.text-muted {
    color: var(--cinza-escuro);
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.text-muted::before {
    content: '📅';
    margin-right: 0.4rem;
}

small {
    font-size: 0.9rem;
}

/* ===== TEXTO DO CARD ===== */
.card-text {
    color: var(--preto);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

/* ===== BOTÃO LER MAIS - GEOMETRIA SIMPLES ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-sm {
    padding: 0.7rem 1.3rem;
    font-size: 0.9rem;
}

.btn-outline-dark {
    background-color: transparent;
    color: var(--azul);
    border: 2px solid var(--azul);
}

.btn-outline-dark:hover {
    background-color: var(--azul);
    color: var(--branco);
    border-color: var(--azul);
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(69, 123, 157, 0.3);
}

.btn-outline-dark::after {
    content: '→';
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.btn-outline-dark:hover::after {
    transform: translateX(3px);
}

/* ===== MENSAGEM DE NENHUMA NOTÍCIA ===== */
.container > p {
    background-color: var(--branco);
    padding: 3rem 2rem;
    border-radius: 16px;
    text-align: center;
    color: var(--cinza-escuro);
    font-size: 1.1rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    animation: fadeIn 0.8s ease;
}

.container > p::before {
    content: '📰';
    display: block;
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* ===== BOTÃO HOME - FORMA GEOMÉTRICA ===== */
body > a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--vermelho);
    color: var(--branco);
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(230, 57, 70, 0.3);
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    z-index: 100;
    animation: fadeIn 1s ease;
}

body > a:hover {
    background-color: var(--laranja);
    transform: translateX(-5px);
    box-shadow: 0 6px 20px rgba(231, 111, 81, 0.4);
}

body > a:active {
    transform: translateX(-3px);
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
    body {
        padding: 1rem 0.5rem;
    }

    .container {
        padding: 1rem;
    }

    h1 {
        font-size: 2rem;
    }

    .lead {
        font-size: 1rem;
    }

    .card-body {
        padding: 1.5rem;
    }

    .card-title {
        font-size: 1.3rem;
    }

    .card-text {
        font-size: 0.95rem;
    }

    body > a {
        bottom: 1rem;
        left: 1rem;
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }

    body::before,
    body::after {
        width: 250px;
        height: 250px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.7rem;
    }

    .card-body {
        padding: 1.2rem;
    }

    .card-title {
        font-size: 1.2rem;
    }

    .tags-list {
        gap: 0.4rem;
    }

    .badge {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    body > a {
        position: static;
        margin: 2rem auto 1rem;
        display: flex;
        width: fit-content;
    }
}

/* ===== ACESSIBILIDADE - FOCO VISÍVEL ===== */
a:focus-visible,
.btn:focus-visible {
    outline: 3px solid var(--amarelo);
    outline-offset: 3px;
}

/* ===== SELEÇÃO DE TEXTO ===== */
::selection {
    background-color: var(--amarelo);
    color: var(--preto);
}

::-moz-selection {
    background-color: var(--amarelo);
    color: var(--preto);
}