
@import url('https://fonts.googleapis.com/css?family=Montserrat:700&display=swap');

/*--------------------------LOADER--------------------------*/
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 1s ease;
}

/* Fade out cuando termina */
#preloader.fade-out {
  opacity: 0;
  pointer-events: none;
}

/* Contenedor central */
.preloader-container {
  text-align: center;
}

/* Logo */
.preloader-logo {
  width: 200px;
  margin-bottom: 20px;
}

/* Barra de carga */
.progress-bar-container {
  width: 200px;
  height: 8px;
  background: #ddd;
  border-radius: 5px;
  overflow: hidden;
  margin: 0 auto;
}

.progress-bar {
  width: 0%;
  height: 100%;
  background: #e67e22; /* tu color */
  transition: width 0.3s ease;
}
/*--------------------------FIN LOADER--------------------------*/

/* Layout base para asegurar footer al fondo */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  max-width: 100%;
}

main {
  padding-top: 48px; /* Ajusta este valor si tu header es más alto/bajo */
  background: transparent;
}

body > main {
  flex: 1; /* Ocupa todo el espacio disponible */
}

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --naranja: #f28c28;
  --gris-oscuro: #23282b;
  --blanco: #ffffff;
  --texto: #000000;
}

body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background: var(--gris-oscuro);
  color: var(--texto);
}

/* ===== HEADER ===== */
.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;   /* centrado y límite de ancho */
  margin: 0 auto;      /* centra el contenido */
  padding: 10px 40px;  /* un poco más de aire a los lados */
  flex-wrap: nowrap;
  height: 98px;
  box-sizing: border-box;
}

/* HEADER UNIFICADO */
header,
.main-header {
  width: 100%;
  background: var(--blanco);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  position: fixed;
  top: 0;
  left: 0;
  height: 98px;
  z-index: 1000;
}

/* Mantener alineado */
.main-header > .header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

/* LOGO */
.logo img {
  height: 45px; /* un poco más grande y proporcional */
}

/* NAV/BUTTONS */
.main-nav {
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: center; /* centra el nav respecto al logo y botón */
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 30px;   /* más espacio entre enlaces */
  padding: 0;
  margin: 0;
}

.main-nav ul li {
  margin: 0;
}

.main-nav ul li a {
  color: var(--texto);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s;
}

.main-nav ul li a:hover,
.main-nav ul li a.active {
  color: var(--naranja);
}

/* BOTÓN DERECHA */
.header-buttons {
  display: flex;
  align-items: center;
  margin-left: 24px;
  z-index: 1001;
}

.header-buttons a {
  padding: 8px 15px;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  background: var(--naranja);
  color: white;
  transition: all 0.3s ease;
  font-size: 1rem;
  text-align: center;
}

.header-buttons a:hover {
  background: #e67e22;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-gris {
  background: #ccc;
  color: #000;
}

.btn-naranja {
  background: var(--naranja);
  color: white;
  transition: all 0.3s ease;
}

.btn-naranja:hover {
  background: #e67e22;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transform: scale(1.05);
}

/* MENÚ DESPLEGABLE */
.main-nav .dropdown {
  position: relative;
  z-index: 10;
}

.main-nav .dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  min-width: 180px;
  z-index: 1000;
  padding: 8px 0;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.main-nav .dropdown-menu li {
  padding: 0;
  margin: 0;
}

.main-nav .dropdown-menu li a {
  display: block;
  padding: 12px 20px;
  color: var(--texto);
  text-decoration: none;
  font-weight: 500;
  transition: background 0.3s ease, color 0.3s ease;
}

.main-nav .dropdown:hover .dropdown-menu {
  display: block;
}

.main-nav .dropdown-menu li a:hover {
  background: var(--naranja);
  color: white;
}

/* WHATSAPP */
.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #25d366;
  color: white;
  font-size: 24px;
  padding: 12px 15px;
  border-radius: 50%;
  text-decoration: none;
  z-index: 999;
  transition: all 0.3s ease;
}

