/* ===== Paleta: tierra, cuero y verde ===== */
:root {
  --cpv-dark: #2b1d14;
  --cpv-brown: #6b4423;
  --cpv-leather: #8b5a2b;
  --cpv-green: #2f4a2f;
  --cpv-gold: #c8962e;
  --cpv-cream: #f8f2e7;

  /* Sustituye el azul de Bootstrap en botones, enlaces y formularios */
  --bs-primary: #8b5a2b;
  --bs-primary-rgb: 139, 90, 43;
  --bs-link-color: #8b5a2b;
  --bs-link-color-rgb: 139, 90, 43;
  --bs-link-hover-color: #6b4423;
  --bs-link-hover-color-rgb: 107, 68, 35;
  --bs-body-bg: #fffdf9;
  --bs-body-color: #2b2118;
}

html { font-size: 15px; position: relative; min-height: 100%; }
@media (min-width: 768px) { html { font-size: 16px; } }

body { margin-bottom: 0; }

h1, h2, h3, .display-5, .display-6, .navbar-brand {
  font-family: Georgia, "Times New Roman", serif;
}

.btn-primary {
  --bs-btn-bg: var(--cpv-leather);
  --bs-btn-border-color: var(--cpv-leather);
  --bs-btn-hover-bg: var(--cpv-brown);
  --bs-btn-hover-border-color: var(--cpv-brown);
  --bs-btn-active-bg: var(--cpv-dark);
  --bs-btn-active-border-color: var(--cpv-dark);
  --bs-btn-disabled-bg: var(--cpv-leather);
  --bs-btn-disabled-border-color: var(--cpv-leather);
}
.btn-outline-primary {
  --bs-btn-color: var(--cpv-leather);
  --bs-btn-border-color: var(--cpv-leather);
  --bs-btn-hover-bg: var(--cpv-leather);
  --bs-btn-hover-border-color: var(--cpv-leather);
  --bs-btn-active-bg: var(--cpv-brown);
  --bs-btn-active-border-color: var(--cpv-brown);
}
.btn-gold {
  --bs-btn-color: var(--cpv-dark);
  --bs-btn-bg: var(--cpv-gold);
  --bs-btn-border-color: var(--cpv-gold);
  --bs-btn-hover-color: var(--cpv-dark);
  --bs-btn-hover-bg: #dba93d;
  --bs-btn-hover-border-color: #dba93d;
  font-weight: 600;
}

.form-control:focus, .form-select:focus, .form-check-input:focus, .btn:focus-visible {
  border-color: var(--cpv-leather);
  box-shadow: 0 0 0 .25rem rgba(139, 90, 43, .25);
}
.form-check-input:checked { background-color: var(--cpv-leather); border-color: var(--cpv-leather); }

/* ===== Barra de navegación ===== */
.site-nav { background: var(--cpv-dark) !important; border-bottom: 3px solid var(--cpv-gold) !important; }
.site-nav .navbar-brand { color: var(--cpv-cream); font-weight: 700; letter-spacing: .3px; }
.site-nav .nav-link { color: rgba(248, 242, 231, .85) !important; }
.site-nav .nav-link:hover { color: var(--cpv-gold) !important; }
.site-nav .navbar-toggler { border-color: rgba(248, 242, 231, .4); }
.site-nav .navbar-toggler-icon { filter: invert(1); }

