/* =========================
   BASE (limpio y responsive)
========================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: auto;
}

body {
  margin: 0;
  padding: 0;
}

/* Evita que imágenes se estiren en móvil */
img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* =========================
   NAVBAR (solo lo que usas)
========================= */
.navbar-brand span {
  font-family: "Neonderthaw", cursive;
  font-size: 1.9em;
}

/* =========================
   MAIN / SECTIONS
========================= */
main {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* El main section de Bootstrap ya tiene su propio spacing,
   aquí solo damos un padding general */
main section {
  flex: 1;
  padding: 20px;
}

#novedades,
#servicios,
#agencias {
  background-color: #2F1B14;
}

/* =========================
   HERO / INICIO (MITAD + FADE REAL)
   REQUIERE en HTML:
   <div class="hero-bg hero-bg-a"></div>
   <div class="hero-bg hero-bg-b"></div>
========================= */
#inicio {
  position: relative;

  /* MITAD de pantalla */
  height: 50vh;
  min-height: 400px;
  max-height: 700px;

  overflow: hidden;

  display: flex;
  align-items: center;
  justify-content: center;

  color: #fff;
  text-align: center;
  padding: 24px 16px;
  margin: 0;
}

/* Capas del fondo para FADE (en vez de animar background-image) */
.hero-bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  opacity: 0;
  transition: opacity 1.2s ease;
  z-index: 0;
}

/* la primera capa arranca visible */
.hero-bg-a {
  opacity: 1;
}

/* Capa oscura encima del fondo para que se lea el texto */
.overlay-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(87, 70, 70, 0.7);
  z-index: 1;
}

/* Asegura que el contenido quede arriba del overlay */
#inicio .row {
  position: relative;
  z-index: 2;
  width: 100%;
  margin: 0; /* evita empujes raros */
}

/* Tipografías del hero */
#inicio h1 {
  font-family: "Dancing Script", cursive;
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 600;
  color: rgba(247, 189, 103, 0.795);
  animation: slideInFromBottom 1.2s ease-out;
}

#inicio p {
  font-family: "Ultra", serif;
  font-size: clamp(1rem, 2.2vw, 1.3rem);
  animation: slideInFromBottom 0.9s ease-out;
}

/* Botón del hero */
.btn-custom {
  background-color: #f5f5dc;
  border: 2px solid #ffffff;
  color: #5c4322;

  transition: background-color 0.3s ease;
  font-family: lora;
  font-size: 1.2em;
  font-weight: 700;
  animation: fadeIn 0.9s ease-in;
}

.btn-custom:hover {
  background-color: #5c4322;
  color: #f5f5dc;
}

/* =========================
   ANIMACIONES
========================= */
@keyframes slideInFromBottom {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Títulos animados */
.animated-text {
  animation: slideInFromBottom 1.2s ease-out;
}

/* =========================
   NOVEDADES / SERVICIOS / AGENCIAS (tipos y estilos)
========================= */
#novedades h2,
#servicios h2,
#agencias h2 {
  font-family: "Dancing Script", cursive;
  font-size: 3em;
  color: #ffbb00;
  margin-bottom: 0;
}

#novedades h3 {
  font-family: "Braah One", sans-serif;
  color: rgba(255, 255, 255, 0.842);
  font-weight: 700;
  margin-top: 0;
  animation: slideInFromBottom 0.9s ease-out;
}

/* Centrar filas custom */
.row1 {
  display: flex;
  justify-content: center;
}

/* Imágenes "novedades" */
.equal-height {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* =========================
   OVERLAY en tarjetas de agencias
========================= */
.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  background-color: rgba(0, 0, 0, 0.7);
  opacity: 0;

  transition: opacity 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
}

.overlay-text {
  color: #fff;
  font-size: 20px;
  text-align: center;
}

.card:hover .overlay {
  opacity: 1;
}

.card:hover .img {
  transform: scale(1.1);
  transition: transform 0.3s ease;
}

/* Iconos y textos de horarios/correo */
.icono-horario,
.icono-correo {
  color: #d8ad38;
}

.parrafo1 {
  font-weight: bold;
  font-size: 1.5em;
  color: #fff;
}

.parrafo2 {
  color: #fff;
  margin-bottom: 2px;
}

/* Botones dentro de agencias (solo si quieres estilo propio) */
#agencias .btn {
  color: #f5f5dc;
  font-family: lora;
  font-size: 1.2em;
  font-weight: 700;
  background-image: linear-gradient(to right, #8b6d35, #be7b54);
  border: 2px solid #9e8461;
  border-radius: 10px;
  cursor: pointer;
}

