/* CSS INDEX */

/* Fontes */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&family=Merriweather:wght@400;700;900&display=swap');

/* Vari?veis */
:root {
  --bg: #e0e0e0;
  --fg: #212529;
  --primary: #eef2ff;
  --primary-dark: #dfd7fb;
  --primary-text: #ff0000;
  --primary-text-dark: #ce0303;

  --news-bg: #0000;
  --primary-light: #03129b;
  --secondary: #ff5722;
  --gray-light: #000000;
  --gray: #6c757d;
  --shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  --border-radius: 8px;
  --transition: all 0.3s ease;
}

/* Reset e Estilos B?sicos */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  text-align: justify;
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  transition: var(--transition);
}

img {
  max-width: 100%;
  height: auto;
}

a {
  text-decoration: none;
  color: var(--primary-text);
  transition: var(--transition);
}

/* Cabe?alho */
header {
  background: linear-gradient(120deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 20px 0;
  position: relative;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-container {
  width: min(100%, 1200px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 0 15px;
}

.logo-header {
  display: flex;
  justify-content: center;
}

.logo-header .logo {
  width: clamp(120px, 20vw, 200px);
  height: auto;
  border-radius: var(--border-radius);
  transition: transform 0.3s ease;
}

.logo-header .logo:hover {
  transform: scale(1.05);
}

/* Navigation */
nav {
  width: 100%;
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: clamp(10px, 3vw, 25px);
  padding: 0;
  flex-wrap: wrap;
}

nav ul li {
  position: relative;
}

nav ul li::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: #ff0000;
  transition: width 0.3s ease;
}

nav ul li:hover::after {
  width: 100%;
}

nav ul li a {
  color: #ff0000;
  font-weight: 500;
  font-size: clamp(0.75rem, 2vw, 0.95rem);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-decoration: none;
  display: block;
  padding: 8px 12px;
  border-radius: 4px;
  transition: var(--transition);
}

nav ul li a:hover {
  background: rgba(255, 0, 0, 0.1);
}

/* Search */
        /* Estilos para o sistema de busca */
        .busca {
            position: relative;
            width: 300px;
            margin: 0 20px;
        }

        #buscaInput {
            width: 100%;
            padding: 12px 45px 12px 15px;
            border: 2px solid #e0e0e0;
            border-radius: 25px;
            font-size: 14px;
            outline: none;
            transition: all 0.3s ease;
            background-color: #fff;
            box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        }

        #buscaInput:focus {
            border-color: #007bff;
            box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
        }

        .search-icon {
            position: absolute;
            right: 15px;
            top: 50%;
            transform: translateY(-50%);
            color: #666;
            cursor: pointer;
            transition: color 0.3s ease;
        }

        .search-icon:hover {
            color: #007bff;
        }

        /* Container de sugest&#65533;es */
        .suggestions-container {
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            color: #000000;
            background: white;
            border: 1px solid #e0e0e0;
            border-top: none;
            border-radius: 0 0 15px 15px;
            max-height: 400px;
            overflow-y: auto;
            z-index: 1000;
            box-shadow: 0 5px 15px rgba(0,0,0,0.2);
            display: none;
        }

        .suggestion-item {
            padding: 12px 15px;
            cursor: pointer;
            border-bottom: 1px solid #f0f0f0;
            transition: background-color 0.2s ease;
            display: flex;
            align-items: center;
        }

        .suggestion-item:last-child {
            border-bottom: none;
        }

        .suggestion-item:hover {
            background-color: #ffffff;
        }

        .suggestion-item.active {
            background-color: #f7f7f7;
        }

        .suggestion-icon {
            margin-right: 10px;
            color: #666;
            width: 16px;
        }

        .suggestion-text {
            flex: 1;
        }

        .suggestion-category {
            font-size: 11px;
            color: #888;
            background: #f0f0f0;
            padding: 2px 6px;
            border-radius: 10px;
            margin-left: 10px;
        }

        /* Resultados da busca */
        .search-results {
            display: none;
            margin: 20px 0;
            padding: 20px;
            background: #f8f9fa;
            border-radius: 10px;
            border: 1px solid #e0e0e0;
        }

        .search-results h3 {
            margin: 0 0 15px 0;
            color: #333;
            font-size: 18px;
        }

        .result-item {
            padding: 15px;
            background: white;
            margin-bottom: 10px;
            border-radius: 8px;
            border: 1px solid #e0e0e0;
            transition: transform 0.2s ease, box-shadow 0.2s ease;
            cursor: pointer;
        }

        .result-item:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        }

        .result-title {
            font-weight: bold;
            color: #007bff;
            margin-bottom: 5px;
            font-size: 16px;
        }

        .result-description {
            color: #666;
            font-size: 14px;
            line-height: 1.4;
            margin-bottom: 8px;
        }

        .result-category {
            display: inline-block;
            background: #007bff;
            color: white;
            padding: 3px 8px;
            border-radius: 12px;
            font-size: 11px;
            text-transform: uppercase;
        }

        .no-results {
            text-align: center;
            padding: 40px;
            color: #666;
        }

        .no-results i {
            font-size: 48px;
            margin-bottom: 15px;
            color: #ccc;
        }

        /* Highlight do termo pesquisado */
        .highlight {
            background-color: #ffeb3b;
            padding: 1px 2px;
            border-radius: 2px;
            font-weight: bold;
        }

        /* Loading spinner */
        .loading {
            display: none;
            text-align: center;
            padding: 20px;
        }

        .spinner {
            border: 2px solid #f3f3f3;
            border-top: 2px solid #007bff;
            border-radius: 50%;
            width: 30px;
            height: 30px;
            animation: spin 1s linear infinite;
            margin: 0 auto 10px;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        /* Responsividade */
        @media (max-width: 768px) {
            .busca {
                width: 250px;
                margin: 10px;
            }

            .suggestions-container {
                max-height: 300px;
            }

            .result-item {
                padding: 12px;
            }

            .result-title {
                font-size: 14px;
            }

            .result-description {
                font-size: 13px;
            }
        }

        @media (max-width: 480px) {
            .busca {
                width: 200px;
            }

            #buscaInput {
                padding: 10px 35px 10px 12px;
                font-size: 13px;
            }

            .suggestion-item {
                padding: 10px 12px;
            }
        }

        /* Anima&#65533;&#65533;es */
        .fade-in {
            animation: fadeIn 0.3s ease-in;
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(-10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .slide-in {
            animation: slideIn 0.3s ease-out;
        }

        @keyframes slideIn {
            from { transform: translateX(-20px); opacity: 0; }
            to { transform: translateX(0); opacity: 1; }
        }

        /* Propaganda no topo */
        .propaganda-header-container {
            padding: 30px 15px;
            display: flex;
            justify-content: center;
        }

        .propaganda-header {
            border-radius: 10px;
            box-shadow: var(--shadow);
            height: clamp(150px, 25vw, 200px);
            width: 100%;
            max-width: 900px;
            position: relative;
            overflow: hidden;
            background: #f0f0f0;
        }

        /* Banner Slider */
        .banner-slider {
            position: relative;
            width: 100%;
            height: 100%;
        }

        .banner-slide {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            opacity: 0;
            transition: opacity 0.5s ease-in-out;
        }

        .banner-slide.active {
            opacity: 1;
        }

        .banner-slide img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }

        .banner-slide:first-child img {
            width: 100%;
            height: 100%;
            object-fit: fill;
        }

        /* Slide especial com texto */
        .second-banner {
            background-color: black;
            border-radius: 10px;
            box-shadow: var(--shadow);
            height: clamp(120px, 25vw, 200px);
            width: min(100%, 900px);
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            overflow: hidden;
        }

        .second-banner::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: rgba(255, 255, 255, 0.1);
            transform: rotate(30deg);
          }

        .second-banner img {
            position: relative;
            top: 20px;
            object-fit: cover;
            width: 300px;
            height: auto;
            max-height: 90%;
        }

        .second-banner p {
            position: relative;
            top: -15px;
            color: white;
            font-size: clamp(0.9rem, 3vw, 1.3rem);
            position: relative;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 2px;
            text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
            text-align: center;
            padding: 0 20px;
            margin-top: 0;
        }


        /* C&#65533;rculos indicadores */
        .banner-dots {
            position: absolute;
            bottom: 15px;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            gap: 10px;
            z-index: 10;
            opacity: 50%;
        }

        .dot {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.5);
            cursor: pointer;
            transition: all 0.3s ease;
            border: 2px solid transparent;
        }

        .dot.active {
            background: rgba(255, 255, 255, 1);
            border-color: rgba(0, 0, 0, 0.3);
            transform: scale(1.2);
        }

        .dot:hover {
            background: rgba(255, 255, 255, 0.8);
            transform: scale(1.1);
        }

        /* Setas de navega&#65533;&#65533;o */
        .banner-nav {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            background: rgba(0, 0, 0, 0.5);
            color: white;
            border: none;
            padding: 12px 16px;
            cursor: pointer;
            font-size: 18px;
            transition: all 0.3s ease;
            border-radius: 50%;
            width: 45px;
            height: 45px;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 10;
            opacity: 0;
        }

        .propaganda-header:hover .banner-nav {
            opacity: 1;
        }

        .banner-nav:hover {
            background: rgba(0, 0, 0, 0.8);
            transform: translateY(-50%) scale(1.1);
        }

        .banner-nav:active {
            transform: translateY(-50%) scale(0.95);
        }

        .banner-nav.prev {
            left: 15px;
        }

        .banner-nav.next {
            right: 15px;
        }

        /* Indicador de progresso */
        .progress-bar {
            position: absolute;
            bottom: 0;
            left: 0;
            height: 3px;
            background: rgba(255, 255, 255, 0.8);
            transition: width linear;
            z-index: 10;
        }

        /* Responsivo */
        @media (max-width: 768px) {
            .propaganda-header-container {
                padding: 20px 10px;
            }

            .banner-nav {
                padding: 10px 14px;
                font-size: 16px;
                width: 40px;
                height: 40px;
            }

            .banner-nav.prev {
                left: 10px;
            }

            .banner-nav.next {
                right: 10px;
            }

            .dot {
                width: 10px;
                height: 10px;
            }

            .banner-dots {
                bottom: 10px;
                gap: 8px;
            }

            .second-banner{
              height: 100%;
            }

            .third-banner{
              height: 100%;
            }

            .propaganda-header {
                height: clamp(185px, 30vw, 150px);
            }
        }

        @media (max-width: 480px) {
            .banner-nav {
                opacity: 1; /* Sempre vis&#65533;vel em mobile */
            }

            .propaganda-header {
                height: clamp(185px, 30vw, 150px);
            }
        }

        /* Anima&#65533;&#65533;es de entrada */
        @keyframes slideInRight {
            from {
                transform: translateX(100%);
                opacity: 0;
            }
            to {
                transform: translateX(0);
                opacity: 1;
            }
        }

        @keyframes slideInLeft {
            from {
                transform: translateX(-100%);
                opacity: 0;
            }
            to {
                transform: translateX(0);
                opacity: 1;
            }
        }

        .banner-slide.slide-in-right {
            animation: slideInRight 0.5s ease-out;
        }

        .banner-slide.slide-in-left {
            animation: slideInLeft 0.5s ease-out;
        }

