/* General Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
    overflow: visible;
}

body {

/* Marker popup type pills */
.popup-pills { 
  display: flex; 
  flex-wrap: wrap; 
  gap: 4px; 
  margin-top: 4px; 
}

/* Local Payment Methods sections */
.lpm-section {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 14px;
  margin: 18px 0 30px;
}
.lpm-title {
  flex: 1 1 100%;
  font-weight: 700;
  font-size: 18px;
  color: #281932;
  display: flex;
  align-items: center;
  gap: 8px;
}
.lpm-title i { font-size: 20px; color: #281932; }
.lpm-item {
  background: #fff;
  border: 1px solid #dedede;
  border-radius: 12px;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 100px;
  min-height: 70px;
  box-shadow: 0 1px 1px rgba(0,0,0,0.04);
  transition: border-color .25s, box-shadow .25s, transform .25s;
}
.lpm-item-link { display:flex; align-items:center; justify-content:center; width:100%; height:100%; }
.lpm-item:hover {
  border-color: #b9b9c9;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}
.lpm-logo {
  max-width: 81px;
  max-height: 42px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: saturate(1.05);
}
@media (max-width: 900px) {
  .lpm-item { min-width: 100px; min-height: 64px; }
  .lpm-logo { max-width: 81px; max-height: 38px; }
}
@media (max-width: 600px) {
  .lpm-section { gap: 10px; }
  .lpm-item { min-width: 100px; min-height: 58px; }
  .lpm-logo { max-width: 81px; max-height: 34px; }
}
.popup-pill { 
  background: #87CDDC;
        color: #281932;
        font-size: 11px;
        line-height: 1;
        padding: 4px 9px;
        border-radius: 10px;
        font-weight: 600;
        letter-spacing: .3px;
        display: inline-block;
        white-space: nowrap;
}
  line-height: 1.6;
  color: #333;
  overflow-x: hidden;
}

/* Header Navigation */
.header-nav {
  background: white;
  padding: 15px 40px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 1000;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: #0070ba;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 30px;
}

.nav-links a {
  text-decoration: none;
  color: #666;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: #0070ba;
}

.cta-btn {
  background: #0070ba;
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

.cta-btn:hover {
  background: #005a9b;
}

/* Intro Section */
.intro-section {
  background: linear-gradient(135deg, rgba(255, 182, 193, 0.8), rgba(255, 160, 180, 0.9)), 
              url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><path d="M200,300 Q400,200 600,300 T1000,300" stroke="rgba(255,255,255,0.3)" stroke-width="2" fill="none"/><circle cx="300" cy="250" r="3" fill="rgba(255,255,255,0.5)"/><circle cx="700" cy="350" r="3" fill="rgba(255,255,255,0.5)"/><circle cx="900" cy="280" r="3" fill="rgba(255,255,255,0.5)"/></svg>');
  background-size: cover;
  background-position: center;
  padding: 100px 40px;
  color: #333;
  position: relative;
}

.intro-content {
  max-width: 1200px;
  margin: 0 auto;
}

.intro-section h1 {
  font-size: 3rem;
  font-weight: 300;
  margin-bottom: 20px;
  color: #333;
}

.intro-section p {
  font-size: 1.1rem;
  max-width: 500px;
  margin-bottom: 30px;
  color: #666;
  line-height: 1.6;
}

.read-more-btn {
  background: transparent;
  color: #333;
  padding: 12px 30px;
  border: 2px solid #333;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.read-more-btn:hover {
  background: #333;
  color: white;
}

/* Report Advantages Section */
.report-section {
  padding: 80px 40px;
  background: #f8f9fa;
}

.report-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.report-image {
  background: #e9ecef;
  border-radius: 10px;
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}

.report-mockup {
  background: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 300px;
}

.report-content h2 {
  font-size: 2.2rem;
  color: #333;
  margin-bottom: 20px;
}

.report-content p {
  color: #666;
  margin-bottom: 20px;
  line-height: 1.6;
}

.download-btn {
  background: #0070ba;
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

.download-btn:hover {
  background: #005a9b;
}

/* MAP COMPONENT STYLES */
.map-story-wrapper {
  position: relative;
  background: #FBEEEF;
  padding: 40px;
}

.map-story-container {
  position: sticky;
  top: 40px;
  height: calc(100vh - 80px);
  display: flex;
  /* border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15); */
  background: #FBEEEF;
  margin-bottom: 40px;
}

/* Fixed Map Container */
.map-container {
  width: 50%;
  height: 100%;
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  /* border: 10px solid #fff; */
    /* box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);  */
    box-shadow: 0 0 10px 2px #5f7e9b40;
}

#map {
  width: 100%;
  height: 100%;
}

/* Disable map interactions except for markers */
.mapboxgl-canvas {
  cursor: default !important;
}

/* Allow pointer events on the canvas so Mapbox GL layer clicks work */
#map .mapboxgl-canvas-container {
  pointer-events: auto; /* was none: this blocked clicks on symbol/circle layers */
}

#map .mapboxgl-marker,
#map .mapboxgl-popup,
#map .mapboxgl-popup-anchor-bottom,
#map .mapboxgl-popup-anchor-top {
  pointer-events: auto;
}

