/* ============================================================
   PLANTILLA CSS - Municipio de Tula de Allende
   Estilos propios del header y footer (sin WordPress/Elementor)
   ============================================================ */

:root {
  --azul-header: #ececec;
  --azul-footer-top: #f4f4f4;
  --azul-footer-bottom: #d9d9d9;
  --texto-claro: #ffffff;
  --texto-oscuro: #212121;
  --acento: #d4af76;
  --altura-header: 90px;
  --fondo-pagina: #ffffff;
}

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

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--fondo-pagina);
  color: var(--texto-oscuro);
}

img {
  max-width: 100%;
  height: auto;
}

/* ============================================================
   HEADER (nuevo diseño)
   ============================================================ */
header {
  width: 100%;
  background: linear-gradient(180deg, #ffffff 0%, #ececec 100%);
  padding: 20px 50px;
  position: sticky;
  top: 0;
  left: 0;
  z-index: 1000;
  transition: box-shadow 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

/* Header: solo sombra al hacer scroll (sin mover el contenido) */
header.scrolled {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
}

/* ===== CONTENEDOR DEL HEADER ===== */
.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== LOGO/ICONO HOME ===== */
.wlogo-home {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: transform 0.3s ease;
  gap: 12px;
  min-width: fit-content;
}

.logo-home:hover {
  transform: scale(1.05);
}

/* Contenedor para logo imagen */
.logo-image {
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.logo-image img {
  width: 120%;
  height: 120%;
  object-fit: contain;
  filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.5));
}

nav {
  display: flex;
  gap: 15px;
  align-items: center;
  transition: gap 0.3s ease;
}

nav a, .dropdown-toggle {
  color: #212121;
  text-decoration: none;
  padding: 12px 18px;
  font-size: 16px;
  font-weight: 500;
  border-radius: 4px;
  transition: all 0.3s ease;
  text-shadow: none;
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  background-color: transparent;
  border: none;
}

nav a::after, .dropdown-toggle::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: #d4af76;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

nav a:hover::after, .dropdown-toggle:hover::after {
  width: 70%;
}

nav a:hover, .dropdown-toggle:hover {
  background-color: rgba(0, 0, 0, 0.06);
  color: #d4af76;
}

/* ===== ÍCONO FLECHA DROPDOWN ===== */
.dropdown-toggle {
  cursor: pointer;
}

.dropdown-toggle i {
  font-size: 12px;
  transition: transform 0.3s ease;
}

.dropdown-toggle.active i {
  transform: rotate(180deg);
}

/* ===== MENÚ DROPDOWN ===== */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #ffffff;
  border-radius: 6px;
  min-width: 220px;
  display: none;
  flex-direction: column;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(212, 175, 118, 0.5);
  margin-top: 8px;
  animation: slideDown 0.3s ease;
  z-index: 1001;
}

.dropdown-menu.active {
  display: flex;
}

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

.dropdown-menu a {
  color: #212121;
  padding: 14px 20px;
  font-size: 15px;
  background-color: transparent;
  text-shadow: none;
  text-decoration: none;
  border: none;
  border-left: 3px solid transparent;
  transition: all 0.3s ease;
}

.dropdown-menu a:hover {
  background-color: rgba(212, 175, 118, 0.2);
  border-left-color: #d4af76;
  padding-left: 25px;
}

/* ===== BOTÓN MENÚ MÓVIL ===== */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #d4af76;
  font-size: 28px;
  cursor: pointer;
  transition: color 0.3s ease;
}

.mobile-menu-toggle:hover {
  color: #a8743a;
}

/* ===== NAVEGACIÓN MÓVIL ===== */
nav.mobile-nav {
  position: fixed;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100vh;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.95) 0%, rgba(50, 30, 20, 0.95) 100%);
  display: none;
  flex-direction: column;
  padding-top: 80px;
  transition: left 0.3s ease;
  z-index: 999;
  overflow-y: auto;
}

nav.mobile-nav.active {
  left: 0;
  display: flex;
}

nav.mobile-nav a {
  color: #ffffff;
  padding: 18px 30px;
  font-size: 18px;
  text-decoration: none;
  border-bottom: 1px solid rgba(212, 175, 118, 0.2);
  background-color: transparent;
  text-shadow: none;
  display: block;
}

nav.mobile-nav a:hover {
  background-color: rgba(212, 175, 118, 0.1);
}