/* ===== Portada ===== */
.hero {
  position: relative;
  min-height: min(78vh, 760px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  overflow: hidden;
  background: var(--cpv-dark);
  margin: -1.5rem calc(50% - 50vw) 0; /* ancho completo dentro del container */
}
/* Mosaico de fotos: 8 fotos del mismo tamaño; cada una se muestra a tamaño igual o menor que el original, así nunca se ve pixeleada. */
.hero-mosaic {
  position: absolute; inset: 0; display: grid; gap: 3px; background: var(--cpv-dark);
  grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(4, 1fr);
}
.hero-mosaic .t { margin: 0; position: relative; overflow: hidden; }
.hero-mosaic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
@media (min-width: 768px) {
  .hero-mosaic { grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(2, 1fr); }
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(43,29,20,.68) 0%, rgba(43,29,20,.58) 45%, rgba(43,29,20,.88) 100%);
}
.hero-content { position: relative; z-index: 1; padding: 3rem 1rem; max-width: 820px; }
.hero h1 { font-size: clamp(2.1rem, 7vw, 4rem); font-weight: 700; text-shadow: 0 2px 12px rgba(0,0,0,.5); }
.hero .lead { font-size: clamp(1.05rem, 3.4vw, 1.5rem); text-shadow: 0 1px 8px rgba(0,0,0,.5); }
.hero-badge {
  display: inline-block; background: var(--cpv-gold); color: var(--cpv-dark);
  font-weight: 700; padding: .3rem .9rem; border-radius: 2rem; font-size: .9rem; margin-bottom: 1rem;
}

.countdown { display: flex; justify-content: center; gap: .6rem; margin: 1.5rem 0; }
.countdown div {
  background: rgba(43,29,20,.7); border: 1px solid rgba(200,150,46,.6);
  border-radius: .6rem; padding: .5rem .3rem; min-width: 4.2rem;
}
.countdown strong { display: block; font-size: 1.7rem; line-height: 1.1; font-family: Georgia, serif; }
.countdown span { font-size: .7rem; text-transform: uppercase; letter-spacing: 1px; opacity: .85; }

