/* ===========================
 1. HERO
 =========================== */
.hero {
  background: linear-gradient(rgba(30,58,138,0.3), rgba(30,58,138,0.3)),
            url('../Imagenes/Ciudad.jpg') center/cover no-repeat;
  color: white;
  text-align: center;
  padding: 160px 20px;
}

.hero h1 {
  font-size: 2.8em;
  font-weight: 700;
  margin-bottom: 10px;
}

.hero p {
  font-size: 1.2em;
  margin-bottom: 30px;
  line-height: 1.5;
}

.btn {
  background: #4CAF50;
  color: white;
  padding: 12px 30px;
  border: none;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s, transform 0.2s;
}

.btn:hover {
  background: #43a047;
  transform: translateY(-2px);
}


/* ===========================
  2. HEADER
  =========================== */
.header {
  background-color: #1E3A8A;
  /* 1. Definimos la altura total y quitamos el padding vertical del header */
  padding: 0 20px; 
  height: 90px; 
  box-sizing: border-box; 
  display: flex;
  align-items: center; 
}

.header .container {
    /* CLAVE: Aplica Flexbox para alinear el logo y la navegación */
    display: flex;
    justify-content: space-between; 
    align-items: center; 
    
    height: 100%; 
    width: 100%; 
    
    /* Aplicamos el padding vertical aquí */
    padding: 15px 0; 
}

/* --- SOLUCIÓN PARA EL ANCHO DEL LOGO --- */
/* 2. Limitamos el ancho del contenedor del logo (etiqueta <a> con clase .logo) */
.header .logo {
    /* Define un ancho máximo para el área del logo (ej. 200px) */
    max-width: 200px; 
    height: 100%; /* El contenedor del logo también toma 100% de alto */
    margin-right: 20px; /* Espacio para separar el logo de las pestañas */
}

/* 3. El logo toma el 100% de la altura y el 100% del ancho de su contenedor (.logo) */
.header .logo-img {
  /* Ocupa el 100% del alto del contenedor (.logo) de 90px */
  height: 100%; 
  /* CLAVE: Ocupa el 100% del ancho de su contenedor (.logo), limitado a 200px */
  width: 100%; 
  
  /* Esto asegura que la imagen se escale DENTRO del ancho y alto definidos sin distorsionarse */
  object-fit: contain; 
}

/* 4. Estilos de la navegación (sin cambios importantes) */
.header .nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex; 
}
/* ... otros estilos de navegación ... */

.nav-links {
  display: flex;
  gap: 20px;
  list-style: none;
  justify-content: flex-end;
  align-items: center;
  margin: 0;
  padding: 0;
}

.nav-links li a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s;
}

.nav-links li a:hover {
  color: #4CAF50;
}

/* ===========================
 3. SECCIONES GENERALES
 =========================== */
.section {
  padding: 80px 20px;
  text-align: center;
}

.section.light {
  background: #F6F7F9;
}

.section h2 {
  color: #1E3A8A;
  margin-bottom: 20px;
  font-size: 2.2em;
  font-weight: 700;
}

.section p {
  max-width: 800px;
  margin: 10px auto 30px;
  line-height: 1.6;
  color: #444;
}

.section img {
  max-width: 100%;
  border-radius: 10px;
  margin-top: 20px;
}

/* ===========================
 4. QUIÉNES SOMOS SINGLE COLUMN
 =========================== */
#quienes-somos .container.single-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2rem;
}

#quienes-somos .container.single-column p {
  max-width: 700px;
}

#quienes-somos .image-wrapper {
  width: 100%;
  text-align: center;
  margin: 2rem 0;
}

/* *** MODIFICACIÓN CLAVE AQUÍ ***
   Se reduce el max-width de la imagen específica de Quiénes Somos (ej. al 40%)
   para hacerla más estrecha y se centra. Esto anula la regla del 100% que tenías. */
#quienes-somos .image-wrapper img.tech-image {
  max-width: 40%; 
  height: auto;
  border-radius: 10px;
}

