/* ==========================================================================
   Luxury Yacht Charter Cancun — Design System
   Turquesa/Azul Caribe, mobile-first, responsive
   ========================================================================== */

/* --- Reset & base --- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--surface);
  background-image:
    linear-gradient(180deg, rgba(255,255,255,0.10), rgba(178,235,242,0.20)),
    url('https://www.luxuryyachtchartercancun.com/fondomarcancun.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  min-height: 100vh;
}
img { max-width: 100%; height: auto; display: block; border: 0; }
a { color: var(--brand-dark); text-decoration: none; transition: color .15s; }
a:hover { color: var(--brand); }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.25; color: var(--ink-dark); font-weight: 700; }
h1 { font-size: clamp(1.7rem, 4vw + .5rem, 2.6rem); }
h2 { font-size: clamp(1.4rem, 2.5vw + .3rem, 2rem); }

/* Navy outline on the main headings — adds depth on the turquoise text */
.hero h1,
.page-hero h1,
.section-title h2,
.hero-brand__name {
  -webkit-text-stroke: 1.5px var(--ink-dark);
  text-stroke: 1.5px var(--ink-dark);
  paint-order: stroke fill;
}
/* H1: drop shadow for an extra "lifted" feel */
.hero h1,
.page-hero h1 {
  text-shadow:
    0 2px 4px rgba(13, 36, 56, .25),
    0 4px 12px rgba(13, 36, 56, .15);
}
/* Section-title H2: thinner letterform + a bit of breathing room */
.section-title h2 {
  font-weight: 500;
  letter-spacing: .02em;
}
/* On small screens, soften the outline so letters don't collide */
@media (max-width: 640px) {
  .section-title h2 {
    -webkit-text-stroke: .8px var(--ink-dark);
    text-stroke: .8px var(--ink-dark);
    letter-spacing: .03em;
  }
  .hero h1,
  .page-hero h1 {
    -webkit-text-stroke: 1px var(--ink-dark);
    text-stroke: 1px var(--ink-dark);
  }
}
h3 { font-size: clamp(1.15rem, 1.5vw + .2rem, 1.4rem); }
p  { margin: 0 0 1em; }
ul, ol { padding-left: 1.4em; margin: 0 0 1em; }
button { font: inherit; cursor: pointer; }

/* --- Theme variables --- */
:root {
  --brand:       #00b8d4;     /* turquesa principal */
  --brand-mid:   #009eb2;     /* turquesa medio (para títulos) */
  --brand-dark:  #00838f;     /* turquesa profundo */
  --brand-light: #b2ebf2;     /* turquesa pálido */
  --sky:         #64b5f6;     /* azul cielo */
  --sky-light:   #bbdefb;     /* azul claro */
  --sky-pale:    #e3f2fd;
  --sand:        #fff8e1;     /* arena suave */
  --ink:         #1a3a52;     /* texto */
  --ink-dark:    #0d2438;     /* títulos */
  --muted:       #5c7a8f;
  --surface:     #ffffff;
  --surface-soft:#f4fbfd;
  --shadow-sm:   0 2px 8px rgba(0, 131, 143, .12);
  --shadow-md:   6px 6px 18px rgba(13,36,56,.18), 2px 2px 6px rgba(13,36,56,.10);
  --shadow-lg:   10px 12px 32px rgba(13,36,56,.22), 4px 4px 12px rgba(13,36,56,.12);
  --edge:        1px solid rgba(0, 184, 212, .25);
  --edge-accent: 3px solid #5c7a8f;             /* light slate gray on top+left */
  --edge-shadow: 2px solid rgba(13, 36, 56, .18); /* subtle light shadow right+bottom */
  --radius:      14px;
  --radius-sm:   8px;
  --maxw:        1180px;
}

/* --- Layout container --- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1rem;
}
@media (min-width: 768px) {
  .container { padding: 0 1.5rem; }
}

/* --- Sections --- */
section { padding: 2.5rem 0; }
@media (min-width: 768px) { section { padding: 4rem 0; } }

/* Tighter spacing when a section follows the hero */
.hero { padding-bottom: .25rem; }
.hero + section { padding-top: .25rem; }
@media (min-width: 768px) {
  .hero { padding-bottom: .25rem; }
  .hero + section { padding-top: .25rem; }
}

