/* Experience Ecuador member listing SEO template styles
   Path: /assets/css/listing-member-seo.css
   Purpose: reusable responsive layout for recommendation member pages.
   Production version: fixes card overflow, gallery captions, map spacing, and global CSS containment.
*/

:root{
  --brand-blue:#034EA2;
  --ink:#0f2f62;
  --text:#1f2a3a;
  --slate:#6E7B8B;
  --bg:#f6f8fb;
  --card:#ffffff;
  --line:rgba(0,0,0,.08);
  --shadow:0 18px 55px rgba(3,78,162,.12);
  --shadow-soft:0 14px 34px rgba(3,78,162,.10);
  --r-xl:24px;
  --r-lg:18px;
  --max:1120px;
}

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

html,
body{
  min-height:100%;
}

body{
  margin:0;
  font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  color:var(--text);
  background:var(--bg);
}

a{
  color:inherit;
  text-decoration:none;
}

a:hover{
  text-decoration:underline;
  text-underline-offset:3px;
}

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

button,
input,
textarea,
select{
  font:inherit;
}

.wrap{
  width:min(var(--max), calc(100% - 36px));
  margin:0 auto;
  padding:38px 0 72px;
}

.breadcrumbs{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
  margin:0 0 14px;
  color:var(--slate);
  font-size:13px;
  font-weight:700;
}

.breadcrumbs a{
  color:var(--ink);
}

.breadcrumbs .sep{
  opacity:.55;
}

/* Language switch */

.rawLangLinks{
  width:min(var(--max), calc(100% - 36px));
  margin:14px auto 0;
  display:flex;
  gap:8px;
  justify-content:flex-start;
  align-items:center;
  flex-wrap:wrap;
}

.rawLangLinks a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:34px;
  padding:7px 12px;
  border-radius:999px;
  border:1px solid rgba(3,78,162,.16);
  background:rgba(255,255,255,.82);
  color:var(--ink);
  font-size:12px;
  font-weight:900;
  line-height:1;
  box-shadow:0 10px 24px rgba(3,78,162,.06);
}

.rawLangLinks a[aria-current="page"]{
  background:var(--brand-blue);
  color:#fff;
  border-color:var(--brand-blue);
  box-shadow:0 14px 30px rgba(3,78,162,.16);
}

/* Hero */

.hero{
  display:grid;
  grid-template-columns:minmax(0,1.02fr) minmax(0,.98fr);
  gap:16px;
  align-items:stretch;
}

.heroCard,
.heroMedia,
.section,
.ctaBand{
  min-width:0;
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--r-xl);
  box-shadow:var(--shadow);
}

.heroCard{
  padding:18px;
}

.heroTop{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:10px;
}

.pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-width:0;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid rgba(3,78,162,.14);
  background:rgba(3,78,162,.06);
  color:var(--ink);
  font-weight:900;
  font-size:12.5px;
  line-height:1;
  white-space:nowrap;
}

h1{
  margin:6px 0 10px;
  font-family:Montserrat,Inter,sans-serif;
  font-weight:800;
  letter-spacing:-.03em;
  line-height:1.06;
  font-size:clamp(34px,4vw,54px);
  color:var(--brand-blue);
  max-width:18ch;
}

.lede{
  margin:0;
  color:#2a2f36;
  line-height:1.75;
  font-size:16px;
  max-width:72ch;
}

.lede + .lede{
  margin-top:10px;
}

.metaRow{
  margin-top:14px;
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
}

.ctaRow{
  margin-top:16px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  max-width:100%;
  min-height:44px;
  padding:12px 14px;
  border-radius:14px;
  font-weight:900;
  font-size:14px;
  line-height:1.15;
  border:1px solid transparent;
  cursor:pointer;
  user-select:none;
  box-shadow:0 14px 30px rgba(3,78,162,.10);
  text-align:center;
}

.btn:hover{
  text-decoration:none;
}

.btnPrimary{
  background:var(--brand-blue);
  color:#fff;
  border-color:rgba(3,78,162,.24);
  box-shadow:0 18px 40px rgba(3,78,162,.18);
}

