/*
Theme Name: Enterate AQP
Author: Brian Vargas / Moon Hare
Description: Tema personalizado para el sitio de noticias Enterate AQP.
Version: 1.0
*/

/* ---------- GLOBAL ---------- */
body {
  margin: 0;
  padding: 0;
  font-family: 'Montserrat', sans-serif;
}

/* ---------- CABECERA ---------- */
.header-wrapper {
  width: 100%;
}

/* Logo */
.logo-container {
  text-align: center;
  background-color: #ffffff;
  padding: 5px 0;
}

.logo-img {
  max-width: 400px;
  height: auto;
  display: inline-block;
  max-height: 200px;
  object-fit: contain;
}

/* Contenedor del menú */
.menu-container {
  background: #f2f2f2;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  padding: 10px 0;
  position: sticky;
  top: 0;
  z-index: 999;
  text-align: center;
}

/* Menú escritorio */
.main-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
}

.main-menu li a {
  text-decoration: none;
  color: #000;
  font-size: 16px;
  font-weight: 500;
  padding: 10px;
}

.main-menu li a:hover {
  color: #d91c1c;
}

/* Botón hamburguesa */
.hamburger {
  display: none;
  font-size: 24px;
  cursor: pointer;
}

/* Checkbox menú */
#menu-toggle {
  display: none;
}

/* ---------- HEADER MOBILE ---------- */
@media (max-width: 768px) {
  .logo-img {
    max-width: 120px;
    max-height: 60px;
  }

  .main-menu {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    background: #f2f2f2;
    padding: 10px 20px;
  }

  #menu-toggle:checked + .hamburger + .main-menu {
    display: flex;
  }

  .hamburger {
    display: block;
    text-align: left;
    margin-left: 20px;
  }
}

/* ---------- FOOTER ---------- */
.site-footer {
  background-color: #1a1a1a;
  color: #fff;
  padding: 40px 20px 10px;
  font-size: 14px;
}

.footer-content {
  display: flex;
  max-width: 1200px;
  margin: 0 auto;
  gap: 40px;
  flex-wrap: wrap;
}

.footer-col {
  flex: 1;
  min-width: 220px;
}

.footer-col h4 {
  margin-bottom: 10px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
}

.footer-col ul li {
  margin-bottom: 8px;
}

.footer-col ul li a {
  color: #ccc;
  text-decoration: none;
}

.footer-col ul li a:hover {
  color: #fff;
}

.footer-logo {
  width: 120px;
}

.social-icons a {
  color: #ccc;
  font-size: 18px;
  margin-right: 12px;
}

.social-icons a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid #333;
  margin-top: 30px;
  text-align: center;
  padding-top: 10px;
  font-size: 12px;
  color: #888;
}

/* Footer mobile */
@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
}

/* ===============================
   CATEGORY RESPONSIVE
================================ */

.category-wrapper {
  display: flex;
  max-width: 1200px;
  margin: 40px auto;
  gap: 30px;
  padding: 0 15px;
}

.category-main {
  flex: 3;
}

.category-sidebar {
  flex: 1;
}

.post-title {
  font-size: 22px;
}

@media (max-width: 768px) {
  .category-wrapper {
    flex-direction: column;
  }

  .category-sidebar {
    display: none;
  }
}

/* ===============================
   HOME MOBILE FIX (CRÍTICO)
   FUNCIONA CON INLINE STYLES
================================ */

@media (max-width: 768px) {

  /* contenedor principal */
  .home-layout {
    flex-direction: column !important;
    padding: 0 15px !important;
  }

  /* TODAS las filas flex del home */
  .home-layout div[style*="display: flex"] {
    flex-direction: column !important;
    gap: 20px !important;
  }

  /* columnas */
  .home-layout div[style*="flex: 1"] {
    width: 100% !important;
  }

  /* ocultar sidebar */
  .home-layout > div:last-child {
    display: none !important;
  }

  /* imágenes */
  .home-layout img {
    width: 100% !important;
    height: auto !important;
  }

  /* títulos */
  .home-layout h2 {
    font-size: 22px !important;
  }

  .home-layout h3 {
    font-size: 18px !important;
  }

  .home-layout h4 {
    font-size: 16px !important;
  }

  /* buscador */
  .search-form {
    flex-direction: column !important;
    width: 100% !important;
  }

  .search-field {
    width: 100% !important;
  }
}