#map .mapboxgl-marker {
  background-image: url('https://docs.mapbox.com/help/demos/custom-markers-gl-js/mapbox-icon.png');
  background-size: cover;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
}
.mapboxgl-popup {
  max-width: 280px;
}
.mapboxgl-popup-tip
{
    display: none;
}
.mapboxgl-popup-content {
  font-family: 'Nunito Sans', sans-serif;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  padding-right: 18px; /* Added padding to avoid text overlap */
  background: rgba(255,255,255,0.8);
}

.mapbox-improve-map {
  display: none;
}

.popup-header {
  display: flex;
  align-items: center;
  gap: 0;              /* no icon, no gap needed */

  padding: 4px 0;
  border-bottom: 1px solid #eee;
}

/* Ensure title stands on its own */
.popup-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #281932;
  margin: 0;
}

.popup-description {
  color: #666;
  margin: 8px 0;
  font-size: 0.9rem;
}

.popup-link {
  display: inline-block;
  color: #fff;
  background-color: #281932;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 6px 15px;
 
  border-radius: 30px;
  transition: all 0.3s ease;
  margin-top: 8px;
}

.popup-link:hover {
  background: #2674E0;
  color: white;
}

/* Popup close button size increase for better usability */
.mapboxgl-popup-close-button {
  font-size: 20px;            /* roughly ~3x default */
  width: 26px;
  height: 26px;
  line-height: 36px;          /* vertically center the × */
  border-radius: 6px;
  color: #333;
  background: transparent;
  padding: 0;                 /* use explicit size above */
  right: 6px;                 /* keep it near the edge */
  top: 2px;
  -webkit-tap-highlight-color: transparent;
}

.mapboxgl-popup-close-button:hover {
  background: rgba(0,0,0,0.06);
}

/* Story Content Container - Desktop */
.story-content {
  width: 50%;
  height: 100%;

  position: relative;
  /* border-radius: 0 20px 20px 0; */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.story-sections-container {
  position: relative;
  width: 100%;
  height: 100%;

}

.story-section {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 60px 0 60px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: transparent;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
  pointer-events: none;
}

.story-section ul {
  margin-bottom: 24px;
  padding-left: 16px;
  list-style-type: disc;
  list-style-position: inside;

}

.story-section.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;

}

/* Mobile Tabs */
.mobile-tabs {
  display: none;
  background: white;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  position: relative;
  order: 1;
  overflow: hidden;
}

.tabs-container {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
  padding: 0 8px;
  position: relative;
  gap: 8px; /* pills spacing */
  scroll-snap-type: x mandatory; /* enable snapping */
}

/* Edge fade overlays on the fixed wrapper (so they don't scroll) */
.mobile-tabs::before,
.mobile-tabs::after {
  content: '';
  position: absolute;
  top: 0;
  height: 100%;
  width: 15px;
  pointer-events: none;
  z-index: 2;
}

