/* =================== RESET Y GENERALES =================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Epilogue", sans-serif;
  line-height: 1.6;
  background-color: #f9f9f9;
  color: #333;
  font-size: 14px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: revert;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
  padding: 20px 0;
}

.section {
  padding: 90px 0;
}

/* Ajuste de padding para secciones específicas */
#servicios {
  padding-top: 40px;
}

#sobre {
  padding-top: 40px;
}

.bg-light {
  background-color: #f1f1f1;
}

/* Clase para corregir el anclaje del scroll con header fijo */
.section-anchor {
  scroll-margin-top: 70px;
}

h2 {
  color: #c24e4e;
  font-size: 2.2em;
  text-align: center;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* =================== HEADER Y NAVEGACIÓN =================== */
header {
  background: #c24e4e;
  color: white;
  padding: 0px 0;
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

header h1 {
  font-size: 22px;
  line-height: 1.1;
  position: relative;
  z-index: 1;
  margin: 0;
  margin-left: 70px;
}

.header-logo {
  position: fixed;
  top: 0px;
  left: 20px;
  height: 70px; /* Aumentamos el tamaño */
  z-index: 1001; /* Aseguramos que esté sobre el header */
  transition: transform 0.2s;
  margin-left: 25px;
}
.header-logo:hover {
  transform: scale(1.1);
}

nav ul {
  list-style: none;
}

nav ul li {
  display: inline;
  margin-left: 20px;
}

nav ul li a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  font-size: 18px;
}

.lang-switcher-inline a {
  margin-left: 6px;
  margin-right: 0;
  display: inline-block;
}

.lang-switcher-inline img {
  height: 18px;
  vertical-align: middle;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s;
}

.lang-switcher-inline a:hover img {
  transform: scale(1.1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.menu-toggle {
  display: none;
}

/* =================== HERO (PRESUPUESTO) =================== */
.hero-img-container-custom {
  position: relative;
  text-align: left;
  width: 100%;
}
.hero-img-van-custom {
  max-height: 500px;
  object-fit: cover;
  width: 100%;
}

.hero-img-overlay-custom {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.hero-img-overlay-content-custom {
  padding: 18px 32px;
  margin-left: 32px;
  margin-top: 20px;
  max-width: 480px;
}
.hero-overlay-p {
  font-size: 20px;
  color: #fff;
  margin: 0 0 10px 0;
  line-height: 1.2;
}

.hero-overlay-p-last {
  margin-bottom: 20px;
}

.hero-overlay-btn {
  background-color: #c24e4e;
  color: white;
  border: none;
  padding: 12px 28px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 18px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  margin-top: 5px;
}
.hero-img-container-custom,
.hero-img-van-custom {
  height: 100%;
}

/* --- Layout de Presupuesto y Formulario --- */
.presupuesto-grid-container {
  display: flex;
  width: 100%;
  background-color: #f1f1f1;
}

.presupuesto-info-col {
  flex: 1 1 60%;
  position: relative;
}

.presupuesto-form-col {
  flex: 1 1 40%;
  padding: 40px 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.presupuesto-form-col h2 {
  margin-bottom: 20px;
  text-align: left;
}

.presupuesto-form-col .contact-form {
  width: 100%;
  margin-top: 0;
}

/* =================== SERVICIOS (CARDS) =================== */
.cards {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 30px;
  justify-content: center;
}

.card {
  background: white;
  padding: 20px;
  flex: 1 1 45%; /* Ajustamos la base para que entren dos por fila */
  max-width: 45%; /* Límite para que no crezcan demasiado */
  border: 1px solid #ddd;
  border-radius: 5px;
}

.card h3 {
  font-size: 1.57em; /* Equivalente a ~22px */
  margin-bottom: 10px;
}

.card h3,
.card p {
  margin-left: 10px;
  margin-right: 10px;
}

.card p {
  font-size: 1.29em; /* Equivalente a ~18px */
  margin-bottom: 20px;
}

.servicio-img {
  width: calc(100% - 40px);
  height: 205px;
  object-fit: cover;
  display: block;
  margin: 20px auto 12px auto;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* =================== PINTURA =================== */
.pintura-container {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.pintura-img-overlay-container {
  position: relative;
  display: inline-block;
  margin: 0 auto 18px auto;
}
.pintura-img-small {
  display: block;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  width: auto;
  height: auto;
  max-width: 100%;
}

.pintura-img-overlay-content {
  position: absolute;
  top: 0;
  right: 0;
  width: 60%;
  height: 100%;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 18px 22px 18px 18px;
  border-radius: 0 10px 10px 0;
  box-sizing: border-box;
  min-height: 100px;
  max-height: 100%;
  padding-left: 150px;
}

.pintura-img-overlay-content h2 {
  font-size: 40px;
  margin-bottom: 10px;
  text-align: left;
  margin-left: 0;
  margin-right: 0;
  line-height: 1.3;
  margin-bottom: 18px;
  color: #fff;
}

.pintura-img-overlay-content p {
  font-size: 1em;
  margin-bottom: 12px;
  text-align: left;
  margin-left: 0;
  margin-right: 0;
}

.pintura-img-overlay-content button {
  margin-top: 18px;
  background-color: #feffff;
  display: block;
  margin-left: 0;
  margin-right: 0;
  color: #c24e4e;
}

#pintura .pintura-img-overlay-content h2 {
  max-width: 380px;
  white-space: normal;
  word-break: break-word;
}

/* =================== SOBRE NOSOTROS =================== */
.sobre-nosotros-flex {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 60px;
  margin-top: 30px;
  margin-bottom: 30px;
}

.sobre-nosotros-texto {
  flex: 1 1 340px;
  min-width: 260px;
  max-width: 540px;
  margin-left: -125px;
}

.sobre-nosotros-titulo {
  color: #c24e4e;
  text-align: center;
  font-size: 2.2em;
  margin-bottom: 18px;
}

.sobre-nosotros-sub {
  color: #c24e4e;
  font-size: 1.5em;
  font-weight: bold;
  margin-bottom: 18px;
}

.sobre-nosotros-texto p {
  font-size: 1.1em;
  margin-bottom: 12px;
  color: #444;
}

.sobre-nosotros-collage {
  flex: 0 0 320px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.sobre-nosotros-collage-img {
  width: 320px;
  max-width: 100%;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  margin-left: 270px;
}

/* =================== FORMULARIO =================== */
form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 20px;
}

form input,
form textarea {
  font-family: inherit;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

form button {
  padding: 10px;
  background: #c24e4e;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

form button:hover {
  background: #06314d;
}

/* =================== TESTIMONIOS =================== */
.testimonials-section {
  text-align: center;
  padding: 40px 20px;
  max-width: 1200px;
  width: 100%;
  box-sizing: border-box;
  margin-left: auto;
  margin-right: auto;
}

.section-title {
  font-family: "Montserrat", sans-serif;
  font-size: 2.2em;
  font-weight: 700;
  color: #c24e4e;
  margin-bottom: 50px;
}

.testimonials-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 70px 30px;
}

/* Tarjeta de Testimonio */
.testimonial-card {
  background-color: #fff;
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.07);
  padding: 30px 25px;
  width: 290px;
  max-width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

/* Tarjeta azul central */
.testimonial-card.blue-card {
  background-color: #c24e4e;
  color: #fff;
  box-shadow: 0 10px 30px rgba(194, 78, 78, 0.3);
}

.testimonial-card.blue-card .client-name,
.testimonial-card.blue-card .client-title,
.testimonial-card.blue-card .testimonial-text {
  color: #fff;
}

.testimonial-card.blue-card .stars .star {
  color: #fff;
}

.testimonial-card.blue-card .quote-icon {
  color: rgba(255, 255, 255, 0.6);
}

.profile-picture {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 20px;
  border: 5px solid #fff;
  box-shadow: 0 0 0 5px rgba(0, 0, 0, 0.05);
  position: relative;
  top: -60px;
  margin-bottom: -40px;
  background-color: #eee;
}

.profile-picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Estrellas */
.stars {
  margin-top: 15px;
  margin-bottom: 15px;
  color: #000000;
  font-size: 1.2em;
}

.stars .star {
  margin: 0 2px;
}

.client-name {
  font-family: "Montserrat", sans-serif;
  font-size: 1.4em;
  font-weight: 600;
  color: #333;
  margin: 10px 0 5px;
}

.client-title {
  font-size: 0.9em;
  color: #777;
  margin-bottom: 15px;
}

.quote-icon {
  font-family: serif;
  font-size: 3em;
  font-weight: 700;
  color: #c24e4e;
  line-height: 0.8;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}

.testimonial-text {
  font-size: 0.95em;
  line-height: 1.6;
  color: #555;
  margin-top: 0;
}

/* =================== FOOTER =================== */
footer {
  background: #c24e4e;
  color: #ccc;
  text-align: center;
  padding: 20px 0;
  margin-top: 80px;
}

/* =================== ELEMENTOS FLOTANTES =================== */
.whatsapp-float.top {
  position: fixed;
  bottom: 100px;
  right: 30px;
  z-index: 2001;
  background: #c24e4e;
}

.whatsapp-float img {
  width: 36px;
  height: 36px;
}

.whatsapp-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 2000;
  background: #25d366;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  padding: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.2s, transform 0.2s;
}

.whatsapp-float:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
  transform: scale(1.08);
}

/* =================== RESPONSIVE =================== */

@media (max-width: 992px) {
  /* --- TABLETS --- */

  .presupuesto-grid-container {
    flex-direction: column;
  }

  .presupuesto-info-col,
  .presupuesto-form-col {
    order: initial; /* Asegura el orden natural del HTML */
  }

  .presupuesto-form-col {
    padding: 40px 20px;
  }

  .presupuesto-form-col h2 {
    text-align: center;
  }

  #presupuesto.section-anchor {
    scroll-margin-top: 55px;
  }

  .hero-img-van-custom {
    height: 220px;
  }

  #servicios {
    padding-top: 10px;
  }

  .cards {
    margin-top: 20px;
  }

  .sobre-nosotros-flex {
    flex-direction: column;
    align-items: center;
    gap: 40px;
  }
  .sobre-nosotros-texto {
    margin-left: 0;
    text-align: left;
    max-width: 100%;
    padding: 0 40px;
  }
  .sobre-nosotros-collage-img {
    margin-left: 0;
  }

  .pintura-img-overlay-container {
    background-color: #c24e4e;
    height: 220px;
  }

  .pintura-container {
    margin-top: 0;
  }

  .pintura-img-small {
    display: none;
  }
  .pintura-img-overlay-content {
    position: static;
    width: 100%;
    height: 100%;
    border-radius: 10px;
  }

  .pintura-img-overlay-content h2 {
    font-size: 32px;
  }

  .menu-toggle {
    display: block;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 20px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    z-index: 2002;
    background: none;
    border: none;
    box-sizing: border-box;
  }

  .menu-toggle span,
  .menu-toggle::before,
  .menu-toggle::after {
    content: "";
    display: block;
    position: absolute;
    left: 4px;
    width: 28px;
    height: 4px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s;
  }

  .menu-toggle::before {
    top: 8px;
  }
  .menu-toggle::after {
    top: 24px;
  }
  .menu-toggle span {
    top: 16px;
  }
  .menu-toggle.active::before {
    top: 16px;
    transform: rotate(45deg);
  }
  .menu-toggle.active::after {
    top: 16px;
    transform: rotate(-45deg);
  }
  .menu-toggle.active span {
    opacity: 0;
  }

  nav ul {
    float: none;
    position: absolute;
    top: 55px;
    right: 0;
    width: 100%;
    background: #c24e4e;
    flex-direction: column;
    max-height: 0;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    margin-right: 0;
    transition: max-height 0.4s ease-out;
  }

  nav ul.open {
    max-height: 400px;
  }

  nav ul li {
    display: block;
    margin: 18px 0;
    text-align: right;
    padding-right: 24px;
  }

  header h1 {
    font-size: 18px;
    margin-left: 10px;
    padding-right: 55px; /* Aumentamos el espacio para evitar que se pegue al menú */
  }

  .header-logo {
    position: static; /* Vuelve al flujo normal del documento */
    height: 55px; /* Tamaño más grande para móvil */
    margin-left: 0; /* Eliminamos el margen */
    transition: none; /* Quitamos la transición */
    z-index: 1;
  }

  .testimonials-container {
    flex-direction: column;
    align-items: center;
    gap: 60px;
  }

  .testimonial-card {
    width: 90%;
    max-width: 450px;
  }

  .testimonial-card:nth-child(n + 4) {
    display: none;
  }
}

@media (min-width: 769px) and (max-width: 992px) {
  /* --- AJUSTES ESPECÍFICOS PARA TABLETS (e.g., iPad Air) --- */

  .hero-img-van-custom {
    height: 300px;
  }
  .hero-img-overlay-content-custom {
    margin-left: 40px;
  }
  .hero-overlay-p {
    font-size: 18px;
  }
  .hero-overlay-btn {
    font-size: 16px;
    padding: 10px 20px;
  }

  .pintura-img-overlay-container {
    height: 250px;
    width: 100%;
  }
  #pintura .pintura-img-overlay-content {
    align-items: center;
    text-align: center;
    padding-left: 40px;
    justify-content: center;
  }
  #pintura .pintura-img-overlay-content h2 {
    text-align: center;
  }
}

@media (max-width: 768px) {
  /* --- SMARTPHONES GRANDES Y TABLETS (VERTICAL) --- */

  /* Hero: Ajusta el texto y el botón */
  .hero-img-overlay-content-custom {
    padding: 10px 10px;
    margin-left: 30px;
    margin-top: 10px;
    max-width: 90%;
    text-align: left;
  }
  .hero-overlay-p {
    font-size: 15px;
    line-height: 1.3;
    margin-bottom: 8px;
  }
  .hero-overlay-btn {
    font-size: 13px;
    padding: 7px 12px;
    margin-top: 8px;
    border-radius: 5px;
  }
  .hero-img-overlay-custom {
    align-items: flex-start;
  }

  /* Servicios: Apila las tarjetas */
  .cards {
    flex-direction: column;
    align-items: center;
  }

  .card {
    flex-basis: auto;
    width: 90%;
    max-width: 450px;
  }

  .pintura-img-overlay-container {
    width: 100%;
  }
  #pintura .pintura-img-overlay-content {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: rgba(194, 78, 78, 0.8);
    width: 100%;
    align-items: center;
    text-align: center;
    padding: 15px;
    border-radius: 10px;
    justify-content: center;
  }
  #pintura .pintura-img-overlay-content h2 {
    font-size: 20px;
    text-align: center;
    max-width: 100%;
    margin-bottom: 10px;
  }
  #pintura .pintura-img-overlay-content p {
    text-align: center;
    font-size: 14px;
    margin-bottom: 10px;
  }

  .section {
    padding: 40px 0;
  }
  .testimonials-section {
    padding-top: 0;
  }

  #sobre {
    padding-bottom: 10px;
  }
}

@media (max-width: 480px) {
  /* --- SMARTPHONES PEQUEÑOS --- */
  h2,
  .section-title,
  .sobre-nosotros-titulo {
    font-size: 1.8em;
  }

  .hero-overlay-p {
    font-size: 14px;
  }

  .sobre-nosotros-texto p {
    font-size: 1em;
  }
  .sobre-nosotros-sub {
    font-size: 1.3em;
  }
  .servicio-img {
    width: 100%;
  }

  /* Ajuste de anclaje para testimonios en móviles */
  #testimonios.section-anchor {
    scroll-margin-top: 85px;
  }

  #pintura .pintura-img-overlay-content h2 {
    font-size: 18px;
  }
  #pintura .pintura-img-overlay-content p {
    font-size: 13px;
  }
  #pintura .pintura-img-overlay-content .hero-overlay-btn {
    font-size: 14px;
    padding: 8px 16px;
  }

  .profile-picture {
    width: 80px;
    height: 80px;
    top: -50px;
    margin-bottom: -30px;
  }
}