.whatsapp-float:hover {
  background-color: #1ebe5d;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* HERO */
.hero-section {
  width: 100%;
  margin: 0;
}
.hero-section img {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  display: block;
}

/* FOOTER */
.main-footer {
  background: var(--blanco);
  padding: 0;
  text-align: center;
  color: var(--texto);
  width: 100%;
  margin: 0;
  border: none;
}

.footer-top {
  background: var(--naranja);
  color: white;
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  padding: 20px;
  margin: 0;
  border: none;
}
.footer-top div {
  margin: 10px;
}
.social-icons img {
  width: 24px;
  margin: 0 8px;
}
.footer-bottom {
  background: var(--blanco);
  color: var(--texto);
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  padding: 20px 0;
  text-align: center;
  margin: 0;
  border: none;
}
.footer-bottom h4 {
  color: var(--naranja);
  margin-bottom: 5px;
}
.footer-legal {
  background: var(--blanco);
  color: var(--texto);
  text-align: center;
  padding: 10px 0;
  font-size: 0.9em;
  margin: 0;
  border: none;
}
.footer-legal a {
  color: #aaa;
  text-decoration: none;
}
.footer-legal a:hover {
  color: var(--naranja);
}

/* SECCIÓN TÍTULO Y REDES */
.section-title {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 20px;
  color: var(--texto);
  text-align: center;
}
.social-icons i,
.whatsapp-float i {
  font-size: 24px;
  color: white;
}

.social-icons {
  display: flex;
  align-items: center;
  gap: 14px; /* Espacio horizontal entre íconos, ajústalo a tu gusto */
}

.social-icons a {
  text-decoration: none;
  border: none;
  outline: none;
  display: flex;
  align-items: center;
}

.social-icons i {
  font-size: 2em; /* Ajusta el tamaño según lo necesites */
  display: block;
}

/* TARJETAS DE INICIO */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 40px 20px;
  justify-items: center;
}
.card:nth-child(3) {
  grid-column: auto;
}
.card {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  cursor: pointer;
  background: #000;
  width: 100%;
  max-width: 500px;
}
.card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  filter: brightness(50%);
  transition: all 0.3s ease;
  display: block;
}
.card:hover img {
  filter: brightness(100%);
}
.card-title {
  position: absolute;
  top: 20px;
  left: 20px;
  color: white;
  font-weight: bold;
  font-size: 1.1rem;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}
.card-title hr {
  border: none;
  border-top: 1px solid white;
  margin: 8px 0;
  width: 60%;
}
section:last-of-type,
.card-grid {
  margin-bottom: 0;
  border-bottom: none;
}

/* QUIENES.PHP */
main.quienes-page .about-section,
main.quienes-page .mission-vision {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  margin: 0;
}
main.quienes-page .about-image,
main.quienes-page .mv-image,
main.quienes-page .about-text,
main.quienes-page .mv-text {
  flex: 1 1 50%;
}
main.quienes-page .about-text {
  background: var(--blanco);
  padding: 40px 90px;
  color: var(--texto);
  text-align: left;
  display: flex;
  flex-direction: column;  
  justify-content: center;
  box-sizing: border-box;
}
main.quienes-page .mv-text {
  background: var(--naranja);
  padding: 40px 90px;
  color: white;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
}
main.quienes-page .about-image img,
main.quienes-page .mv-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}
/* Títulos y párrafos */
main.quienes-page .about-text h2,
main.quienes-page .mv-text h2 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 20px;
  line-height: 1.3;
  font-family: 'Segoe UI', sans-serif;
}
main.quienes-page .about-text p,
main.quienes-page .mv-text p {
  font-size: 1.15rem;
  line-height: 1.8;
  margin-bottom: 10px;
  font-family: 'Segoe UI', sans-serif;
  font-weight: 400;
}
/* Nuestros valores */
main.quienes-page .valores {
  background: #111;
  padding: 60px 0;
  text-align: center;
}
main.quienes-page .valores h2.section-title {
  color: white;
  margin-bottom: 40px;
  font-size: 2rem;
}
main.quienes-page .valores-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 80px;
  padding: 0 60px;
  box-sizing: border-box;
}
main.quienes-page .valor-item {
  background: #1a1a1a;
  color: white;
  padding: 40px 30px;
  border-radius: 10px;
  max-width: 300px;
  flex: 1 1 280px;
  box-sizing: border-box;
}
main.quienes-page .valor-item i {
  font-size: 8rem;
  margin-bottom: 20px;
  color: var(--naranja);
  display: block;
}
main.quienes-page .valor-item h3 {
  font-size: 1.4rem;
  margin-bottom: 10px;
  font-weight: 700;
  color: white;
}
main.quienes-page .valor-item p {
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 0;
  color: white;
}

