/* ===== Banner Optimizado ===== */
.banner {
  background: url('/assets/img/fondocr2.PNG') no-repeat center center;
  background-size: cover;
  height: 45vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-color: #b7b7b7;
  position: relative;
  overflow: hidden;
}
.banner::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: transparent;
  z-index: 1;
}
.banner-content, .banner-texto {
  position: relative;
  z-index: 2;
  max-width: 900px;
  width: 100%;
  padding: 40px 20px;
  margin: 0 auto;
}
.banner-texto {
  text-shadow: 2px 2px 6px rgba(20,43,112,0.25);
}
.banner h1, .banner-texto h2 {
  font-size: 3rem;
  font-weight: bold;
  margin-bottom: 20px;
  line-height: 1.2;
  color: #fff;
}
.banner p {
  font-size: 1.6rem;
  margin-bottom: 30px;
  color: #fff;
  font-weight: bold;
}
.banner a, .banner .btn {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 30px;
  background: #fff;
  color: #142b70;
  padding: 14px 28px;
  display: inline-block;
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.3s, transform 0.2s;
}
.banner .btn:hover, .banner a:hover {
  background: #e2e2e2;
  transform: scale(1.05);
}
/* Texto del banner movido fuera */
.banner-contenido {
  text-align: center;
  padding: 15px 40px;
  background: #f2f0f0; /* Fondo blanco para separar del banner */
  margin: 0 auto;
  max-width: 1400px;
}

.banner-contenido h1 {
  font-size: 2.2rem;
  color: #142b70;
  margin-bottom: 5px;
}

.banner-contenido p {
  font-size: 1.9rem;
  color: #142b70;
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
  .banner-contenido h1 {
    font-size: 1.5rem;
  }
  .banner-contenido p {
    font-size: 1.2rem;
	text-align: justify;
  }
}

/* ===== Responsive Banner ===== */
@media (max-width: 1024px) {
  .banner {
    height: 30vh;
	background-size: contain;
  }
  .banner h1, .banner-texto h2 { font-size: 2rem; }
  .banner-content, .banner-texto { padding: 28px 12px; }
  .banner p { font-size: 1.2rem; }
}
@media (max-width: 768px) {
  .banner {
    height: 18vh;
	background-size: contain;	
  }
  .banner-content, .banner-texto {
    padding: 12px 7px;
    max-width: 98vw;
  }
  .banner h1, .banner-texto h2 { font-size: 1.4rem; }
  .banner p { font-size: 1rem; }
  .banner .btn, .banner a {
    font-size: 0.96rem;
    padding: 9px 18px;
  }
}

/* ===== Seccion Acerca de Nosotros Optimizada ===== */

#acerca {
  padding: 15px 30px;
  background-color: #f2f0f0;
}

.acerca-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 40px;
  max-width: 1400px;
  margin: 0 auto;
}

.acerca-img {
  flex: 1;
}
.acerca-img img {
  width: 100%;
  max-width: 650px;
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Texto de Acerca de */
.acerca-texto {
  flex: 1;
  text-align: left;
  padding: 0 18px;
}
.acerca-texto h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: #142b70;
}
.acerca-texto p {
  text-align: justify;
  font-size: 1.3rem;
  line-height: 1.6;
  color: #142b70;
  font-weight: bold;
}

/* Tablets: apilar elementos y centrar texto */
@media (max-width: 1024px) {
  .acerca-container {
    flex-direction: column;
    text-align: center;
    gap: 24px;
  }
  .acerca-img img {
    max-width: 420px;
    margin: 0 auto;
  }
  .acerca-texto {
    text-align: center;
    padding: 0 24px;
  }
}
/* Moviles */
@media (max-width: 768px) {
  #acerca {
    padding: 60px 20px; /* menos padding */
  }

  .acerca-texto h2 {
    font-size: 1.8rem; /* mas compacto */
    line-height: 1.3;
  }

  .acerca-texto p {
    font-size: 1.1rem; /* tamano base optimo */
    line-height: 1.4; /* mas ajustado */
    text-align: justify;  /*left mejor legibilidad */
    font-weight: normal; /* evitar que se vea muy ¡§pesado¡¨ en moviles */
    margin-bottom: 1rem;
  }

  .acerca-img img {
    max-width: 110%;
  }
}

/* ===== Seccion Servicios Optimizada ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

#servicios {
  background-color: #fc6f23;
  padding: 15px 20px;
  text-align: center;
}

.servicios-container h2 {
  font-size: 2.5rem;
  margin-bottom: 50px;
  color: #ffffff;
  font-weight: bold;
  text-align: center;
}

/* === Sub-secciones (Plomberie / Electricite) === */
.subservicios {
  margin-bottom: 60px;
}

