/*
Theme Name: AG News WordPress Theme
Description: A modern WordPress theme for AG News, converted from React application
Version: 1.0.0
Author: AG News Team
Text Domain: agnews
*/

/* ===========================
   Reset e Base
   =========================== */

:root {
  --font-body: 'Exo', sans-serif;
  --font-heading: 'Dhurjati', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font-body);
  line-height: 1.6;
  color: #333;
  background-color: #e6e7ea;
}

h1, h2, h3, h4, h5, h6,
.main-navigation a,
.page-title,
.news-section h2,
.news-card h3,
.social-media h3,
.footer-text strong {
  font-family: var(--font-heading);
}

/* ===========================
   Header / Navegação
   =========================== */

.site-header {
  background: #ff4f00;
  padding: 8px 0;
  position: sticky;
  top: 0;
  z-index: 9999; /* acima de tudo */
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative; /* base p/ menu mobile absoluto */
}

.site-logo { height: 40px; width: auto; object-fit: contain; }

/* Botão hambúrguer (mostra só no mobile) */
.mobile-menu-toggle {
  display: block;
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  transition: transform .2s;
  position: relative;
  z-index: 10001; /* acima do overlay do menu */
}
.mobile-menu-toggle:hover { transform: scale(1.1); }

/* Nav base: escondido por padrão (mobile fecha) */
.main-navigation { display: none; }

/* Quando ativo (via JS no mobile), aparece */
.main-navigation.active { display: block; }

/* Reseta UL/LI para evitar que o WP aplique listas verticais no desktop */
.main-navigation .nav-menu,
.main-navigation ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.main-navigation li { margin: 0; padding: 0; }

/* Links do menu */
.main-navigation a {
  font-family: 'Arial', sans-serif;
  font-weight: bold;
  padding: 8px 16px;
  border-radius: 12px;
  transition: all .3s;
  text-decoration: none;
  font-size: 14.7px;
  box-shadow: 0 4px 15px rgba(255,79,0,.4), 0 2px 8px rgba(0,0,0,.2);
  letter-spacing: .5px;
}
.main-navigation a:hover,
.main-navigation .current-menu-item > a {
  color: #121212;
  background-color: rgba(255,255,255,.2);
}
.main-navigation a:not(.current-menu-item):not(:hover) { color: white; }

/* ----- MOBILE (≤767px): menu colapsável em coluna ----- */
@media (max-width: 767px) {
  .main-navigation {
    position: absolute;
    top: 56px; /* ajuste se seu header for mais alto */
    left: 0; right: 0;
    background: #ff4f00;
    z-index: 10000;
  }
  .main-navigation .nav-menu {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px 20px;
  }
}

/* ----- DESKTOP (≥768px): menu sempre visível em linha ----- */
@media (min-width: 768px) {
  .mobile-menu-toggle { display: none; }
  .main-navigation { display: block !important; position: static; background: transparent; z-index: auto; }
  .main-navigation .nav-menu {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 24px;
    padding: 0;
  }
}

/* ===========================
   Hero
   =========================== */

