/* ==========================================================================
   CONDORTREKK EXPEDITIONS — Main Stylesheet
   Built by Blue Nova Consulting S.A.S.
   Vanilla CSS · Custom Properties · CSS Grid · No frameworks
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CUSTOM PROPERTIES (Design Tokens)
   Based on GoWorld template palette + Condortrekk brand
   -------------------------------------------------------------------------- */
:root {
  /* --- Colors: Primary --- */
  --color-primary:        #0D5C4D;   /* GoWorld teal-green */
  --color-primary-hover:  #0A4A3E;
  --color-primary-light:  #E6F5F0;
  --color-primary-bright: #14A085;

  /* --- Colors: Neutral Dark --- */
  --color-dark-900:       #112B2A;   /* Header/footer bg */
  --color-dark-800:       #0E2321;
  --color-dark-700:       #1A3C3A;
  --color-dark-600:       #2A524F;

  /* --- Colors: Neutral Light --- */
  --color-white:          #FFFFFF;
  --color-gray-50:        #F8F9FA;
  --color-gray-100:       #F1F3F5;
  --color-gray-200:       #E9ECEF;
  --color-gray-300:       #DEE2E6;
  --color-gray-400:       #ADB5BD;
  --color-gray-500:       #6C757D;
  --color-gray-600:       #495057;
  --color-gray-700:       #343A40;
  --color-gray-800:       #212529;

  /* --- Colors: Accent / Semantic --- */
  --color-success:        #2E7D32;
  --color-info:           #0288D1;
  --color-warning:        #F9A825;
  --color-danger:         #C62828;
  --color-mountain:       #5C6B73;   /* Muted mountain gray-blue */

  /* --- Typography --- */
  --font-heading:         'Playfair Display', 'Georgia', serif;
  --font-body:            'Source Sans 3', 'Segoe UI', sans-serif;
  --font-mono:            'JetBrains Mono', 'Courier New', monospace;

  --fs-xs:    0.75rem;     /* 12px */
  --fs-sm:    0.875rem;    /* 14px */
  --fs-base:  1rem;        /* 16px */
  --fs-md:    1.125rem;    /* 18px */
  --fs-lg:    1.25rem;     /* 20px */
  --fs-xl:    1.5rem;      /* 24px */
  --fs-2xl:   2rem;        /* 32px */
  --fs-3xl:   2.5rem;      /* 40px */
  --fs-4xl:   3rem;        /* 48px */
  --fs-hero:  3.5rem;      /* 56px */

  --lh-tight:    1.2;
  --lh-snug:     1.35;
  --lh-normal:   1.6;
  --lh-relaxed:  1.75;

  --fw-regular:  400;
  --fw-semi:     600;
  --fw-bold:     700;

  /* --- Spacing --- */
  --space-xs:    0.25rem;
  --space-sm:    0.5rem;
  --space-md:    1rem;
  --space-lg:    1.5rem;
  --space-xl:    2rem;
  --space-2xl:   3rem;
  --space-3xl:   4rem;
  --space-4xl:   6rem;
  --space-5xl:   8rem;

  /* --- Layout --- */
  --container-max:   1280px;
  --container-wide:  1440px;
  --container-narrow: 960px;
  --gutter:          1.5rem;

  /* --- Borders & Radius --- */
  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-full: 9999px;

  /* --- Shadows --- */
  --shadow-sm:   0 1px 3px rgba(0,0,0,0.08);
  --shadow-md:   0 4px 12px rgba(0,0,0,0.10);
  --shadow-lg:   0 8px 32px rgba(0,0,0,0.14);
  --shadow-xl:   0 16px 48px rgba(0,0,0,0.18);

  /* --- Transitions --- */
  --ease-out:    cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast: 0.15s;
  --duration-base: 0.3s;
  --duration-slow: 0.5s;

  /* --- Z-index scale --- */
  --z-dropdown:   100;
  --z-sticky:     200;
  --z-header:     300;
  --z-overlay:    400;
  --z-modal:      500;
  --z-whatsapp:   600;
}