.btnGhost{
  background:#fff;
  color:var(--ink);
  border-color:rgba(3,78,162,.22);
}

/* Hero carousel */

.heroMedia{
  overflow:hidden;
  position:relative;
  min-height:460px;
  display:flex;
  flex-direction:column;
}

.carousel{
  position:relative;
  width:100%;
  height:100%;
  flex:1;
  min-height:460px;
  background:#eef2f7;
}

.carouselViewport{
  position:absolute;
  inset:0;
  overflow:hidden;
  touch-action:pan-y;
}

.carouselTrack{
  height:100%;
  display:flex;
  transform:translateX(0);
  transition:transform 450ms ease;
  will-change:transform;
}

.carouselSlide{
  min-width:100%;
  height:100%;
  background:#eef2f7;
  position:relative;
}

.carouselSlide img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.phOverlay{
  position:absolute;
  inset:0;
  background:linear-gradient(180deg, rgba(0,0,0,.10), rgba(0,0,0,.04), rgba(0,0,0,.34));
  pointer-events:none;
}

.phLabel{
  position:absolute;
  left:14px;
  right:14px;
  bottom:70px;
  max-height:96px;
  overflow:hidden;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.26);
  background:rgba(0,0,0,.26);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  padding:12px;
  color:#fff;
  box-shadow:0 20px 60px rgba(0,0,0,.20);
  font-weight:900;
  letter-spacing:-.01em;
  line-height:1.3;
}

.carouselControls{
  position:absolute;
  left:14px;
  right:14px;
  bottom:14px;
  z-index:6;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  pointer-events:none;
}

.carouselControls > *{
  pointer-events:auto;
}

.navBtn{
  width:40px;
  height:40px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.38);
  background:rgba(0,0,0,.18);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0;
  flex:0 0 auto;
  box-shadow:0 16px 34px rgba(0,0,0,.24);
}

.navBtn:hover{
  background:rgba(0,0,0,.28);
}

.navBtn span{
  display:block;
  width:10px;
  height:10px;
  border-right:2px solid rgba(255,255,255,.95);
  border-bottom:2px solid rgba(255,255,255,.95);
  opacity:.95;
}

.navBtn.prev span{
  transform:rotate(135deg);
}

.navBtn.next span{
  transform:rotate(-45deg);
}

.dots{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  flex:1 1 auto;
  min-width:0;
}

.dot{
  width:10px;
  height:10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.55);
  background:rgba(0,0,0,.14);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  cursor:pointer;
  padding:0;
  appearance:none;
  -webkit-appearance:none;
  box-shadow:0 12px 26px rgba(0,0,0,.22);
}

.dot.active{
  background:rgba(255,255,255,.92);
  border-color:rgba(255,255,255,.92);
}

/* Sections */

.section{
  margin-top:14px;
  padding:18px;
  box-shadow:var(--shadow-soft);
  overflow:hidden;
}

.h2{
  margin:0 0 10px;
  font-family:Montserrat,Inter,sans-serif;
  font-weight:800;
  letter-spacing:-.02em;
  color:var(--ink);
  font-size:20px;
  line-height:1.18;
}

.p{
  margin:0;
  color:#2a2f36;
  line-height:1.78;
  font-size:14.9px;
  opacity:.98;
  max-width:92ch;
}

.p + .p{
  margin-top:10px;
}

/* Grids */

.grid2,
.nearbyGrid,
.faqGrid,
.linkGrid,
.galleryGrid,
.seoDeepGrid{
  margin-top:12px;
  display:grid;
  gap:12px;
  min-width:0;
}

.grid2,
.faqGrid,
.seoDeepGrid{
  grid-template-columns:repeat(2,minmax(0,1fr));
}

.nearbyGrid,
.linkGrid,
.galleryGrid{
  grid-template-columns:repeat(3,minmax(0,1fr));
}

/* Cards */

.mini,
.nearbyCard,
.faqCard,
.linkCard,
.galleryCard,
details{
  min-width:0;
  border-radius:var(--r-lg);
  overflow:hidden;
  border:1px solid rgba(0,0,0,.06);
  box-shadow:0 16px 35px rgba(3,78,162,.10);
  background:#fff;
}

