body { margin: 0; padding: 0; }

  .tdm-wrapper {
    --coral: #E8485A;
    --salmon: #F2A07A;
    --salmon-pastel: #F2C4B6;
    --teal: #2AABAA;
    --cream: #FDF6EE;
    --button-yellow: #F8EDC3;
    --button-yellow-hover: #F3E3AE;
    --button-yellow-border: #E3D4A3;
    --dark: #2D1810;
    --white: #FFFFFF;
    --shadow: 0 4px 20px rgba(45,24,16,0.1);
    --shadow-hover: 0 8px 30px rgba(232,72,90,0.2);
  }

  /* ============ RESET LIGERO ============ */
  .tdm-wrapper, .tdm-wrapper * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }

  .tdm-wrapper {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--dark);
    background: var(--cream);
    line-height: 1.6;
    overflow-x: hidden;
  }

  .tdm-wrapper h1, .tdm-wrapper h2, .tdm-wrapper h3 {
    font-family: 'Playfair Display', 'Didot', 'Bodoni Moda', 'Iowan Old Style', 'New York', Georgia, 'Times New Roman', serif;
    font-weight: 700;
    line-height: 1.2;
  }

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

  .tdm-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
  }

  /* ============ HERO ============ */
  .tdm-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    background:
      linear-gradient(180deg, rgba(15,74,82,0.15) 0%, rgba(15,74,82,0.55) 100%),
      url('tribus-hero-sunset.jpg') center/cover;
    padding: 56px 24px;
  }

  /* Placeholder visual si no hay foto todavía */
  .tdm-hero[data-nophoto] {
    background: linear-gradient(135deg, var(--coral) 0%, var(--salmon) 50%, var(--teal) 100%);
  }

  .tdm-hero-content { max-width: 800px; }

  .tdm-hero h1 {
    font-size: clamp(2.5rem, 6vw, 5rem);
    margin-bottom: 12px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.3);
  }

  #tdm-hero-heading { font-style: italic; font-weight: 400; }
  #tdm-hero-heading, #tdm-hero-heading + p {
    text-shadow: 0 1px 3px rgb(7 34 41 / 95%), 0 2px 12px rgb(0 0 0 / 75%);
  }
  #tdm-hero-heading + p { text-wrap: balance; }
  /* Baja el título, el subtítulo y los botones sin mover el logotipo: el desplazamiento relativo no altera la altura centrada del bloque. */
  .tdm-hero-content > :not(.tdm-hero-logo-frame) { position: relative; top: clamp(14px, 2.5vw, 28px); }

  .tdm-hero p {
    font-size: clamp(0.95rem, 1.6vw, 1.15rem);
    /* Conserva el alto de línea del tamaño anterior para que el logotipo no se desplace. */
    line-height: calc(1.6 * clamp(1.1rem, 2vw, 1.4rem));
    margin-bottom: 24px;
    font-weight: 300;
  }

  .tdm-hero .tdm-hero-tagline {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.25rem;
    color: #F5DD78;
    margin: 8px auto 12px;
    max-width: 620px;
    line-height: 1.4;
  }

  .tdm-hero .tdm-location {
    position: absolute;
    top: 24px;
    left: 24px;
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(10px);
    color: #0F4A52;
    padding: 6px 14px;
    border-radius: 24px;
    font-size: 0.82rem;
    letter-spacing: 0.5px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 5;
  }
  .tdm-hero .tdm-location:hover { background: rgba(255,255,255,0.95); }
  @media (max-width: 600px) {
    .tdm-hero .tdm-location { top: 16px; left: 16px; font-size: 0.72rem; padding: 5px 11px; }
  }

  .tdm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 24px;
    border-radius: 30px;
    font-weight: 700;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    letter-spacing: 0.5px;
  }

  /* Botones con paleta pastel inspirada en identidad visual (QR + logo teal) */
  .tdm-btn-secondary {
    background: #7DCDC4; /* turquesa pastel */
    color: #0F4A52;
    box-shadow: 0 4px 15px rgba(125,205,196,0.35);
  }

  .tdm-btn-secondary:hover {
    background: #5EBDB1;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(125,205,196,0.5);
  }

  .tdm-btn-primary {
    background: var(--button-yellow);
    color: #0F4A52;
    border: 2px solid var(--button-yellow-border);
    box-shadow: 0 4px 15px rgb(146 119 38 / 14%);
  }

  .tdm-btn-primary:hover {
    background: var(--button-yellow-hover);
    transform: translateY(-2px);
  }

  .tdm-btn-whatsapp {
    background: #A8E6CF; /* verde menta pastel */
    color: #0F4A52;
    box-shadow: 0 4px 15px rgba(168,230,207,0.5);
  }

  .tdm-btn-whatsapp:hover {
    background: #8DD9B9;
    color: #0F4A52;
    transform: translateY(-2px);
  }

  .tdm-btn-ghost {
    background: transparent;
    color: #F2A07A;
    border: 2px solid #F5B5C0; /* rosa pastel */
  }

  .tdm-btn-ghost:hover {
    background: #F5B5C0;
    color: white;
  }

  /* ============ SECCIONES GENERALES ============ */
  .tdm-section {
    padding: 56px 0;
  }

  .tdm-section-alt { background: white; }

  .tdm-section-header {
    text-align: center;
    margin-bottom: 36px;
  }

  .tdm-section-header .tdm-eyebrow {
    display: inline-block;
    color: var(--teal);
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 0.85rem;
    margin-bottom: 8px;
  }

  .tdm-section-header h1, .tdm-section-header h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--dark);
    margin-bottom: 10px;
  }

  .tdm-section-header p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    color: #666;
  }

  /* ============ FLOTA ============ */
  .tdm-flota-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
    align-items: start;
    gap: 22px;
  }

  .tdm-boat-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }

  .tdm-boat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
  }

  .tdm-boat-info .tdm-boat-model {
    color: #888;
    font-size: 0.95rem;
    margin-bottom: 12px;
    font-style: italic;
  }

  .tdm-boat-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #eee;
  }

  .tdm-spec {
    background: var(--cream);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--dark);
  }

  /* ============ EXPERIENCIAS ============ */
  .tdm-packs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
  }

  .tdm-pack-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }

  .tdm-pack-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
  }

  .tdm-pack-photo {
    aspect-ratio: 4/3;
    background-size: cover;
    background-position: center;
    background-color: #e8e8e8;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-weight: 600;
    text-align: center;
    padding: 20px;
  }

  .tdm-pack-photo::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 60%, rgba(0,0,0,0.3));
    pointer-events: none;
  }

  .tdm-pack-duration {
    background: var(--coral);
    color: white;
    padding: 3px 9px;
    border-radius: 20px;
    font-weight: 700;
  }

  .tdm-pack-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
  }

  .tdm-pack-body h3 {
    font-size: 1.5rem;
    color: var(--dark);
    margin-bottom: 8px;
  }

  .tdm-pack-schedule {
    color: var(--teal);
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 14px;
  }

  .tdm-pack-description {
    color: #555;
    margin-bottom: 12px;
    font-size: 0.95rem;
    flex: 1;
  }

  .tdm-pack-includes {
    font-size: 0.85rem;
    color: #777;
    padding: 8px 10px;
    background: var(--cream);
    border-radius: 10px;
    border-left: 3px solid var(--salmon);
  }

  .tdm-pack-buttons {
    display: flex;
    gap: 8px;
    margin-top: 12px;
  }

  .tdm-pack-buttons .tdm-btn {
    flex: 1;
    padding: 9px 12px;
    font-size: 0.9rem;
    text-align: center;
  }

  /* ============ CALENDARIO ============ */
  .tdm-calendar-wrapper {
    background: white;
    border-radius: 20px;
    padding: 22px;
    box-shadow: var(--shadow);
    max-width: 900px;
    margin: 0 auto;
  }

  .tdm-calendar-legend {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    font-size: 0.9rem;
  }

  .tdm-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .tdm-legend-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
  }

  .tdm-dot-available { background: var(--teal); }
  .tdm-dot-booked { background: #ccc; }
  .tdm-dot-selected { background: var(--coral); }

  .tdm-calendar-months {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
  }

  .tdm-month {
    text-align: center;
  }

  .tdm-month-name {
    font-family: 'Playfair Display', 'Didot', 'Bodoni Moda', 'Iowan Old Style', 'New York', Georgia, 'Times New Roman', serif;
    font-size: 1.3rem;
    color: var(--dark);
    margin-bottom: 8px;
    text-transform: capitalize;
    font-weight: 600;
  }

  .tdm-weekdays, .tdm-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
  }

  .tdm-weekday {
    font-size: 0.75rem;
    color: #999;
    font-weight: 700;
    text-transform: uppercase;
    padding: 6px 0;
  }

  .tdm-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    background: var(--cream);
    color: var(--dark);
    position: relative;
  }

  .tdm-day-empty { background: transparent; cursor: default; }
  .tdm-day-past { color: #ccc; cursor: not-allowed; background: transparent; }
  .tdm-day-booked { background: #e0e0e0; color: #999; cursor: not-allowed; text-decoration: line-through; }
  .tdm-day-selected { background: var(--coral) !important; color: white !important; transform: scale(1.1); box-shadow: 0 4px 12px rgba(232,72,90,0.4); }

  .tdm-selected-info {
    background: linear-gradient(180deg, #FDF6EE 0%, #FCEDE8 100%);
    color: #0F4A52;
    padding: 28px 24px;
    border-radius: 20px;
    margin-top: 24px;
    display: none;
    text-align: center;
    font-weight: 500;
    border: 2px solid #F5B5C0;
    box-shadow: 0 4px 20px rgba(242, 160, 122, 0.15);
  }

  .tdm-selected-info.active { display: block; }

  /* ============ CONTACTO / FOOTER ============ */
  .tdm-contact {
    background: linear-gradient(180deg, #0F4A52 0%, #2AABAA 100%);
    color: white;
    text-align: center;
  }

  .tdm-contact h2 { color: white; margin-bottom: 12px; }
  .tdm-contact .tdm-container > p { opacity: 0.95; font-size: 1.1rem; }

  .tdm-footer {
    background: var(--dark);
    color: var(--cream);
    padding: 22px 24px;
    text-align: center;
    font-size: 0.9rem;
  }

  .tdm-footer-brand {
    font-family: 'Playfair Display', 'Didot', 'Bodoni Moda', 'Iowan Old Style', 'New York', Georgia, 'Times New Roman', serif;
    font-size: 1.3rem;
    margin-bottom: 8px;
    color: white;
  }

  .tdm-footer-tag {
    opacity: 0.7;
    font-style: italic;
    font-size: 0.8rem;
    margin-bottom: 8px;
  }

  /* ============ RESPONSIVE ============ */
  @media (max-width: 600px) {
    .tdm-section { padding: 42px 0; }
    .tdm-section-header { margin-bottom: 26px; }
    .tdm-pack-buttons { flex-direction: column; }
    .tdm-calendar-wrapper { padding: 14px; }
    /* Formularios: 1 columna en móvil */
    #tdm-reserva-form > div[style*="grid-template-columns:1fr 1fr"],
    .tdm-selected-info > div[style*="grid-template-columns:1fr 1fr"] {
      grid-template-columns: 1fr !important;
    }
    .tdm-selected-info select,
    .tdm-selected-info input,
    #tdm-reserva-form select,
    #tdm-reserva-form input,
    #tdm-reserva-form textarea {
      font-size: 16px !important; /* evita zoom iOS */
    }
    /* Hero: título más pequeño y botón WhatsApp flotante no se come el contenido */
    .tdm-hero h1 { font-size: min(2.2rem, calc((100vw - 40px) / 10.8)) !important; line-height: 1.15; }
    .tdm-hero p { font-size: 0.875rem; line-height: 1.6rem; }
    #tdm-hero-heading + p { margin-inline: -8px; }
    /* Ocasiones especiales: imagen y texto apilados */
    #ocasiones-especiales img { max-height: 280px; object-fit: cover; }
    /* Tablas de tarifas: scroll horizontal natural */
    #tdm-tarifas-detalle table { font-size: 0.85em; }
  }

  /* Subtítulo de la portada: reserva las dos líneas que ocupaba con su tamaño anterior para que el logotipo no se desplace. */
  @media (max-width: 549px) { html:not([lang^="en"]) .tdm-hero p { min-height: 3.2rem; } }
  @media (max-width: 466px) { html[lang^="en"] .tdm-hero p { min-height: 3.2rem; } }

  /* ============ OCASIONES ESPECIALES · TRANSICIÓN ENTRE SECCIONES ============ */
  /* Enlaza el fondo de "Tarifas" (#FFF9F0) con el de "Clases en el mar" (#FDF6EE) */
  #ocasiones-especiales { padding: 44px 0; }
  #ocasiones-especiales li:not(:last-child) { border-bottom: 1px solid var(--salmon-pastel); }
  .tdm-occasion-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
    gap: clamp(18px, 3vw, 28px);
    align-items: center;
  }
  .tdm-occasion-grid ul { list-style: none; margin-top: 14px; color: #555; }
  .tdm-occasion-grid li { padding: 7px 0; }
  .tdm-occasion-grid .tdm-btn { margin-top: 16px; }
  @media (max-width: 600px) {
    #ocasiones-especiales { padding: 32px 0; }
  }

  /* ============ AVISO SOLICITUD DE RESERVA (formularios) ============ */
  .tdm-form-note {
    max-width: 560px;
    margin: 16px auto 0;
    font-size: 0.84rem;
    line-height: 1.55;
    color: #5d6f71;
    background: rgba(215,232,229,0.55);
    border-radius: 10px;
    padding: 10px 14px;
    text-align: left;
  }
  /* ============ NAVEGACIÓN DEL CALENDARIO ============ */
  .tdm-cal-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
  }
  .tdm-cal-nav button {
    font-family: inherit;
    background: var(--booking-field);
    color: var(--booking-ink);
    border: 1px solid var(--booking-control-border);
    border-radius: 20px;
    padding: 8px 16px;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  }
  .tdm-cal-nav .tdm-cal-season { background: var(--booking-mint); }
  .tdm-cal-nav button:hover:not(:disabled, [aria-disabled="true"]) { background: var(--booking-hover); border-color: var(--booking-accent); }

.tdm-site-header {
  background: #FFF9F0;
  color: #0F4A52;
  border-bottom: 1px solid #E9D9CC;
}

.tdm-container.tdm-site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px 24px;
  min-height: 62px;
  padding-right: 100px;
}

.tdm-site-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: inherit;
  text-decoration: none;
  font: 700 1.2rem 'Playfair Display', Georgia, serif;
  white-space: nowrap;
}

