/**
 * Alas Petulu - Standardized Global Header & Footer Styles
 * Applies universally to all pages (Homepage, Single Rooms, Single Activities, Pages)
 */

/* ==========================================================================
   1. GLOBAL HEADER & NAVIGATION
   ========================================================================== */
.ap-site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  padding: 1.5rem 3.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  background: linear-gradient(180deg, rgba(14, 24, 16, 0.75) 0%, rgba(14, 24, 16, 0) 100%);
}

/* Scrolled / Non-transparent State */
.ap-site-header.is-scrolled {
  background: rgba(18, 28, 21, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 1rem 3.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Header Left: Menu Toggle + Desktop Nav Links */
.ap-header-left {
  display: flex;
  align-items: center;
  gap: 2rem;
  position: relative;
  z-index: 30;
}

.ap-menu-toggle {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  cursor: pointer;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 6px;
  outline: none;
  position: relative;
  z-index: 35;
  width: 44px;
  height: 44px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.ap-menu-toggle span {
  display: block;
  height: 2px;
  background-color: #ffffff;
  border-radius: 0 !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.25s ease,
              width 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              background-color 0.25s ease;
  pointer-events: none;
  transform-origin: center;
}

.ap-menu-toggle span:nth-child(1) { width: 34px; }
.ap-menu-toggle span:nth-child(2) { width: 26px; }
.ap-menu-toggle span:nth-child(3) { width: 18px; }

.ap-menu-toggle:hover span {
  width: 34px;
  background-color: #D6B86A;
}

/* Header & Animated Hamburger Transition to Close State */
body.ap-menu-open .ap-site-header {
  z-index: 10005;
  background: transparent !important;
  box-shadow: none !important;
  border-bottom: none !important;
}

body.ap-menu-open .ap-header-logo,
body.ap-menu-open .ap-header-right {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

body.ap-menu-open .ap-menu-toggle {
  position: fixed;
  top: 2.5rem;
  right: 2rem;
  z-index: 10005;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  gap: 0;
  cursor: pointer;
  animation: none !important;
}

body.ap-menu-open .ap-menu-toggle:hover {
  background: transparent !important;
  border: none !important;
}

body.ap-menu-open .ap-menu-toggle span {
  background-color: #E8E5DC;
  box-shadow: none !important;
  border-radius: 0 !important;
  width: 24px !important;
}

body.ap-menu-open .ap-menu-toggle:hover span {
  background-color: #D6B86A;
}

/* Morph 3 lines into pure minimal sharp X (Close icon, zero border, zero radius) */
body.ap-menu-open .ap-menu-toggle span:nth-child(1) {
  transform: translateY(2px) rotate(45deg);
}

body.ap-menu-open .ap-menu-toggle span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

body.ap-menu-open .ap-menu-toggle span:nth-child(3) {
  transform: translateY(-2px) rotate(-45deg);
}

/* Desktop Nav Links - Standardized across ALL pages to match Figma V2 (hamburger drawer only) */
.ap-desktop-nav {
  display: none !important;
}

.ap-desktop-nav a {
  font-family: var(--ap-font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffffff;
  opacity: 0.85;
  transition: var(--ap-transition);
  position: relative;
  padding: 0.25rem 0;
}

.ap-desktop-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--ap-accent);
  transition: width 0.3s ease;
}

.ap-desktop-nav a:hover {
  opacity: 1;
  color: var(--ap-accent-light);
}

.ap-desktop-nav a:hover::after {
  width: 100%;
}

/* Header Center: Logo */
.ap-header-logo {
  text-align: center;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 20;
}

.ap-header-logo a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

.ap-header-logo img {
  height: 84px;
  width: auto;
  aspect-ratio: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.45));
  transition: var(--ap-transition);
}

.ap-site-header.is-scrolled .ap-header-logo img,
body:not(.home) .ap-site-header .ap-header-logo img {
  height: 68px;
  width: auto;
}

/* Header Right */
.ap-header-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  position: relative;
  z-index: 30;
}

.ap-header-right .ap-btn {
  padding: 0.75rem 2rem;
  font-size: 0.925rem;
  white-space: nowrap;
}

/* ==========================================================================
   2. MOBILE / OFF-CANVAS NAVIGATION DRAWER (SLIDE IN FROM LEFT TO RIGHT)
   ========================================================================== */
.ap-mobile-drawer {
  position: fixed;
  inset: 0;
  background-color: #0D1812;
  z-index: 10000;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-100%);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2.5rem 2rem;
  box-sizing: border-box;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

body.ap-menu-open {
  overflow: hidden !important;
  touch-action: none;
}

html.ap-menu-locked {
  overflow: hidden !important;
}