/* CONTACTO.PHP */
main.contacto-page .contact-section {
  display: flex;
  flex-wrap: nowrap;
  width: 100%;
  background: var(--gris-oscuro);
  padding: 0;
  box-sizing: border-box;
  gap: 0;
  align-items: stretch;
  height: auto;
  min-height: calc(100vh - 96px);
}
main.contacto-page .contact-form-container,
main.contacto-page .contact-image-container {
  flex: 1;
  box-sizing: border-box;
}
main.contacto-page .contact-form-container {
  background: #1f1f1f;
  border-radius: 12px;
  padding: 30px 40px;
  margin: 40px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
}
main.contacto-page .contact-image-container {
  display: flex;
  align-items: stretch;
  justify-content: center;
  overflow: hidden;
}
main.contacto-page .contact-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0;
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 100%;
}
.contact-form .form-group {
  display: flex;
  flex-direction: column;
}
.contact-form label {
  font-weight: bold;
  margin-bottom: 6px;
  color: #fff;
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  padding: 10px;
  border: none;
  border-radius: 6px;
  font-family: 'Segoe UI', sans-serif;
  background: #2e2e2e;
  color: white;
  font-size: 0.95rem;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #aaa;
}
.contact-form button.btn-naranja {
  align-self: center;
  padding: 10px 24px;
  font-size: 1rem;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  background: var(--naranja);
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
}
.contact-form button.btn-naranja:hover {
  background: #e67e22;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.contact-form .form-message {
  margin-top: 16px;
  text-align: center;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 6px;
  padding: 10px;
}
.contact-form .form-message.success {
  color: #28a745;
}
.contact-form .form-message.error {
  color: #dc3545;
}

/* BOTÓN HAMBURGUESA */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--texto);
  cursor: pointer;
  z-index: 1001;
  padding: 6px;
}
.menu-toggle i {
  font-size: 2.2rem;
  transition: transform 0.3s ease, color 0.3s ease;
}
.menu-toggle:hover i {
  color: var(--naranja);
  transform: rotate(90deg);
}