/* Layout Principal */
.layout {
  display: flex;
  flex-direction: column;
  gap: 30px;
  padding: 20px 15px;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

.conteudo-principal {
  width: 100%;
  max-width: none;
}

/* Not?cia da Semana */
.destaques-grid {
  margin-bottom: 40px;
}

.destaques-grid h2 {
  font-family: 'Merriweather', serif;
  font-size: clamp(1.3rem, 4vw, 1.8rem);
  color: var(--primary-text);
  margin-bottom: 20px;
  position: relative;
  padding-left: 12px;
}

.destaques-grid h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 5px;
  height: 80%;
  width: 4px;
  background: var(--secondary);
  border-radius: 2px;
}

.noticia-principal {
  background: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
}

.noticia-principal:hover {
  transform: translateY(-5px);
}

.noticia-principal img {
  height: clamp(200px, 40vw, 450px);
  width: 100%;
  object-fit: cover;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.noticia-principal .info {
  padding: 20px;
}

.noticia-principal .info h3 {
  font-family: 'Merriweather', serif;
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  color: var(--primary-text);
  margin-bottom: 10px;
}

.noticia-principal .info p {
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
  color: var(--gray);
  margin-bottom: 15px;
}



.nav-buttons {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 5;
}

.scroll-btn {
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition);
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 10px;
}

