html {
  scroll-behavior: smooth;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  line-height: 1.6;
  color: white;
  background-color: #1A1A1A;
}

/* ─── NAV ─── */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: #1A1A1A;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.616);
  z-index: 1000;
}

.logo {
  font-weight: bold;
  font-size: 1.1rem;
}

.nav-links {
  display: flex;
  gap: 20px;
}

.text-links {
  text-decoration: none;
  color: white;
  font-weight: 500;
  font-size: 0.9rem;
  transition: opacity 0.2s;
}

.text-links:hover {
  opacity: 0.7;
}

.menu-toggle {
  display: none;
  font-size: 25px;
  cursor: pointer;
}

/* ─── HEADER ─── */
header {
  height: 100vh;
  background: url('Sources/Fondo.jpg') center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
}

header h1 {
  font-size: 3rem;
}

header p {
  margin: 10px 0;
  font-size: 1.2rem;
}

header button {
  padding: 12px 25px;
  border: none;
  background: white;
  color: black;
  cursor: pointer;
  border-radius: 5px;
  font-size: 1rem;
  margin-top: 10px;
  transition: background 0.2s, color 0.2s;
}

header button:hover {
  background: #f0f0f0;
}

/* ─── SECTIONS ─── */
section {
  padding: 60px 20px;
  text-align: center;
}

section h2 {
  font-size: 2rem;
  margin-bottom: 10px;
}

/* ─── CARDS ─── */
.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.card {
  position: relative;
  height: 250px;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  /* Fallback oscuro por si la imagen no carga */
  background-color: #313131;
}