/* --------------------------------------------------------------------------
   2. RESET & BASE
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  line-height: var(--lh-normal);
  color: var(--color-gray-700);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--duration-fast) ease;
}

a:hover {
  color: var(--color-primary);
}

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  color: var(--color-gray-800);
}

h1 { font-size: var(--fs-4xl); }
h2 { font-size: var(--fs-3xl); }
h3 { font-size: var(--fs-2xl); }
h4 { font-size: var(--fs-xl); }
h5 { font-size: var(--fs-lg); }
h6 { font-size: var(--fs-md); }

p + p { margin-top: var(--space-md); }


/* --------------------------------------------------------------------------
   3. LAYOUT UTILITIES
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--wide  { max-width: var(--container-wide); }
.container--narrow { max-width: var(--container-narrow); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


/* --------------------------------------------------------------------------
   4. BUTTONS
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semi);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: var(--radius-md);
  transition: all var(--duration-base) var(--ease-out);
  white-space: nowrap;
}

.btn--primary {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn--primary:hover {
  background: var(--color-primary-hover);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(13, 92, 77, 0.35);
}

.btn--outline {
  background: transparent;
  color: var(--color-white);
  border: 2px solid var(--color-white);
}

.btn--outline:hover {
  background: var(--color-white);
  color: var(--color-dark-900);
}

.btn--dark {
  background: var(--color-dark-900);
  color: var(--color-white);
}

.btn--dark:hover {
  background: var(--color-dark-800);
  color: var(--color-white);
  transform: translateY(-2px);
}

.btn--sm {
  padding: 0.5rem 1.25rem;
  font-size: var(--fs-xs);
}

.btn--lg {
  padding: 1rem 2.25rem;
  font-size: var(--fs-base);
}

.btn svg,
.btn img {
  width: 18px;
  height: 18px;
}


/* --------------------------------------------------------------------------
   5. TOP BAR
   -------------------------------------------------------------------------- */
.top-bar {
  background: var(--color-dark-900);
  color: var(--color-gray-400);
  font-size: var(--fs-xs);
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.top-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.top-bar__left,
.top-bar__right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.top-bar__item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.top-bar__item svg {
  width: 14px;
  height: 14px;
  stroke: var(--color-primary);
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
}

.top-bar__item a:hover {
  color: var(--color-white);
}

.top-bar__social {
  display: flex;
  gap: 0.75rem;
}

.top-bar__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.06);
  transition: background var(--duration-fast) ease;
}

.top-bar__social a:hover {
  background: var(--color-primary);
}

.top-bar__social svg {
  width: 14px;
  height: 14px;
  fill: var(--color-white);
}

@media (max-width: 768px) {
  .top-bar { display: none; }
}


/* --------------------------------------------------------------------------
   6. SITE HEADER & NAVIGATION
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: var(--color-dark-800);
  box-shadow: var(--shadow-md);
  transition: background var(--duration-base) ease,
              box-shadow var(--duration-base) ease;
}

.site-header--scrolled {
  background: rgba(14, 35, 33, 0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  gap: 2rem;
}

/* --- Logo --- */
.site-logo {
  flex-shrink: 0;
}

.site-logo img {
  height: 80px;
  width: auto;
  transition: opacity var(--duration-fast) ease;
}

@media (max-width: 768px) {
  .site-logo img {
    height: 56px;
  }
}

.site-logo:hover img {
  opacity: 0.85;
}

/* --- Primary Nav --- */
.primary-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.primary-nav__list {
  display: flex;
  align-items: center;
  gap: 0;
}

.primary-nav__item {
  position: relative;
}

.primary-nav__link {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 1rem 0.9rem;
  color: var(--color-gray-300);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semi);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: color var(--duration-fast) ease;
}

.primary-nav__link:hover,
.primary-nav__item--active > .primary-nav__link {
  color: var(--color-primary);
}

.primary-nav__arrow {
  width: 10px;
  height: 10px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  transition: transform var(--duration-fast) ease;
}

.primary-nav__item:hover > .primary-nav__link .primary-nav__arrow {
  transform: rotate(180deg);
}

/* --- Dropdown --- */
.primary-nav__dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 250px;
  background: var(--color-white);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all var(--duration-base) var(--ease-out);
  z-index: var(--z-dropdown);
  padding: 0.5rem 0;
}