.mobile-tabs::before {
  left: 0;
  background: linear-gradient(to right, #ffffff 0%, rgba(255,255,255,0) 100%);
}

.mobile-tabs::after {
  right: 0;
  background: linear-gradient(to left, #ffffff 0%, rgba(255,255,255,0) 100%);
}

/* Remove previous container-based fades to avoid double layers */
.tabs-container::before,
.tabs-container::after {
  content: none;
}

.tabs-container::-webkit-scrollbar { display: none; }

.tab-button {
  flex: 0 0 auto;
  padding: 10px 14px;
  background: #fff; /* pill background */
  border: 1px solid #e4e4e4; /* light gray border */
  border-radius: 10px; /* pill radius */
  color: #333;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  scroll-snap-align: center; /* center on snap */
  /* override any previous underline styles */
  /* border-bottom: none; */
}

.tab-button.active {
  color: #0070ba;
  background: #fff;
  border-color: #e4e4e4;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12); /* drop shadow for active */
}

.tab-button:hover {
  background: #f8f9fb;
}

/* Remove old chevron-specific styles */
.tab-navigation, .tab-chevron, .current-tab, .current-tab-icon, .current-tab-text { display: none !important; }

/* Mobile Map Container */
.mobile-map-container {
  display: none;
  width: 100%;
  height: calc(100vh - 200px);
  position: relative;
  order: 2;
}

#mobile-map {
  width: 100%;
  height: 100%;
}

/* Mobile Detail Panel - Hidden on Desktop by default */
.mobile-detail-panel {
  display: none;
}

.panel-header {
  padding: 20px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 70px;
  background: white;
  border-radius: 20px 20px 0 0;
}

.panel-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #0070ba;
  margin: 0;
}

.panel-toggle {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #666;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.panel-content {
  padding: 20px;
  /* Remove inner scrolling to prevent scroll trapping */
  overflow: visible;
  background: white;
}

/* Panel navigation footer (mobile) */
.panel-footer-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 16px 20px;
  background: white;
  border-top: 1px solid #eee;
}
.panel-footer-nav button:disabled {
  opacity: 0.5;
}
.panel-footer-nav .la {
  font-size: 1.1rem;
}

/* Scroll trigger sections */
.scroll-trigger {
  height: 85vh; /* reduced from 100vh to tighten scroll distance between sections */
  position: relative;
  pointer-events: none;
}
.scroll-trigger:first-of-type {
  height: 85vh; /* ensure LATAM spacer matches others */
}

.story-section h2 {
  font-size: 2.2rem;
  font-weight: 700;
  margin: 20px 0;
  color: #281932;
  line-height: 1.2;
}

.story-section h3 {
     font-size: 22px;
    font-weight: 600;
  margin-bottom: 15px;
  color: #333;
}

.story-section p {
  font-size: 1rem;
  margin-bottom: 18px;
  color: #666;
  /* max-width: 550px; */
  line-height: 1.6;
}

.flag-icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.tab-flag {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.stats {
  background: #fff;
  border: 1px solid #e4e4e4;
  padding: 20px;
  border-radius: 15px;
  margin: 15px 0 30px 0;

box-shadow: 0px 15px 15px 0px rgba(0,0,0,0.1);
}

.stats h4 {
  color: #2674E0;
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.stats ul {
  list-style: none;
  padding: 0;
}

.stats li {
  padding: 4px 0;
  color: #666;
  font-size: 0.95rem;
}
.stats li strong{
 
  color: #281932;

}

/* About LATAM Section */
.about-latam-section {
  padding: 80px 40px;
  background: white;
}

.about-container {
  max-width: 1200px;
  margin: 0 auto;
}

.about-image {
  width: 100%;
  height: 400px;
  background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)),
              url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 400"><rect width="1200" height="400" fill="%23e9ecef"/><text x="600" y="200" text-anchor="middle" fill="%23666" font-size="24">&npsp;</text></svg>');
  background-size: cover;
  background-position: center;
  border-radius: 10px;
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
}