body.ap-menu-open .ap-mobile-drawer {
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
}

.ap-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #263229;
  flex-shrink: 0;
}

.ap-drawer-logo img {
  height: 52px;
  width: auto;
  object-fit: contain;
}

.ap-drawer-close {
  visibility: hidden !important;
  pointer-events: none !important;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
}

.ap-drawer-nav {
  list-style: none;
  padding: 0;
  margin: 2rem 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  text-align: center;
}

.ap-drawer-nav a {
  font-family: var(--ap-font-serif);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  color: #E8E5DC;
  opacity: 0.9;
  transition: var(--ap-transition);
  text-decoration: none;
}

.ap-drawer-nav a:hover {
  opacity: 1;
  color: #D6B86A;
  transform: translateX(6px);
}

body.ap-menu-open .ap-drawer-nav a {
  animation: apNavItemSlideRight 0.5s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

body.ap-menu-open .ap-drawer-nav a:nth-child(1) { animation-delay: 0.1s; }
body.ap-menu-open .ap-drawer-nav a:nth-child(2) { animation-delay: 0.16s; }
body.ap-menu-open .ap-drawer-nav a:nth-child(3) { animation-delay: 0.22s; }
body.ap-menu-open .ap-drawer-nav a:nth-child(4) { animation-delay: 0.28s; }
body.ap-menu-open .ap-drawer-nav a:nth-child(5) { animation-delay: 0.34s; }
body.ap-menu-open .ap-drawer-nav a:nth-child(6) { animation-delay: 0.40s; }

@keyframes apNavItemSlideRight {
  from {
    opacity: 0;
    transform: translateX(-32px);
  }
  to {
    opacity: 0.9;
    transform: translateX(0);
  }
}

.ap-drawer-footer {
  text-align: center;
  color: #E8E5DC;
  font-size: 0.875rem;
}

.ap-drawer-footer strong {
  color: #E8E5DC;
}

.ap-drawer-footer p {
  color: rgba(232, 229, 220, 0.75);
}

.ap-drawer-footer a {
  color: #D6B86A;
  text-decoration: none;
}

.ap-drawer-footer a:hover {
  color: #ffffff;
}

.ap-drawer-footer .ap-btn-primary {
  background-color: #193522 !important;
  border: 1px solid #263229 !important;
  color: #E8E5DC !important;
  box-shadow: none !important;
}

.ap-drawer-footer .ap-btn-primary:hover {
  background-color: #21432c !important;
  border-color: #D6B86A !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

/* ==========================================================================
   3. GLOBAL STANDARDIZED FOOTER
   ========================================================================== */
.ap-site-footer {
  background-color: var(--ap-bg-dark);
  color: #ffffff;
  padding: 5.5rem 0 2.5rem 0;
  text-align: center;
  position: relative;
  z-index: 10;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.ap-footer-logo {
  margin-bottom: 2.5rem;
}

.ap-footer-logo img {
  height: 75px;
  width: auto;
  margin: 0 auto;
}

.ap-footer-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  list-style: none;
  margin: 0 auto 3rem auto;
  padding: 0;
  flex-wrap: wrap;
}

.ap-footer-nav a {
  font-family: var(--ap-font-sans);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  transition: var(--ap-transition);
}

.ap-footer-nav a:hover {
  color: var(--ap-accent-light);
}

.ap-footer-socials {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin-bottom: 3.5rem;
}

.ap-social-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  transition: var(--ap-transition);
}

.ap-social-icon:hover {
  background-color: var(--ap-accent);
  border-color: var(--ap-accent);
  color: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(197, 160, 89, 0.35);
}

.ap-social-icon svg {
  width: 18px;
  height: 18px;
}

.ap-footer-divider {
  height: 1px;
  background-color: rgba(255, 255, 255, 0.08);
  margin-bottom: 2rem;
  max-width: var(--ap-container-max);
  margin-left: auto;
  margin-right: auto;
}

.ap-footer-copyright {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.45);
  margin: 0;
}

/* Figma V2 Specific Footer Styling */
.ap-footer-v2 {
  background-color: #142217 !important;
  padding: 5rem 0 3rem 0;
}

.ap-footer-logo-v2 {
  margin-bottom: 2.25rem;
}

.ap-footer-logo-v2 img {
  height: 68px;
  width: auto;
}

.ap-footer-socials-v2 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin-bottom: 3.5rem;
}

.ap-social-icon-v2 {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  transition: var(--ap-transition);
}

.ap-social-icon-v2 svg {
  width: 19px;
  height: 19px;
}

.ap-social-icon-v2:hover {
  background-color: var(--ap-accent);
  border-color: var(--ap-accent);
  color: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 4px 14px rgba(197, 160, 89, 0.35);
}