/* NAV-ANIMATE */
.nav-animate {
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}
.main-nav.open .nav-animate {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
@media (min-width: 769px) {
  .nav-animate {
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto !important;
  }
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .header-container {
    flex-wrap: nowrap !important;    /* NO permite que los hijos bajen de línea */
    overflow-x: auto;   
    justify-content: flex-end;
  }
  
  .logo img {
    height: 35px;
  }
  .logo {
    order: 1;
  }
  .menu-toggle {
      order: 3;
      display: block;
      margin: 0;
      padding: 0;
  }
  .main-nav {
    order: 4;
    width: 100%;
  }
  .main-nav, nav {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s ease, opacity 0.4s ease;
    flex-direction: column;
    background: white;
    position: absolute;
    top: 98px;
    right: 0;
    width: 100%;
    z-index: 999;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    border-radius: 0 0 12px 12px;
  }
  .main-nav.open, nav.open {
    max-height: 500px;
    opacity: 1;
    overflow: visible;
  }
  .main-nav ul, nav ul {
    flex-direction: column;
    padding: 20px;
    margin: 0;
    align-items: center;
  }
  .main-nav ul li, nav ul li {
    text-align: center;
    margin: 12px 0;
    width: 100%;
  }
  .main-nav ul li a, nav ul li a {
    font-size: 1rem;
    font-weight: 600;
  }
  .header-buttons {
      order: 2;
      margin: 0 !important;
      padding: 0 !important;
      width: auto !important;
      display: flex !important;
      align-items: center !important;
  }
  .header-buttons a {
    margin: 0 0 0 0;   /* Sin margen a la derecha ni izquierda */
    padding: 4px 10px !important;
    font-size: 0.97rem;
  }
  .card-grid {
    grid-template-columns: 1fr;
  }
  .card:nth-child(3) {
    grid-column: span 1;
  }
  main.quienes-page .about-section,
  main.quienes-page .mission-vision {
    flex-direction: column;
  }
  main.quienes-page .about-text,
  main.quienes-page .mv-text {
    order: 1;
    padding: 20px 20px;
  }
  main.quienes-page .about-image,
  main.quienes-page .mv-image {
    order: 2;
  }
  main.contacto-page .contact-section {
    flex-direction: column;
  }
  main.contacto-page .contact-form-container {
    order: 1;
    margin: 20px;
    padding: 20px;
    width: calc(100% - 40px);
    box-sizing: border-box;
  }
  main.contacto-page .contact-image-container {
    order: 2;
    height: 200px;
  }
  main.contacto-page .contact-image-container img {
    height: 100%;
    object-fit: cover;
  }
  .dropdown-menu {
    position: static;
    box-shadow: none;
    background: #f5f5f5;
    padding-left: 0;
  }
  .nav-content {
    max-height: 0;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.4s ease;
    pointer-events: none;
  }
  .main-nav.open .nav-content {
    max-height: 1000px;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
}

/* Escritorio: submenú por hover */
.main-nav .dropdown:hover .dropdown-menu {
  display: block;
}
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  z-index: 1000;
  min-width: 180px;
  padding: 8px 0;
}
.dropdown.open .dropdown-menu {
  display: block;
}

.about-content, .mv-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}
.about-image, .mv-image {
  flex: 1;
  min-width: 280px;
}
.about-image img, .mv-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  margin: 0;
  padding: 0;
  display: block;
}
.valores {
  padding: 40px 20px;
  background: white;
  text-align: center;
}
.valores-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 40px;
  margin-top: 20px;
}
.valor-item {
  max-width: 200px;
}
.valor-item img {
  width: 100%;
  border-radius: 10px;
}
.valor-item p {
  margin-top: 10px;
  color: var(--texto);
}

.header-container {
  gap: 0 20px;
}

/* Por defecto, muestra solo texto, oculta icono */
.icon-cotizar { display: none; }
.text-cotizar { display: inline; }

/* SOLO para pantallas MUY pequeñas: oculta el texto y muestra el icono */
@media (max-width: 400px) {
  .icon-cotizar { display: inline; }
  .text-cotizar { display: none; }
}


/* ==== Estilos exclusivos para la página de Login ==== */

body.login {
  background: #fff;
  font-family: 'Montserrat', Arial, sans-serif;
  margin: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-container {
  background: #fff;
  box-shadow: 0 2px 32px 0 rgba(0,0,0,0.12);
  padding: 2.5rem 2.5rem 2rem 2.5rem;
  border-radius: 1.3rem;
  min-width: 350px;
  max-width: 92vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: box-shadow .2s;
}

.login-logo {
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: 0.10em;
  color: #111;
  margin-bottom: 0.4em;
  position: relative;
  display: inline-block;
  text-align: center;
}

.login-logo::after {
  content: "";
  display: block;
  width: 100%;
  height: 6px;
  background: #f2851e;
  border-radius: 3px;
  margin-top: 5px;
}

.login-title {
  font-size: 1.14rem;
  font-weight: 400;
  color: #333;
  margin-bottom: 2.1em;
  letter-spacing: 0.02em;
  text-align: center;
}

.login-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.1em;
}

.login-input {
  font-family: inherit;
  padding: 0.85em 1em;
  font-size: 1.04rem;
  border: 1.7px solid #ddd;
  border-radius: 0.7em;
  background: #f9f9f9;
  outline: none;
  transition: border .2s;
}
.login-input:focus {
  border-color: #f2851e;
  background: #fff;
}

.login-button {
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  background: #f2851e;
  color: #fff;
  border: none;
  border-radius: 0.7em;
  padding: 0.85em 1em;
  cursor: pointer;
  transition: background .18s;
  margin-top: 0.6em;
  box-shadow: 0 2px 8px rgba(242,133,30,0.08);
}
.login-button:hover {
  background: #db730d;
}

