/* ============================================================
   KedaraCMS content blocks — shared visual styles
   Single source of truth for TinyMCE block plugins (filas,
   experiencias, faq). Plugins emit class-only markup; only
   per-instance values (author-chosen colors, column width,
   overlay background-image) ride inline on the element.
   Heading defaults are reset on every block class so an
   <h2>..<h6> and a <p> with the same class render identically.
   ============================================================ */

/* --- Shared section header (title / subtitle) ---
   The core (blockkit) emits .block-title / .block-subtitle / .block-header on
   every block. Scoped to each block wrapper so the generic class names never
   leak onto non-block markup. Add new blocks to this list. */
.filas-block .block-title,
.experiencias-block .block-title,
.faq-block .block-title,
.viajes-block .block-title,
.sliderdestinos-block .block-title,
.articulos-block .block-title {
  line-height: 1.1;
  margin: 0 0 10px 0;
}
.filas-block .block-subtitle,
.experiencias-block .block-subtitle,
.faq-block .block-subtitle,
.viajes-block .block-subtitle,
.sliderdestinos-block .block-subtitle,
.articulos-block .block-subtitle {
  font-size: 18px;
  font-weight: 300;
  line-height: 1.4;
  letter-spacing: normal;
  text-transform: none;
  margin: 0 0 15px 0;
  color: #777;
}
.filas-block .block-header > .col-md-12,
.experiencias-block .block-header > .col-md-12,
.faq-block .block-header > .col-md-12,
.viajes-block .block-header > .col-md-12,
.sliderdestinos-block .block-header > .col-md-12,
.articulos-block .block-header > .col-md-12 { margin-bottom: 20px; }

/* ============================ FILAS ============================ */
section.filas-block { margin-top: 40px; }
.filas-block .filas-header > .col-md-12 { margin-bottom: 24px; }

.filas-block .filas-row {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid #e5e5e5;
  flex-wrap: wrap;
}
.filas-block .filas-left  { flex: 0 0 28%; min-width: 140px; }
.filas-block .filas-right { flex: 1 1 0;   min-width: 240px; }

.filas-block .filas-row-title {
  margin: 0 0 8px 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
  text-transform: none;
  color: #004F71;
}
.filas-block .filas-badge {
  display: inline-block;
  margin: 0;
  font-size: 12px;
  font-weight: bold;
  line-height: 1.2;
  letter-spacing: .5px;
  text-transform: none;
  padding: 5px 11px;
  border-radius: 4px;
  border: 0 solid #004F71;
  background: #004F71;
  color: #fff;
}
.filas-block .filas-body {
  margin: 0;
  font-size: inherit;
  font-weight: 400;
  line-height: 1.6;
}
.filas-block .filas-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  margin-top: 10px;
}
.filas-block[data-style="v2"] .filas-img { margin-top: 8px; }
.filas-block[data-style="v2"] .filas-right .filas-badge + .filas-body { margin-top: 10px; }

/* ========================= EXPERIENCIAS ========================= */
section.experiencias-block { margin-top: 60px; }
.experiencias-block .exp-description > .col-md-12 { margin-bottom: 30px; }

/* cajafoto (normal) variant */
.experiencias-block .cajafoto {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.experiencias-block .exp-cajafoto-img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  border-radius: 15px;
}
.experiencias-block .exp-cajafoto-title {
  margin: 25px 0 0 0;
  line-height: 1.25;
  text-transform: none;
}
.experiencias-block .exp-cajafoto-text { margin-top: 0; }

/* overlay (imagen de fondo) variant */
.experiencias-block .exp-overlay-row {
  display: flex;
  gap: 16px;
  margin: 0 0 40px 0;
  flex-wrap: wrap;
}
.experiencias-block .exp-overlay-card {
  flex: 1;
  min-width: 240px;
  height: 320px;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
}
.experiencias-block .exp-overlay-shade {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(to bottom, rgba(0,0,0,.05) 0%, rgba(0,0,0,.72) 100%);
}
.experiencias-block .exp-overlay-content {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 20px 20px 24px;
}
.experiencias-block .exp-overlay-title {
  display: inline-block;
  margin: 0 0 10px 0;
  font-size: 12px;
  font-weight: bold;
  line-height: 1.2;
  letter-spacing: .6px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  background: #004F71;
  color: #fff;
}
.experiencias-block .exp-overlay-text {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.55;
  color: #fff;
}
.experiencias-block .exp-overlay-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 13px;
  font-weight: bold;
  text-decoration: none;
  color: #59CBE8;
}

