/* ============================================
   style.css - Jornal Escolar Amyntas de Barros
   ============================================ */

/* ---------- VARIÁVEIS GLOBAIS ---------- */
:root {
  --primary: #0f172a;
  --accent: #3b82f6;
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #1e2937;
  --gray: #64748b;
}

[data-theme="dark"] {
  --bg: #0f172a;
  --card: #1e2937;
  --text: #f1f5f9;
  --gray: #94a3b8;
}

/* ---------- RESET E BASE ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: all 0.4s ease;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- TÍTULOS GLOBAIS - Playfair Display ---------- */
h1, h2, h3, h4, h5, h6,
.logo h1,
.hero h1,
.noticias h2,
.slide-info h3,
.article-card h3,
.about-title,
.about-card h2,
.modal-content h2,
.category-header h1 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
}

/* ---------- HEADER ---------- */
header {
  background: var(--primary);
  color: white;
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.logo h1 {
  font-size: 1.8rem;
  letter-spacing: -1px;
}

.slogan {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  opacity: 0.9;
}

nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  transition: opacity 0.2s;
}

nav a:hover {
  opacity: 0.8;
}

/* Botão tema claro/escuro */
.theme-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  border: none;
  font-size: 1.35rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.theme-btn:hover {
  transform: scale(1.08);
  background: #2563eb;
}

/* ---------- HERO (PÁGINA INICIAL) ---------- */
.hero {
  padding: 100px 0 80px;
  text-align: center;
  background: linear-gradient(rgba(15, 23, 42, 0.75), rgba(15, 23, 42, 0.75)),
              url('imagens/1.jpeg') center/cover;
  color: white;
}

.hero .tag {
  background: var(--accent);
  padding: 8px 20px;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  display: inline-block;
}

.hero h1 {
  font-size: 3.5rem;
  max-width: 900px;
  margin: 20px auto 25px;
  line-height: 1.2;
}

.lead {
  font-family: 'Inter', sans-serif;
  font-size: 1.2rem;
  max-width: 750px;
  margin: 0 auto 35px;
  line-height: 1.6;
}

/* Botão padrão */
.btn {
  background: var(--accent);
  color: white;
  border: none;
  padding: 14px 32px;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}

.btn:hover {
  transform: scale(1.02);
  background: #2563eb;
}

/* ---------- SEÇÃO DE NOTÍCIAS (CARROSSEL) ---------- */
.noticias {
  padding: 70px 0;
  background: var(--bg);
}

.noticias h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 50px;
  color: var(--primary);
}

[data-theme="dark"] .noticias h2 {
  color: white;
}

.carousel-wrapper {
  position: relative;
  max-width: 100%;
  border-radius: 20px;
  padding: 0 60px; /* Espaço para os botões laterais */
}

@media (max-width: 768px) {
  .carousel-wrapper {
    padding: 0 40px;
  }
}

@media (max-width: 480px) {
  .carousel-wrapper {
    padding: 0 30px;
  }
}

.slides-horizontal {
  display: flex;
  gap: 30px;
  overflow-x: auto;
  padding: 20px 0 35px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) var(--card);
}

.slides-horizontal::-webkit-scrollbar {
  height: 9px;
}

.slides-horizontal::-webkit-scrollbar-track {
  background: var(--card);
  border-radius: 10px;
}

.slides-horizontal::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 10px;
}

.slide {
  flex: 0 0 460px;
  background: var(--card);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
  transition: all 0.4s ease;
  cursor: pointer;
}

.slide:hover {
  transform: translateY(-12px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.22);
}

.slide img {
  width: 100%;
  height: 280px;
  object-fit: cover;
}

.slide-info {
  padding: 24px;
}

.slide-info .categoria {
  font-size: 0.9rem;
  background: var(--accent);
  color: white;
  padding: 7px 16px;
  border-radius: 30px;
  display: inline-block;
  margin-bottom: 14px;
  font-family: 'Inter', sans-serif;
}

.slide-info h3 {
  font-size: 1.45rem;
  line-height: 1.35;
  margin-bottom: 12px;
  color: var(--text);
}

.slide-info p {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  color: var(--gray);
  line-height: 1.6;
}

/* Botões navegação carrossel - POSICIONADOS CORRETAMENTE */
.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(59, 130, 246, 0.9);
  backdrop-filter: blur(4px);
  color: white;
  border: none;
  width: 48px;
  height: 48px;
  font-size: 2rem;
  font-weight: bold;
  border-radius: 50%;
  cursor: pointer;
  z-index: 30;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-btn:hover {
  background: var(--accent);
  transform: translateY(-50%) scale(1.1);
}

.prev {
  left: 5px;
}

.next {
  right: 5px;
}

/* Botões menores para mobile */
@media (max-width: 768px) {
  .nav-btn {
    width: 40px;
    height: 40px;
    font-size: 1.6rem;
  }
  
  .prev {
    left: 0px;
  }
  
  .next {
    right: 0px;
  }
}