.subservicios h3 {
  font-size: 1.8rem;
  margin-bottom: 30px;
  text-align: center;
  color: #ffffff;
  font-weight: 600;
  position: relative;
}

/* Linea decorativa bajo subtitulos */
.subservicios h3::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: #ffffff;
  margin: 10px auto 0;
  border-radius: 2px;
}

/* Grid general de tarjetas */
.cards-container,
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  max-width: 1300px;
  margin: 0 auto;
  align-items: stretch;
  justify-items: center;
  padding: 0 15px;
}

/* Tablets: 2 columnas */
@media (max-width: 1024px) {
  .cards-container,
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    max-width: 900px;
    padding: 0 12px;
  }
}

/* Moviles: 1 columna */
@media (max-width: 768px) {
  .cards-container,
  .grid {
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 100%;
    padding: 2px; /* corregido */
  }
  
  /* Ajustar tarjetas en moviles */
  .card {
    height: auto; /*  quitar altura fija */
    min-height: 200px; /* altura minima flexible */
    padding: 20px 15px;
  }

  /* Evitar desbordamiento de imagenes */
  .cards-container img,
  .grid img {
    max-width: 50%;
    height: auto;
    display: block;
    object-fit: contain;
  }
}
/* Moviles: ajustar card6 */
@media (max-width: 768px) {
  .card6 {
    background: url('/assets/img/servicio6.png') no-repeat center center;
    background-size: contain; /*  Se ajusta dentro sin recortarse */
    background-color: #fc6f23; /* Mantiene fondo naranja */
    min-height: 200px; /* para que no se vea aplastada */
  }
}

/* === Tarjetas === */
.card {
  background: white;
  border-radius: 12px;
  padding: 30px 20px;
  width: 100%;
  height: 240px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  color: #ebe8e8;
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin: 0;
}

.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.card h3,
.card p {
  position: relative;
  z-index: 2;
  color: #ebe8e8;
  font-weight: bold;
  font-size: 1.4rem;
  line-height: 1.8;
  text-align: center;
}

.card h3 {
  margin-bottom: 10px;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

/* Fondos unicos por tarjeta */
.card1 { background-image: url('/assets/img/servicio1.jpg'); }
.card2 { background-image: url('/assets/img/servicio2.jpg'); }
.card3 { background-image: url('/assets/img/servicio3.jpg'); }
.card4 { background-image: url('/assets/img/servicio4.jpg'); }
.card5 { background-image: url('/assets/img/servicio5.jpg'); }
.card6 {
  background: url('/assets/img/servicio6.png') no-repeat center center;
  background-size: contain;
}
.card7 { background-image: url('/assets/img/servicio7.jpg'); }
.card8 { background-image: url('/assets/img/servicio8.jpg'); }
.card9 { background-image: url('/assets/img/servicio9.jpg'); }

/* Eliminar la capa translucida */
.card6::before {
  content: none !important;
}
.card6.sin-capa::before {
  background: none !important;
}

/* Hover suave para tarjetas */
.servicios .card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

/* Iconos de servicio */
.icono-servicio {
  width: 60px;
  height: 60px;
  margin-bottom: 15px;
}


/* ===== Seccion Proyectos (Puntos fuertes) Optimizada ===== */
#proyectos {
  background-color: #f7a60b;
  padding: 15px 20px;
  text-align: center;
}

.proyectos-container h2 {
  font-size: 2.5rem;
  margin-bottom: 40px;
  color: #ffffff;
  font-weight: bold;
}

/* Grid responsive */
.grid.proyectos {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 15px;
  align-items: stretch;
}

/* Tablets: 2 columnas */
@media (max-width: 1024px) {
  .grid.proyectos {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 900px;
  }
}

/* Moviles: 1 columna */
@media (max-width: 768px) {
  .grid.proyectos {
    grid-template-columns: 1fr;
    gap: 18px;
    max-width: 100%;
    padding: 0 8px;
  }
}

/* ===== Tarjetas ===== */
#proyectos .proyecto-card {
  /*background: transparent;  /* fondo tarjetas transarente*/
  background: rgba(255, 140, 0, 0.4);
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  text-align: center;
}

.proyecto-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

/* Imagen (solo si se usa) */
.proyecto-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 12px;
}
.proyecto-card img:empty {
  display: none; /* evita "espacio fantasma" si no hay imagen */
}

/* ===== Titulos ===== */
#proyectos .proyecto-card h3 {
  font-size: 1.4rem !important;
  margin: 0 0 0.4rem !important;
  color: #fff !important;
  font-weight: bold !important;
  min-height: 2.2em; /* ?? asegura misma altura */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== Parrafos ===== */