/* ===== Secciones ===== */
.section { padding: 3rem 0; }
.section-title { text-align: center; color: var(--cpv-brown); margin-bottom: .4rem; }
.section-sub { text-align: center; color: #7a6a5a; margin-bottom: 2rem; }
.section-title::after {
  content: ""; display: block; width: 64px; height: 3px; margin: .6rem auto 0; background: var(--cpv-gold); border-radius: 2px;
}
.bg-cream { background: var(--cpv-cream); margin: 0 calc(50% - 50vw); padding-left: calc(50vw - 50%); padding-right: calc(50vw - 50%); }

.step-card { text-align: center; padding: 1.4rem 1rem; height: 100%; background: #fff; border: 1px solid #eadfcb; border-radius: .9rem; }
.step-num {
  width: 3rem; height: 3rem; margin: 0 auto .8rem; border-radius: 50%;
  background: var(--cpv-green); color: #fff; font: 700 1.4rem Georgia, serif;
  display: flex; align-items: center; justify-content: center;
}

.price-card { text-align: center; border: 2px solid #eadfcb; border-radius: 1rem; padding: 1.6rem 1rem; background: #fff; height: 100%; position: relative; }
.price-card.active { border-color: var(--cpv-gold); box-shadow: 0 .5rem 1.5rem rgba(200,150,46,.25); }
.price-card .amount { font: 700 2.4rem Georgia, serif; color: var(--cpv-brown); }
.price-tag {
  position: absolute; top: -.8rem; left: 50%; transform: translateX(-50%);
  background: var(--cpv-green); color: #fff; font-size: .75rem; font-weight: 700; padding: .2rem .8rem; border-radius: 1rem; white-space: nowrap;
}

.goal { max-width: 640px; margin: 0 auto; }
.goal .progress { height: 1.1rem; background: #eadfcb; border-radius: 1rem; }
.goal .progress-bar { background: var(--cpv-green); }

/* Carrusel de fotos con flechas */
.carousel-wrap { position: relative; }
.gallery-track {
  display: flex; gap: .7rem; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none; padding: .2rem 0;
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-track figure {
  flex: 0 0 calc((100% - .7rem) / 2); scroll-snap-align: start; margin: 0; overflow: hidden;
  border-radius: .8rem; aspect-ratio: 4 / 3; background: var(--cpv-cream);
}
@media (min-width: 768px) { .gallery-track figure { flex-basis: calc((100% - 2.1rem) / 4); } }
.gallery-track img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; transition: transform .4s ease; }
.gallery-track figure:hover img { transform: scale(1.05); }
.car-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 2.6rem; height: 2.6rem; border-radius: 50%;
  border: 0; background: rgba(43,29,20,.78); color: #fff; font-size: 1.1rem; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.car-btn:hover, .car-btn:focus-visible { background: var(--cpv-gold); color: var(--cpv-dark); }
.car-prev { left: -.6rem; } .car-next { right: -.6rem; }

.cta-band {
  background: linear-gradient(135deg, var(--cpv-green), #1f331f); color: #fff; text-align: center;
  margin: 0 calc(50% - 50vw); padding: 3rem 1rem;
}

/* ===== Pie de página ===== */
.site-footer { background: var(--cpv-dark); color: rgba(248,242,231,.75); font-size: .85rem; margin-top: 0; padding: 1.2rem 0; }
.site-footer a { color: var(--cpv-gold); }

/* ===== Formularios y tarjetas del resto del sitio ===== */
.card { border-color: #eadfcb; border-radius: .8rem; }
.alert-info { background: #f3ead8; border-color: #e3d2ad; color: #4b3a22; }

/* Respeta a quien prefiere menos movimiento */
@media (prefers-reduced-motion: reduce) {
  .gallery-track img { transition: none; } .gallery-track { scroll-behavior: auto; }
}

/* ===== Tarjeta de datos de pago ===== */
.pay-card { border: 2px solid var(--cpv-gold); background: #fffaf0; }
.pay-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .6rem 0; border-top: 1px solid #eadfcb; }

/* ===== Patrocinadores ===== */
.sp-carousel { max-width: 1100px; margin-left: auto; margin-right: auto; border-radius: .9rem; overflow: hidden; background: #fff; border: 1px solid #eadfcb; }
.sp-carousel .carousel-item img { width: 100%; aspect-ratio: 8 / 3; object-fit: cover; display: block; }
.sp-carousel .carousel-control-prev-icon, .sp-carousel .carousel-control-next-icon { filter: drop-shadow(0 0 3px rgba(0,0,0,.7)); }
.sp-logos { display: flex; flex-wrap: wrap; justify-content: center; gap: .8rem; max-width: 1000px; margin: 0 auto; }
.sp-logo { display: flex; align-items: center; justify-content: center; width: 150px; height: 90px; padding: .6rem; background: #fff; border: 1px solid #eadfcb; border-radius: .7rem; }
.sp-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
a.sp-logo:hover { border-color: var(--cpv-gold); box-shadow: 0 .3rem .8rem rgba(200,150,46,.25); }
.sp-card { height: 100%; background: #fff; border: 1px solid #eadfcb; border-radius: .9rem; padding: 1.2rem; text-align: center; }
.sp-card .sp-card-logo { height: 110px; display: flex; align-items: center; justify-content: center; margin-bottom: .8rem; }
.sp-card .sp-card-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.sp-thumb { max-width: 80px; max-height: 50px; object-fit: contain; }
.sp-thumb-lg { max-width: 160px; max-height: 100px; object-fit: contain; border: 1px solid #eadfcb; border-radius: .4rem; padding: .3rem; background: #fff; }
.sp-thumb-banner { max-width: 100%; max-height: 120px; object-fit: contain; border: 1px solid #eadfcb; border-radius: .4rem; }

/* Menú desplegable de gestión */
.site-nav .dropdown-menu { background: var(--cpv-cream, #f8f2e7); border-color: rgba(0,0,0,.1); }
.site-nav .dropdown-item { color: #2b1d14 !important; }
.site-nav .dropdown-item:hover, .site-nav .dropdown-item:focus { background: #ecdfc6; }
.site-nav .dropdown-menu .nav-link, .site-nav .dropdown-item.btn { width: 100%; text-align: left; }

/* Página Acerca de */
.about-block { background: #fff; border: 1px solid #e8dcc5; border-radius: 12px; padding: 1.25rem 1.5rem; margin-bottom: 1rem; }
.about-block h2 { font-size: 1.25rem; margin-bottom: .5rem; }

/* Menú: enlaces informativos a la derecha, junto a Gestión */
.site-nav .nav-gap { margin-left: auto; }
