/* final-header-solution.css - Solución definitiva para el botón del header */

/* REGLA #1: Estado inicial del botón en PC Y MÓVIL - Siempre oculto inicialmente */
.header .header-cta {
    display: none !important;
  }
  
  /* REGLA #2: Estado del botón cuando se hace scroll en PC */
  @media (min-width: 768px) {
    .header.scrolled .header-cta {
      display: inline-flex !important;
      font-size: 0.95rem;
      padding: 0.5rem 1.2rem;
      min-width: 120px;
      background: linear-gradient(135deg, #4361ee 0%, #7209b7 100%);
      color: #ffffff;
      border-radius: 0.5rem;
      font-weight: 600;
      text-decoration: none;
      margin-left: 1rem;
      align-items: center;
      justify-content: center;
    }
  }
  
  /* REGLA #3: Estado del botón cuando se hace scroll en MÓVIL */
  @media (max-width: 767px) {
    .header.scrolled .header-cta {
      display: inline-flex !important;
      font-size: 0.8rem !important; /* Reducido tamaño de la fuente */
      padding: 0.4rem 0.8rem !important; /* Reducido padding horizontal */
      min-width: auto !important; /* Importante no forzar ancho mínimo */
      max-width: 140px !important; /* Limitar ancho máximo */
      background: linear-gradient(135deg, #4361ee 0%, #7209b7 100%);
      color: #ffffff;
      border-radius: 0.5rem;
      font-weight: 600;
      text-decoration: none;
      position: absolute;
      right: 15px;
      top: 50%;
      transform: translateY(-50%);
      align-items: center;
      justify-content: center;
      white-space: nowrap !important; /* Evitar saltos de línea */
      overflow: hidden !important; /* Recortar texto si es necesario */
      text-overflow: ellipsis !important; /* Mostrar puntos suspensivos si el texto se recorta */
    }
  }
  
  /* REGLA #4: Asegurar que el navbar tenga posición relativa */
  .header .navbar {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
  }
  
  /* REGLA #5: Estilos básicos del header */
  .header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 0.6rem 0;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
  }
  
  .header.scrolled {
    padding: 0.4rem 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  }
  
  /* REGLA #6: Estilos para el logo */
  .logo-container {
    display: flex;
    align-items: center;
  }
  
  .logo img {
    height: 35px;
    transition: all 0.3s ease;
  }
  
  .header.scrolled .logo img {
    height: 28px;
  }