/* ========================================================
   HEADER MINIMALISTA UNIFICADO - GRUPO LÓPEZ ROSA
   Diseño sobrio, elegante y responsivo para:
   - index.html (Portal / Guía + Quiz)
   - distrito_conkal.html (Distrito Conkal)
   - almaviva.html (Almaviva)
   ======================================================== */

.lr-header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--lr-header-bg, rgba(255, 255, 255, 0.90));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--lr-header-border, rgba(0, 0, 0, 0.07));
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  font-family: 'Outfit', Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  box-sizing: border-box;
}

.lr-header *,
.lr-header *::before,
.lr-header *::after {
  box-sizing: border-box;
}

.lr-header.lr-scrolled {
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.07);
}

.lr-header-inner {
  width: min(94%, 1200px);
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* --- Brand / Logo --- */
.lr-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none !important;
  color: var(--lr-header-text, #141414);
  flex-shrink: 0;
  transition: opacity 0.2s ease;
}

.lr-brand:hover {
  opacity: 0.9;
}

.lr-brand-logo-img {
  height: 42px;
  max-width: 180px;
  width: auto;
  display: block;
  object-fit: contain;
}

.lr-brand-text {
  display: flex;
  flex-direction: column;
}

.lr-brand-title {
  font-size: 1.22rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.15;
  color: var(--lr-header-text, #141414);
  text-transform: none;
}

.lr-brand-title span {
  color: var(--lr-header-accent, #EF6F61);
}

.lr-brand-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--lr-header-muted, #737373);
  margin-top: 1px;
}

/* --- Desktop Nav Links --- */
.lr-nav {
  display: flex;
  align-items: center;
}

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

.lr-nav-item {
  position: relative;
  list-style: none;
}

.lr-nav-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--lr-header-muted, #525252) !important;
  text-decoration: none !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.lr-nav-link:hover {
  color: var(--lr-header-text, #141414) !important;
  background: var(--lr-header-hover-bg, rgba(0, 0, 0, 0.04));
}

/* --- Dropdown "Otros Desarrollos" --- */
.lr-dropdown {
  position: relative;
}

.lr-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--lr-header-muted, #525252);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.lr-dropdown-trigger:hover,
.lr-dropdown.lr-active .lr-dropdown-trigger {
  color: var(--lr-header-text, #141414);
  background: var(--lr-header-hover-bg, rgba(0, 0, 0, 0.04));
}

.lr-dropdown-chevron {
  width: 12px;
  height: 12px;
  transition: transform 0.22s ease;
  opacity: 0.7;
}

.lr-dropdown.lr-active .lr-dropdown-chevron,
.lr-dropdown:hover .lr-dropdown-chevron {
  transform: rotate(180deg);
}

.lr-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 320px;
  background: var(--lr-header-menu-bg, #ffffff);
  border: 1px solid var(--lr-header-border, rgba(0, 0, 0, 0.08));
  border-radius: 18px;
  padding: 10px;
  box-shadow: 0 18px 45px -8px rgba(0, 0, 0, 0.12), 0 4px 14px -2px rgba(0, 0, 0, 0.04);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 1010;
}

@media (hover: hover) {
  .lr-dropdown:hover .lr-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}

.lr-dropdown.lr-active .lr-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lr-dropdown-header {
  padding: 8px 12px 6px;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--lr-header-muted, #8a8a8a);
}

.lr-dropdown-item {
  display: block;
  padding: 11px 12px;
  border-radius: 12px;
  text-decoration: none !important;
  transition: background 0.18s ease;
}

.lr-dropdown-item:hover {
  background: var(--lr-header-hover-bg, rgba(0, 0, 0, 0.04));
}

.lr-dropdown-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}

.lr-dropdown-item-title {
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--lr-header-text, #141414);
}

.lr-dropdown-tag {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--lr-header-tag-bg, rgba(0, 0, 0, 0.05));
  color: var(--lr-header-accent, #EF6F61);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.lr-dropdown-item-desc {
  display: block;
  font-size: 0.78rem;
  color: var(--lr-header-muted, #666);
  line-height: 1.35;
}

.lr-dropdown-divider {
  height: 1px;
  background: var(--lr-header-border, rgba(0, 0, 0, 0.06));
  margin: 6px 0;
}

.lr-dropdown-footer-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--lr-header-accent, #EF6F61) !important;
  text-decoration: none !important;
  border-radius: 10px;
  transition: background 0.18s ease;
}

.lr-dropdown-footer-link:hover {
  background: var(--lr-header-hover-bg, rgba(0, 0, 0, 0.04));
}

/* --- Action Area (Botón al Index + CTA Principal) --- */
.lr-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Botón al Index */
.lr-btn-index {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--lr-header-text, #1e2522) !important;
  background: var(--lr-header-btn-index-bg, rgba(255, 255, 255, 0.75));
  border: 1px solid var(--lr-header-border-btn, rgba(0, 0, 0, 0.14));
  text-decoration: none !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.lr-btn-index:hover {
  background: #ffffff;
  color: var(--lr-header-text, #000000) !important;
  border-color: rgba(0, 0, 0, 0.3);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
  transform: translateY(-1px);
}

.lr-btn-index svg {
  transition: transform 0.2s ease;
}

.lr-btn-index:hover svg {
  transform: translateX(-2px);
}

/* Primary CTA Button */
.lr-btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 20px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--lr-header-cta-text, #ffffff) !important;
  background: var(--lr-header-cta-bg, #141414);
  text-decoration: none !important;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  box-shadow: 0 4px 14px -2px rgba(0, 0, 0, 0.15);
  border: none;
  cursor: pointer;
}

.lr-btn-cta:hover {
  background: var(--lr-header-cta-hover, #2a2a2a);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -2px rgba(0, 0, 0, 0.22);
}

/* --- Burger Button (Mobile) --- */
.lr-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--lr-header-border, rgba(0, 0, 0, 0.08));
  border-radius: 10px;
  cursor: pointer;
  padding: 0;
  gap: 5px;
  color: var(--lr-header-text, #141414);
  transition: background 0.2s;
}

.lr-burger:hover {
  background: var(--lr-header-hover-bg, rgba(0, 0, 0, 0.04));
}

.lr-burger-line {
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.lr-burger.lr-open .lr-burger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.lr-burger.lr-open .lr-burger-line:nth-child(2) {
  opacity: 0;
}
.lr-burger.lr-open .lr-burger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --- Mobile Menu Drawer --- */
.lr-mobile-drawer {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: var(--lr-header-mobile-bg, #ffffff);
  border-bottom: 1px solid var(--lr-header-border, rgba(0, 0, 0, 0.08));
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  padding: 18px 20px 24px;
  max-height: calc(100vh - 72px);
  overflow-y: auto;
  z-index: 999;
}

.lr-mobile-drawer.lr-open {
  display: block;
  animation: lrSlideDown 0.26s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes lrSlideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.lr-mobile-nav-list {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lr-mobile-link {
  display: block;
  padding: 10px 14px;
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--lr-header-text, #141414) !important;
  text-decoration: none !important;
  border-radius: 10px;
  transition: background 0.18s;
}

.lr-mobile-link:hover {
  background: var(--lr-header-hover-bg, rgba(0, 0, 0, 0.04));
}

.lr-mobile-section {
  border-top: 1px solid var(--lr-header-border, rgba(0, 0, 0, 0.08));
  padding-top: 14px;
  margin-top: 8px;
}

.lr-mobile-section-title {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--lr-header-muted, #737373);
  margin-bottom: 8px;
  padding: 0 14px;
}

.lr-mobile-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--lr-header-border, rgba(0, 0, 0, 0.08));
}

.lr-mobile-actions .lr-btn-index,
.lr-mobile-actions .lr-btn-cta {
  width: 100%;
  justify-content: center;
  padding: 12px;
  font-size: 0.92rem;
}

/* --- Media Queries --- */
@media (max-width: 980px) {
  .lr-nav {
    display: none;
  }
  .lr-burger {
    display: flex;
  }
  .lr-header-actions .lr-btn-index {
    display: none; /* Accessible inside mobile drawer */
  }
  .lr-header-actions .lr-btn-cta {
    display: none; /* Accessible inside mobile drawer */
  }
}

@media (min-width: 981px) {
  .lr-mobile-drawer {
    display: none !important;
  }
}