.mini,
.nearbyCard,
.faqCard,
.linkCard,
details{
  padding:14px;
}

.mini{
  background:rgba(3,78,162,.03);
  box-shadow:0 16px 45px rgba(3,78,162,.10);
}

.nearbyBody,
.faqBody,
.linkBody,
.galleryCap{
  padding:14px;
}

.mini h3,
.nearbyCard h3,
.faqCard h3,
.linkCard h3,
.galleryCard h3,
details summary{
  margin:0 0 8px;
  font-family:Montserrat,Inter,sans-serif;
  font-weight:800;
  letter-spacing:-.02em;
  color:var(--ink);
  font-size:16px;
  line-height:1.25;
  overflow-wrap:anywhere;
}

details summary{
  cursor:pointer;
  list-style:disclosure-closed;
}

details[open] summary{
  list-style:disclosure-open;
}

.bullets{
  margin:0;
  padding-left:18px;
  color:#2a2f36;
  line-height:1.75;
  font-size:14.6px;
}

.bullets li{
  margin:6px 0;
}

.nearbyCard p,
.faqCard p,
.linkCard p,
details p{
  margin:0;
  color:#2a2f36;
  line-height:1.7;
  font-size:14.2px;
  overflow-wrap:anywhere;
}

/* Card text containment for variable-length generated content */

.nearbyCard,
.linkCard,
.faqCard,
details{
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  height:100%;
}

