/* ===== HEADER STYLES - FINAL CLEAN VERSION ===== */
@import url('../base/variables.css');

.header {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 249, 250, 0.95));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  border-bottom: 1px solid rgba(211, 47, 47, 0.1);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1010;
  height: 100px;
  padding: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(211, 47, 47, 0.02) 50%, transparent 100%);
  pointer-events: none;
}

.header .container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  padding: 0 32px;
  position: relative;
}

/* === LOGO === */
.logo {
  display: flex;
  align-items: center;
  height: 100%;
  text-decoration: none;
  padding: 0;
  z-index: 1011;
  transition: transform 0.3s ease;
  gap: 8px;
  margin-right: auto;
}

.logo-main {
  height: 100%;
  width: auto;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
  transition: all 0.3s ease;
}

.logo-text {
  height: 100%;
  width: auto;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
  transition: all 0.3s ease;
}

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

.logo:hover .logo-main,
.logo:hover .logo-text {
  filter: drop-shadow(0 4px 12px rgba(211, 47, 47, 0.2));
}

/* === DESKTOP NAVIGATION === */
.nav-desktop {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 2rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(15px);
  border-radius: 50px;
  padding: 8px 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  z-index: 1005;
}

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

.nav-desktop li {
  position: relative;
}

.nav-desktop a {
  text-decoration: none;
  color: #2c3e50;
  font-weight: 600;
  font-size: 15px;
  padding: 12px 20px;
  border-radius: 25px;
  position: relative;
  transition: all 0.3s ease;
  overflow: hidden;
  display: block;
}

.nav-desktop a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(211, 47, 47, 0.1), transparent);
  transition: left 0.5s ease;
}

.nav-desktop a:hover::before {
  left: 100%;
}

.nav-desktop a:hover {
  color: #d32f2f;
  background: rgba(211, 47, 47, 0.08);
  transform: translateY(-2px);
}

.nav-desktop a.active {
  color: #fff;
  background: linear-gradient(135deg, #d32f2f, #b71c1c);
  box-shadow: 0 4px 15px rgba(211, 47, 47, 0.3);
  transform: translateY(-1px);
}

.nav-desktop a.active::before {
  display: none;
}

/* === CTA BUTTON === */
.header .cta-button {
  background: linear-gradient(135deg, #d32f2f, #b71c1c);
  color: #fff !important;
  padding: 12px 24px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(211, 47, 47, 0.3);
  position: relative;
  z-index: 1006;
  border: 2px solid transparent;
  overflow: hidden;
}

.header .cta-button::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;
}

.header .cta-button:hover::before {
  left: 100%;
}

.header .cta-button:hover {
  background: linear-gradient(135deg, #b71c1c, #8e0000);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(211, 47, 47, 0.4);
}

/* === MOBILE NAVIGATION (hidden ≥ 992px) === */
.mobile-nav,
.hamburger,
.mobile-menu-toggle {
  display: none;
}

@media (max-width: 991.98px) {
  .nav-desktop,
  .header .cta-button {
    display: none;
  }

  .mobile-nav,
  .hamburger {
    display: block;
  }

  .hamburger {
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border: 2px solid rgba(211, 47, 47, 0.1);
    border-radius: 12px;
    padding: 10px;
    width: 44px;
    height: 44px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
  }

  .hamburger span {
    position: absolute;
    left: 10px;
    height: 2px;
    width: 24px;
    background: linear-gradient(90deg, #d32f2f, #b71c1c);
    border-radius: 2px;
    transition: all 0.3s ease;
  }

  .hamburger span:nth-child(1) { top: 12px; }
  .hamburger span:nth-child(2) { top: 20px; }
  .hamburger span:nth-child(3) { top: 28px; }

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

  .nav-mobile {
    position: fixed;
    top: 100px;
    left: -100%;
    width: 85%;
    max-width: 300px;
    height: calc(100vh - 100px);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 249, 250, 0.98));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.15);
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1008;
    overflow-y: auto;
    border-right: 1px solid rgba(211, 47, 47, 0.1);
  }

  .nav-mobile.active { left: 0; }

  .nav-mobile ul {
    list-style: none;
    padding: 40px 20px;
    margin: 0;
  }

  .nav-mobile li { margin-bottom: 8px; }

  .nav-mobile a {
    text-decoration: none;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
    display: block;
    padding: 18px 24px;
    border-radius: 15px;
    transition: all 0.3s ease;
  }

  .nav-mobile a:hover {
    color: #d32f2f;
    background: rgba(211, 47, 47, 0.08);
    transform: translateX(10px);
  }

  .nav-mobile a.active {
    background: linear-gradient(135deg, #d32f2f, #b71c1c);
    color: white;
    box-shadow: 0 4px 15px rgba(211, 47, 47, 0.3);
  }

  .mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1007;
  }

  .mobile-overlay.active {
    opacity: 1;
    visibility: visible;
  }
}

@media (max-width: 768px) {
  .header { height: 80px; }
  .nav-mobile { top: 80px; height: calc(100vh - 80px); }
  .header.scrolled { height: 70px; }
  .logo-main, .logo-text { max-height: 40px; }
  .header.scrolled .logo-main,
  .header.scrolled .logo-text { max-height: 35px; }
}

@media (max-width: 600px) {
  .header .container { padding: 0 15px; }
  .nav-mobile { width: 90%; }
  .nav-mobile a {
    font-size: 16px;
    padding: 14px 20px;
  }
  .logo-main, .logo-text { max-height: 35px; }
}

/* === ANIMATIONS === */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

.nav-mobile.active ul { animation: fadeInUp 0.6s ease; }
.nav-mobile.active li {
  animation: slideInLeft 0.5s ease;
  animation-fill-mode: both;
}
.nav-mobile.active li:nth-child(1) { animation-delay: 0.1s; }
.nav-mobile.active li:nth-child(2) { animation-delay: 0.2s; }
.nav-mobile.active li:nth-child(3) { animation-delay: 0.3s; }
.nav-mobile.active li:nth-child(4) { animation-delay: 0.4s; }
.nav-mobile.active li:nth-child(5) { animation-delay: 0.5s; }

/* === ACCESSIBILITY === */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
.nav-desktop a:focus-visible,
.nav-mobile a:focus-visible,
.hamburger:focus-visible {
  outline: 2px solid #d32f2f;
  outline-offset: 2px;
}

/* === PRINT === */
@media print {
  .header { position: static; box-shadow: none; background: white; }
  .nav-desktop a, .nav-mobile a { color: black !important; }
}