#proyectos .proyecto-card p {
  font-size: 1rem !important;
  line-height: 1.4 !important;   /* ?? compacto */
  color: #eee !important;
  margin: 0 !important;
  text-align: justify;
  display: -webkit-box !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 6 !important; /* ?? maximo 4 lineas */
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
/* ===== Seccion Contacto Optimizada ===== */
/* Estilos para el formulario de contacto */

form {
  max-width: 600px;
  margin: 0 auto;
  padding: 15px;
  background: ##142b70;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  font-family: inherit;
  text-align: center;
}

form label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: #142b70;
  font-size: 1.1rem;
}

form input[type="text"],
form input[type="email"],
form textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  margin-bottom: 20px;
  box-sizing: border-box;
  transition: border-color 0.3s ease;
}

form input[type="text"]:focus,
form input[type="email"]:focus,
form textarea:focus {
  outline: none;
  border-color: #0077cc;
  box-shadow: 0 0 6px rgba(0,119,204,0.4);
}

form textarea {
  resize: vertical;
  min-height: 120px;
}

form button[type="submit"] {
  background-color: #0077cc;
  color: white;
  border: none;
  padding: 14px 32px;
  border-radius: 50px;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

form button[type="submit"]:hover,
form button[type="submit"]:focus {
  background-color: #005fa3;
  transform: scale(1.05);
  outline: none;
}

/* Responsive: formulario optimizado para moviles */
@media (max-width: 768px) {
  form {
    padding: 15px;
  }

  form button[type="submit"] {
    width: 100%;
    padding: 14px 0;
  }
}



#contacto {
  background: #142b70;
  padding: 80px 20px;
  text-align: center;
}

.contacto h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: #ffffff;
}

.contacto .intro {
  font-size: 1.2rem;
  margin-bottom: 40px;
  color: #ffffff;
}

/* Contenedor form y grid de items */
.contacto-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Formularios 
.contacto-form {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 20px;
}

.contacto-form input,
.contacto-form textarea {
  width: 100%;
  padding: 15px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1.8rem;
  font-family: inherit;
  box-sizing: border-box;
  resize: vertical;
}

.contacto-form button {
  background: #007bff;
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1rem;
  transition: background 0.3s ease;
}

.contacto-form button:hover {
  background: #0056b3;
}*/

/* Responsive Tablets */
@media (max-width: 1024px) {
  .contacto-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

/* Responsive M¨®viles */
@media (max-width: 768px) {
  .contacto-container {
    grid-template-columns: 1fr;
    gap: 15px;
    text-align: center;
    padding: 0 10px;
  }

  .contacto-container a {
    justify-content: center;
  }
}

/* ===== Seccion Datos de Contacto Optimizada ===== */

#info-contacto {
  padding: 20px 20px;
  background-color: #fc6f23;
  text-align: center;
}

#info-contacto h2 {
  font-size: 2.2rem;
  margin-bottom: 40px;
  color: #ffffff;
}

/* Grid de contacto */
.contacto-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.contacto-item {
  background: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
  cursor: default;
}

.contacto-item:hover {
  transform: translateY(-8px);
}

.contacto-item i {
  font-size: 2rem;
  color: #0077cc;
  margin-bottom: 15px;
}

.contacto-item p {
  font-size: 1rem;
  margin: 0;
}

/* ===== Responsive ===== */

/* Tablets (769px - 1024px) */
@media (max-width: 1024px) {
  #info-contacto h2 {
    font-size: 2rem;
  }

  .contacto-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 900px;
    padding: 0 10px;
  }
}

/* M¨®viles (¡Ü768px) */
@media (max-width: 768px) {
  #info-contacto {
    padding: 40px 15px;
  }

  #info-contacto h2 {
    font-size: 1.8rem;
    margin-bottom: 25px;
  }

  .contacto-grid {
    grid-template-columns: 1fr;
    gap: 15px;
    max-width: 100%;
    padding: 0 8px;
  }

  .contacto-item {
    padding: 20px;
  }

  .contacto-item i {
    font-size: 1.6rem;
    margin-bottom: 12px;
  }

  .contacto-item p {
    font-size: 0.95rem;
  }
}

/* ===== Bot¨®n flotante "Ir arriba" Optimizado ===== */
.btn-flotante {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #0077cc; /* color principal */
  color: white;
  font-size: 22px;
  text-decoration: none;
  border-radius: 50%;
  padding: 12px 18px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Hover */
.btn-flotante:hover {
  background-color: #005fa3;
  transform: scale(1.1);
}

/* M¨®viles */
@media (max-width: 768px) {
  .btn-flotante {
    bottom: 15px;
    right: 15px;
    padding: 10px 15px;
    font-size: 18px;
  }
}