.section-title {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 1.2rem;
  background: rgba(255,255,255,0.92);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  box-shadow: var(--shadow-sm);
  border: var(--edge);
  border-top: var(--edge-accent);
  border-left: var(--edge-accent);
  border-right: var(--edge-shadow);
  border-bottom: var(--edge-shadow);
}
.section-title h2 { margin-bottom: .4em; color: var(--brand-mid); }
.section-title .eyebrow {
  display: inline-block;
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand-dark);
  font-weight: 600;
  margin-bottom: .6em;
}
.section-title p { color: var(--ink); margin: 0; }

.surface-card {
  background: #ffffff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  border: var(--edge);
  border-top: var(--edge-accent);
  border-left: var(--edge-accent);
  border-right: var(--edge-shadow);
  border-bottom: var(--edge-shadow);
  padding: 1.5rem;
}
@media (min-width: 768px) {
  .surface-card { padding: 2.5rem; }
}

/* ==========================================================================
   Header / Navigation
   Visual order on page: contact-bar (top) → site-header (below, sticky).
   Achieved by putting site-header AFTER contact-bar in DOM via a flex wrapper.
   Body uses a flex column reverse on the first two children.
   ========================================================================== */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
/* The DOM order is .site-header then .contact-bar; we visually swap them.
   Use negative orders so everything else stays at default order 0. */
.contact-bar { order: -2; }
.site-header { order: -1; }
.site-footer { margin-top: auto; }

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid rgba(0, 184, 212, 0.15);
  box-shadow: 0 1px 6px rgba(13, 36, 56, .05);
}
.site-header__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: .6rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.site-brand {
  display: flex; align-items: center; gap: .6rem;
  color: var(--ink-dark);
  font-weight: 700;
  line-height: 1.1;
  font-size: .92rem;
}
.site-brand img { width: 38px; height: 38px; }
.site-brand strong { color: var(--brand-dark); font-size: 1rem; display: block; }
.site-brand small { color: var(--muted); font-weight: 500; font-size: .75rem; display: block; }

.nav-toggle {
  background: var(--brand);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: .55rem .7rem;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.nav-toggle svg { width: 22px; height: 22px; }
@media (min-width: 1024px) { .nav-toggle { display: none; } }

.main-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border-bottom: 1px solid var(--brand-light);
  box-shadow: var(--shadow-md);
  padding: .5rem 0;
}
.main-nav.is-open { display: block; }
.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 75vh;
  overflow-y: auto;
}
.main-nav li { border-bottom: 1px solid var(--sky-pale); }
.main-nav li:last-child { border: 0; }
.main-nav a {
  display: block;
  padding: .85rem 1.2rem;
  color: var(--ink);
  font-weight: 500;
}
.main-nav a:hover, .main-nav a.is-active {
  background: var(--sky-pale);
  color: var(--brand-dark);
}

@media (min-width: 1024px) {
  .main-nav {
    display: block !important;
    position: static;
    background: none;
    border: 0;
    box-shadow: none;
    padding: 0;
  }
  .main-nav ul { display: flex; gap: .2rem; max-height: none; overflow: visible; }
  .main-nav li { border: 0; }
  .main-nav a {
    padding: .55rem .9rem;
    border-radius: 8px;
    font-size: .92rem;
  }
  .main-nav a:hover, .main-nav a.is-active {
    background: var(--brand-light);
    color: var(--brand-dark);
  }
}

/* ==========================================================================
   Buttons / CTAs
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .75rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
  border: 2px solid transparent;
  transition: transform .15s, box-shadow .15s, background .15s, color .15s;
  white-space: nowrap;
  cursor: pointer;
}
.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--brand-dark); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-outline {
  background: rgba(255,255,255,0.9);
  color: var(--brand-dark);
  border-color: var(--brand);
}
.btn-outline:hover { background: var(--brand); color: #fff; }

.btn-whatsapp {
  background: #25d366;
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-whatsapp:hover { background: #1ebe5d; color: #fff; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  padding: 3rem 0 2.5rem;
  text-align: center;
}
.hero > .container {
  background: rgba(255, 255, 255, 0.94);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow-lg);
  border: var(--edge);
  border-top: var(--edge-accent);
  border-left: var(--edge-accent);
  border-right: var(--edge-shadow);
  border-bottom: var(--edge-shadow);
}
.hero h1 {
  color: var(--brand-mid);
}
.hero-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: nowrap;
  margin-bottom: 1.2rem;
  font-family: Georgia, 'Times New Roman', serif;
}
.hero-brand__icon {
  width: 70px;
  height: 70px;
  flex-shrink: 0;
}
.hero-brand__name {
  font-size: clamp(1.5rem, 3vw + .5rem, 2.4rem);
  font-weight: 700;
  color: var(--brand-dark);
  letter-spacing: .01em;
  font-style: italic;
  line-height: 1.1;
  text-align: center;
}
@media (max-width: 540px) {
  .hero-brand__icon { width: 50px; height: 50px; }
  .hero-brand { gap: .5rem; }
}
.hero .lead {
  font-size: clamp(1rem, 1.5vw + .5rem, 1.2rem);
  color: var(--ink);
  max-width: 760px;
  margin: 0 auto 1.5rem;
}
.hero-cta {
  display: flex;
  gap: .8rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.hero-image {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin: 1.5rem auto 0;
  max-width: 900px;
}

/* TripAdvisor badge — sits where the hero image used to be */
.tripadvisor-badge {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 1.5rem auto 0;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.97);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  min-height: 130px;
  max-width: 320px;
}
.tripadvisor-badge .TA_selfserveprop,
.tripadvisor-badge .TA_selfserveprop * {
  margin: 0 auto !important;
}

