/* ==========================================================================
   SAN BLAS ISLANDS EXPEDITION GUIDE (san-blas-islands.com)
   Style: Refined Travel Journal, Linen & Sand Aesthetic, Botanical Warmth
   Palette: Warm Cream/Linen (#fbf9f5), Deep Espresso Charcoal (#2d261e),
            Muted Tropical Sage Green (#314e39), Warm Earthy Taupe (#5c5348)
   Typography: Newsreader Serif (Headings) + Plus Jakarta Sans (Body)
   ========================================================================== */

:root {
  --bg-canvas:      #fbf9f5;
  --bg-surface:     #f4efe6;
  --bg-card:        #ffffff;
  --bg-card-subtle: #f7f3eb;
  
  --border:         #e7e0d3;
  --border-light:   #dacfc0;
  --border-subtle:  #eee8dc;
  
  --text-primary:   #2b241d;
  --text-secondary: #5a5146;
  --text-muted:     #8a7f72;
  
  --green-primary:  #314e39;
  --green-hover:    #233a2a;
  --green-subtle:   #ebf2ec;
  --green-border:   #c8dacb;
  
  --brown-warm:     #7a5230;
  --brown-subtle:   #f5ede4;
  --brown-border:   #e2d2c1;
  
  --sand-accent:    #c4975f;
  
  --font-serif: "Newsreader", "Playfair Display", Georgia, serif;
  --font-sans:  "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --shadow-soft: 0 4px 20px -2px rgba(43, 36, 29, 0.05);
  --shadow-card: 0 2px 10px rgba(43, 36, 29, 0.03);
}

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

html {
  font-family: var(--font-sans);
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 110px;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-canvas);
  overflow-x: hidden;
  max-width: 100%;
}