.login-footer {
  font-size: 0.95rem;
  color: #888;
  margin-top: 1.7em;
  text-align: center;
}

@media (max-width: 480px) {
  .login-container {
    min-width: 95vw;
    padding: 1.2rem 0.8rem 1.2rem 0.8rem;
  }
}

/* ==== Fin estilos Login ==== */

/* ==== estilos Alquileres ==== */
main.alquileres-page {
  padding: 40px 20px;
  background: var(--gris-oscuro);
  margin-top: 70px; /* un poco más de margen para que no se esconda tras el header */
  margin-bottom: 60px;
}

.alquileres-container {
  width: 100%;
  max-width: 900px; /* menos ancho para que las cartillas sean más estilizadas */
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* siempre 2 columnas en escritorio */
  gap: 30px; /* más espacio entre tarjetas */
}

.alquiler-card {
  position: relative;
  height: 500px; /* más alto tipo cartilla */
  border-radius: 15px;
  overflow: hidden;
  cursor: pointer;
  background-size: cover;
  background-position: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  transition: transform 0.3s;
}

.alquiler-card:hover {
  transform: scale(1.05);
}

.alquiler-overlay {
  position: absolute;
  bottom: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 123, 255, 0.75);
  color: #fff;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  transition: bottom 0.4s ease;
  overflow-y: auto; /* scroll solo si es necesario */

  /* Estiliza el scroll */
  scrollbar-width: thin;             /* Firefox: scroll delgado */
  scrollbar-color: rgba(255,255,255,0.4) transparent; 
}

/* Chrome, Edge, Safari */
.alquiler-overlay::-webkit-scrollbar {
  width: 6px;              /* delgado */
}

.alquiler-overlay::-webkit-scrollbar-track {
  background: transparent;  /* sin fondo */
}

.alquiler-overlay::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.4); /* semi-transparente */
  border-radius: 10px;
  transition: background 0.3s;
}

.alquiler-overlay::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.7); /* más visible al pasar mouse */
}

.alquiler-card:hover .alquiler-overlay {
  bottom: 0;
}

.alquiler-overlay h3 {
  margin: 0 0 10px 0;
  font-size: 1.5rem;
}

.alquiler-overlay p {
  font-size: 0.95rem;
  line-height: 1.3;
  text-align: justify;
}

.alquileres-no-data {
  text-align: center;
  font-size: 1.2rem;
  color: #ccc;
  grid-column: 1/-1;
}

/* Responsive */
@media (max-width: 768px) {
  .alquileres-container {
    grid-template-columns: 1fr; /* en móvil solo 1 tarjeta */
  }
  .alquiler-card {
    height: 350px; /* un poco menos alto en móvil */
  }
  .alquiler-overlay h3 {
    font-size: 1.2rem;
  }
  .alquiler-overlay p {
    font-size: 0.85rem;
  }
}
/* ==== Fin estilos Alquileres ==== */

/* ==== estilos Servicios ==== */
main.servicios-page {
  padding: 40px 20px;
  background: var(--gris-oscuro);
  margin-top: 70px; /* un poco más de margen para que no se esconda tras el header */
  margin-bottom: 60px;
}

.servicios-container {
  width: 100%;
  max-width: 1000px; /* menos ancho para que las cartillas sean más estilizadas */
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* siempre 2 columnas en escritorio */
  gap: 30px; /* más espacio entre tarjetas */
}

.servicio-card {
  position: relative;
  height: 500px; /* más alto tipo cartilla */
  border-radius: 15px;
  overflow: hidden;
  cursor: pointer;
  background-size: cover;
  background-position: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  transition: transform 0.3s;
}

.servicio-card:hover {
  transform: scale(1.05);
}

.servicio-overlay {
  position: absolute;
  bottom: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 123, 255, 0.75);
  color: #fff;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  transition: bottom 0.4s ease;
  overflow-y: auto; /* scroll solo si es necesario */

  /* Estiliza el scroll */
  scrollbar-width: thin;             /* Firefox: scroll delgado */
  scrollbar-color: rgba(255,255,255,0.4) transparent; 
}

/* Chrome, Edge, Safari */
.servicio-overlay::-webkit-scrollbar {
  width: 6px;              /* delgado */
}