/* "Tarjetas (icono pequeño izquierda)" variant — bordered card, small icon left of title */
.experiencias-block .exp-tarjeta-row {
  display: flex;
  flex-wrap: wrap;
}
/* row gap on the column (the flex item) — a height:100% card + margin-bottom
   would push the margin past the column edge and overlap the next card. */
.experiencias-block .exp-tarjeta-row > [class*="col-"],
.experiencias-block .exp-iconos-row > [class*="col-"] {
  margin-bottom: 24px;
}
.experiencias-block .exp-tarjeta {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 32px;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 18px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  text-align: left;
}
.experiencias-block .exp-tarjeta-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.experiencias-block .exp-tarjeta-glyph {
  display: block;
  flex-shrink: 0;
  font-size: 34px;
  color: #59cae8;
}
.experiencias-block .exp-tarjeta-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  text-transform: none;
}
.experiencias-block .exp-tarjeta-text {
  margin: 12px 0 0 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  color: #666;
}

/* "Tarjetas (con icono o imagen)" variant — bordered card whose top visual is
   either a centered icon or a full-width image */
.experiencias-block .exp-iconos-row {
  display: flex;
  flex-wrap: wrap;
}
.experiencias-block .exp-iconos {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 18px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}
.experiencias-block .exp-iconos-img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}
.experiencias-block .exp-iconos-glyph {
  display: block;
  margin: 0 auto 16px auto;
  font-size: 64px;
  color: #59cae8;
}
.experiencias-block .exp-iconos-body {
  flex: 1 1 auto;
  padding: 24px 28px 32px;
}
.experiencias-block .exp-iconos-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  text-transform: none;
}
.experiencias-block .exp-iconos-text {
  margin: 12px 0 0 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  color: #666;
}

/* ============================= FAQ ============================= */
.faq-block .faq-header > .col-md-12 { margin-bottom: 30px; }

/* ============================ VIAJES ============================ */
/* Dynamic trip-listing block. Square card corners are the default;
   the "redondeado" toggle adds .viajes-rounded on the same wrapper as
   .viajes-block. The .project card and its .project-hover overlay both
   need the radius (overlay is overflow:visible), matching the homepage
   cards. Scoped to .viajes-block to avoid leaking onto unrelated
   .project elements elsewhere. */
.viajes-block.viajes-rounded .project,
.viajes-block.viajes-rounded .project-hover { border-radius: 20px; }

/* ======================= SLIDER DESTINOS ======================= */
/* Dynamic block — a slick slider of destination cards, each with the
   destination's minimum trip price. The .destinos-slider class is what
   templates/repute/footer.php lazy-loads and initializes as slick. */
