/* ========================= */
/* RESET Y VARIABLES */
/* ========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #1f2933;
  --secondary: #0b1c2d;
  --accent: #f5a623;
  --bg-light: #f8fafc;
  --text-dark: #222;
  --white: #ffffff;
}

/* ========================= */
/* ESTILOS BASE */
/* ========================= */
html,
body {
  overflow-x: hidden;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
  background: var(--bg-light);
  color: var(--text-dark);
}

/* ========================= */
/* HEADER */
/* ========================= */
header {
  background: var(--secondary);
  color: var(--white);
  padding: 15px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: 'Oswald', sans-serif;
  font-size: 26px;
  letter-spacing: 2px;
}

.logo img {
  background: transparent;
  height: 90px;
}

header nav {
  display: flex;
  gap: 0;
}

header nav a {
  color: var(--white);
  margin-left: 20px;
  text-decoration: none;
  transition: all 0.3s ease;
}

/* ========================= */
/* HERO */
/* ========================= */
.hero {
  min-height: 80vh;
  padding: 80px 40px;
  background: linear-gradient(rgba(11, 28, 45, 0.85), rgba(11, 28, 45, 0.85)),
    var(--secondary);
  color: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.hero h1 {
  font-family: 'Oswald', sans-serif;
  font-size: 2.5rem;
}

.hero p {
  max-width: 600px;
  font-size: 1.1rem;
  margin: 0;
}

/* ========================= */
/* BOTONES */
/* ========================= */
.btn {
  display: inline-block;
  background: var(--accent);
  color: #000;
  padding: 12px 25px;
  text-decoration: none;
  font-weight: bold;
  border-radius: 5px;
  width: fit-content;
  transition: all 0.3s ease;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.btn-outline {
  display: inline-block;
  border: 2px solid var(--primary);
  color: var(--primary);
  background: transparent;
  padding: 12px 25px;
  text-decoration: none;
  border-radius: 5px;
  transition: all 0.3s ease;
}

/* ========================= */
/* SECCIONES */
/* ========================= */
section {
  padding: 80px 20px;
  max-width: 1200px;
  margin: auto;
}

.section-light {
  background: var(--white);
}

.section-gray {
  background: #f1f5f9;
}

/* ========================= */
/* SERVICIOS */
/* ========================= */
.servicios {
  padding: 60px 40px;
}

.servicios h2 {
  font-family: 'Oswald', sans-serif;
  margin-bottom: 30px;
}

/* ========================= */
/* GRIDS */
/* ========================= */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.servicios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

.services-preview {
  display: grid;
  gap: 30px;
}

.contacto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  margin-top: 30px;
}

/* ========================= */
/* TARJETAS Y SERVICIOS */
/* ========================= */
.card {
  background: var(--white);
  padding: 30px;
  text-align: center;
  font-weight: bold;
  transition: all 0.3s ease;
}

.servicio,
.service {
  background: var(--white);
  padding: 25px;
  border-left: 5px solid var(--accent);
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.servicio h3 {
  font-family: 'Oswald', sans-serif;
  margin-bottom: 10px;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* ========================= */
/* VALORES */
/* ========================= */
.valores {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 30px;
}

.valor {
  background: var(--white);
  padding: 20px;
  font-weight: bold;
  border-left: 5px solid var(--accent);
  transition: all 0.3s ease;
}

/* ========================= */
/* PÁGINAS */
/* ========================= */
.pagina {
  padding: 60px 40px;
  max-width: 1000px;
  margin: auto;
}

.pagina h1 {
  font-family: 'Oswald', sans-serif;
  font-size: 36px;
  margin-bottom: 20px;
}

.pagina p {
  margin-bottom: 15px;
  line-height: 1.7;
}

/* ========================= */
/* WHY US */
/* ========================= */
.why-us ul {
  list-style: none;
  margin-top: 20px;
}

.why-us li {
  margin-bottom: 10px;
}

/* ========================= */
/* ABOUT PREVIEW */
/* ========================= */
.about-preview {
  text-align: center;
}

.about-preview h2 {
  font-family: 'Oswald', sans-serif;
  font-size: 2rem;
  margin-bottom: 20px;
}

.about-preview p {
  max-width: 700px;
  margin: 0 auto;
  font-size: 1.1rem;
}

/* ========================= */
/* CTA */
/* ========================= */
.cta {
  text-align: center;
}

.cta h2 {
  font-family: 'Oswald', sans-serif;
  font-size: 2rem;
  margin-bottom: 15px;
}

.cta p {
  margin: 15px auto 25px;
  max-width: 600px;
  font-size: 1.1rem;
}

/* ========================= */
/* FOOTER */
/* ========================= */
footer {
  background: var(--secondary);
  color: var(--white);
  text-align: center;
  padding: 30px 20px;
  margin-top: 0;
}

footer p {
  margin: 0;
  font-size: 0.95rem;
}

/* ========================= */
/* CONTACTO */
/* ========================= */
.contacto-info h3,
.contacto-form h3 {
  font-family: 'Oswald', sans-serif;
  margin-bottom: 15px;
}

.contacto-info p {
  margin-bottom: 10px;
}

.contacto-form input,
.contacto-form textarea {
  width: 100%;
  padding: 14px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 15px;
}

.contacto-form textarea {
  min-height: 120px;
}

/* ========================= */
/* ANIMACIONES */
/* ========================= */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.8s ease forwards;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.fade-scale {
  opacity: 0;
  transform: scale(0.95);
  animation: fadeScale 0.8s ease forwards;
}

@keyframes fadeScale {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.slide-left {
  opacity: 0;
  transform: translateX(-40px);
  animation: slideLeft 0.8s ease forwards;
}

.slide-right {
  opacity: 0;
  transform: translateX(40px);
  animation: slideRight 0.8s ease forwards;
}

@keyframes slideLeft {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideRight {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

.animate.show {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================ */
/* CARRUSEL DE HERO */
/* ============================================ */

.hero-slides {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
  will-change: opacity;
}

.hero-slide.active {
  opacity: 1;
  z-index: 2;
}

/* Overlay oscuro sobre las imágenes */
.hero-slides::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    rgba(11, 28, 45, 0.85),
    rgba(11, 28, 45, 0.75)
  );
  z-index: 3;
  pointer-events: none;
}

/* Contenido del hero por encima */
.hero > * {
  position: relative;
  z-index: 4;
}

/* ============================================ */
/* SERVICIOS CON IMAGEN AL HOVER */
/* ============================================ */

.servicio {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Imagen de fondo del servicio */
.servicio-bg-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.1);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

/* Overlay oscuro sobre la imagen - MÁS OSCURO para mejor legibilidad */
.servicio-bg-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(11, 28, 45, 0.50) 0%,
    rgba(31, 41, 51, 0.45) 100%
  );
  z-index: 2;
}

/* Contenido del servicio por encima */
.servicio > h3,
.servicio > p {
  position: relative;
  z-index: 3;
  transition: all 0.3s ease;
}

/* Asegurar que el texto SIEMPRE sea visible */
.servicio h3 {
  color: var(--text-dark);
  font-weight: bold;
}

.servicio p {
  color: #555;
}

/* Efecto hover */
.servicio:hover .servicio-bg-image {
  opacity: 1;
  transform: scale(1.05);
}

.servicio:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

/* Mejorar contraste del texto al hacer hover */
.servicio:hover h3 {
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
  font-weight: bold;
}

.servicio:hover p {
  color: #f0f0f0;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
}

/* ============================================ */
/* SECCIÓN NOSOTROS CON IMÁGENES */
/* ============================================ */

.nosotros-visual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 50px;
  align-items: center;
}

.nosotros-content {
  order: 1;
}

.nosotros-images {
  order: 2;
  position: relative;
  min-height: 500px;
}

/* Imagen principal */
.nosotros-image-main {
  width: 100%;
  height: 450px;
  background-size: cover;
  background-position: center;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

/* Overlay sutil en imagen principal */
.nosotros-image-main::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(11, 28, 45, 0.50) 0%,
    rgba(31, 41, 51, 0.45) 100%
  );
}

/* Imágenes secundarias */
.nosotros-image-secondary {
  position: absolute;
  width: 200px;
  height: 150px;
  background-size: cover;
  background-position: center;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border: 4px solid white;
  transition: transform 0.3s ease;
}

.nosotros-image-secondary:hover {
  transform: scale(1.05);
  z-index: 10;
}

.nosotros-image-secondary:nth-child(2) {
  top: -30px;
  right: -30px;
}

.nosotros-image-secondary:nth-child(3) {
  bottom: -30px;
  left: -30px;
}

/* ============================================ */
/* MEJORAS DE RENDIMIENTO */
/* ============================================ */

/* Hardware acceleration para elementos animados */
.servicio,
.servicio-bg-image,
.hero-slide,
.nosotros-image-secondary {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

/* ============================================ */
/* ANIMACIONES ADICIONALES */
/* ============================================ */

/* Fade suave para imágenes que se cargan */
.servicio-bg-image,
.nosotros-image-main,
.nosotros-image-secondary {
  animation: fadeIn 0.6s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ========================= */
/* RESPONSIVE - TABLET */
/* ========================= */
@media (max-width: 1024px) {
  header {
    padding: 15px 20px;
  }

  .hero h1 {
    font-size: 34px;
  }
}

/* ========================= */
/* RESPONSIVE - MÓVIL */
/* ========================= */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    gap: 10px;
  }

  header nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
  }

  header nav a {
    font-size: 14px;
    margin-left: 0;
  }

  .hero {
    padding: 60px 20px;
    text-align: center;
  }

  .hero h1 {
    font-size: 28px;
  }

  .pagina {
    padding: 30px 15px;
  }

  .servicio,
  .card {
    padding: 20px;
  }

  .btn {
    width: 100%;
    text-align: center;
    padding: 15px;
    font-size: 16px;
  }

  h1 {
    font-size: 26px;
  }

  h2 {
    font-size: 22px;
  }

  p {
    font-size: 15px;
    line-height: 1.6;
  }

  /* Desactivar hover en servicios en móvil */
  .servicio-bg-image {
    display: none;
  }
  
  .servicio:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  }
  
  /* Layout de nosotros en móvil */
  .nosotros-visual {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .nosotros-content {
    order: 2;
  }
  
  .nosotros-images {
    order: 1;
    min-height: 300px;
  }
  
  .nosotros-image-main {
    height: 300px;
  }
  
  .nosotros-image-secondary {
    width: 120px;
    height: 90px;
  }
  
  /* Ajustar carrusel en móvil */
  .hero-slide {
    background-position: center;
  }

  /* Desactivar animaciones en móvil */
  .fade-up,
  .fade-scale,
  .slide-left,
  .slide-right,
  .reveal,
  .animate {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ========================= */
/* RESPONSIVE - CELULAR CHICO */
/* ========================= */
@media (max-width: 480px) {
  .hero h1 {
    font-size: 24px;
  }
}
/* ===== HERO CON CARRUSELES LATERALES ===== */

.hero-wrapper {
  display: grid;
  grid-template-columns: 3fr 4fr 3fr;
  min-height: 85vh;
}


.hero-side {
  width: 100%;
  height: 100%;
  min-height: 700px;
  background-size: 140%;
  background-position: center;
  transition: background-image 1s ease-in-out;
  position: relative;
}
.hero-side::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.15);
  pointer-events: none;
  z-index: 1;
}


.hero-center {
  background: #2f3e4e;
  color: white;
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  position: relative;
  z-index: 2;

}

/* Responsive */
@media (max-width: 768px) {
  .hero-wrapper {
    grid-template-columns: 1fr;
  }

  .hero-side {
    display: none;
  }

  .hero-center {
    padding: 40px 20px;
    text-align: center;
  }
}
/* ===== CONTACTO + MAPA ===== */

.contacto-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.mapa {
  margin-top: 20px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.contacto-form input,
.contacto-form textarea {
  width: 100%;
  padding: 14px;
  margin-bottom: 15px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 15px;
}

.contacto-form button {
  width: 100%;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .contacto-grid {
    grid-template-columns: 1fr;
  }

  .mapa iframe {
    height: 250px;
  }
}
/* ===== CONTACTO + MAPA ===== */

.contacto-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.mapa {
  margin-top: 20px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.contacto-form input,
.contacto-form textarea {
  width: 100%;
  padding: 14px;
  margin-bottom: 15px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 15px;
}

.contacto-form button {
  width: 100%;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .contacto-grid {
    grid-template-columns: 1fr;
  }

  .mapa iframe {
    height: 250px;
  }
}