.scroll-btn:hover {
  background-color: var(--primary);
}

/* Not?cias Recentes */
.news-section {
  margin-bottom: 40px;
}

.news-section h2 {
  font-family: 'Merriweather', serif;
  font-size: clamp(1.3rem, 4vw, 1.8rem);
  color: var(--primary-text);
  margin-bottom: 20px;
  position: relative;
  padding-left: 12px;
}

.news-section h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 5px;
  height: 80%;
  width: 4px;
  background: var(--secondary);
  border-radius: 2px;
}

.grid {
  display: grid;
  gap: 25px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.grid article {
  background: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: none;
  padding: 0;
}

.grid article:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

.grid article img {
  height: clamp(150px, 25vw, 180px);
  width: 100%;
  object-fit: cover;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.grid article h3 {
  font-family: 'Merriweather', serif;
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--primary-text-dark);
  padding: 15px 15px 5px;
  line-height: 1.4;
}

.grid article p {
  padding: 0 15px 15px;
  color: var(--gray);
  font-size: clamp(0.8rem, 2vw, 0.9rem);
}

.grid article a {
  color: inherit;
}

.grid article a:hover h3 {
  color: var(--secondary);
}

.grid article p strong {
  color: var(--secondary);
  font-weight: 500;
}

/* Propaganda Lateral Esquerda */
.propaganda-container-esquerda {
  width: 100%;
  max-width: 280px;
  margin: 0 auto 20px;
  position: static;
}

.propaganda-lateral-esquerda {
  height: 100%;
}

.propaganda-conteudo-esquerda {
  background: white;
  border-radius: var(--border-radius);
  padding: 0;
  height: clamp(250px, 40vw, 650px);
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid var(--gray-light);
}

.propaganda-conteudo-esquerda:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

.propaganda-conteudo-esquerda img {
  position: relative;
  bottom: 20px;
  object-fit: cover;
  width: 100%;
  height: auto;
  border-radius: var(--border-radius);
}

/* Propaganda Lateral Direita */
.propaganda-container-direita {
  width: 100%;
  max-width: 280px;
  margin: 0 auto 20px;
  position: static;
}

.propaganda-lateral-direita {
  height: 100%;
}

.propaganda-conteudo-direita {
  background: white;
  border-radius: var(--border-radius);
  padding: 0;
  height: clamp(250px, 40vw, 450px);
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid var(--gray-light);
}

.propaganda-conteudo-direita:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

.propaganda-conteudo-direita::before {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  background: linear-gradient(135deg, var(--primary-light) 40%, transparent 100%);
  border-radius: 50%;
  top: -150px;
  left: -150px;
  opacity: 0.8;
}

.propaganda-conteudo-direita::after {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  background: linear-gradient(135deg, var(--primary-light) 0%, transparent 80%);
  border-radius: 50%;
  bottom: -100px;
  right: -100px;
  opacity: 0.5;
}

.propaganda-conteudo-direita img {
  position: relative;
  bottom: 20px;
  object-fit: cover;
  width: 100%;
  height: auto;
  border-radius: var(--border-radius);
}

#topoBtn.mostrar {
  opacity: 1;
  visibility: visible;
}

