/* Estructura en L inversa */
.main-layout {
  display: flex;
  align-items: stretch; /* Estira los hijos para que tengan la misma altura */
  min-height: 100vh; /* Altura mínima igual a la pantalla */
}

/* Sidebar se estira según el contenido principal */
.sidebar {
  width: 250px;
  background-color: #0047ab;
  color: white;
  padding: 20px;
  font-family: "Poppins", sans-serif;
  flex-shrink: 0;
  font-size: 14px;
  display: flex;
  flex-direction: column;
}

/* Estilos para los enlaces del menú */
.sidebar a {
  font-family: "Roboto", sans-serif;
  display: block;
  color: white;
  text-decoration: none;
  margin: 8px 0;
  padding: 8px;
  border-radius: 4px;
  transition: background-color 0.3s;
  font-size: 14px; /* Tamaño consistente */
}

.sidebar a:hover {
  background-color: #3f51b5;
}

/* Logo en el sidebar */
.sidebar img.logo {
  width: 70%;
  max-width: 180px;
  margin: 0 auto 20px;
  display: block;
  border-radius: 10px;
}

/* Contenedor de header + contenido */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Header: tamaño de fuente ajustado */
.header {
  background-color: #3f51b5;
  color: white;
  padding: 15px 20px;
  text-align: center;
  font-family: "Poppins", sans-serif;
  font-size: 18px; /* Reduce el tamaño para mantener la proporción */
}

/* Contenido principal */
.page-content {
  max-width: 800px;
  margin: 40px auto 20px auto;
  padding: 20px;
  box-sizing: border-box;
}

#Contacto h1,
#Contacto h3 {
  color: #1e3a8a;
  font-weight: 700;
}

.contact-form {
  background-color: #f9fafb;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(30, 58, 138, 0.2);
  max-width: 100%;
  width: 100%;
}

.form-control {
  border: 2px solid #1e3a8a;
  border-radius: 8px;
  padding: 12px;
  font-size: 1rem;
  color: #1e3a8a;
  background-color: #ffffff;
  width: 100%;
  box-sizing: border-box;
}

.form-control:focus {
  border-color: #1e3a8a;
  box-shadow: 0 0 5px #1e3a8a88;
  outline: none;
}

.btn-primary {
  background-color: #1e3a8a;
  border: none;
  font-weight: 600;
  font-size: 1.1rem;
  border-radius: 8px;
  width: 100%;
  padding: 12px;
}

.btn-primary:hover {
  background-color: #3f51b5;
}

img.img-fluid {
  border-radius: 8px;
  border: 2px solid #1e3a8a;
  display: inline-block;
  background-color: #0e0d0d;
}

/*Mapas contactos*/
#Sucursales .section-title {
  color: #1e3a8a; /* Azul cobalto */
  font-weight: 700;
}

.sucursal-box {
  background-color: #1e3a8a;
  padding: 30px 20px;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(30, 58, 138, 0.1);
  margin-bottom: 40px;
}

.sucursal-info {
  font-size: 1rem;
  color: #ffffff;
  font-weight: 500;
  margin-bottom: 25px;
  line-height: 1.6;
}

.map-container {
  max-width: 900px;
  margin: 0 auto;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.15);
}

.map-container iframe {
  width: 100%;
  height: 450px;
  border: 0;
}

/* Responsive */
@media (max-width: 767px) {
  .sucursal-box {
    padding: 20px 15px;
  }

  .sucursal-info {
    font-size: 0.95rem;
  }

  .map-container iframe {
    height: 300px;
  }
}

/* Footer ocupa toda la parte inferior */
.footer {
  background-color: #3f51b5;
  color: white;
  text-align: center;
  padding: 20px;
  font-size: 14px;
  margin: 0; /* <- importante */
}
/* Ajustes responsivos para pantallas pequeñas */
@media (max-width: 768px) {
  .main-layout {
    display: flex;
    min-height: 100vh;
    align-items: stretch;
  }

  /* En móviles el sidebar se ocupará la parte superior */
  .sidebar {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    font-size: 13px;
  }

  .sidebar a {
    margin: 5px;
    padding: 6px;
    font-size: 13px;
  }

  .main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
  }
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

/*Mejoras celular*/
/* GENERAL RESPONSIVE AJUSTES */
@media (max-width: 767px) {
  .page-content {
    padding: 20px 10px;
    margin: 0 auto 20px auto;
    width: 100%;
  }

  .contact-form {
    padding: 20px 15px;
  }

  .form-control {
    font-size: 1rem;
    padding: 12px;
    margin-bottom: 15px;
  }

  .btn-primary {
    font-size: 1rem;
    padding: 12px;
    width: 100%;
  }

  .logo-container img.img-fluid {
    max-width: 100px;
  }

  /* Títulos */
  .page-title h1,
  #Sucursales h1 {
    font-size: 1.4rem;
    text-align: center;
  }

  /* Sucursal Section Adjustments */
  .sucursal-info {
    padding: 10px;
    font-size: 0.95rem;
  }

  .map-container {
    margin-top: 15px;
  }

  /* Ajuste final entre bloques */
  #Contacto {
    margin-bottom: 20px;
  }

  #Sucursales {
    margin-top: 10px;
    margin-bottom: 30px;
  }
}

/*boton de whatsapp*/
.whatsapp-float {
  position: fixed;
  width: 60px;
  height: 60px;
  bottom: 20px;
  right: 20px;
  z-index: 999;
}

.whatsapp-float img {
  width: 100%;
  height: auto;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Sección "Nosotros" */
#Nosotros {
  padding: 40px 20px;
  background-color: #f4f4f4;
  text-align: center;
}

#Nosotros h1 {
  font-size: 2rem;
  color: #333;
  margin-bottom: 40px;
}

#Nosotros .cards-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 25px;
}

#Nosotros .card {
  background-color: #ffffff;
  border-radius: 15px;
  border: 2px solid #ddd;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
  width: 260px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 300px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  position: relative;
}

/* Efecto hover */
#Nosotros .card:hover {
  transform: translateY(-8px);
  border-color: #1e3a8a;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Línea decorativa arriba de la tarjeta */
#Nosotros .card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 6px;
  width: 100%;
  background: linear-gradient(to right, #0f0f0f, #0c0c0c);
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
}

/* Títulos */
#Nosotros .card h3 {
  color: #1e3a8a;
  margin-top: 15px; /* separa del borde decorativo */
  margin-bottom: 15px;
  font-weight: bold;
}

/* Texto */
#Nosotros .card p,
#Nosotros .card ul {
  font-size: 1rem;
  line-height: 1.6;
  text-align: justify;
  color: #444;
}

/* Lista personalizada */
#Nosotros .card ul {
  list-style: none;
  padding-left: 0;
}
#Nosotros .card ul li::before {
  content: "• ";
  color: #1e3a8a;
  font-weight: bold;
}

/* Responsivo */
@media (max-width: 768px) {
  #Nosotros .cards-container {
    flex-direction: column;
    align-items: center;
  }
  #Nosotros .card {
    width: 90%;
  }
}
