/* ========================================
   HEADER STYLES - CreaYVendelo (Moderno + Animaciones)
======================================== */

:root {
  --primary-gradient: linear-gradient(135deg, #ff6b35 0%, #ff5e94 50%, #a855f7 100%);
  --primary-gradient-alt: linear-gradient(135deg, #a855f7 0%, #ff5e94 50%, #ff6b35 100%);
  --primary-color: #ff6b35;
  --secondary-color: #a855f7;
  --accent-color: #ff5e94;
  --text-dark: #1a1a2e;
  --text-muted: #4a4a6a;
  --text-light: #ffffff;
  --glass-bg: rgba(255, 255, 255, 0.6);
  --glass-border: rgba(255, 255, 255, 0.35);
  --shadow-sm: 0 2px 10px rgba(26, 26, 46, 0.06);
  --shadow-md: 0 10px 30px rgba(26, 26, 46, 0.08);
  --shadow-lg: 0 20px 60px rgba(26, 26, 46, 0.12);
  --shadow-brand: 0 12px 40px rgba(255, 107, 53, 0.25);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-dark);
  background: #ffffff;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.menu-open { overflow: hidden; }

/* ===== Scroll progress bar ===== */
.scroll-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--primary-gradient);
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 0.1s linear;
  z-index: 2000;
  box-shadow: 0 0 10px rgba(255, 107, 53, 0.5);
}

/* ===== Header ===== */
.main-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  transition: all 0.4s var(--ease-smooth);
  animation: headerSlideDown 0.6s var(--ease-out) both;
}

@keyframes headerSlideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.main-header.scrolled {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-md);
  border-bottom: 1px solid rgba(26, 26, 46, 0.05);
}

/* ===== Navbar ===== */
.navbar { width: 100%; padding: 0; }

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

/* ===== Logo ===== */
.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-family: "Outfit", sans-serif;
  font-size: 1.45rem;
  font-weight: 900;
  color: var(--text-dark);
  z-index: 1001;
  transition: transform 0.3s var(--ease-out);
}

.logo:hover { transform: scale(1.03); }

.logo-text {
  background: var(--primary-gradient);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
  animation: gradientShift 6s ease-in-out infinite;
}

.logo-text .highlight { font-size: 1.50rem; font-weight: 900; }

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ===== Nav Menu ===== */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 3rem;
  flex: 1;
  justify-content: flex-end;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 2rem;
  margin: 0;
}

.nav-link {
  position: relative;
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.5rem 0;
  transition: color 0.3s var(--ease-smooth);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background: var(--primary-gradient);
  border-radius: 10px;
  transition: width 0.35s var(--ease-out);
}

.nav-link:hover::after,
.nav-link.active::after { width: 100%; }

.nav-link:hover,
.nav-link.active {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== Nav Actions ===== */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* ===== Botón principal del header ===== */
.btn-hero-primary {
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: var(--primary-gradient);
  background-size: 200% 200%;
  color: var(--text-light);
  box-shadow: var(--shadow-brand);
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), background-position 0.5s ease;
  will-change: transform;
}

.btn-hero-primary::before {
  content: "";
  position: absolute;
  top: 0; left: -80%;
  width: 60%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.45), transparent);
  transform: skewX(-20deg);
  transition: left 0.7s var(--ease-out);
  pointer-events: none;
}

.btn-hero-primary:hover {
  background-position: 100% 50%;
  box-shadow: 0 18px 50px rgba(255, 107, 53, 0.38);
}

.btn-hero-primary:hover::before { left: 130%; }

.btn-hero-primary i { position: relative; z-index: 1; font-size: 1rem; }

/* ===== Menu Toggle Mobile ===== */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

.menu-toggle span {
  width: 28px;
  height: 3px;
  background: var(--primary-gradient);
  border-radius: 10px;
  transition: all 0.35s var(--ease-smooth);
}

.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(8px, 8px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; transform: translateX(20px); }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(7px, -7px); }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .nav-list { gap: 2rem; }
  .nav-menu { gap: 2rem; }
}

@media (max-width: 768px) {
  .nav-container { padding: 1rem 1.5rem; }
  .menu-toggle { display: flex; }

  .nav-menu {
    position: fixed;
    top: 0; right: -100%;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    padding: 2rem;
    box-shadow: -10px 0 40px rgba(26, 26, 46, 0.12);
    transition: right 0.45s var(--ease-out);
    z-index: 1000;
  }

  .nav-menu.active { right: 0; }

  .nav-list {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
  }

  .nav-menu.active .nav-list li {
    animation: navItemIn 0.5s var(--ease-out) both;
  }
  .nav-menu.active .nav-list li:nth-child(1) { animation-delay: 0.08s; }
  .nav-menu.active .nav-list li:nth-child(2) { animation-delay: 0.16s; }
  .nav-menu.active .nav-list li:nth-child(3) { animation-delay: 0.24s; }
  .nav-menu.active .nav-list li:nth-child(4) { animation-delay: 0.32s; }
  .nav-menu.active .nav-actions {
    animation: navItemIn 0.5s var(--ease-out) 0.4s both;
  }

  @keyframes navItemIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .nav-link { font-size: 1.2rem; padding: 0.75rem 0; }

  .nav-actions {
    flex-direction: column;
    width: 100%;
    gap: 1rem;
  }

  .btn-hero-primary {
    width: 100%;
    justify-content: center;
    padding: 1rem 2rem;
    font-size: 1rem;
  }

  .logo { font-size: 1.45rem; }
}

@media (max-width: 480px) {
  .nav-container { padding: 1rem; }
  .nav-menu { max-width: 100%; }
  .logo { font-size: 1.45rem; }
}

/* ===== Accesibilidad: reducir movimiento ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