/* Container */
/* Container - strictly consistent width across header, hero, content and footer */
.container,
.container-narrow {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Navigation Header (Two-row spacious layout) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(251, 249, 245, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: all 0.2s ease;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0 10px;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
}

.logo-text {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.logo-tag {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  color: var(--green-primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  border: 1px solid var(--green-border);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: var(--green-subtle);
}

.lang-switch-wrap {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.lang-switch-desktop {
  display: flex;
  align-items: center;
  gap: 3px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 3px 5px;
  background: var(--bg-surface);
}

.lang-switch-mobile {
  display: none;
}

.lang-select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 18px 0 24px;
  height: 32px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.lang-select-wrap:focus-within {
  border-color: var(--green-primary);
  box-shadow: 0 0 0 2px var(--green-subtle);
}

.lang-globe-icon {
  position: absolute;
  left: 7px;
  pointer-events: none;
  color: var(--text-muted);
}

.lang-arrow-icon {
  position: absolute;
  right: 6px;
  pointer-events: none;
  color: var(--text-muted);
}

.lang-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  line-height: 32px;
  height: 32px;
  width: 20px;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
}

.lang-select option {
  color: var(--text-primary);
  background: #ffffff;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 8px 12px;
}

.lang-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: all 0.15s ease;
}

.lang-link.active {
  color: var(--text-primary);
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* Row 2: Navigation Bar */
.header-bottom {
  display: flex;
  align-items: center;
  border-top: 1px solid var(--border-subtle);
  padding: 6px 0 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.header-bottom::-webkit-scrollbar {
  display: none;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.925rem;
  transition: all 0.15s ease;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.01em;
  white-space: nowrap;
  border: 1px solid transparent;
}

.nav-link:hover {
  color: var(--green-primary);
  background: var(--bg-surface);
  border-color: var(--border);
}

.nav-link.active {
  color: var(--green-primary);
  background: var(--green-subtle);
  border-color: var(--green-border);
  font-weight: 600;
}

/* Hero Section */
.hero-section {
  position: relative;
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg-canvas) 0%, var(--bg-surface) 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.08fr;
  gap: 48px;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--green-primary);
  background: var(--green-subtle);
  border: 1px solid var(--green-border);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 22px;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: 3.2rem;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 22px;
  color: var(--text-primary);
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 34px;
  max-width: 560px;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 20px;
}

/* Buttons */
.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none !important;
  padding: 13px 26px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  letter-spacing: 0.01em;
}

.btn-primary {
  background-color: var(--green-primary);
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(49, 78, 57, 0.2);
}

.btn-primary:hover {
  background-color: var(--green-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(49, 78, 57, 0.25);
}

.btn-secondary {
  background-color: #ffffff;
  color: var(--text-primary) !important;
  border-color: var(--border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.btn-secondary:hover {
  background-color: var(--bg-surface);
  border-color: var(--border-light);
  transform: translateY(-1px);
}

/* Seamless Illustration Card Integration */
.hero-media-card {
  position: relative;
  background: transparent;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero-media-card picture {
  display: block;
  width: 100%;
}

.hero-media-card img {
  width: 100%;
  max-height: 490px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  mix-blend-mode: multiply;
  opacity: 0.96;
  filter: contrast(1.02);
}

.hero-media-caption {
  padding: 10px 14px 4px;
  font-size: 0.825rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-style: italic;
  font-family: var(--font-serif);
  width: 100%;
}

/* Stats Ribbon */
.stats-ribbon {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 34px 0;
  border-bottom: 1px solid var(--border);
}

.stat-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  text-align: center;
  box-shadow: var(--shadow-card);
}

.stat-value {
  font-family: var(--font-serif);
  font-size: 2.3rem;
  font-weight: 600;
  color: var(--green-primary);
  line-height: 1.1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Section Header */
.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 42px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 2.35rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* Cockpit Filter Section */
.cockpit-section {
  padding: 64px 0;
  border-bottom: 1px solid var(--border);
  background-color: var(--bg-canvas);
}

.cockpit-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 38px;
}

.cockpit-tab-btn {
  background: #ffffff;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  padding: 10px 22px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.cockpit-tab-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-light);
  background: var(--bg-surface);
}

.cockpit-tab-btn.active {
  background: var(--green-primary);
  color: #ffffff;
  border-color: var(--green-primary);
  box-shadow: 0 3px 10px rgba(49, 78, 57, 0.2);
}

.cockpit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 26px;
}

.trip-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-card);
}

.trip-card:hover {
  transform: translateY(-3px);
  border-color: var(--green-border);
  box-shadow: var(--shadow-soft);
}

.trip-card-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  align-self: flex-start;
}

.badge-sailing {
  background: var(--green-subtle);
  color: var(--green-primary);
  border: 1px solid var(--green-border);
}

.badge-tour {
  background: var(--brown-subtle);
  color: var(--brown-warm);
  border: 1px solid var(--brown-border);
}

.badge-cabin {
  background: #fdf6ec;
  color: #925816;
  border: 1px solid #fae4c8;
}

.trip-card-title {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-primary);
  line-height: 1.3;
}

.trip-card-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 22px;
  flex-grow: 1;
}

.trip-meta-list {
  list-style: none;
  border-top: 1px solid var(--border-subtle);
  padding-top: 16px;
  margin-bottom: 24px;
}

.trip-meta-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  padding: 6px 0;
}

.trip-meta-label {
  color: var(--text-muted);
}

.trip-meta-val {
  color: var(--text-primary);
  font-weight: 600;
}

/* Map Section */
.map-section {
  padding: 64px 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
  overflow: hidden;
}

.map-wrapper {
  height: 520px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  position: relative;
  z-index: 10;
  max-width: 100%;
}

/* Article & Content Page */
.content-section {
  padding: 56px 0 84px;
  background-color: var(--bg-canvas);
}

.article-header {
  margin-bottom: 38px;
}

.article-breadcrumbs {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 18px;
  letter-spacing: 0.01em;
}

.article-breadcrumbs a {
  color: var(--green-primary);
  text-decoration: none;
  font-weight: 500;
}

.article-title {
  font-family: var(--font-serif);
  font-size: 2.75rem;
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: 16px;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.article-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 24px;
}