/* ==========================================================================
   Contact bar (phones/whatsapp)
   ========================================================================== */
.contact-bar {
  background: linear-gradient(180deg, rgba(13,36,56,1), rgba(13,36,56,.95));
  color: #fff;
  padding: 1rem 0;
  text-align: center;
}
.contact-bar a { color: #fff; font-weight: 600; }
.contact-bar a:hover { color: var(--sand); }
.contact-bar__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .6rem 1.2rem;
  font-size: .95rem;
  align-items: center;
}
.contact-bar__row strong { font-size: 1.05rem; }
.contact-bar__icon {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}
.contact-bar__icon img,
.contact-bar__icon svg,
.contact-bar__icon .cb-ico { width: 18px; height: 18px; flex-shrink: 0; }

/* Footer SVG icons */
.foot-ico {
  width: 16px;
  height: 16px;
  vertical-align: -3px;
  margin-right: .35rem;
  flex-shrink: 0;
}

/* ==========================================================================
   Grids (cards / fleet / marinas)
   ========================================================================== */
.card-grid {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: 1fr;
}
@media (min-width: 560px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .card-grid--3 { grid-template-columns: repeat(3, 1fr); }
}

.card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: var(--edge);
  transition: transform .2s, box-shadow .2s, border-color .2s;
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--brand);
}
.card__media {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--sky-pale);
}
.card__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .3s;
}
.card:hover .card__media img { transform: scale(1.04); }
.card__body { padding: 1rem 1.1rem 1.2rem; flex: 1; display: flex; flex-direction: column; }
.card__title {
  font-size: 1.05rem;
  color: var(--ink-dark);
  margin: 0 0 .35em;
  font-weight: 700;
}
.card__meta {
  font-size: .82rem;
  color: var(--muted);
  margin-bottom: .5em;
}
.card__excerpt {
  font-size: .9rem;
  color: var(--ink);
  margin: 0 0 .8em;
  flex: 1;
}
.card a.card__cover {
  color: inherit;
  display: flex; flex-direction: column;
  height: 100%;
  text-decoration: none;
}

/* ==========================================================================
   Page content (article)
   ========================================================================== */
.page {
  padding: 2rem 0 3rem;
}
/* When .page follows a .page-hero panel, cut the gap drastically so the
   first card grid doesn't float in empty space. */
.page-hero + .page,
.page-hero + main.page {
  padding-top: 0;
}
.page-hero + .page > .container > section:first-child,
.page-hero + main.page > .container > section:first-child {
  padding-top: .25rem;
}
.page-hero {
  text-align: center;
  padding: 2rem 1rem;
  margin: 1.5rem auto .25rem;
  background: rgba(255, 255, 255, 0.94);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  border: var(--edge);
  border-top: var(--edge-accent);
  border-left: var(--edge-accent);
  border-right: var(--edge-shadow);
  border-bottom: var(--edge-shadow);
}
.page-hero h1 {
  color: var(--brand-mid);
}
.page-hero .breadcrumbs {
  font-size: .85rem;
  color: var(--muted);
  margin-bottom: .8rem;
}
.page-hero .breadcrumbs a { color: var(--brand-dark); }
.page-hero .lead { color: var(--ink); max-width: 760px; margin: 0 auto; }
.page-hero__image {
  margin: 1.2rem auto 0;
  max-width: 900px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.page-hero__image img {
  width: 100%;
  height: auto;
  display: block;
}

.article {
  background: #ffffff;
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  border: var(--edge);
  border-top: var(--edge-accent);
  border-left: var(--edge-accent);
  border-right: var(--edge-shadow);
  border-bottom: var(--edge-shadow);
}
@media (min-width: 768px) { .article { padding: 2.5rem 3rem; } }

.article p { margin: 0 0 1.1em; }
.article h2, .article h3 { margin-top: 1.4em; }
.article h2:first-child, .article h3:first-child { margin-top: 0; }

.article img {
  border-radius: var(--radius-sm);
  margin: 1rem auto;
  box-shadow: var(--shadow-sm);
}

.article iframe {
  width: 100%;
  max-width: 800px;
  aspect-ratio: 16/9;
  border-radius: var(--radius-sm);
  display: block;
  margin: 1.2rem auto;
  border: 0;
  box-shadow: var(--shadow-md);
}

/* Gallery (when article has many images) */
.article .gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: .8rem;
  margin: 1.5rem 0;
}
.article .gallery img {
  margin: 0;
  cursor: zoom-in;
  aspect-ratio: 4/3;
  object-fit: cover;
  width: 100%;
}

