/* ============================================
   HEADER STYLES - Reutilizable en todas las páginas
   ============================================ */

:root {
  --nav-bg: rgba(11, 31, 51, 0.92);
  --nav-text: #ffffff;
  --accent: #0f4c81;
  --accent-light: #dbe8f5;
}

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

.site-header {
  position: relative;
  width: 100%;
  height: 80px;
  overflow: hidden;
}

.header-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  z-index: 0;
}

.header-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(11, 31, 51, 0.65) 0%,
    rgba(15, 76, 129, 0.5) 100%
  );
  z-index: 1;
}

.header-nav {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(
    180deg,
    rgba(11, 31, 51, 0.95) 0%,
    rgba(11, 31, 51, 0.7) 100%
  );
  z-index: 10;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

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

.logo {
  flex-shrink: 0;
}

.logo a {
  text-decoration: none;
  display: flex;
  align-items: center;
  color: var(--nav-text);
  transition: opacity 0.3s ease;
}

.logo a:hover {
  opacity: 0.8;
}

.logo-text {
  font-family: "Newsreader", serif;
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--nav-text);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.nav-link {
  display: block;
  padding: 0.7rem 1.2rem;
  color: var(--nav-text);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: all 0.3s ease;
  border-radius: 6px;
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent-light);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover::after {
  width: 60%;
}

.nav-link:hover {
  color: var(--accent-light);
}

.nav-cta {
  background: var(--accent);
  color: #ffffff;
  padding: 0.65rem 1.4rem;
  border-radius: 8px;
  margin-left: 0.5rem;
}

.nav-cta::after {
  display: none;
}

.nav-cta:hover {
  background: #0d3d6a;
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(15, 76, 129, 0.3);
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 100;
}

.mobile-menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--nav-text);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* ============================================
   RESPONSIVE MOBILE
   ============================================ */

@media (max-width: 768px) {
  .site-header {
    height: 280px;
  }

  .nav-container {
    padding: 1rem 1.5rem;
  }

  .logo-text {
    font-size: 1.3rem;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    flex-direction: column;
    gap: 0;
    background: var(--nav-bg);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .nav-menu.active {
    max-height: 400px;
  }

  .nav-menu li {
    width: 100%;
  }

  .nav-link {
    display: block;
    width: 100%;
    padding: 1rem 1.5rem;
    border-radius: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .nav-link::after {
    display: none;
  }

  .nav-link:hover {
    background: rgba(15, 76, 129, 0.3);
  }

  .nav-cta {
    margin: 0;
    margin-top: 0.5rem;
  }
}

@media (max-width: 480px) {
  .site-header {
    height: 240px;
  }

  .logo-text {
    font-size: 1.1rem;
  }

  .nav-link {
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
  }
}