.ap-footer-v2 .ap-footer-divider {
  background-color: rgba(255, 255, 255, 0.12);
  margin-bottom: 1.75rem;
}

.ap-footer-v2 .ap-footer-copyright {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.875rem;
}

/* Reusable Outline Buttons */
.ap-btn-outline-white {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #ffffff !important;
  border: 1px solid #ffffff;
  padding: 0.85rem 2.25rem;
  font-size: 0.975rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: var(--ap-radius-sm);
  transition: var(--ap-transition);
}

.ap-btn-outline-white:hover {
  background: #ffffff;
  color: #142217 !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.ap-btn-outline-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--ap-primary-dark) !important;
  border: 1px solid var(--ap-primary-dark);
  padding: 0.85rem 2.25rem;
  font-size: 0.975rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: var(--ap-radius-sm);
  transition: var(--ap-transition);
}

.ap-btn-outline-dark:hover {
  background: var(--ap-primary-dark);
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(20, 34, 23, 0.2);
}

/* ==========================================================================
   4. UNIVERSAL PRE-FOOTER NEWSLETTER SECTION
   ========================================================================== */
.ap-newsletter-section {
  padding: 6.5rem 0;
  background-color: #142217;
  color: #ffffff;
  text-align: center;
  position: relative;
  z-index: 10;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.ap-newsletter-title {
  color: #ffffff;
  font-size: var(--ap-fs-h2);
  margin-bottom: 2.5rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  font-family: var(--ap-font-serif);
  font-weight: 400;
  line-height: 1.25;
}

.ap-newsletter-form {
  max-width: 650px;
  margin: 0 auto;
}

.ap-newsletter-input-group {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.ap-newsletter-input {
  flex: 1;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  padding: 0.85rem 1rem;
  color: #ffffff;
  font-size: 1rem;
  outline: none;
  transition: var(--ap-transition);
}

.ap-newsletter-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.ap-newsletter-input:focus {
  border-bottom-color: #ffffff;
}

.ap-newsletter-privacy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

.ap-newsletter-privacy input[type="checkbox"] {
  accent-color: var(--ap-accent);
}

/* ==========================================================================
   5. RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (max-width: 1024px) {
  .ap-desktop-nav {
    display: none;
  }

  .ap-site-header,
  .ap-site-header.is-scrolled,
  body:not(.home) .ap-site-header {
    padding: 1.25rem 2rem;
  }
}

@media (max-width: 768px) {
  .ap-site-header,
  .ap-site-header.is-scrolled,
  body:not(.home) .ap-site-header {
    padding: 0.85rem 1.25rem;
  }

  .ap-header-logo img {
    height: 52px;
    width: auto;
    object-fit: contain;
  }

  .ap-site-header.is-scrolled .ap-header-logo img,
  body:not(.home) .ap-site-header .ap-header-logo img {
    height: 46px;
    width: auto;
  }

  .ap-header-right .ap-btn {
    padding: 0.5rem 1.15rem;
    font-size: 0.825rem;
    letter-spacing: 0.06em;
  }

  body.ap-menu-open .ap-menu-toggle {
    top: 2rem;
    right: 1.5rem;
  }

  .ap-menu-toggle {
    width: 44px;
    height: 44px;
    padding: 0;
  }

  .ap-menu-toggle span:nth-child(1) { width: 30px; }
  .ap-menu-toggle span:nth-child(2) { width: 22px; }
  .ap-menu-toggle span:nth-child(3) { width: 14px; }

  .ap-mobile-drawer {
    padding: 2rem 1.5rem;
  }

  .ap-drawer-nav {
    margin: 1.5rem 0;
    gap: 1.15rem;
  }

  .ap-drawer-nav a {
    font-size: clamp(1.35rem, 5.5vw, 1.85rem);
  }

  .ap-footer-nav {
    gap: 1.25rem;
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  body.ap-menu-open .ap-menu-toggle {
    top: 1.5rem;
    right: 1.15rem;
  }

  .ap-site-header,
  .ap-site-header.is-scrolled,
  body:not(.home) .ap-site-header {
    padding: 0.75rem 0.85rem;
  }

  .ap-header-logo img {
    height: 42px;
  }

  .ap-site-header.is-scrolled .ap-header-logo img,
  body:not(.home) .ap-site-header .ap-header-logo img {
    height: 38px;
  }

  .ap-header-right .ap-btn {
    padding: 0.45rem 0.85rem;
    font-size: 0.75rem;
  }

  .ap-menu-toggle span:nth-child(1) { width: 26px; }
  .ap-menu-toggle span:nth-child(2) { width: 18px; }
  .ap-menu-toggle span:nth-child(3) { width: 12px; }
}