/* Contact page icons */
.contact-ico {
  width: 56px;
  height: 56px;
  display: block;
  margin: 0 auto .8rem;
  color: var(--brand-dark);
}

/* Yacht star rating */
.stars {
  display: inline-block;
  color: #ffb300;
  font-size: 1.5rem;
  letter-spacing: .1em;
  line-height: 1;
  margin: .3rem 0;
  text-shadow: 0 1px 2px rgba(0,0,0,.12);
}

/* Captions */
.caption {
  text-align: center;
  color: var(--muted);
  font-size: .9rem;
  font-style: italic;
  margin: .3rem 0 1rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: linear-gradient(180deg, rgba(13,36,56,.95), rgba(13,36,56,1));
  color: #c0d8ea;
  padding: 2.5rem 0 1rem;
  margin-top: 3rem;
}
.site-footer a { color: var(--sky-light); }
.site-footer a:hover { color: #fff; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: .8em; }
.footer-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: .4em; font-size: .92rem; }
.site-footer .copyright {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: .85rem;
  text-align: center;
  opacity: .8;
}

/* ==========================================================================
   Lightbox
   ========================================================================== */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.92);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  cursor: zoom-out;
}
.lightbox.is-open { display: flex; }
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 10px 60px rgba(0,0,0,.8);
}
.lightbox__close {
  position: absolute;
  top: 1rem; right: 1rem;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  border: 0;
  color: #fff;
  font-size: 1.4rem;
  display: flex; align-items: center; justify-content: center;
}

/* ==========================================================================
   Utility
   ========================================================================== */
.text-center { text-align: center; }
.muted { color: var(--muted); }
.mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; } .mb-2 { margin-bottom: 2rem; }
.hidden { display: none !important; }
.flex-center { display: flex; align-items: center; justify-content: center; gap: .5rem; flex-wrap: wrap; }

/* Tags / chips */
.tags { display: flex; gap: .35rem; flex-wrap: wrap; }
.chip {
  display: inline-block;
  padding: .25rem .7rem;
  border-radius: 999px;
  background: var(--sky-pale);
  color: var(--brand-dark);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .02em;
}
.chip--solid { background: var(--brand); color: #fff; }

/* Tables in old content — neutralize odd inline styles */
.article table {
  width: 100% !important;
  max-width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}
.article table td, .article table th {
  padding: .6rem;
  vertical-align: top;
}
.article table img {
  margin: 0 auto;
}

/* Tame old font tags inherited from imported content */
.article font {
  color: inherit !important;
  font-family: inherit !important;
  font-size: inherit !important;
}
.article font[color] { color: var(--ink) !important; }
.article font[size="1"], .article font[size="2"] { font-size: .95em !important; }
.article font[size="3"] { font-size: 1em !important; }
.article font[size="4"] { font-size: 1.1em !important; }
.article font[size="5"] { font-size: 1.25em !important; }

/* Old <br> spam → tighter */
.article br + br { display: none; }

/* ==========================================================================
   Legacy table-as-divs ( leg-block / leg-row / leg-cell )
   ========================================================================== */
.article .leg-block { margin: 1rem 0; }
.article .leg-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-start;
}
.article .leg-cell {
  flex: 1 1 240px;
  min-width: 0;
}
.article .leg-cell img { width: 100%; height: auto; }

/* Video embed wrapper */
.article .video-embed {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 1.5rem auto;
  aspect-ratio: 16/9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.article .video-embed iframe {
  width: 100%; height: 100%;
  border: 0;
  position: absolute; inset: 0;
}