/* =========================
   MODAL (novedades)
========================= */
.modal {
  display: none;
  position: fixed;
  z-index: 1050; /* por encima de bootstrap */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9);

  padding-top: 10%;
  justify-content: center;
  align-items: center;
}

.modal-content-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
}

.modal-content {
  margin: auto;
  display: block;
  width: auto;
  max-width: 90%;
  max-height: 90%;
}

.close {
  position: absolute;
  color: #f1f1f1;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
  font-size: 40px;
  top: 4vh;
  right: 4vw;
}

.close:hover,
.close:focus {
  color: #bbb;
  text-decoration: none;
  cursor: pointer;
}

.image-container {
  cursor: pointer;
}

.image-container:hover {
  opacity: 0.7;
}

@media (max-width: 768px) {
  .modal-content {
    width: 90%;
  }
}

/* =========================
   SERVICIOS
========================= */
#servicios .card {
  margin-bottom: 20px;
}

#servicios .card-img-top {
  height: 200px;
  object-fit: cover;
}

/* =========================
   FOOTER
========================= */
footer a {
  color: #fff;
  text-decoration: none;
  margin: 0 10px;
}

/* =========================
   BOTON WHATSAPP
========================= */
.whatsapp-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #25d366;
  padding: 10px;
  border-radius: 50px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 2000;
}

.whatsapp-btn a {
  display: flex;
  align-items: center;
  color: #fff;
  text-decoration: none;
  padding: 10px;
}

.whatsapp-btn img {
  margin-left: 10px;
  width: 30px;
  height: 30px;
}

/* ===== AJUSTES TARJETAS EN MOVIL ===== */
@media (max-width: 768px) {

  #novedades .card {
    max-width: 92%;
    margin: 0 auto 20px;
    border-radius: 16px;
  }

  #novedades .card-img-top {
    height: 220px;          /* imagen más visible */
    object-fit: contain;    /* NO recorta la imagen */
    padding: 10px;
  }

  #novedades .card-body {
    padding: 16px;
  }

}
/* =========================
   WHATSAPP RESPONSIVE (MOVIL)
========================= */
@media (max-width: 768px) {

  .whatsapp-btn {
    bottom: 60px;
    right: 14px;
    padding: 6px;
    border-radius: 36px;
  }

  .whatsapp-btn a {
    padding: 6px 10px;
    font-size: 14px;
  }

  .whatsapp-btn img {
    width: 22px;
    height: 22px;
    margin-left: 6px;
  }
}

/* =========================
   NOVEDADES – IMAGENES 4:3 EN MOVIL
   - 2 columnas
   - cover (sin bordes vacíos)
   - mismo tamaño en todas
========================= */
@media (max-width: 768px) {

  /* Marco de la imagen con proporción 4:3 */
  #novedades .image-container{
    width: 100%;
    aspect-ratio: 4 / 3;        /* 🔑 4:3 */
    background-color: #f5f0e6;  /* respaldo (casi no se verá) */
    overflow: hidden;

    display: block;
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
  }

  /* La imagen llena TODO el marco */
  #novedades .image-container img.card-img-top{
    width: 100%;
    height: 100%;
    object-fit: cover;          /* 🔥 llena sin bordes */
    object-position: center;    /* centra el zoom */
    padding: 0;                 /* ❌ nada de aire */
    display: block;
  }

  /* Rompe herencias que causan estiramiento */
  #novedades img.equal-height{
    height: auto !important;
  }

  /* Evita que h-100 arrastre altura desktop */
  #novedades .card.h-100{
    height: auto !important;
  }
}
/* =========================
   TARJETAS – FONDO BEIGE PARA TEXTO
   (ideal para chocolates)
========================= */

/* Fondo del área de texto */
.card-body{
  background-color: #f3eadb;   /* beige cacao */
  border-bottom-left-radius: 18px;
  border-bottom-right-radius: 18px;
}

/* Mejor contraste de texto */
.card-title{
  color: #5a3e2b;   /* marrón chocolate */
  font-weight: 700;
}

.card-text{
  color: #3e2f23;
}

/* ===== OFFSET PARA ANCLAS (DESKTOP) ===== */
html{
  scroll-behavior: smooth;
  scroll-padding-top: 40px;   /* desktop OK */
}

section[id]{
  scroll-margin-top: 40px;
}

/* ===== OFFSET PARA ANCLAS (MOVIL) ===== */
@media (max-width: 991px){
  html{
    scroll-padding-top: 120px;   /* 🔥 más pequeño en móvil */
  }

  section[id]{
    scroll-margin-top: 120px;
  }
}

/*anclar la barra de navegacion*/
/* =========================
   NAVBAR FIJA / STICKY
========================= */
.navbar{
  position: sticky;
  top: 0;
  z-index: 1000; /* por encima del contenido */
}