/* Fondo con imagen */
.card-bg {
  position: absolute;
  inset: 0;
  background: var(--bg, linear-gradient(135deg, #2a2a2a, #444)) center/cover no-repeat;
  filter: brightness(0.6);
  transition: filter 0.4s, transform 0.4s;
}

/* Título centrado */
.card-title {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 1.6rem;
  text-align: center;
  font-family: 'Parisienne', cursive;
  z-index: 2;
  transition: transform 0.4s, font-size 0.4s;
  width: 90%;
  text-shadow: 0 2px 8px rgba(0,0,0,0.7);
  pointer-events: none;
}

/* Contenido (descripción + botón) */
.card-content {
  position: absolute;
  bottom: 0;
  width: 100%;
  padding: 16px;
  color: white;
  z-index: 2;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s, transform 0.4s;
}

.card-content p {
  font-size: 0.85rem;
  line-height: 1.4;
  margin-bottom: 10px;
}

/* Botón dentro de card */
.more-info {
  padding: 8px 18px;
  border: none;
  background: white;
  color: black;
  cursor: pointer;
  border-radius: 5px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.2s;
}

.more-info:hover {
  background: #e8e8e8;
}

/* Estado activo de la card */
.card.active .card-bg {
  filter: blur(4px) brightness(0.3);
}

.card.active .card-title {
  transform: translate(-50%, -200%);
}

.card.active .card-content {
  opacity: 1;
  transform: translateY(0);
}

/* ─── GALERÍA ─── */

.carousel {
  position: relative;
  margin-top: 20px;
}

.carousel-track-wrapper {
  overflow-x: auto;
  overflow-y: hidden;
  border-radius: 12px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
}

.carousel-track-wrapper::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.carousel-track {
  display: flex;
  gap: 16px;
  /* Sin transform, el scroll lo maneja el navegador */
}

.carousel-track img {
  flex: 0 0 calc(33.333% - 11px);
  height: 300px;
  object-fit: cover;
  border-radius: 10px;
  scroll-snap-align: start;
  transition: transform 0.3s, filter 0.3s;
}

.carousel-track img:hover {
  transform: scale(1.02);
  filter: brightness(0.85);
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s;
}

.carousel-btn:hover {
  background: rgba(0, 0, 0, 0.85);
}

.carousel-btn.prev { left: -22px; }
.carousel-btn.next { right: -22px; }

@media (max-width: 768px) {
  .carousel-track img {
    flex: 0 0 calc(50% - 8px);
  }
}

@media (max-width: 480px) {
  .carousel-track img {
    flex: 0 0 100%;
    height: 480px;
  }
  .carousel-btn.prev { left: 4px; }
  .carousel-btn.next { right: 4px; }
}

/* ─── NOSOTROS ─── */
.about {
  max-width: 800px;
  margin: auto;
}

/* ─── TESTIMONIOS ─── */
.testimonials {
  background: #313131;
}

.testimonial {
  margin: 20px auto;
  max-width: 600px;
}

/* ─── MAPA ─── */
.map-section {
  padding: 60px 20px;
  text-align: center;
  background: #1a1a1a;
}

.map-container {
  margin-top: 20px;
  width: 100%;
  max-width: 1000px;
  margin-inline: auto;
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.map-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ─── FORMULARIO ─── */
form {
  max-width: 500px;
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

input,
textarea {
  padding: 10px;
  border-radius: 5px;
  background-color: #313131;
  border: 1px solid #555;
  color: #ccc;
}
input[type="date"] {
  appearance: auto;
  -webkit-appearance: auto;
  color-scheme: dark;
  min-height: 44px;
  font-size: 1rem;
  box-sizing: border-box;
  width: 100%;              /* que ocupe el mismo ancho que el input de nombre */
  color: #ccc;
}

input[type="date"]::-webkit-datetime-edit-text,
input[type="date"]::-webkit-datetime-edit-month-field,
input[type="date"]::-webkit-datetime-edit-day-field,
input[type="date"]::-webkit-datetime-edit-year-field {
  color: #ccc;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.7);
  cursor: pointer;
  width: 20px;
  height: 20px;
}

.checkbox-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  justify-items: start;
}

.checkbox-group label {
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

#formCotizacion {
  text-align: left;
}

button.submit {
  background: white;
  color: black;
  border: none;
  padding: 12px;
  cursor: pointer;
  border-radius: 5px;
  font-size: 1rem;
  font-weight: 600;
  transition: background 0.2s;
}

button.submit:hover {
  background: #e8e8e8;
}

/* ─── MODAL ─── */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.modal.active {
  display: flex;
}

.modal-content {
  position: relative;
  width: 90%;
  max-width: 350px;
  aspect-ratio: 9 / 16;
}

#close {
  position: absolute;
  top: -36px;
  right: 0;
  font-size: 2rem;
  color: white;
  cursor: pointer;
  line-height: 1;
  z-index: 10;
  transition: opacity 0.2s;
}

#close:hover {
  opacity: 0.7;
}

.modal iframe {
  width: 100%;
  height: 100%;
  border-radius: 15px;
  border: none;
}

/* ─── FOOTER ─── */
footer {
  background: #222;
  color: white;
  text-align: center;
  padding: 20px;
  font-size: 0.85rem;
}

/* ─── WHATSAPP FLOTANTE ─── */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  background: #25D366;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.35);
  z-index: 999;
  text-decoration: none;
  transition: transform 0.2s, background 0.2s;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  background: #1ebe5b;
}

/* ─── RESPONSIVE ─── */
@media (min-width: 1024px) {
  .services {
    grid-template-columns: repeat(4, 1fr);
  }

  .card.active .card-title {
    transform: translate(-50%, -180%);
  }
}

@media (max-width: 768px) {
  header h1 {
    font-size: 2rem;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 60px;
    right: 0;
    background: #1a1a1a;
    width: 100%;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 20px 0;
    transform: translateY(-200%);
    transition: transform 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
  }

  .nav-links.active {
    transform: translateY(0);
  }

  .checkbox-group {
    grid-template-columns: 1fr;
  }
}

.promo-note {
  font-size: 0.82rem;
  color: #888;
  text-align: center;
  margin-top: 4px;
}

.promo-note i {
  color: #f0a500;
  margin-right: 4px;
}

.promo-note strong {
  color: #ccc;
}