section.sliderdestinos-block { margin-top: 60px; }
.sliderdestinos-block .destinos-slider { padding: 0 15px; }
.sliderdestinos-block .destinos-slider .slick-slide { margin: 0 10px; }
.sliderdestinos-block .destinos-slider .slick-list { margin: 0 -10px; }
.sliderdestinos-block .project-category {
  height: 350px !important;
  border-radius: 20px;
  margin-bottom: 30px;
  max-width: 100%;
  width: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.sliderdestinos-block .project-category h3 { font-weight: 400; }
.sliderdestinos-block .project-category .project-hover {
  border-radius: 20px;
  align-content: end;
  display: flex;
  flex-flow: column wrap;
  background-color: rgba(0,0,0,0.2);
  height: 100%;
  position: relative;
  padding: 20px;
}
.sliderdestinos-block .project-category .project-hover a {
  position: absolute;
  bottom: 10%;
  left: 50%;
  transform: translateX(-50%);
  max-width: 85%;
  margin-left: 0;
}
/* Hover treatment — ported from main.css's global .project cards. The block's
   own .project-hover background rule has equal specificity to main.css's
   ".project:hover .project-hover" and loads later, so the hover state must be
   restated here at a higher specificity to take effect. */
.sliderdestinos-block .project-category .project-hover {
  transition: background-color 0.5s ease;
}
.sliderdestinos-block .project-category:hover .project-hover {
  background-color: rgba(0,78,115,0.7);
}
.sliderdestinos-block .project-category .project-hover a:hover {
  border-color: #59cae8;
  color: #fff;
  background-color: #59cae8;
}
@media screen and (max-width: 767px) {
  .sliderdestinos-block .destinos-slider { padding: 0; }
}

/* ---- faq block ---------------------------------------------------------
   ALL rules are scoped to `.faq-block` (the wrapper KedaraBlocks emits around
   our FAQ). Other places in the codebase use the same `.panel-group-faq` /
   `.panel-minimal` markup (e.g. mod_viajes/viaje.php) and must NOT be styled
   by these rules — mira.css continues to govern those.
   Base look + indicator (number/icon) + bordered variant. The base rules are
   intentionally duplicated from mira.css so the TinyMCE editor preview matches
   the frontend (mira.css is loaded by noticias views but NOT in content_css). */

.faq-block .panel-group-faq.top-faq { margin: 30px 0; }
.faq-block .panel-group-faq.top-faq .panel.panel-minimal {
  border: none; box-shadow: none; border-bottom: 1px solid #e8e8e8;
  border-radius: 0; margin-bottom: 0; background: transparent;
}
.faq-block .panel-group-faq.top-faq .panel.panel-minimal:last-child { border-bottom: none; }
.faq-block .panel-group-faq.top-faq .panel-heading { padding: 15px 0; background: transparent; border: none; cursor: pointer; }
.faq-block .panel-group-faq.top-faq .panel-title { font-size: 18px; font-weight: 400; margin: 0; position: relative; }
.faq-block .panel-group-faq.top-faq .panel-title a,
.faq-block .panel-group-faq.top-faq .panel-title a .faq-q-text { font-weight: 400; }
.faq-block .panel-group-faq.top-faq .panel-title a {
  display: flex; align-items: center; gap: 10px;
  color: #454545; text-decoration: none; padding-right: 30px;
  position: relative; transition: color .2s; border-bottom: none;
  width: 100%; box-sizing: border-box;
}
.faq-block .panel-group-faq.top-faq .panel-title a:hover,
.faq-block .panel-group-faq.top-faq .panel-title a:focus { color: #59cae8; text-decoration: none; }
.faq-block .panel-group-faq.top-faq .panel-title a::after {
  content: '\f107'; font-family: 'FontAwesome';
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  font-size: 20px; transition: transform .3s;
  color: var(--faq-caret, #999);
}
.faq-block .panel-group-faq.top-faq .panel-title a.collapsed::after { transform: translateY(-50%) rotate(-90deg); }
.faq-block .panel-group-faq.top-faq .panel-collapse > .panel-body { padding: 0 0 20px 0; border-top: 2px solid #59cae8; margin-top: 0; }
.faq-block .panel-group-faq.top-faq .panel-body .faq-answer-text { color: #666; font-size: 16px; line-height: 1.7; padding-top: 15px; margin: 0; }
.faq-block .panel-group-faq.top-faq .panel-title a .faq-q-text { flex: 1; min-width: 0; }

.faq-block .faq-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: #59cae8; color: #fff;
  font-size: 14px; font-weight: 600; line-height: 1;
  flex: 0 0 28px;
}

.faq-block .faq-icon {
  font-size: 22px; line-height: 1; color: #59cae8;
  flex: 0 0 auto;
}

/* Bordered variant: each Q&A panel as a self-contained card. */
.faq-block .panel-group-faq.top-faq.faq-bordered .panel.panel-minimal {
  border: 1px solid #d8e6ec;
  border-radius: 6px;
  margin-bottom: 12px;
  background: #fff;
  overflow: hidden;
}
.faq-block .panel-group-faq.top-faq.faq-bordered .panel.panel-minimal:last-child {
  border-bottom: 1px solid #d8e6ec;
  margin-bottom: 0;
}
.faq-block .panel-group-faq.top-faq.faq-bordered .panel-heading { padding: 14px 18px; }
.faq-block .panel-group-faq.top-faq.faq-bordered .panel-collapse > .panel-body { padding: 0 18px 18px; }

/* ---- indice (table of contents) block ----------------------------------
   Static block built from the post's h2/h3 headings (scanned in the editor).
   Header / body backgrounds ride inline from the block's color settings
   (default white); the caret colour comes from the --indice-caret variable.
   "Solo H2" depth hides the h3 sublists via data-profundidad. All rules scoped
   to .indice-block so the generic .panel-* classes never leak to other markup. */
.indice-block { margin: 30px 0; }
.indice-block .indice-toc { margin: 0; }
.indice-block .panel { border: 1px solid #e3e3e3; border-radius: 8px; box-shadow: none; background: transparent; overflow: hidden; }
.indice-block .panel-heading { padding: 14px 18px; border: none; cursor: pointer; }
.indice-block[data-profundidad="h2"] .indice-sublist { display: none; }
.indice-block .panel-title { margin: 0; font-size: 18px; font-weight: 600; position: relative; }
.indice-block .panel-title a {
  display: flex; align-items: center; gap: 10px;
  color: #004F71; text-decoration: none; padding-right: 30px;
  position: relative; border-bottom: none; cursor: pointer;
}
.indice-block .panel-title a:hover,
.indice-block .panel-title a:focus { color: #59cae8; text-decoration: none; }
.indice-block .panel-title a .indice-title-text { flex: 1; min-width: 0; }
.indice-block .indice-icon { font-size: 22px; line-height: 1; color: #59cae8; flex: 0 0 auto; }
.indice-block .panel-title a::after {
  content: '\f107'; font-family: 'FontAwesome';
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  font-size: 20px; transition: transform .3s; color: var(--indice-caret, #999);
}
.indice-block .panel-title a.collapsed::after { transform: translateY(-50%) rotate(-90deg); }
.indice-block .panel-collapse > .panel-body { padding: 4px 18px 16px; }
.indice-block .indice-list { margin: 0; padding-left: 20px; }
.indice-block .indice-list > li { margin: 6px 0; }
.indice-block .indice-list a { color: #406da4; text-decoration: none; }
.indice-block .indice-list a:hover { color: #59cae8; text-decoration: underline; }
.indice-block .indice-sublist { margin: 4px 0 4px 0; padding-left: 22px; list-style: circle; }
.indice-block .indice-sublist > li { margin: 3px 0; }

/* ---- callout (caja destacada) ------------------------------------------
   Editable inline container (NOT a KedaraBlock). Base box geometry only;
   background/border/text colours ride inline from the preset or the custom
   colour dialog. Scoped to .kc-callout (unique prefix, no collision). */
.kc-callout {
  border: 2px solid #1b7fa3;
  border-radius: 10px;
  padding: 24px 28px;
  margin: 24px 0;
  background-color: #08506b;
  color: #fff;
}
.kc-callout-body > :first-child,
.kc-callout > :first-child { margin-top: 0; }
.kc-callout-body > :last-child,
.kc-callout > :last-child { margin-bottom: 0; }
.kc-callout a { color: inherit; text-decoration: underline; }
/* Accent variant: thick left bar instead of a full border (light-blue preset). */
.kc-callout.kc-callout--accent {
  border-width: 0 0 0 6px;
  border-radius: 6px;
}

/* ============================ ARTÍCULOS ============================
   Dynamic block: hand-picked blog-post grid resolved at render time
   (master::resolve_articulos_block). Uses its own prefixed classes
   (.articulos-card*) — NOT the generic .news-item/.news-title — so page-level
   rules like `.ncategoria-page .news-item a` can't bleed in. Card look mirrors
   the related-posts grid; excerpt matches .exp-iconos-text. All scoped to
   .articulos-block. Title link sets size/weight/colour explicitly so a parent
   `.ncategoria-page a {font-weight:600}` element rule can't override it. */
section.articulos-block { margin-top: 60px; }
.articulos-block .articulos-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin-bottom: 20px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  overflow: hidden;
  transition: all 0.3s ease;
}
.articulos-block .articulos-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  transform: translateY(-2px);
}
.articulos-block .articulos-card-img { border-radius: 16px 16px 0 0; width: 100%; height: auto; display: block; }
.articulos-block .articulos-card-body { padding: 20px; }
.articulos-block .articulos-card-title { margin: 0 0 15px 0; font-size: 14px; line-height: 1.7; }
.articulos-block .articulos-card-title a {
  color: #333;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.7;
}
.articulos-block .articulos-card-text {
  margin: 12px 0 0 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  color: #666;
}
@media (min-width: 992px) {
  .articulos-block .articulos-card-img { height: 200px; object-fit: cover; }
  .articulos-block .articulos-card { min-height: 415px; }
}
