/* ===============================
   BLOG SINGLE — Dominican To Do
================================ */

/* HERO PARALLAX */
.single-hero {
  position: relative;
  height: 360px;
  overflow: hidden;
}

.single-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translateY(0);
  transition: transform 0.2s linear;
  will-change: transform;
}

.single-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.30),
    rgba(0,0,0,0.55)
  );
}

.single-hero-content {
  position: absolute;
  bottom: 40px;
  left: 40px;
  max-width: 700px;
  color: #fff;
}

.single-hero-category {
  display: inline-block;
  background: #2850ff;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: .78rem;
  letter-spacing: 0.05em;
}

.single-hero-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin: 12px 0 6px;
}

.single-hero-sub {
  font-size: 1rem;
  color: #f0f0f0;
}

/* META */
.single-meta {
  background: #fff;
  padding: 16px 0;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.single-meta-box {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: #555;
}

.single-meta-box span i {
  color: #2850ff;
  margin-right: 6px;
}

/* CONTENIDO */
.single-post {
  padding: 40px 0;
  background: #fff;
}

.single-content {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.single-content h2 {
  margin: 32px 0 14px;
  color: #111;
}

.single-content p {
  color: #444;
  line-height: 1.65;
  margin-bottom: 18px;
}

/* IMÁGENES */
.single-img img {
  width: 100%;
  border-radius: 12px;
  margin: 22px 0;
}

/* CONSEJOS */
.single-tip {
  background: #eaf0ff;
  border-left: 4px solid #2850ff;
  padding: 14px 16px;
  border-radius: 8px;
  margin: 22px 0;
  color: #2850ff;
  font-size: 0.93rem;
}

.single-tip i {
  margin-right: 6px;
}

/* TOC (Tabla de contenido) */
.single-toc {
  position: sticky;
  top: 120px;
  max-width: 240px;
  margin-bottom: 40px;
  float: right;
  margin-left: 40px;
}

.toc-title {
  font-weight: bold;
  margin-bottom: 8px;
}

#toc-list a {
  display: block;
  margin-bottom: 6px;
  color: #2850ff;
  font-size: 0.9rem;
}

/* CTA */
.single-cta {
  background: #f6f8ff;
  padding: 28px;
  border-radius: 12px;
  text-align: center;
  margin: 40px 0;
}

.single-cta h3 {
  margin: 0 0 6px;
}

.single-cta p {
  margin-bottom: 18px;
  color: #555;
}

.cta-btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 999px;
  background: #2850ff;
  color: #fff;
  margin: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.15s ease;
}

.cta-btn:hover {
  transform: translateY(-2px);
}

.cta-btn.airbnb {
  background: #ff385c;
}

/* RELACIONADOS */
.single-related {
  background: #fafafa;
  padding: 40px 0;
}

.single-related h2 {
  margin-bottom: 20px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.related-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: #111;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: transform .15s ease, box-shadow .15s ease;
}

.related-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.13);
}

.related-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.related-title {
  display: block;
  padding: 12px;
  font-size: 0.95rem;
}

/* GALERÍA DE FOTOS SLIDER */
.city-gallery-section {
  margin: 3rem 0;
}

.city-gallery-slider {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  background: #f9fafb;
}

.gallery-track-container {
  width: 100%;
  overflow: hidden;
}

.gallery-track {
  display: flex;
  transition: transform 0.4s ease-in-out;
}

.gallery-track img {
  width: 100%;
  height: 450px;
  object-fit: cover;
  flex-shrink: 0;
  border-radius: 12px;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.95);
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #1f2937;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
  z-index: 10;
}

.gallery-nav:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.gallery-nav:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.gallery-nav:disabled:hover {
  transform: translateY(-50%) scale(1);
}

.gallery-nav-prev {
  left: 16px;
}

.gallery-nav-next {
  right: 16px;
}

.gallery-indicators {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 1rem;
}

.gallery-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d1d5db;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  padding: 0;
}

.gallery-indicator.active {
  background: #2850ff;
  width: 28px;
  border-radius: 5px;
}

.gallery-indicator:hover {
  background: #9ca3af;
}

/* RESPONSIVE */
@media(max-width: 900px){
  /* Single hero más compacto en tablet/móvil */
  .single-hero { height: 280px; }
  .single-hero-content { bottom: 24px; left: 20px; right: 20px; max-width: 100%; }
  .single-hero-title { font-size: clamp(1.4rem, 5vw, 2rem); }

  /* Meta bar: apilar en columna en pantallas pequeñas */
  .single-meta-box { gap: 10px; font-size: 0.85rem; }

  /* Oculta la navegación del TOC pero mantiene el rating widget visible */
  .single-toc #toc-list,
  .single-toc .toc-title { display: none; }
  .single-toc {
    position: static;
    float: none;
    width: 100%;
    max-width: 100%;
    margin: 0 0 1.5rem;
  }

  /* Rating widget: ancho completo centrado + más padding */
  .dttd-rating-widget {
    margin-top: 0;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    padding: 1.25rem 1rem;
  }

  .single-content { margin: 0 16px; }

  /* Galería grid: 1 columna en tablet */
  #galleryGrid { grid-template-columns: 1fr 1fr !important; }
}

