/* Estilos MÍNIMOS para las secciones dinámicas. Reutilizan las clases del
   main.css (.h2-stronger, .section-title, .subtitle, .container, .row, etc.)
   y sólo añaden layout de grids, cards y modales. */

/* Fondo blanco continuo y sin el padding residual del body de main.css */
html, body { background: #fff; }
body { padding: 0 !important; min-height: 100vh; display: flex; flex-direction: column; }
body > footer.footer { margin-top: auto; }

/* Desactivar el margin-top:160px que main.css aplica a h2 (para bloques CMS) */
.section .h2-stronger:first-child,
.cms-article > :first-child + .h2-stronger,
.cms-article .h2-stronger { margin-top: 0; }

/* ───────── Cabecera de bloque en la home (título + "ver más") ───────── */
.home-block-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 1rem; flex-wrap: wrap; margin-bottom: .5rem;
}
.home-block-head > h2 { margin: 0 !important; }
.home-block-more {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .9rem; white-space: nowrap; text-decoration: none;
}

/* ───────── Grid de cards (noticias, negocios, agenda) ───────── */
.cms-grid {
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  margin: 1.5rem 0 3rem;
}

.cms-card {
  display: flex; flex-direction: column;
  background: #fff;
  border: 1px solid #e5e7eb; border-radius: 10px;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
  text-decoration: none; color: inherit;
}
.cms-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0,0,0,.08);
  text-decoration: none;
}
.cms-card .thumb {
  aspect-ratio: 16 / 9;
  background: #e2e8f0 center/cover no-repeat;
}
.cms-card .thumb.no-img { background: linear-gradient(135deg, #ce0e2d 0%, #7a0819 100%); }

.cms-card .body { padding: 1rem 1.1rem 1.2rem; }

/* h3 dentro de una card: más compacto que el h3 genérico del main (32px) */
.cms-card h3 {
  margin: 0 0 .5rem !important;
  font-size: 1.2rem !important;
  line-height: 1.3 !important;
  color: #1d1d1b;
}
.cms-card p { color: #475569; font-size: .95rem; line-height: 1.45; margin: 0; }
.cms-card .meta {
  margin-top: .7rem; font-size: .82rem; color: #64748b;
  display: flex; gap: .75rem; flex-wrap: wrap;
}
.cms-card .price {
  display: inline-block; margin-top: .6rem;
  font-weight: 700; color: #ce0e2d; font-size: 1.05rem;
}
.cms-card .badge {
  display: inline-block; padding: .15rem .55rem;
  font-size: .72rem; font-weight: 700; letter-spacing: .03em;
  border-radius: 999px; background: #fbe1e5; color: #ce0e2d;
  text-transform: uppercase;
}
.cms-card .badge.vendido { background: #fee2e2; color: #991b1b; }

/* ───────── Paginación ───────── */
.cms-pager {
  display: flex; justify-content: center; gap: .5rem;
  margin: 2rem 0 3rem;
}
.cms-pager a, .cms-pager span {
  padding: .45rem .85rem; border: 1px solid #cbd5e1; border-radius: 6px;
  color: #334155; text-decoration: none; font-size: .9rem;
}
.cms-pager a:hover { background: #f1f5f9; }
.cms-pager .current { background: #ce0e2d; color: #fff; border-color: #ce0e2d; }

/* ───────── Filtros de listado ───────── */
.cms-filters {
  display: flex; gap: .8rem; flex-wrap: wrap;
  margin: 0 0 1.5rem; padding: 1rem; background: #f8fafc; border-radius: 8px;
}
.cms-filters label { font-size: .85rem; color: #475569; display: block; }
.cms-filters select, .cms-filters input[type=text] {
  padding: .5rem .7rem; border: 1px solid #cbd5e1; border-radius: 6px;
  background: #fff; font-size: .9rem;
}

.cms-empty {
  text-align: center; padding: 3rem 1rem; color: #64748b;
  background: #f8fafc; border-radius: 10px;
}

/* ───────── Artículo / ficha ───────── */
.cms-article { max-width: 860px; margin: 0 auto; padding: 1rem 0 3rem; }
.cms-article .hero-img {
  width: 100%; aspect-ratio: 16/9; object-fit: cover;
  border-radius: 10px; margin-bottom: 1.5rem;
}
.cms-article .content p { line-height: 1.7; color: #334155; }
.cms-article .content img { max-width: 100%; height: auto; border-radius: 8px; margin: 1rem 0; }

/* ───────── Bloque de fecha (eventos) ───────── */
.event-date-block {
  display: inline-flex; flex-direction: column; align-items: center;
  padding: .55rem .9rem; border-radius: 8px;
  background: #ce0e2d; color: #fff; min-width: 72px;
  font-family: inherit;
}
.event-date-block .day   { font-size: 1.6rem; font-weight: 700; line-height: 1; }
.event-date-block .month { font-size: .75rem; text-transform: uppercase; margin-top: .2rem; letter-spacing: .08em; }

/* ───────── Ficha de negocio ───────── */
.negocio-detalle {
  display: grid; gap: 2rem; grid-template-columns: 1.7fr 1fr;
  max-width: 1100px; margin: 2rem auto 3rem;
}
@media (max-width: 900px) { .negocio-detalle { grid-template-columns: 1fr; } }

.negocio-meta-line { color: #64748b; font-size: .95rem; margin-bottom: 1rem; }
.negocio-gallery {
  display: grid; gap: .6rem; grid-template-columns: repeat(4, 1fr);
  margin-bottom: 1.5rem;
}
.negocio-gallery .main-img { grid-column: 1/-1; aspect-ratio: 16/9; }
.negocio-gallery img {
  width: 100%; height: 100%; object-fit: cover;
  border-radius: 8px; cursor: pointer; transition: opacity .15s;
}
.negocio-gallery img:hover { opacity: .9; }

.negocio-side {
  background: #f8fafc; border-radius: 10px; padding: 1.4rem;
  border: 1px solid #e5e7eb; align-self: start;
  position: sticky; top: 1rem;
}
.negocio-side .price-big {
  font-size: 2rem; color: #ce0e2d; margin: 0 0 .5rem;
}
.negocio-side dl { margin: 1rem 0; font-size: .92rem; }
.negocio-side dl div { display: flex; justify-content: space-between; padding: .4rem 0; border-bottom: 1px dashed #e5e7eb; }
.negocio-side dl dt { color: #64748b; }
.negocio-side dl dd { margin: 0; font-weight: 600; color: #1d1d1b; text-align: right; }
.negocio-side .cta-btn {
  display: block; width: 100%; text-align: center;
  padding: .85rem 1rem; background: #ce0e2d; color: #fff;
  border: 0; border-radius: 8px; cursor: pointer;
  font-size: 1rem; font-weight: 600; text-decoration: none;
  margin-top: .5rem;
}
.negocio-side .cta-btn:hover { background: #a80c25; text-decoration: none; color: #fff; }
.negocio-side .cta-btn.secondary { background: #fff; color: #ce0e2d; border: 2px solid #ce0e2d; margin-top: .7rem; }
.negocio-side .cta-btn.secondary:hover { background: #fff5f5; }

/* ───────── Modal CTA ───────── */
.ccb-modal {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .6);
  display: none; align-items: center; justify-content: center; z-index: 9999;
  padding: 1rem;
}
.ccb-modal.open { display: flex; }
.ccb-modal .dialog {
  background: #fff; border-radius: 12px; padding: 1.8rem;
  max-width: 480px; width: 100%;
  box-shadow: 0 20px 50px rgba(0,0,0,.3);
  max-height: 90vh; overflow: auto;
}
.ccb-modal h3 { margin: 0 0 .3rem; font-size: 1.3rem; color: #1d1d1b; }
.ccb-modal .sub { color: #64748b; margin: 0 0 1.2rem; font-size: .9rem; }
.ccb-modal label { display: block; font-size: .85rem; color: #334155; font-weight: 600; margin-bottom: .3rem; margin-top: .8rem; }
.ccb-modal input, .ccb-modal textarea {
  width: 100%; padding: .55rem .7rem; border: 1px solid #cbd5e1; border-radius: 6px;
  font-size: .95rem; font-family: inherit;
}
.ccb-modal textarea { min-height: 90px; }
.ccb-modal .actions { display: flex; gap: .6rem; margin-top: 1rem; }
.ccb-modal .actions button {
  flex: 1; padding: .7rem; border: 0; border-radius: 6px; cursor: pointer; font-weight: 600;
}
.ccb-modal .actions .cancel { background: #e5e7eb; color: #1f2937; }
.ccb-modal .actions .submit { background: #ce0e2d; color: #fff; }
.ccb-modal .actions .submit:hover { background: #a80c25; }
.ccb-modal .msg { padding: .6rem .8rem; border-radius: 6px; margin-top: .8rem; font-size: .9rem; }
.ccb-modal .msg.ok  { background: #ecfdf5; color: #065f46; }
.ccb-modal .msg.err { background: #fef2f2; color: #991b1b; }
