/**
 * Header Figma Styles
 * Basado en el diseno de Figma - Menudos Corazones
 * Figma node: 974-21429
 */

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

.site-header-figma {
  background-color: var(--wp--preset--color--white);
  height: 80px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  /* background: #fff; */
  height: 80px;
  z-index: 22;
}

.site-header-figma .theme-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
  padding: 8px 64px;
}

/* ==================================
   LOGO
   ================================== */

.header-logo {
  flex-shrink: 0;
}

.site-logo {
  width: 179px;
  height: 56px;
  object-fit: contain;
}

.site-logo-text {
  font-family: var(--wp--preset--font-family--inter);
  font-size: 24px;
  font-weight: 700;
  color: var(--wp--preset--color--text-dark);
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.site-logo-text:hover {
  opacity: 0.8;
}

/* ==================================
   NAVEGACION PRINCIPAL
   ================================== */

.header-navigation {
  flex: 1;
  display: flex;
  justify-content: center;
}

.nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 8px;
  font-family: 'Inter', var(--wp--preset--font-family--inter), sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.21;
  color: var(--wp--preset--color--text-gray);
  text-decoration: none;
  transition: color 0.3s ease, background-color 0.3s ease;
}

.nav-link:hover {
  color: var(--wp--preset--color--text-dark);
  background-color: var(--wp--preset--color--light-gray);
}

/* Nav link active state */
.nav-link.is-active {
  color: var(--wp--preset--color--primary);
  background-color: rgba(232, 29, 99, 0.08);
}

.nav-link.is-active:hover {
  color: var(--wp--preset--color--primary);
  background-color: rgba(232, 29, 99, 0.12);
}

/* ==================================
   HEADER ACTIONS (Dona Button)
   ================================== */

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Boton Dona Ahora - Estilo Primario */
.donate-button {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 40px;
  padding: 8px 16px;
  background-color: var(--wp--preset--color--primary);
  border-radius: 24px;
  font-family: 'Inter', var(--wp--preset--font-family--inter), sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.21;
  color: var(--wp--preset--color--white);
  text-decoration: none;
  transition: background-color 0.3s ease;
  white-space: nowrap;
}

.donate-button:hover {
  background-color: var(--wp--preset--color--primary-hover);
  color: var(--wp--preset--color--white);
}

/* ==================================
   MOBILE MENU TOGGLE
   ================================== */

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 24px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.mobile-menu-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--wp--preset--color--text-dark);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(10px) rotate(45deg);
}

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-11px) rotate(-45deg);
}

/* ==================================
   BOTÓN DONA AHORA EN MENÚ MÓVIL
   (Solo visible en responsive)
   ================================== */

.nav-donate-wrapper {
  display: none;
}

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

/* Large Desktop */
@media (max-width: 1400px) {
  .site-header-figma .theme-container {
    padding: 8px 32px;
  }
}

/* Desktop */
@media (max-width: 1200px) {
  .site-header-figma .theme-container {
    padding: 8px 24px;
  }

  .nav-menu {
    gap: 8px;
  }

  .nav-link {
    font-size: 14px;
    padding: 6px;
  }
}

/* Tablet landscape */
@media (max-width: 1024px) {
  .site-header-figma {
    height: auto;
    min-height: 70px;
  }

  .site-header-figma .theme-container {
    flex-wrap: wrap;
    padding: 12px 16px;
  }

  .header-logo {
    order: 1;
  }

  /* Ocultar botón Dona Ahora del header en responsive */
  .header-actions {
    display: none;
  }

  .mobile-menu-toggle {
    display: flex;
    order: 2;
    margin-left: auto;
  }

  /* Menu móvil dropdown debajo del header */
  .header-navigation {
    flex: 0 0 100%; /* Sobrescribe flex: 1, ocupa 100% del ancho */
    order: 4;
    width: 100%;
    display: none !important;
    margin-top: var(--wp--preset--spacing--small);
    padding-top: var(--wp--preset--spacing--small);
    border-top: 1px solid var(--wp--preset--color--light-gray);
    justify-content: flex-start;
    min-height: 100dvh;
  }

  .header-navigation.active {
    display: block !important;
  }

  .nav-menu {
    flex-direction: column;
    width: 100%;
    gap: 0;
  }

  .nav-item {
    width: 100%;
  }

  .nav-link {
    width: 100%;
    padding: var(--wp--preset--spacing--small) var(--wp--preset--spacing--x-small);
    justify-content: flex-start;
    font-size: var(--wp--preset--font-size--normal);
    font-weight: 500;
    border-radius: 0;
    color: var(--wp--preset--color--text-dark);
  }

  .nav-link:hover {
    background-color: var(--wp--preset--color--light-gray);
    color: var(--wp--preset--color--primary);
  }

  /* Botón Dona Ahora dentro del menú móvil */
  .nav-donate-wrapper {
    display: block;
    width: 100%;
    padding: 8px 0;
    margin-top: 1rem;
  }

  .nav-donate-button {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 40px;
    padding: 8px 16px;
    background-color: var(--wp--preset--color--primary);
    border-radius: 24px;
    font-family: 'Inter', var(--wp--preset--font-family--inter), sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.21;
    color: var(--wp--preset--color--white);
    text-decoration: none;
    transition: background-color 0.3s ease;
  }

  .nav-donate-button:hover {
    background-color: var(--wp--preset--color--primary-hover);
    color: var(--wp--preset--color--white);
  }
}

/* Tablet portrait */
@media (max-width: 768px) {
  .site-logo {
    width: 150px;
    height: 47px;
  }

  .donate-button {
    font-size: 13px;
    padding: 6px 12px;
    height: 36px;
  }
}

/* Mobile */
@media (max-width: 480px) {
  .site-header-figma .theme-container {
    padding: 10px 12px;
  }

  .site-logo {
    width: 120px;
    height: 38px;
  }

  .donate-button {
    font-size: 12px;
    padding: 6px 10px;
    height: 32px;
  }

  .mobile-menu-toggle {
    margin-left: 12px;
  }
}