.article-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  padding: 16px 22px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  color: var(--text-secondary);
  box-shadow: var(--shadow-card);
}

/* Fact Box */
.fact-box {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px 28px;
  margin: 36px 0;
  box-shadow: var(--shadow-card);
}

.fact-box-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 14px;
}

/* Pro Tip Box */
.tip-box {
  background: var(--green-subtle);
  border: 1px solid var(--green-border);
  border-radius: var(--radius-md);
  padding: 22px 26px;
  margin: 32px 0;
}

.tip-box-title {
  font-size: 0.825rem;
  font-weight: 700;
  color: var(--green-primary);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.tip-box ul {
  padding-left: 20px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.75;
}

/* Hub Pages Articles Grid */
.hub-articles-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 28px;
  margin-top: 36px;
}

/* Prose Typography */
.prose {
  width: 100%;
}

.prose h2 {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  font-weight: 600;
  margin: 44px 0 18px;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.prose p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 22px;
  max-width: 80ch;
}

.prose ul, .prose ol {
  color: var(--text-secondary);
  padding-left: 24px;
  margin-bottom: 24px;
  line-height: 1.75;
  max-width: 80ch;
}

.prose li {
  margin-bottom: 10px;
}

/* CTA Banner */
.cta-banner {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 40px;
  margin: 50px 0;
  text-align: center;
  box-shadow: var(--shadow-card);
}

.cta-banner-title {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 14px;
  color: var(--text-primary);
}

.cta-banner-desc {
  font-size: 1.025rem;
  color: var(--text-secondary);
  max-width: 620px;
  margin: 0 auto 26px;
  line-height: 1.7;
}

/* In-Content Seamless Illustration Wrapper */
.incontent-media {
  margin: 48px auto;
  max-width: 780px;
  text-align: center;
  position: relative;
}

.incontent-media picture {
  display: block;
  width: 100%;
}

.incontent-media img {
  display: block;
  max-width: 100%;
  height: auto;
  max-height: 440px;
  object-fit: contain;
  margin: 0 auto;
  mix-blend-mode: multiply;
  opacity: 0.96;
  filter: contrast(1.02);
}

/* Footer */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 56px 0 32px;
  margin-top: auto;
  font-size: 0.925rem;
  color: var(--text-muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 44px;
  margin-bottom: 44px;
}

.footer-col h4 {
  color: var(--text-primary);
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.footer-col p {
  line-height: 1.65;
  margin-bottom: 12px;
  color: var(--text-secondary);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: var(--green-primary);
}

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 26px;
  text-align: center;
  font-size: 0.825rem;
}

/* Responsive */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .hero-title {
    font-size: 2.5rem;
  }
  .stats-ribbon {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 820px) {
  .lang-switch-desktop {
    display: none !important;
  }
  .lang-switch-mobile {
    display: inline-flex !important;
    flex-shrink: 0;
  }
  .header-top {
    padding: 10px 0 8px;
    gap: 12px;
  }
  .logo-wrap {
    gap: 8px;
    min-width: 0;
    flex: 0 1 auto;
  }
  .logo-text {
    font-size: 1.25rem;
    line-height: 1.15;
  }
  .logo-tag {
    display: none;
  }
}

@media (max-width: 600px) {
  .container,
  .container-narrow {
    padding: 0 16px;
  }
  .hero-title {
    font-size: 2rem;
  }
  .article-title {
    font-size: 1.85rem;
    line-height: 1.2;
    overflow-wrap: break-word;
    word-break: break-word;
  }
  .main-nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }
  .stats-ribbon {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .logo-text {
    font-size: 1.15rem;
  }
  .lang-select-wrap {
    padding: 0 18px 0 22px;
    height: 30px;
  }
  .lang-select {
    font-size: 0.74rem;
    height: 30px;
    line-height: 30px;
    width: 23px;
  }
  .lang-globe-icon {
    left: 6px;
    width: 12px;
    height: 12px;
  }
  .lang-arrow-icon {
    right: 5px;
    width: 9px;
    height: 9px;
  }
}
