/*
  Path: /custom-elementor-widgets/assets/css/header.css
  =================================
  HEADER WIDGET STYLES - UNIQUE CLASSES
  ================================= */

/* Header - Unique */
.header {
  background-color: var(--white, #ffffff);
  border-bottom: 1px solid var(--gray-300, #d1d5db);
  box-shadow: var(--shadow-sm, 0 1px 2px 0 rgb(0 0 0 / 0.05));
  position: relative;
  top: 0;
  z-index: 1000;
  width: 100%;
}

  /* Sticky and shadow states */
}

.header.header-sticky {
  position: sticky;
}

.header.header-shadow {
  box-shadow: var(--shadow, 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1));
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
  width: 100%;
}

/* Logo Styles */
.logo {
  display: flex;
  align-items: center;
  height: 100%;
}

  /* Logo link */
.logo-link {
  display: flex;
  align-items: center;
  height: 100%;
  text-decoration: none;
}

  /* Logo image */
.logo-img {
  height: 100% !important;
  width: auto !important;
  max-width: auto !important;
  object-fit: contain;
}

  /* Logo text */
.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--indigo-900, #1e1b4b);
  text-decoration: none;
}

/* Navigation Styles */
.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

  /* Navigation list */
.nav-list {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

  /* Navigation item */
.nav-item {
  display: flex;
  align-items: center;
}

  /* Navigation link */
.nav-link {
  text-decoration: none;
  color: var(--gray-700, #374151);
  font-weight: 500;
  font-size: 0.875rem;
  transition: color 0.2s ease;
  padding: 0.5rem 0;
  position: relative;
}

  /* Navigation link hover and current */
.nav-link:hover,
.nav-item.current-menu-item .nav-link {
  color: var(--orange-500, #f97316);
  text-decoration: none;
}

  /* Navigation link underline */
.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  background-color: var(--orange-500, #f97316);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

  /* Navigation link underline hover */
.nav-link:hover::after,
.nav-item.current-menu-item .nav-link::after {
  width: 100%;
}

/* CTA Button */
.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 0.5rem !important;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.875rem;
  background-color: var(--orange-500, #f97316);
  color: var(--white, #ffffff);
}

  /* CTA Button hover */
.cta-btn:hover {
  background-color: var(--orange-600, #ea580c);
  text-decoration: none;
  color: var(--white, #ffffff);
  transform: translateY(-1px);
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--gray-700, #374151);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.25rem;
  transition: all 0.2s ease;
}

  /* Mobile Menu Button hover */
.mobile-menu-btn:hover {
  background-color: var(--gray-100, #f3f4f6);
  color: var(--orange-500, #f97316);
}

  /* Mobile Menu Button icon */
.mobile-menu-btn svg,
.mobile-menu-btn i {
  width: 1.25rem;
  height: 1.25rem;
}

/* Hidden JSON settings */
.header-settings {
  display: none;
}

/* Responsive Design para Header */
@media (max-width: 1024px) {
  .header-content {
    padding: 0 1rem;
  }

  .nav-list {
    gap: 1rem;
  }

  .nav-link {
    font-size: 0.8125rem;
  }
}

@media (max-width: 768px) {
  .header-content {
    flex-wrap: wrap;
    position: relative;
  }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100vw;
    background: var(--white, #ffffff);
    border-top: 1px solid var(--gray-300, #d1d5db);
    flex-direction: column;
    align-items: stretch;
    z-index: 999;
    box-shadow: var(--shadow-lg, 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1));
    padding: 2rem 1rem 1.5rem 1rem;
    margin-left: calc(-50vw + 50%);
    animation: slideDown 0.3s ease-out;
  }

  .nav.active {
    display: flex;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    width: 100%;
  }
  
  .nav-item {
    justify-content: center;
    display: flex;
    width: 100%;
  }
  
  .nav-link {
    display: block;
    width: 100%;
    text-align: center;
    padding: 0.8rem 0;
    font-size: 1.1rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
  }

  .nav-link:hover {
    background-color: var(--orange-50, #fff7ed);
  }

  .nav-link::after {
    display: none;
  }

  .cta-btn {
    margin: 1.5rem auto 0 auto;
    display: block;
    width: 80%;
    max-width: 250px;
    font-size: 1.1rem;
    text-align: center;
    padding: 0.875rem 1.5rem;
  }

  .mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 1rem;
    z-index: 1001;
  }
}

@media (max-width: 480px) {
  .header-content {
    height: 3.5rem;
    padding: 0 0.75rem;
  }

  .logo-img {
    height: 2rem;
  }

  .logo-text {
    font-size: 1.25rem;
  }

  .nav {
    padding: 1.5rem 0.75rem 1rem 0.75rem;
  }

  .nav-link {
    font-size: 1rem;
    padding: 0.7rem 0;
  }

  .cta-btn {
    font-size: 1rem;
    padding: 0.75rem 1.25rem;
    width: 90%;
  }

  .mobile-menu-btn {
    font-size: 1.125rem;
    padding: 0.375rem;
  }
}

/* Animaciones */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Estados de hover mejorados */
.nav-link {
  position: relative;
  overflow: hidden;
}

.cta-btn {
  position: relative;
  overflow: hidden;
}

.cta-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.cta-btn:hover::before {
  left: 100%;
}

/* Focus states para accesibilidad */
.nav-link:focus,
.cta-btn:focus,
.mobile-menu-btn:focus,
.logo-link:focus {
  outline: 2px solid var(--indigo-600, #4f46e5);
  outline-offset: 2px;
}

/* Mejoras de rendimiento */
.header {
  will-change: transform;
}

.nav {
  will-change: transform, opacity;
}

/* Estados de carga */
.header.loading {
  opacity: 0.6;
  pointer-events: none;
}

.header.loading * {
  animation-play-state: paused;
}

/* Soporte para scroll suave */
@supports (scroll-behavior: smooth) {
  html {
    scroll-behavior: smooth;
  }
}

/* Optimizaciones para reducir motion */
@media (prefers-reduced-motion: reduce) {
  .nav,
  .nav-link,
  .cta-btn,
  .mobile-menu-btn {
    transition: none;
    animation: none;
  }

  .nav-link::after {
    transition: none;
  }

  .cta-btn::before {
    transition: none;
  }
}