.servicio-overlay::-webkit-scrollbar-track {
  background: transparent;  /* sin fondo */
}

.servicio-overlay::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.4); /* semi-transparente */
  border-radius: 10px;
  transition: background 0.3s;
}

.servicio-overlay::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.7); /* más visible al pasar mouse */
}

.servicio-card:hover .servicio-overlay {
  bottom: 0;
}

.servicio-overlay h3 {
  margin: 0 0 10px 0;
  font-size: 1.5rem;
}

.servicio-overlay p {
  font-size: 0.95rem;
  line-height: 1.3;
  text-align: justify;
}

.servicios-no-data {
  text-align: center;
  font-size: clamp(0.75rem, 1vw, 0.95rem); /* se ajusta si el espacio es pequeño */
  color: #ccc;
  grid-column: 1/-1;
}

/* Responsive */
@media (max-width: 768px) {
  .servicios-container {
    grid-template-columns: 1fr; /* en móvil solo 1 tarjeta */
  }
  .servicio-card {
    height: 350px; /* un poco menos alto en móvil */
  }
  .servicio-overlay h3 {
    font-size: 1.2rem;
  }
  .servicio-overlay p {
    font-size: 0.85rem;
  }
}
/* ==== Fin estilos Servicios ==== */

/* ==== estilos repuestos ==== */
main.repuestos-page {
  padding: 40px 20px;
  background: var(--gris-oscuro);
  margin-top: 70px;
  margin-bottom: 60px;
}

.repuestos-container {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.repuesto-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.repuesto-card {
  position: relative;
  height: 500px;
  width: 100%;
  border-radius: 15px;
  overflow: hidden;
  cursor: pointer;
  background-size: cover;
  background-position: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  transition: transform 0.3s;
}

.repuesto-card:hover {
  transform: scale(1.05);
}

.repuesto-overlay {
  position: absolute;
  bottom: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 123, 255, 0.75);
  color: #fff;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  transition: bottom 0.4s ease;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.4) transparent;
}

.repuesto-overlay::-webkit-scrollbar {
  width: 6px;
}
.repuesto-overlay::-webkit-scrollbar-track {
  background: transparent;
}
.repuesto-overlay::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.4);
  border-radius: 10px;
}
.repuesto-overlay::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.7);
}

.repuesto-card:hover .repuesto-overlay {
  bottom: 0;
}

.repuesto-overlay h3 {
  margin: 0 0 10px 0;
  font-size: 1.5rem;
}

.repuesto-overlay p {
  font-size: 0.95rem;
  line-height: 1.3;
  text-align: justify;
}

.repuestos-no-data {
  text-align: center;
  font-size: clamp(0.75rem, 1vw, 0.95rem);
  color: #ccc;
  grid-column: 1/-1;
}

/* Botón debajo de la tarjeta */
.btn-detalle-wrap {
  margin-top: 25px;      /* más separación respecto a la tarjeta */
  margin-bottom: 25px;   /* más espacio hacia abajo */
  display: flex;
  justify-content: center; /* centrado horizontal */
  width: 100%;
}

.btn-ver-detalle {
  display: inline-block;
  background: #e67e22;
  color: #fff;
  font-weight: 600;
  padding: 12px 18px; /* un poco más de padding para darle aire */
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.95rem;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
  transition: all 0.25s ease-in-out;
  text-align: center; /* texto centrado */
}

.btn-ver-detalle:hover {
  background: #cf6e1b;
  box-shadow: 0 0 18px rgba(230, 126, 34, 0.7);
  transform: translateY(-2px);
}

/* Responsive mejorado */
@media (max-width: 1024px) {
  .repuestos-container {
    grid-template-columns: repeat(2, 1fr); /* dos productos por fila */
  }
  .repuesto-card {
    height: 420px;
  }
}

@media (max-width: 600px) {
  .repuestos-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  .repuesto-card {
    height: 300px;
  }
  .repuesto-overlay h3 {
    font-size: 1rem;
  }
  .repuesto-overlay p {
    font-size: 0.8rem;
  }
  .btn-ver-detalle {
    width: 100%; /* en móviles que ocupe todo el ancho */
  }
}