@media(max-width: 600px){
  .single-hero { height: 220px; }
  .single-hero-title { font-size: clamp(1.2rem, 6vw, 1.7rem); }

  /* Rating widget centrado, stars más grandes en móvil */
  .dttd-rating-widget { max-width: 100%; }
  .rating-star { font-size: 1.4rem; padding: 0.15rem 0.1rem; }
  .rating-stars { gap: 0.25rem; }

  /* CTA en móvil: full width */
  .cta-btn { display: block; text-align: center; margin: 6px 0; }
  .single-cta { padding: 20px 16px; }

  /* Galería: 1 columna en móvil */
  #galleryGrid { grid-template-columns: 1fr !important; }
  .gallery-track img { height: 220px; }
}

/* ── Rating Widget ──────────────────────────────────────────────────────────── */
.dttd-rating-widget {
  background: #f6f8ff;
  border: 1px solid #e0e7ff;
  border-radius: 0.75rem;
  padding: 1rem 0.75rem;
  text-align: center;
  margin-top: 1.5rem;
}

.rating-title {
  font-weight: 700;
  font-size: 0.78rem;
  color: #374151;
  margin: 0 0 0.6rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.rating-stars {
  display: flex;
  justify-content: center;
  gap: 0.15rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.rating-star {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  color: #d1d5db;
  transition: color .15s, transform .1s;
  padding: 0.1rem 0.05rem;
  line-height: 1;
}

.rating-star:hover,
.rating-star.active {
  color: #f59e0b;
  transform: scale(1.25);
}

.rating-star.voted {
  color: #f59e0b;
  cursor: default;
  transform: none;
}

.rating-widget-done .rating-star:not(.voted) {
  color: #d1d5db;
  cursor: default;
}

.rating-meta {
  font-size: 0.72rem;
  color: #6b7280;
  margin: 0;
  line-height: 1.4;
}

/* ── Rating Breakdown bars ─────────────────────── */
#ratingBreakdown {
  margin-top: 0.75rem;
  display: none;
}
.rating-bd-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.rating-bd-row {
  display: grid;
  grid-template-columns: 2rem 1fr 1.6rem;
  align-items: center;
  gap: 0.35rem;
}
.rating-bd-label {
  font-size: 0.65rem;
  color: #9ca3af;
  text-align: right;
  white-space: nowrap;
}
.rating-bd-label .fa-solid {
  font-size: 0.55rem;
  color: #f59e0b;
  margin-left: 1px;
}
.rating-bd-bar {
  height: 6px;
  background: #e5e7eb;
  border-radius: 3px;
  overflow: hidden;
}
.rating-bd-fill {
  height: 100%;
  background: #f59e0b;
  border-radius: 3px;
  transition: width 0.3s ease;
}
.rating-bd-count {
  font-size: 0.62rem;
  color: #9ca3af;
  text-align: left;
}

@media(max-width: 700px){
  .related-grid { grid-template-columns: 1fr; }

  .gallery-track img { height: 260px; }

  .gallery-nav { width: 40px; height: 40px; font-size: 1rem; }
  .gallery-nav-prev { left: 8px; }
  .gallery-nav-next { right: 8px; }

  /* TOC show/hide toggle en móvil */
  .single-toc .toc-toggle { display: flex; }
  #toc-list.toc-collapsed { display: none; }
}

/* ── Breadcrumb ─────────────────────────────────────────── */
.dttd-breadcrumb {
  background: #f9fafb;
  border-bottom: 1px solid #f3f4f6;
  padding: .55rem 0;
}
.dttd-bc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .25rem .15rem;
  font-size: .8rem;
  color: #9ca3af;
}
.dttd-bc-list li { display: flex; align-items: center; gap: .25rem; }
.dttd-bc-list a { color: #6b7280; text-decoration: none; transition: color .15s; }
.dttd-bc-list a:hover { color: #2850ff; }
.dttd-bc-list .fa-chevron-right { font-size: .55rem; color: #d1d5db; }
.dttd-bc-current span { color: #374151; font-weight: 500;
  max-width: 260px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }

/* ── Social Share ───────────────────────────────────────── */
.dttd-social-share {
  margin-top: 1.25rem;
  padding-top: 1.1rem;
  border-top: 1px solid #f3f4f6;
}
.dttd-share-btns {
  display: flex;
  gap: .45rem;
  flex-wrap: wrap;
  margin-top: .4rem;
}
.dttd-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: .9rem;
  text-decoration: none;
  transition: transform .15s, opacity .15s;
}
.dttd-share-btn:hover { transform: scale(1.1); opacity: .85; }
.dttd-share-wa   { background: #25d366; color: #fff; }
.dttd-share-fb   { background: #1877f2; color: #fff; }
.dttd-share-tw   { background: #000;    color: #fff; }
.dttd-share-copy { background: #f3f4f6; color: #374151; }