.primary-nav__item:hover > .primary-nav__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.primary-nav__dropdown-item {
  display: block;
  padding: 0.6rem 1.25rem;
  color: var(--color-gray-700);
  font-size: var(--fs-sm);
  transition: background var(--duration-fast) ease,
              color var(--duration-fast) ease,
              padding-left var(--duration-fast) ease;
}

.primary-nav__dropdown-item:hover {
  background: var(--color-primary-light);
  color: var(--color-primary);
  padding-left: 1.5rem;
}

/* --- Sub-dropdown (nested, e.g. Cotopaxi under Hiking) --- */
.primary-nav__dropdown .primary-nav__sub-parent {
  position: relative;
}

.primary-nav__sub-dropdown {
  position: absolute;
  top: 0;
  left: 100%;
  min-width: 220px;
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateX(8px);
  transition: all var(--duration-base) var(--ease-out);
  padding: 0.5rem 0;
}

.primary-nav__sub-parent:hover > .primary-nav__sub-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

/* --- Header CTA --- */
.header-cta {
  flex-shrink: 0;
}

/* --- Mobile Toggle --- */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle__bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
  transition: transform var(--duration-base) ease,
              opacity var(--duration-fast) ease;
}

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

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

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

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

  .primary-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    height: 100dvh;
    background: var(--color-dark-900);
    flex-direction: column;
    justify-content: flex-start;
    padding: 5rem 1.5rem 2rem;
    overflow-y: auto;
    transition: right var(--duration-slow) var(--ease-out);
    z-index: var(--z-overlay);
    visibility: hidden;
  }

  .primary-nav.is-open {
    right: 0;
    visibility: visible;
  }

  .primary-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
  }

  .primary-nav__link {
    padding: 0.85rem 0;
    font-size: var(--fs-base);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    justify-content: space-between;
  }

  .primary-nav__dropdown {
    position: static;
    box-shadow: none;
    background: rgba(255,255,255,0.03);
    border-radius: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--duration-base) ease;
    padding: 0;
    display: block;
  }

  .primary-nav__item.is-expanded > .primary-nav__dropdown {
    max-height: 2000px;
    padding: 0.25rem 0;
  }

  .primary-nav__dropdown-item {
    color: var(--color-gray-400);
    padding-left: 1.5rem;
  }

  .primary-nav__dropdown-item:hover {
    background: rgba(232, 101, 26, 0.1);
  }

  .primary-nav__sub-dropdown {
    position: static;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    padding-left: 1rem;
    max-height: 0;
    overflow: hidden;
    display: block;
  }

  .primary-nav__sub-parent.is-expanded > .primary-nav__sub-dropdown {
    max-height: 2000px;
  }

  /* Hide desktop hover effects on mobile */
  .primary-nav__item:hover > .primary-nav__dropdown,
  .primary-nav__sub-parent:hover > .primary-nav__sub-dropdown {
    max-height: 0;
    padding: 0;
  }
  .primary-nav__item.is-expanded:hover > .primary-nav__dropdown {
    max-height: 2000px;
    padding: 0.25rem 0;
  }

  /* Overlay behind mobile nav */
  .nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: calc(var(--z-overlay) - 1);
    opacity: 0;
    visibility: hidden;
    transition: all var(--duration-base) ease;
  }

  .nav-overlay.is-visible {
    opacity: 1;
    visibility: visible;
  }

  /* Top bar responsive */
  .top-bar__left { flex-wrap: wrap; gap: 0.25rem; }
  .top-bar__item { font-size: 11px; }
}

@media (min-width: 1025px) {
  .nav-overlay { display: none; }
}


/* --------------------------------------------------------------------------
   7. FOOTER
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--color-dark-900);
  color: var(--color-gray-400);
  font-size: var(--fs-sm);
}

.footer-main {
  padding: var(--space-4xl) 0 var(--space-3xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: var(--space-3xl);
}

.footer-col__title {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: var(--fw-bold);
  color: var(--color-white);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-lg);
  position: relative;
  padding-bottom: 0.75rem;
}

.footer-col__title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--color-primary);
  border-radius: 2px;
}

/* Footer: About column */
.footer-about__logo {
  height: 100px;
  width: auto;
  margin-bottom: var(--space-lg);
}

.footer-about__text {
  line-height: var(--lh-relaxed);
  margin-bottom: var(--space-lg);
  color: var(--color-gray-400);
}