@media (max-width: 480px) {
  .nav-btn {
    width: 36px;
    height: 36px;
    font-size: 1.4rem;
  }
  
  .prev {
    left: -5px;
  }
  
  .next {
    right: -5px;
  }
}

/* ---------- PÁGINA NOTÍCIAS (GRID) ---------- */
.category-header {
  padding: 100px 0 80px;
  text-align: center;
  background: linear-gradient(rgba(15, 23, 42, 0.75), rgba(15, 23, 42, 0.75)),
              url('imagens/1.jpeg') center/cover;
  color: white;
}

.category-header h1 {
  font-size: 3.5rem;
  max-width: 900px;
  margin: 0 auto 20px;
  line-height: 1.2;
}

.category-header h1 i {
  font-size: 3rem;
  margin-right: 15px;
}

.category-header p {
  font-family: 'Inter', sans-serif;
  font-size: 1.2rem;
  max-width: 750px;
  margin: 0 auto 35px;
  line-height: 1.6;
}

.category-header .btn {
  margin-top: 10px;
}

.articles {
  padding: 60px 0;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 35px;
  padding: 20px 0 40px;
  justify-content: center;
}

.article-card {
  background: var(--card);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.3s;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  max-width: 420px;
  margin: 0 auto;
}

.article-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.article-card img {
  width: 100%;
  height: 280px;
  object-fit: cover;
}

.article-info {
  padding: 25px;
}

.article-info .categoria-badge {
  background: var(--accent);
  color: white;
  padding: 5px 14px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-family: 'Inter', sans-serif;
  display: inline-block;
}

.article-info .data {
  margin: 12px 0;
  color: var(--gray);
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
}

.article-info h3 {
  font-size: 1.4rem;
  margin-bottom: 12px;
  line-height: 1.35;
  color: var(--text);
}

.article-info p {
  font-family: 'Inter', sans-serif;
  color: var(--gray);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- PÁGINA SOBRE ---------- */
.about-section {
  padding: 80px 0;
  max-width: 900px;
  margin: 0 auto;
}

.about-title {
  text-align: center;
  margin-bottom: 50px;
  font-size: 2.2rem;
  color: var(--text);
}

.button-wrapper {
  text-align: center;
  margin-bottom: 50px;
}

.about-card {
  background: var(--card);
  border-radius: 16px;
  padding: 40px;
  margin-bottom: 40px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.about-card h2 {
  margin-bottom: 20px;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.5rem;
}

.about-card h2 i {
  font-size: 1.6rem;
}

.about-card p {
  font-family: 'Inter', sans-serif;
  line-height: 1.7;
  color: var(--text);
  margin-top: 15px;
}

.about-card strong {
  color: var(--accent);
}

.member-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 15px;
}

.member-tag {
  background: var(--bg);
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  transition: all 0.2s;
}

.member-tag:hover {
  background: var(--accent);
  color: white;
  transform: scale(1.02);
}

.contact-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
}

.contact-link:hover {
  text-decoration: underline;
}

/* ---------- MODAL ---------- */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-content {
  background: var(--card);
  max-width: 720px;
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 2rem;
  cursor: pointer;
  z-index: 10;
  background: rgba(0, 0, 0, 0.5);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: background 0.2s;
}

.close:hover {
  background: rgba(0, 0, 0, 0.8);
}

#modal-body {
  padding: 25px 20px;
}

#modal-body img {
  width: 100%;
  border-radius: 12px;
  margin: 15px 0;
}

#modal-body p {
  font-family: 'Inter', sans-serif;
}

/* ---------- FOOTER ---------- */
footer {
  background: var(--primary);
  color: white;
  text-align: center;
  padding: 35px 20px;
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
}

/* ---------- RESPONSIVIDADE ---------- */
@media (max-width: 768px) {
  .category-header h1 {
    font-size: 2.2rem;
  }
  
  .articles-grid {
    grid-template-columns: 1fr;
  }
  
  .about-card {
    padding: 25px;
  }
  
  .about-card h2 {
    font-size: 1.3rem;
  }
  
  .member-tag {
    font-size: 0.8rem;
    padding: 4px 12px;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .noticias h2 {
    font-size: 2rem;
  }
  
  .slide {
    flex: 0 0 380px;
  }
  
  .slide img {
    height: 250px;
  }
}

@media (max-width: 700px) {
  .slide {
    flex: 0 0 380px;
  }
  
  .slide img {
    height: 250px;
  }
}

@media (max-width: 500px) {
  .slide {
    flex: 0 0 320px;
  }
  
  .slide img {
    height: 220px;
  }
  
  header .container {
    flex-direction: column;
    text-align: center;
  }
  
  nav {
    justify-content: center;
  }
}