.about-content h2 {
  font-size: 2.2rem;
  color: #333;
  margin-bottom: 30px;
  text-align: center;
}

.about-text {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.about-text p {
  color: #666;
  line-height: 1.6;
  font-size: 1rem;
}

/* CTA Section */
.cta-section {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  color: white;
  padding: 80px 40px;
  text-align: center;
}

.cta-container {
  max-width: 800px;
  margin: 0 auto;
}

.cta-section h2 {
  font-size: 2.2rem;
  margin-bottom: 20px;
}

.cta-section p {
  font-size: 1.1rem;
  margin-bottom: 30px;
  opacity: 0.9;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.form-group input {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 5px;
  font-size: 1rem;
}

.submit-cta-btn  {
    display: inline-flex;
    align-items: center;
    padding: 10px 16px;
    border: 1px solid #281932;
    border-radius: 5px;
    color: #281932;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    background-color: transparent;
}

.submit-cta-btn:hover {
    background-color: #281932;
    color: #fff;
}





/* Responsive Design */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .intro-section h1 {
    font-size: 2rem;
  }

  .report-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .map-story-wrapper {
    padding: 0;
    background: white;
    height: auto !important;
  }

  .map-story-container {
    position: relative;
    top: 0;
    height: auto;
    flex-direction: column;
    border-radius: 0;
    margin-bottom: 0;
    box-shadow: none;
    overflow: hidden; /* Prevent any overflow */
  }
  
  .map-container {
    display: none;
  }

  .story-content {
    display: none;
  }

  .mobile-tabs {
    display: block;
    height: 60px;
    border-radius: 0;
    position: relative;
    z-index: 100;
    flex-shrink: 0;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    order: 1;
  }

  .tabs-container {
    background: white;
    height: 100%;
    align-items: center;
  }

  .tab-button {
    min-width: 120px;
  }

  .mobile-map-container {
    display: block;
    height: 40vh; /* Reduced height for more horizontal map */
    position: relative;
    z-index: 1;
    flex-shrink: 0; /* Don't shrink */
    order: 2; /* Second in display order */
  }

  #mobile-map {
    width: 100%;
    height: 100%;
  }

  .mobile-detail-panel {
    position: relative;
    width: 100%;
    height: auto; /* Remaining height after tabs and map */
    background: white;
    border-radius: 0;
    box-shadow: none;
    transform: none;
    overflow: visible; /* allow page to scroll, no inner trap */
    display: block;    /* ensure visible on mobile */
    order: 3
  }

  /* Mobile panel typography: match desktop story-section styles */
  .panel-content h2 {
    font-size: 28px;
        font-weight: 700;
        margin: 20px 0;
        color: #281932;
        line-height: 30px;
  }
  .panel-content h3 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
  }
  .panel-content p {
    font-size: 1rem;
    margin-bottom: 18px;
    color: #666;
    line-height: 1.6;
    max-width: 450px; /* match desktop content width */
  }

.panel-content ul {
  margin-bottom: 24px;
  padding-left: 16px;
  list-style-type: disc;
  list-style-position: inside;

}

  /* Prevent desktop scroll triggers from inflating mobile layout */
  .scroll-trigger {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }
}

/* Flex row for flag + title */
.flag-title {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 30px;
  margin-top: 15px;
}
.flag-title .flag-icon {
  flex: 0 0 48px; /* fixed width as before */
  height: 48px;
}
.flag-title h2 {
  flex: 1 1 auto;
  margin: 0; /* keep compact alignment */
}

/* Remove previous float-based layout to avoid conflicts */
.story-section > .flag-icon,
.panel-content > .flag-icon { float: none; margin-right: 0; }
.story-section > .flag-icon + h2,
.panel-content > .flag-icon + h2 { display: block; overflow: visible; }
.story-section > .flag-icon + h2 + *,
.panel-content > .flag-icon + h2 + * { clear: none; }