/* ===========================
 5. IMAGEN TECNOLOGÍA (REGLA GENERAL)
 =========================== */
.tech-image {
  display: block;
  margin: 2rem auto;
  /* Se recomienda un valor general más razonable (ej. 80%) para el resto de imágenes. */
  max-width: 80%; 
  height: auto;
  max-height: 350px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  background-color: #fff;
  border: 1px solid #E0E0E0;
  transition: transform 0.3s ease;
}

.tech-image:hover {
  transform: scale(1.02);
}

/* ===========================
 6. FEATURES LIST
 =========================== */
#tecnologia .features {
  list-style: none;
  padding: 0;
  margin-top: 30px;
  text-align: center;
}

#tecnologia .features li {
  margin: 8px 0;
  font-size: 1.05rem;
  color: #475569;
}

/* ===========================
 7. SERVICIOS EN REJILLA
 =========================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.service-card {
  background: #FFFFFF;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  padding: 30px 20px;
  transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  background: #F0F8FF;
}

.service-card h3 {
  margin-bottom: 10px;
}

.service-card p {
  margin-bottom: 15px;
}

.btn-pago {
  background-color: #00bfa6;
  color: white;
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none;
  display: inline-block;
  font-weight: 600;
}

.btn-pago:hover {
  background-color: #009e8f;
}

/* ===========================
 8. RESULTADOS / STATS
 =========================== */
.stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  margin: 40px 0;
}

.stats div {
  background: white;
  border-radius: 10px;
  padding: 25px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  width: 220px;
  color: #1E3A8A;
  font-weight: 600;
}

/* ===========================
 9. FORMULARIO DE CONTACTO
 =========================== */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 500px;
  margin: auto;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-family: inherit;
}

.contact-form button {
  align-self: center;
}

/* ===========================
 10. FOOTER
 =========================== */
.footer {
  background: #1E3A8A;
  color: white;
  text-align: center;
  padding: 20px 0;
  margin-top: 40px;
  font-size: 0.95em;
}

.footer a {
  color: white;
  text-decoration: none;
}

.footer a:hover {
  color: #4CAF50;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  list-style: none;
  padding: 0;
  margin: 10px 0 0 0;
}

/* ===========================
 11. RESPONSIVE
 =========================== */
@media (max-width: 768px) {
  .tech-image {
    /* Aquí se sobrescribe la regla general para móviles */
    max-width: 90%; 
    max-height: 250px;
  }
  
  /* Se asegura que la imagen de Quiénes Somos se ajuste en móviles */
  #quienes-somos .image-wrapper img.tech-image {
    max-width: 70%; /* Un valor más ancho para móvil */
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
  }

  .hero h1 {
    font-size: 2em;
  }

  .logo-img {
    height: 60px;
  }

  /* SERVICIOS REJILLA RESPONSIVE */
  .services-grid {
    grid-template-columns: 1fr;
  }
}

/* ===========================
 12. MONTAJE DE IMAGEN (SOLUCIÓN MANOLO/UBICACIÓN)
 =========================== */

/* 1. Contenedor figure */
.image-center {
    position: relative;
    width: 600px; /* Ancho del montaje completo */
    margin: 20px auto; 
    height: auto; 
}

/* 2. Imagen principal del montaje (Manolo) */
/* Usamos una clase nueva para aislar esta imagen de la regla general .tech-image */
.manolo-principal {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* 3. Imagen superpuesta (ubicacion.png) */
.superpuesta {
    position: absolute;
    top: 15px;    
    right: 15px;  
    width: 20%; /* Tamaño de la imagen pequeña */
    height: auto;
    border: 3px solid #FFF; 
    border-radius: 5px;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.7);
    z-index: 10;
}

/* Ajuste Responsivo para el Montaje */
@media (max-width: 768px) {
    .image-center {
        width: 90%;
    }
    .superpuesta {
        width: 30%;
    }
}