/* ============================================
   TOURISTRIO — Layout
   Header, footer, grids
   ============================================ */

/* === HEADER === */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-sticky);
  height: var(--header-height);
  display: flex;
  align-items: center;
  transition: all var(--duration-base) var(--ease-smooth);
  background: transparent;
}

.header.scrolled {
  background: rgba(11, 22, 40, 0.95);
  backdrop-filter: blur(12px);
  height: var(--header-height-scrolled);
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--container-xl);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.header__logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  z-index: 10;
}

.header__logo img {
  height: 150px;
  width: auto;
  object-fit: contain;
  transition: height var(--duration-base);
}

.header.scrolled .header__logo img {
  height: 120px;
}

/* Nav */
.nav {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.nav__link {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  border-radius: var(--radius-md);
  transition: all var(--duration-fast) var(--ease-smooth);
  position: relative;
}

.nav__link:hover,
.nav__link.active {
  color: var(--white);
  background: rgba(255,255,255,0.1);
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 20px;
  height: 2px;
  background: var(--sunset-400);
  border-radius: 1px;
  transition: transform var(--duration-fast) var(--ease-smooth);
}

.nav__link:hover::after,
.nav__link.active::after {
  transform: translateX(-50%) scaleX(1);
}

.nav__cta {
  margin-left: var(--space-4);
}

/* Dropdown */
.nav__dropdown {
  position: relative;
}

.nav__dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 220px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: var(--space-2);
  opacity: 0;
  visibility: hidden;
  transition: all var(--duration-fast) var(--ease-smooth);
}

.nav__dropdown:hover .nav__dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav__dropdown-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  color: var(--gray-700);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: all var(--duration-fast);
}

.nav__dropdown-link:hover {
  background: var(--sunset-50);
  color: var(--sunset-600);
}

.nav__dropdown-link svg {
  width: 20px;
  height: 20px;
  color: var(--sunset-400);
}

/* Mobile toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  padding: var(--space-2);
  z-index: 10;
}

.nav-toggle__line {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--white);
  border-radius: 1px;
  transition: all var(--duration-base) var(--ease-smooth);
}

.nav-toggle.active .nav-toggle__line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active .nav-toggle__line:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active .nav-toggle__line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Nav */
@media (max-width: 1024px) {
  .nav-toggle {
    display: flex;
  }

  .nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    height: 100vh;
    background: var(--navy-900);
    flex-direction: column;
    align-items: flex-start;
    padding: calc(var(--header-height) + var(--space-8)) var(--space-8) var(--space-8);
    gap: var(--space-1);
    transition: right var(--duration-slow) var(--ease-smooth);
    box-shadow: -8px 0 40px rgba(0,0,0,0.4);
    overflow-y: auto;
  }

  .nav.open {
    right: 0;
  }

  .nav__link {
    width: 100%;
    font-size: var(--text-md);
    padding: var(--space-3) var(--space-4);
  }

  .nav__cta {
    margin-left: 0;
    margin-top: var(--space-4);
    width: 100%;
  }

  .nav__cta .btn {
    width: 100%;
    justify-content: center;
  }

  .nav__dropdown-menu {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
    background: rgba(255,255,255,0.05);
    border-radius: var(--radius-md);
    padding: var(--space-2);
    margin-top: var(--space-2);
  }

  .nav__dropdown-link {
    color: rgba(255,255,255,0.7);
  }

  .nav__dropdown-link:hover {
    color: var(--white);
    background: rgba(255,255,255,0.1);
  }

  .nav__dropdown-link svg {
    color: var(--sunset-400);
  }
}

/* Mobile overlay */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: calc(var(--z-sticky) - 1);
  opacity: 0;
  transition: opacity var(--duration-base);
}

.nav-overlay.visible {
  display: block;
  opacity: 1;
}

/* === FOOTER === */
.footer {
  background: var(--navy-900);
  color: var(--navy-200);
  padding-top: var(--space-16);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: var(--space-10);
  padding-bottom: var(--space-12);
}

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.footer__brand img {
  width: 150px;
  height: auto;
  object-fit: contain;
}

.footer__brand p {
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  color: var(--navy-300);
  margin-bottom: 0;
}

.footer__social {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-2);
}

.footer__social a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.08);
  color: var(--navy-200);
  transition: all var(--duration-fast) var(--ease-smooth);
}

.footer__social a:hover {
  background: var(--sunset-500);
  color: var(--white);
  transform: translateY(-3px);
}

.footer__title {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  color: var(--white);
  margin-bottom: var(--space-5);
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer__links a {
  font-size: var(--text-sm);
  color: var(--navy-300);
  transition: all var(--duration-fast);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.footer__links a:hover {
  color: var(--sunset-400);
  transform: translateX(4px);
}

.footer__contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--navy-300);
  margin-bottom: var(--space-4);
}

.footer__contact-item svg {
  width: 18px;
  height: 18px;
  color: var(--sunset-400);
  flex-shrink: 0;
  margin-top: 2px;
}

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: var(--space-5) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer__copyright {
  font-size: var(--text-xs);
  color: var(--navy-400);
}

.footer__legal {
  display: flex;
  gap: var(--space-6);
}

.footer__legal a {
  font-size: var(--text-xs);
  color: var(--navy-400);
}

.footer__legal a:hover {
  color: var(--sunset-400);
}

@media (max-width: 768px) {
  .footer__grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .footer__bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 1024px) and (min-width: 769px) {
  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}