.footer-social {
  display: flex;
  gap: 0.6rem;
}

.footer-social__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.06);
  transition: background var(--duration-fast) ease,
              transform var(--duration-fast) ease;
}

.footer-social__link:hover {
  background: var(--color-primary);
  transform: translateY(-3px);
}

.footer-social__link svg {
  width: 16px;
  height: 16px;
  fill: var(--color-white);
}

/* Footer: Links column */
.footer-links li + li {
  margin-top: 0.6rem;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--color-gray-400);
  transition: color var(--duration-fast) ease,
              padding-left var(--duration-fast) ease;
}

.footer-links a::before {
  content: '';
  width: 6px;
  height: 6px;
  border-top: 1.5px solid var(--color-primary);
  border-right: 1.5px solid var(--color-primary);
  transform: rotate(45deg);
  flex-shrink: 0;
  transition: transform var(--duration-fast) ease;
}

.footer-links a:hover {
  color: var(--color-white);
  padding-left: 0.3rem;
}

/* Footer: Contact column */
.footer-contact__item {
  display: flex;
  gap: 0.75rem;
  margin-bottom: var(--space-md);
  align-items: flex-start;
}

.footer-contact__icon {
  width: 18px;
  height: 18px;
  stroke: var(--color-primary);
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
  margin-top: 2px;
}

.footer-contact__text a:hover {
  color: var(--color-white);
}

/* Footer: Bottom bar */
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: var(--space-lg) 0;
}

.footer-bottom__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-bottom__copy {
  font-size: var(--fs-xs);
  color: var(--color-gray-500);
}

.footer-bottom__copy a {
  color: var(--color-primary);
}

.footer-bottom__links {
  display: flex;
  gap: 1.5rem;
  font-size: var(--fs-xs);
}

.footer-bottom__links a:hover {
  color: var(--color-white);
}

/* Footer responsive */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

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


/* --------------------------------------------------------------------------
   8. WHATSAPP FLOATING BUTTON
   -------------------------------------------------------------------------- */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: var(--z-whatsapp);
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
  transition: transform var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base) ease;
}

.whatsapp-float:hover {
  transform: scale(1.1) translateY(-3px);
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.5);
  color: var(--color-white);
}

.whatsapp-float svg {
  width: 28px;
  height: 28px;
  fill: var(--color-white);
}

@media (max-width: 480px) {
  .whatsapp-float {
    bottom: 16px;
    right: 16px;
    width: 50px;
    height: 50px;
  }

  .whatsapp-float svg {
    width: 24px;
    height: 24px;
  }
}


/* --------------------------------------------------------------------------
   9. SECTION UTILITIES (for page templates)
   -------------------------------------------------------------------------- */
.section {
  padding: var(--space-4xl) 0;
}

.section--dark {
  background: var(--color-dark-900);
  color: var(--color-gray-300);
}

.section--gray {
  background: var(--color-gray-50);
}

.section--primary {
  background: var(--color-primary);
  color: var(--color-white);
}

.section__label {
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
}

.section--dark .section__label {
  color: var(--color-primary);
}

.section__title {
  font-size: var(--fs-3xl);
  margin-bottom: var(--space-md);
}

.section--dark .section__title {
  color: var(--color-white);
}

.section__subtitle {
  font-size: var(--fs-md);
  color: var(--color-gray-500);
  max-width: 600px;
}

.section--dark .section__subtitle {
  color: var(--color-gray-400);
}

.section__header {
  margin-bottom: var(--space-3xl);
}

.section__header--center {
  text-align: center;
}

.section__header--center .section__subtitle {
  margin-inline: auto;
}


/* --------------------------------------------------------------------------
   10. SCROLL TO TOP
   -------------------------------------------------------------------------- */
.scroll-top {
  position: fixed;
  bottom: 24px;
  right: 90px;
  z-index: var(--z-whatsapp);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--color-dark-900);
  border: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: all var(--duration-base) var(--ease-out);
  cursor: pointer;
}

.scroll-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.scroll-top svg {
  width: 18px;
  height: 18px;
  stroke: var(--color-white);
  fill: none;
  stroke-width: 2.5;
}

@media (max-width: 480px) {
  .scroll-top {
    right: 74px;
    bottom: 16px;
    width: 40px;
    height: 40px;
  }
}
