html {
    scroll-behavior: smooth;
    scroll-padding-top: 70px; /* margen global para evitar que el navbar tape el título */
  }

  body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f4f6f8;
  }
  
  header {
    background: #2c8a7a;
    color: white;
    padding: 15px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
  }
  
  .logo {
    width: 100px;          /* Ajusta según el tamaño real de tu logo */
    height: auto;
    margin-right: 15px;
  }
  .header-text {
    flex: 1;              /* Ocupa el espacio disponible entre el logo y el nav */
    margin: 0 20px;
  }
  
  .header-text h1 {
    margin: 0;
    font-size: 1.5rem;
    line-height: 1.2;
  }
  
  .header-text p {
    margin: 5px 0 0;
    font-size: 1rem;
    opacity: 0.9;
  }

  nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  padding: 8px 12px;
  border-radius: 4px;
  transition: background 0.3s;
  white-space: nowrap;
}

nav a:hover {
  background: #1f6f63;  /* Tono más oscuro para el hover */
}

  
  .banner {
    position: relative;
    height: 280px;
    overflow: hidden;
  }
  
  .banner img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: contain;   /* Cambiado de cover a contain */
    background-color: #333; /* Color de fondo para las franjas (opcional) */
    opacity: 0;
    transition: 1s;
  }
  
  .banner img.active {
    opacity: 1;
  }
  
  section {
    padding: 40px;
    max-width: 900px;
    margin: auto;
    scroll-margin-top: 70px;
  }
  
  .hero {
    background: #dff3f0;
    text-align: center;
  }
  
  /* Servicios grid */
  .servicios-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
  }
  
  .servicios-grid div {
    background: white;
    padding: 20px;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,.1);
  }
  
  .servicios-grid i {
    font-size: 2rem;
    color: #2c8a7a;
    display: block;
    margin-bottom: 5px;
  }
  
  /* Formulario */
  .formulario input,
  .formulario textarea {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
  }
  
  .formulario button {
    background: #2c8a7a;
    color: white;
    padding: 12px;
    border: none;
    width: 100%;
  }
  
  /* WhatsApp flotante */
  .whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #25D366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    text-align: center;
    font-size: 32px;
    box-shadow: 0 0 10px rgba(0,0,0,.3);
    z-index: 999;
  }
  
  .whatsapp-float i {
    line-height: 60px;
  }
  
  .whatsapp-float:hover {
    background: #1ebe57;
  }
  
  /* Responsive */
  @media (max-width: 900px) {
    .servicios-grid {
      grid-template-columns: repeat(2, 1fr);
    }
  }

  @media (max-width: 768px) {
    header {
      flex-direction: column;
      text-align: center;
      padding: 15px;
    }
  
    .logo {
      margin-right: 0;
      margin-bottom: 10px;
    }
  
    .header-text {
      margin: 10px 0;
    }
  
    nav {
      justify-content: center;
      margin-top: 10px;
    }
  
    nav a {
      white-space: normal;  /* Permite que el texto se ajuste si es necesario */
    }
  }
  @media (max-width: 500px) {
    .servicios-grid {
      grid-template-columns: 1fr;
    }

    nav {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
      }
      nav a {
        text-align: center;
        white-space: normal;
      }
  }
  
  footer {
    background: #1f6f63;    /* Mismo color del navbar */
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    width: 100%;
  }
  
  /* Opcional: si el footer queda pegado al contenido anterior */
  footer p {
    margin: 0;
  }

  /* Estilos para la sección contacto */
#contacto {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
  }
  
  .contacto-container {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    flex-wrap: wrap;
  }
  
  .contacto-info {
    flex: 1 1 300px;
    background: #e9f5f2;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }
  
  .contacto-info p {
    margin: 15px 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  
  .contacto-info i {
    font-size: 1.5rem;
    color: #2c8a7a;
    min-width: 30px;
    text-align: center;
  }
  
  .contacto-form {
    flex: 2 1 400px;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }
  
  /* Ajustes al formulario existente */
  .formulario input,
  .formulario textarea {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
  }
  
  .formulario button {
    background: #2c8a7a;
    color: white;
    padding: 14px;
    border: none;
    width: 100%;
    font-size: 1.1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
  }
  
  .formulario button:hover {
    background: #1f6f63;
  }
  
  /* Responsive: en móviles se apilan */
  @media (max-width: 768px) {
    .contacto-container {
      flex-direction: column;
    }
  }

  .success-message {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
  }
  
  .error-message {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
  }

  /* Sección novedades */
#novedades {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    background: #f9f9f9;
  }
  
  #novedades h2 {
    text-align: center;
    color: #2c8a7a;
    margin-bottom: 40px;
  }
  
  .noticias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
  }
  
  .noticia-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
  }
  
  .noticia-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  }
  
  .noticia-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
  }
  
  .noticia-content {
    padding: 20px;
  }
  
  .noticia-content h3 {
    margin: 0 0 10px;
    color: #1f6f63;
  }
  
  .fecha {
    color: #777;
    font-size: 0.9rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
  }
  
  .fecha i {
    color: #2c8a7a;
  }
  
  .btn-mas {
    display: inline-block;
    margin-top: 15px;
    background: #2c8a7a;
    color: white;
    padding: 8px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s;
  }
  
  .btn-mas:hover {
    background: #1f6f63;
  }

  .noticia-detalle {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    background: #f5f5f5;
    border-top: 1px solid #ddd;
  }
  
  .noticia-detalle.mostrar {
    max-height: 800px; /* Ajusta según el contenido */
    transition: max-height 0.6s ease-in;
  }
  
  .detalle-texto {
    padding: 20px;
  }
  
  .detalle-galeria {
    padding: 0 20px 20px;
  }
  
  .detalle-galeria h4 {
    margin-bottom: 15px;
    color: #2c8a7a;
  }
  
  .galeria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
  }
  
  .galeria-grid img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s;
  }
  
  .galeria-grid img:hover {
    transform: scale(1.05);
  }
  
  .btn-mas {
    background: #2c8a7a;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
  }
  
  .btn-mas:hover {
    background: #1f6f63;
  }
.redes-sociales {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 15px;
}
.btn-redes {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 15px;
  border-radius: 30px;
  text-decoration: none;
  color: white;
  font-weight: 500;
  transition: opacity 0.3s;
  border: none;
  cursor: pointer;
}
.btn-redes i {
  font-size: 1.2em;
}
.btn-redes.whatsapp { background-color: #25D366; }
.btn-redes.facebook { background-color: #1877F2; }
.btn-redes.tiktok { background-color: #000000; } /* TikTok usa negro normalmente */
.btn-redes:hover { opacity: 0.8; }
/* Ajuste responsive */
@media (max-width: 480px) {
  .btn-redes { width: 100%; }
}