/* ===== CONTENIDO PRINCIPAL ===== */
main {
  padding: 40px 20px;
  min-height: 100vh;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: linear-gradient(180deg, var(--azul-footer-top, #f4f4f4), var(--azul-footer-bottom, #d9d9d9));
  color: var(--texto-oscuro);
  margin-top: 40px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.footer-columnas {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  max-width: 1300px;
  margin: 0 auto;
  padding: 48px 24px 32px;
}

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

.footer-col img {
  max-height: 120px;
  width: auto;
}

.footer-titulo {
  font-family: Graphik, "Segoe UI", Arial, sans-serif;
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--texto-oscuro);
}

/* Lista de contacto */
.contacto-lista {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  text-align: left;
}

.contacto-lista li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 15px;
  line-height: 1.5;
}

.contacto-lista .icono {
  flex-shrink: 0;
  color: var(--acento);
  margin-top: 2px;
}

.contacto-lista a {
  color: var(--texto-oscuro);
  text-decoration: none;
}

.contacto-lista a:hover {
  text-decoration: underline;
}

/* Redes sociales */
.redes-sociales {
  display: flex;
  gap: 10px;
}

.redes-sociales a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.06);
  color: var(--texto-oscuro);
  transition: background-color 0.25s ease, transform 0.25s ease;
}

.redes-sociales a:hover {
  background-color: rgba(0, 0, 0, 0.16);
  transform: translateY(-2px);
}

/* Navegación del footer */
.footer-nav,
.footer-legal {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-nav li {
  margin-bottom: 10px;
}

.footer-nav a,
.footer-legal a {
  font-family: Graphik, "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  color: var(--texto-oscuro);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-nav a:hover,
.footer-legal a:hover {
  color: var(--acento);
  text-decoration: underline;
}

.footer-legal {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}

.footer-copyright {
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  text-align: center;
  padding: 18px 24px;
  font-family: Graphik, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  color: #6b6b6b;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
/* ===== HEADER - TABLETS ===== */
@media (max-width: 1024px) {
  .header-container {
    padding: 0 15px;
  }

  nav {
    gap: 8px;
  }

  nav a, .dropdown-toggle {
    padding: 10px 14px;
    font-size: 14px;
  }

  .logo-text {
    font-size: 16px;
  }

  .logo-image {
    width: 48px;
    height: 48px;
  }
}

/* ===== HEADER - MÓVIL ===== */
@media (max-width: 768px) {
  /* Mostrar botón de menú móvil */
  .mobile-menu-toggle {
    display: block;
  }

  /* Ocultar navegación en desktop */
  nav.desktop-nav {
    display: none;
  }

  .header-container {
    padding: 0 15px;
  }

  .logo-text {
    font-size: 14px;
  }

  .logo-image {
    width: 42px;
    height: 42px;
  }

  /* ===== DROPDOWN EN MÓVIL ===== */
  .dropdown-menu {
    position: static;
    background-color: rgba(100, 70, 40, 0.9);
    box-shadow: none;
    border: none;
    margin-top: 0;
    border-radius: 0;
  }

  nav.mobile-nav .dropdown-toggle {
    color: #ffffff;
  }

  nav.mobile-nav .dropdown-menu a {
    color: #ffffff;
  }

  .dropdown-menu a {
    padding: 12px 30px;
    padding-left: 40px;
    font-size: 14px;
  }

  .dropdown-menu a:hover {
    padding-left: 45px;
  }
}

/* ===== HEADER - MÓVIL PEQUEÑO ===== */
@media (max-width: 480px) {
  header {
    padding: 12px 0;
  }

  .header-container {
    padding: 0 10px;
  }

  .logo-image {
    width: 38px;
    height: 38px;
  }

  .logo-text {
    font-size: 12px;
  }

  .mobile-menu-toggle {
    font-size: 24px;
  }

  nav.mobile-nav a {
    padding: 14px 20px;
    font-size: 15px;
  }

  .dropdown-menu a {
    padding: 10px 25px;
    padding-left: 35px;
    font-size: 13px;
  }
}

/* ===== FOOTER - MÓVIL ===== */
@media (max-width: 600px) {
  .footer-columnas {
    flex-direction: column;
    text-align: center;
  }

  .footer-col img {
    margin: 0 auto;
  }

  .contacto-lista,
  .footer-nav,
  .footer-legal {
    text-align: center;
  }

  .redes-sociales,
  .contacto-lista {
    justify-content: center;
  }
}