.nearbyCard p,
.linkCard p{
  display:-webkit-box;
  -webkit-line-clamp:4;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

/* Narrative gallery */

.narrativeGallery{
  overflow:hidden;
}

.galleryCard{
  margin:0;
  display:flex;
  flex-direction:column;
  height:100%;
  overflow:hidden;
}

.galleryCard img{
  width:100%;
  aspect-ratio:4 / 3;
  object-fit:cover;
  flex:0 0 auto;
}

.galleryCard figcaption,
.galleryCap{
  display:block;
  padding:12px 14px 14px;
  margin:0;
  background:#fff;
  color:var(--ink);
  font-size:13.5px;
  font-weight:800;
  line-height:1.42;
  overflow-wrap:anywhere;
}

.galleryCard figcaption{
  flex:1 1 auto;
}

/* Map */

.mapSplit{
  margin-top:12px;
  display:grid;
  grid-template-columns:minmax(0,.95fr) minmax(0,1.05fr);
  gap:14px;
  align-items:start;
}

.mapCopy{
  min-width:0;
  border-radius:var(--r-lg);
  border:1px solid rgba(0,0,0,.06);
  background:rgba(3,78,162,.03);
  padding:16px;
  box-shadow:0 16px 45px rgba(3,78,162,.10);
}

.mapCopy .ctaRow{
  margin-top:16px;
}

.mapCard,
.mapEmbed{
  min-width:0;
  min-height:360px;
  border-radius:var(--r-lg);
  overflow:hidden;
  border:1px solid rgba(0,0,0,.08);
  background:#eef2f7;
  box-shadow:0 18px 45px rgba(3,78,162,.12);
}

.mapCard iframe,
.mapEmbed iframe{
  width:100%;
  height:100%;
  min-height:360px;
  display:block;
  border:0;
}

.mapNote{
  margin-top:12px;
  font-size:13px;
  line-height:1.55;
  color:#5f6c7b;
}

.mapCardLink a{
  width:100%;
  height:100%;
  min-height:300px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
  text-align:center;
  color:var(--ink);
  font-family:Montserrat,Inter,sans-serif;
  font-weight:900;
  font-size:18px;
  line-height:1.3;
}

.mapCardLink a span{
  display:inline-flex;
  padding:14px 16px;
  border-radius:999px;
  background:#fff;
  border:1px solid rgba(3,78,162,.16);
  box-shadow:0 16px 35px rgba(3,78,162,.12);
}

/* CTA */

.ctaBand{
  margin-top:14px;
  padding:18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
  box-shadow:var(--shadow-soft);
  background:linear-gradient(180deg, rgba(3,78,162,.06), rgba(3,78,162,.02));
}

.ctaLeft{
  min-width:min(260px,100%);
  flex:1 1 420px;
}

.ctaRight{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  justify-content:flex-end;
}

.ctaBand h2,
.ctaBand h3{
  margin:0 0 6px;
  font-family:Montserrat,Inter,sans-serif;
  font-weight:800;
  letter-spacing:-.02em;
  color:var(--ink);
  font-size:20px;
  line-height:1.18;
}

.ctaBand p{
  margin:0;
  color:#2a2f36;
  opacity:.95;
  line-height:1.6;
  font-size:14.4px;
  max-width:78ch;
}

/* SEO authority helper cards */

.seoDeepCard{
  border-radius:var(--r-lg);
  border:1px solid rgba(0,0,0,.06);
  background:#fff;
  box-shadow:0 16px 35px rgba(3,78,162,.09);
  padding:16px;
  min-width:0;
}

.seoDeepCard h3{
  margin:0 0 8px;
  font-family:Montserrat,Inter,sans-serif;
  font-weight:800;
  letter-spacing:-.02em;
  color:var(--ink);
  font-size:16px;
  line-height:1.25;
}

.seoDeepCard p{
  margin:0;
  color:#2a2f36;
  line-height:1.72;
  font-size:14.4px;
}

.seoDeepCard a{
  color:var(--brand-blue);
  font-weight:900;
  text-decoration:underline;
  text-decoration-thickness:1px;
  text-underline-offset:3px;
}

.authorityList{
  margin:12px 0 0;
  padding-left:18px;
  color:#2a2f36;
  line-height:1.75;
  font-size:14.5px;
}

.authorityList li{
  margin:6px 0;
}

/* Defensive overflow rules for generated pages */

.section,
.heroCard,
.heroMedia,
.mini,
.nearbyCard,
.linkCard,
.galleryCard,
.mapCopy,
.mapCard,
.ctaBand{
  overflow-wrap:anywhere;
}

.nearbyGrid > *,
.linkGrid > *,
.galleryGrid > *,
.grid2 > *,
.faqGrid > *,
.seoDeepGrid > *{
  min-width:0;
}

/* Responsive */

@media (max-width:980px){
  .wrap{
    width:min(var(--max), calc(100% - 28px));
    padding:18px 0 64px;
  }

  .rawLangLinks{
    width:min(var(--max), calc(100% - 28px));
    margin-top:10px;
  }

  .hero,
  .grid2,
  .nearbyGrid,
  .faqGrid,
  .linkGrid,
  .galleryGrid,
  .mapSplit,
  .seoDeepGrid{
    grid-template-columns:1fr;
  }

  .heroMedia,
  .carousel{
    min-height:340px;
  }

  .phLabel{
    bottom:66px;
  }

  .navBtn{
    width:38px;
    height:38px;
  }

  .mapCard,
  .mapEmbed,
  .mapCard iframe,
  .mapEmbed iframe{
    min-height:300px;
  }

  .ctaRight{
    justify-content:flex-start;
  }
}

@media (max-width:620px){
  .wrap{
    width:min(var(--max), calc(100% - 24px));
    padding-bottom:56px;
  }

  .rawLangLinks{
    width:min(var(--max), calc(100% - 24px));
  }

  .section,
  .heroCard,
  .ctaBand{
    padding:16px;
  }

  .heroMedia,
  .carousel{
    min-height:300px;
  }

  .phLabel{
    left:10px;
    right:10px;
    bottom:60px;
    max-height:110px;
    padding:10px;
    font-size:13px;
  }

  .mapCard,
  .mapEmbed,
  .mapCard iframe,
  .mapEmbed iframe{
    min-height:260px;
  }

  .btn{
    width:100%;
  }

  .ctaRight{
    width:100%;
  }

  .ctaRight .btn{
    flex:1 1 100%;
  }
}

@media (prefers-reduced-motion:reduce){
  .carouselTrack{
    transition:none !important;
  }
}