.hero-section {
  padding: 40px 0;
  background-image: url('https://storage.googleapis.com/ag-crm/2025-CRM-AG/Imgs/textura_AGNEWS.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #2a2a2a;
  background-attachment: scroll;
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.hero-card {
  position: relative;
  background-color: #374151;
  border-radius: 12px;
  overflow: hidden;
  height: 320px;
  transition: all .3s;
  box-shadow: 0 4px 15px rgba(255,79,0,.4), 0 2px 8px rgba(0,0,0,.2);
}
.hero-card:hover { transform: translateY(-4px); box-shadow: 0 8px 25px rgba(255,79,0,.6), 0 4px 12px rgba(0,0,0,.3); }
.hero-card img { width: 100%; height: 100%; object-fit: cover; }

.hero-card-content {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(0,0,0,.8), transparent);
  padding: 24px;
}
.hero-card h2 { color: #fff; font-size: 24px; font-weight: bold; margin-bottom: 8px; }
.hero-card p { color: rgba(255,255,255,.9); font-size: 14px; }

.hero-advertisement { text-align: center; }
.hero-advertisement img {
  width: 100%; max-width: 800px; margin: 0 auto; border-radius: 12px;
  transition: transform .3s; cursor: pointer;
  box-shadow: 0 4px 15px rgba(255,79,0,.4), 0 2px 8px rgba(0,0,0,.2);
}
.hero-advertisement img:hover { transform: scale(1.05); }

/* ===========================
   News Section
   =========================== */

.news-section { background-color: #e6e7ea; padding: 32px 0; }

.news-container { max-width: 1000px; margin: 0 auto; padding: 0 20px; }

.news-section h2 {
  font-family: 'Arial', sans-serif;
  font-weight: bold;
  color: #374151;
  margin-bottom: 24px;
  font-size: 17.6px;
  letter-spacing: -0.5px;
}

.news-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 24px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.news-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(255,79,0,.4), 0 2px 8px rgba(0,0,0,.2);
  transition: all .3s;
  position: relative;
}
.news-card:hover { transform: translateY(-4px); box-shadow: 0 8px 25px rgba(255,79,0,.6), 0 4px 12px rgba(0,0,0,.3); }
.news-card img { width: 100%; height: 128px; object-fit: cover; }

.news-card-content {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(0,0,0,.9), rgba(0,0,0,.6), transparent);
  padding: 16px;
}
.news-card h3 {
  color: #fff;
  font-family: 'Arial', sans-serif;
  margin-bottom: 12px;
  line-height: 1.4;
  font-size: 15.6px;
}

.news-card .btn {
  background-color: #f97316; color: #fff;
  padding: 6px 16px; border-radius: 12px;
  font-family: 'Arial', sans-serif; font-weight: 600; text-decoration: none;
  display: inline-block; transition: background-color .3s; font-size: 14px;
  box-shadow: 0 4px 15px rgba(255,79,0,.4), 0 2px 8px rgba(0,0,0,.2);
}
.news-card .btn:hover { background-color: #ea580c; }

.news-more { text-align: center; }
.news-more .btn {
  border: 2px solid #f97316; color: #f97316;
  padding: 8px 24px; border-radius: 12px;
  font-family: 'Arial', sans-serif; font-weight: 600; text-decoration: none;
  display: inline-block; transition: all .3s; font-size: 14px;
  box-shadow: 0 4px 15px rgba(255,79,0,.4), 0 2px 8px rgba(0,0,0,.2);
}
.news-more .btn:hover { background-color: #f97316; color: #fff; }

/* ===========================
   Footer
   =========================== */

.site-footer {
  color: #fff;
  background-image: url('https://storage.googleapis.com/ag-crm/2025-CRM-AG/Imgs/textura_AGNEWS.png');
  background-size: cover; background-position: center; background-repeat: no-repeat;
  background-color: #121212;
  flex-direction: column !important;
}
.footer-container { padding: 32px 20px; }

.footer-content {
  max-width: 1200px; margin: 0 auto;
  display: flex; flex-direction: column !important; align-items: center !important; gap: 24px;
}

.social-media { text-align: center; }
.social-media h3 { font-size: 20px; font-family: 'Arial', sans-serif; font-weight: bold; margin-bottom: 16px; text-align: center !important }
.social-links {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-bottom: 8px;
}
.social-links a { color: #fff; font-size: 24px; transition: color .3s; text-decoration: none; }
.social-links a:hover { color: #f97316; }

.footer-logo { text-align: center; }
.footer-logo img {
  display: block; height: auto; max-width: clamp(110px, 45vw, 120px); width: auto;
  margin-left: auto; margin-right: auto;
}

.footer-text {
  text-align: center; font-size: 14px; color: #9ca3af; font-family: 'Arial', sans-serif; line-height: 1.6;
}
.footer-text p { margin-bottom: 8px;  text-align: center !important}

.footer-gradient { height: 32px; background: linear-gradient(to right, #ff4f00, #ff6600, #e50000); }

/* ===========================
   Main Content
   =========================== */

.site-main { min-height: 60vh; }

.content-container { max-width: 1200px; margin: 0 auto; padding: 40px 20px; }

.page-title { font-size: 32px; font-weight: bold; margin-bottom: 24px; color: #374151; }

/* ===========================
   Responsivo extra
   =========================== */

@media (min-width: 768px) {
  .hero-grid { grid-template-columns: 1fr 1fr; }
  .news-grid { grid-template-columns: 1fr 1fr; }

  /* Footer em colunas no desktop */
  .footer-content { flex-direction: row; justify-content: space-between; align-items: flex-start; text-align: left; }
  .social-media { flex: 1; text-align: left; }
  .footer-logo { flex: 1; text-align: center; }
  .footer-text { flex: 2; text-align: right; }
}

@media (max-width: 360px) {
  .footer-logo img { max-width: clamp(100px, 45vw, 120px) !important; }
}

/* ===========================
   WordPress utilitários
   =========================== */

.wp-block-image img { max-width: 100%; height: auto; }
.aligncenter { text-align: center; }
.alignleft { float: left; margin-right: 20px; }
.alignright { float: right; margin-left: 20px; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 14px; color: #666; text-align: center; margin-top: 8px; }

/* Font Awesome */
.fab, .fas { font-family: 'Font Awesome 5 Brands', 'Font Awesome 5 Free'; }
.fab { font-weight: 400; }
.fas { font-weight: 900; }

/* Utils */
.text-center { text-align: center; }
.mb-4 { margin-bottom: 16px; }
.mb-8 { margin-bottom: 32px; }
.py-8 { padding-top: 32px; padding-bottom: 32px; }
.px-4 { padding-left: 16px; padding-right: 16px; }
