/* app/assets/stylesheets/components/header.css */

/* ===== HEADER BASE ===== */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin: 0;
  padding: 0;
  transform: translateY(0);
}

/* Smooth scroll behavior */
.main-header.scrolling-down {
  transform: translateY(-100%);
}

.main-header.scrolling-up {
  transform: translateY(0);
}

/* ===== MOBILE HEADER (mantener actual) ===== */
.mobile-header {
  width: 100%;
  height: 80px;
  background-color: var(--color-gen);
  display: flex;
  justify-content: center;
  align-items: center;
}

.mobile-header .logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

.mobile-header .logo-container img.logo {
  width: 180px;
  height: 45px;
  object-fit: contain;
}

/* ===== DESKTOP HEADER (nuevo - como captura) ===== */
.desktop-header {
  display: none;
}

/* ===== RESPONSIVE BREAKPOINT ===== */
@media (min-width: 768px) {
  /* Mostrar desktop, ocultar mobile */
  .mobile-header {
    display: none;
  }
  
  .desktop-header {
    display: block;
    background-color: var(--color-gen);
    height: 80px;
    width: 100%;
  }
  
  /* Container principal - 3 columnas iguales */
  .desktop-container {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    align-items: center;
    height: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    gap: var(--spacing-lg);
  }
  
  /* ===== LOGO SECTION (izquierda) ===== */
  .desktop-logo {
    display: flex;
    justify-content: flex-start;
    align-items: center;
  }
  
  .logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: transform 0.2s ease;
  }
  
  /* Micro-animation hover logo */
  .logo-link:hover {
    transform: scale(1.02);
  }
  
  .desktop-logo-img {
    height: 42px;
    width: auto;
    object-fit: contain;
  }
  
  /* ===== SEARCH CENTER (centro fijo) ===== */
  .search-center {
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  .search-container {
    width: 100%;
    max-width: 500px;
  }
  
  .search-wrapper {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    padding: 0 12px;
    height: 44px;
    transition: all 0.2s ease;
    position: relative;
  }
  
  /* Efecto sutil en search bar */
  .search-wrapper:focus-within {
    border-color: var(--color-highlight);
    box-shadow: 0 0 0 2px rgba(255, 212, 55, 0.3);
    background: rgba(255, 255, 255, 0.2);
  }
  
  .search-wrapper:hover {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.18);
  }
  
  .search-icon {
    width: 18px;
    height: 18px;
    margin: 0 var(--spacing-sm);
    filter: brightness(0) invert(1);
    opacity: 0.7;
  }
  
 .search-input {
    flex-grow: 1;
    border: none;
    background: transparent;
    color: var(--color-white);
    font-size: 15px;
    padding: 0 var(--spacing-md);
    outline: none;
    font-family: var(--font-destacados);
    height: 32px;
    box-sizing: border-box;
    margin: 6px 0;
  }
  
  .search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
    font-size: 15px;
    font-weight: 400;
  }
  
  .search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 70px;
    height: 36px;
    background: var(--color-highlight);
    border: none;
    border-radius: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-left: 8px;
  }
  
  /* Micro-animation hover search button */
  .search-btn:hover {
    transform: scale(1.05);
    background: #FFE055;
  }
  
  .search-btn-text {
    color: var(--color-gen);
    font-family: var(--font-base);
    font-size: 14px;
    font-weight: 600;
  }
  
  /* ===== MENU SECTION (igual que bottom-nav) ===== */
  .desktop-menu {
    display: flex;
    justify-content: flex-end;
    align-items: center;
  }
  
  .desktop-menu .nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    text-decoration: none;
    background: transparent;
    border: none;
    font-family: var(--font-base);
    font-size: 12px;
    cursor: pointer;
    width: 60px;
    height: 50px;
    padding: 8px 4px;
    margin: 0;
    transition: transform 0.1s ease, background-color 0.2s ease;
    border-radius: 8px;
  }
  
  .desktop-menu .nav-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: none;
  }
  
  .desktop-menu .nav-btn:active {
    transform: scale(0.95);
  }
  
  .desktop-menu .nav-btn:focus {
    outline: none;
    background-color: rgba(255, 255, 255, 0.15);
  }
  
  .desktop-menu .nav-btn img {
    width: 24px;
    height: 24px;
    margin-bottom: 5px;
    filter: brightness(0) invert(1);
  }
  
  .desktop-menu .nav-btn span {
    opacity: 0.8;
    font-weight: 500;
  }
}

/* ===== MOBILE RESPONSIVO (mantener actual) ===== */
@media screen and (max-width: 375px) {
  .mobile-header {
    height: 70px;
  }
  
  .mobile-header img.logo {
    width: 160px;
  }
}

/* ===== DESKTOP LARGE ===== */
@media (min-width: 1200px) {
  .desktop-container {
    max-width: 1600px;
  }
  
  .search-container {
    max-width: 600px;
  }
}



/* === DEBUG TEMPORAL === */
.main-header {
  transform: translateY(0) !important;
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
  background: red !important; /* Para ver si existe */
}

.main-header.scrolling-down {
  transform: translateY(-100%) !important;
  background: blue !important; /* Para ver cuando se oculta */
}

.main-header.scrolling-up {
  transform: translateY(0) !important;
  background: green !important; /* Para ver cuando aparece */
}