.tdm-site-brand img { flex: none; width: auto; height: 36px; }

/* Franja de enlaces en salmón claro (el --salmon-pastel de la marca); «Tribus del Mar» sigue en crema. */
.tdm-site-nav {
  display: flex;
  column-gap: clamp(8px, 2.7vw, 30px);
  flex-wrap: wrap;
  padding: 0 clamp(12px, 2vw, 22px);
  border-radius: 22px;
  background: #F2C4B6;
}

.tdm-site-nav a,
.tdm-boat-filter a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  color: inherit;
  font-weight: 700;
  text-decoration: none;
}

.tdm-site-nav a:is(:hover, [aria-current]) {
  text-decoration: underline 2px #0F4A52;
  text-underline-offset: 5px;
}

.tdm-home-experiences { padding: clamp(22px, 4vw, 42px) 0; }
.tdm-home-intro { margin-bottom: 12px; color: #0F4A52; }
.tdm-home-intro h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }

.tdm-home-trips {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px 12px;
}

.tdm-home-trips a {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 10px 12px;
  border-top: 2px solid #7DCDC4;
  border-radius: 0 0 9px 9px;
  background: #FFF9F0;
  color: #0F4A52;
  font-weight: 700;
  text-decoration: none;
}

.tdm-home-trips a:hover { background: #E7F4EF; }
.tdm-home-trips span { font-size: 0.875rem; font-weight: 600; }

.tdm-boat-filter {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin-bottom: 8px;
  color: var(--booking-ink);
}

.tdm-boat-filter a { padding: 0 12px; border-radius: 22px; }
.tdm-boat-filter a:hover { background: var(--booking-hover); }
.tdm-boat-filter a[aria-current] { background: var(--booking-ink); color: white; }

.tdm-wrapper .tdm-footer a { color: inherit; }
.tdm-footer-classes { display: inline-flex; align-items: center; min-height: 44px; font-size: 0.88rem; text-underline-offset: 3px; }

@media (max-width: 680px) {
  .tdm-container.tdm-site-header-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-inline: 12px;
  }
  .tdm-site-brand { align-self: flex-start; }
  .tdm-site-nav { justify-content: space-between; margin-inline: -12px; padding-inline: 12px; border-radius: 0; border-top: 1px solid #E3A994; font-size: 0.875rem; }
  .tdm-home-trips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tdm-wrapper .tdm-footer { padding-bottom: var(--tdm-wa-clearance); }
}

