/* ======================================================
   LAYOUT CSS - Coaching y Resulta2
   Header, navegación, footer y grid base
   ====================================================== */

/* ======================================================
   HEADER
   ====================================================== */

header.site-header {
  background-color: #fff;
  box-shadow: var(--sombra-suave);
  position: sticky;
  top: 0;
  z-index: 1000;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3) var(--space-4);
}

header .logo img {
  height: 48px;
}

/* ======================================================
   NAVEGACIÓN PRINCIPAL + SUBMENÚ
   ====================================================== */

.nav {
  display: flex;
  gap: var(--space-6);
  align-items: center;
  position: relative;
}

/* Enlaces principales */
.nav a {
  font-weight: 500;
  color: var(--color-primario);
  text-decoration: none;
  position: relative;
  transition: color 0.3s ease;
}

.nav a:hover {
  color: var(--color-secundario);
}

/* Contenedor del submenú */
.submenu {
  position: relative;
}

/* Lista del submenú (oculta por defecto) */
.submenu-items {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  list-style: none;
  padding: 0.6rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s ease-in-out;
  min-width: 230px;
  z-index: 999;
}

/* Elementos del submenú */
.submenu-items li {
  display: block;
}

.submenu-items li a {
  display: block;
  padding: 0.7rem 1.2rem;
  font-size: 0.95rem;
  color: var(--color-primario);
  white-space: nowrap;
  transition: all 0.2s ease;
}

.submenu-items li a:hover {
  background: var(--color-primario);
  color: #fff;
}

/* Mostrar submenú al pasar el cursor */
.submenu:hover .submenu-items {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Indicador de submenú (flecha ▾) */
.submenu > a::after {
  content: " ▾";
  font-size: 0.75rem;
  color: var(--color-primario);
}

/* ======================================================
   GRID BASE
   ====================================================== */

.grid {
  display: grid;
  gap: var(--space-6);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* ======================================================
   FOOTER UNIFICADO (con iconos y tooltips)
   ====================================================== */

.site-footer {
  background-color: #1E3A8A;
  color: #fff;
  text-align: center;
  padding: 4rem 2rem 2rem;
  position: relative;
}

.frase-footer {
  font-size: 1.1rem;
  margin-bottom: 1.8rem;
  font-style: italic;
  color: #E2BB53;
}

.footer-redes {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  position: relative;
}

.footer-redes a {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  transition: all 0.3s ease;
}

.footer-redes a:hover {
  color: #D4A940;
  transform: scale(1.15);
}

.footer-redes svg {
  width: 24px;
  height: 24px;
}

.footer-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin-bottom: 1.5rem;
}

.footer-nav a {
  color: #fff;
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: #D4A940;
}

.footer-copy {
  font-size: 0.85rem;
  opacity: 0.9;
  margin-top: 1.5rem;
}

/* 🏷️ Tooltip redes sociales */
.footer-redes .tooltip {
  position: absolute;
  bottom: 140%;
  background: rgba(255, 255, 255, 0.95);
  color: #1E3A8A;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 6px;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  white-space: nowrap;
  transition: all 0.25s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.footer-redes a:hover .tooltip {
  opacity: 1;
  transform: translateY(0);
}

.footer-redes .tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.95) transparent transparent transparent;
}

/* ======================================================
   MENÚ HAMBURGUESA - RESPONSIVE
   ====================================================== */

/* Botón hamburguesa (oculto en escritorio) */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 22px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1100;
}

.menu-bar {
  width: 100%;
  height: 3px;
  background-color: var(--color-primario);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Estado activo (animación de la X) */
.menu-toggle.active .menu-bar:nth-child(1) {
  transform: rotate(45deg) translateY(8px);
}

.menu-toggle.active .menu-bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active .menu-bar:nth-child(3) {
  transform: rotate(-45deg) translateY(-8px);
}

/* ======================================================
   RESPONSIVE DESIGN
   ====================================================== */

@media (max-width: 768px) {
  header .container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .menu-toggle {
    display: flex;
  }

  .nav {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    background: #fff;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: var(--space-6) 0;
    box-shadow: var(--sombra-media);
    z-index: 1000;
  }

  .nav.show {
    display: flex;
  }

  /* 🚫 Eliminar submenús en móvil */
  .submenu-items {
    display: none !important;
  }
  .submenu > a::after {
    content: none;
  }

  /* Footer responsive */
  .footer-redes svg {
    width: 22px;
    height: 22px;
  }

  .footer-nav {
    flex-direction: column;
    gap: 0.6rem;
  }
}