/* Paginación debajo de las tarjetas */
.pagination-wrap {
  display: flex;
  justify-content: center;
  margin-top: 30px;
  gap: 6px;
  flex-wrap: wrap;
}

.page-link {
  background: #fff;
  border: 1px solid #ddd;
  color: #e67e22;
  padding: 8px 14px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.page-link:hover {
  background: #e67e22;
  color: #fff;
  transform: translateY(-2px);
}

.page-link.active {
  background: #e67e22;
  color: #fff;
  font-weight: 700;
}
/* ==== Fin estilos repuestos ==== */

/* ==== estilos detalle de repuesto ==== */
.detalle-container {
  max-width: 1200px;
  margin: 70px auto 60px;
  padding: 20px;
}

/* Botón volver */
.btn-regresar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #e67e22;
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  margin-bottom: 30px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.15);
  transition: all 0.25s ease-in-out;
}
.btn-regresar:hover {
  background: #cf6e1b;
  box-shadow: 0 0 18px rgba(230,126,34,0.7);
  transform: translateY(-2px);
}

/* Layout en dos columnas */
.detalle-layout {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

/* Galería */
.detalle-galeria {
  flex: 1;
  position: relative;
  max-width: 500px;
}

.detalle-img-wrapper {
  position: relative;
}

/* Imagen principal */
.detalle-main-img {
  width: 100%;
  max-width: 500px;
  height: 800px;            /* Altura fija */
  object-fit: contain;      /* Se ajusta sin deformarse */
  background: #fff;         /* Relleno blanco */
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  display: block;
  margin: 0 auto;
}

/* Botones navegación */
.nav-btn {
  position: absolute;
  top: 45%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 10px;
  border-radius: 50%;
  z-index: 5;
}
.nav-btn.prev { left: -20px; }
.nav-btn.next { right: -20px; }
.nav-btn:hover { background: rgba(0,0,0,0.7); }

/* Miniaturas */
.detalle-sec-imgs {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  flex-wrap: wrap;
  justify-content: center;
}
.detalle-sec-imgs img {
  width: 80px;
  height: 60px;
  object-fit: contain;      /* Se ajusta sin recortarse */
  background: #fff;         /* Fondo blanco */
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border 0.2s, transform 0.2s;
}
.detalle-sec-imgs img:hover,
.detalle-sec-imgs img.active {
  border: 2px solid #e67e22;
  transform: scale(1.05);
}

/* Columna info */
.detalle-info {
  flex: 1;
  color: #fff;
}
.detalle-info h2 {
  margin-bottom: 12px;
  font-size: 2rem;
}
.detalle-info h3 {
  margin-top: 20px;
  margin-bottom: 8px;
  font-size: 1.2rem;
  color: #e67e22;
}
.detalle-info p {
  line-height: 1.5;
  font-size: 1rem;
  color: #ccc;
  text-align: justify;
}

/* Especificaciones formateadas */
.detalle-especificaciones {
  line-height: 1.2;   /* compacto */
  margin: 0;
  white-space: normal; /* evita doble salto */
}

.detalle-especificaciones strong {
  color: #fff;
  font-weight: 700;
  display: block;
}

/* Títulos de especificaciones (los que vienen de { }) */
.detalle-especificaciones .titulo-especificacion {
  display: block;
  margin-top: 14px;   /* más espacio arriba de los títulos */
  margin-bottom: 4px;
  line-height: 1.3;
  color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
  .detalle-layout {
    flex-direction: column;
    gap: 20px;
  }

  .detalle-galeria {
    max-width: 100%;
  }

  .detalle-main-img {
    height: 280px;  /* Más baja en móvil */
  }

  .nav-btn.prev { left: 10px; }
  .nav-btn.next { right: 10px; }

  /* Ajustes de tipografía en móvil */
  .detalle-info h2 {
    font-size: 1.4rem;   /* antes más grande */
  }

  .detalle-info h3 {
    font-size: 1rem;     /* subtítulos más compactos */
  }

  .detalle-info p {
    font-size: 0.9rem;   /* texto más pequeño */
    line-height: 1.4;    /* menos espacio entre líneas */
  }
}
/* ==== fin estilos detalle de repuesto ==== */