#topoBtn:hover {
  background: var(--secondary);
  transform: translateY(-3px);
}

/* Footer */
footer {
  background: linear-gradient(120deg, #2259ff, #0f0046);
  color: white;
  padding: 40px 15px;
  margin-top: 40px;
}

.footer-conteudo {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 30px;
}

.logo-footer img {
  width: clamp(150px, 25vw, 200px);
  height: auto;
  border-radius: var(--border-radius);
  transition: transform 0.3s ease;
}

footer p {
  font-size: clamp(0.8rem, 2vw, 0.9rem);
  opacity: 0.8;
}

.redes-sociais {
  display: flex;
  gap: 15px;
}

.redes-sociais a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transition: var(--transition);
}

.redes-sociais img {
  width: 20px;
  height: 20px;
  filter: brightness(0) invert(1);
}

.redes-sociais a:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.2);
}

/* Responsividade Desktop */
@media (min-width: 1200px) {
  .layout {
    flex-direction: row;
    justify-content: center;
  }

  .propaganda-container-esquerda,
  .propaganda-container-direita {
    width: 280px;
    flex-shrink: 0;
    position: sticky;
    top: 90px;
    align-self: flex-start;
    margin: 0;
  }

  .conteudo-principal {
    flex: 1;
    max-width: 900px;
    margin: 0 20px;
  }
}

@media (min-width: 992px) {
  .header-container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .logo-header {
    margin-bottom: 0;
  }

  nav {
    width: auto;
  }

  .busca {
    width: auto;
    max-width: 250px;
    margin: 0;
  }
}

@media (max-width: 991px) {
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }

  .propaganda-conteudo-esquerda{
    height: 400px;
  }
}

@media (max-width: 768px) {
  header {
    padding: 15px 0;
  }

  .header-container {
    gap: 15px;
  }

  nav ul {
    gap: 15px;
  }

  nav ul li a {
    font-size: 0.85rem;
  }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
  }

  .footer-conteudo {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }
}

@media (max-width: 350px){
  .propaganda-conteudo-esquerda{
    height: 450px;
  }
}

@media (max-width: 480px) {
  header {
    padding: 10px 0;
  }

  .header-container {
    gap: 15px;
  }

  nav ul {
    align-items: center;
    gap: 10px;
  }

  .layout {
    padding: 15px 10px;
    gap: 20px;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  #topoBtn {
    width: 40px;
    height: 40px;
    bottom: 20px;
    right: 20px;
  }
}

/* Anima??es */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.destaques-grid, .news-section {
  animation: fadeIn 0.8s ease-out;
}