* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-container img {
  height: 50px;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: bold;
  color: white;
}

/* Medios fluidos por defecto */
img, video {
  max-width: 100%;
  height: auto;
}

body {
  font-family: 'Montserrat', sans-serif;
  color: #333;
  line-height: 1.6;
  padding-top: 80px; /* Ajusta según la altura real del header */
}

header {
  background: #6499C2;
  color: white;
  padding: 1rem 2rem;
  position: fixed; /* Cambiado a fixed para que siempre esté arriba */
  width: 100%;
  top: 0;
  left: 0;
  z-index: 1000;
  transition: background 0.3s ease;
  box-sizing: border-box;
}

header:hover {
  background: #517998;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1rem;
}

.nav-links li a {
  color: white;
  text-decoration: none;
}

.hero {
  background: url('Header.jpg') center/cover no-repeat;
  background-attachment: fixed;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
}

.hero-content {
  background-color: rgba(15, 25, 32, 0.85); /* #0F1920 con opacidad */
  padding: 2rem;
  border-radius: 10px;
}

.hero h1 {
  font-size: 2.5rem;
}

.hero p {
  margin: 1rem 0;
}

.btn {
  background: #6499C2;
  color: white;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  border-radius: 5px;
}

section {
  padding: 4rem 2rem;
  scroll-margin-top: 70px; /* Ajusta según la altura del header */
}

.container {
  max-width: 1000px;
  margin: 0 auto;
}

.about-content {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.about-img {
  max-width: 300px;
  border-radius: 10px;
}

.contact form {
  display: flex;
  flex-direction: column;
  max-width: 400px;
  margin: 0 auto;
  gap: 1rem;
}

.contact input, .contact textarea {
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.contact button {
  background: #A8C8E5;
  color: white;
  padding: 0.75rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

footer {
  background: #6499C2;
  color: white;
  text-align: center;
  padding: 1rem;
  margin-top: 2rem;
}

.map iframe {
  width: 100%;
  border-radius: 10px;
  margin-top: 2rem;
}

.whatsapp-button {
  position: fixed;
  width: 60px;
  height: 60px;
  bottom: 20px;
  right: 20px;
  background-color: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  z-index: 1001;
  text-decoration: none;
}

.whatsapp-button img {
  width: 32px;
  height: 32px;
  filter: invert(1);
}

.whatsapp-button:hover {
  background-color: #1ebea5;
}

.instagram {
  background: #f1f1f1;
  text-align: center;
  padding: 4rem 2rem;
}

.instagram h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.instagram p {
  margin-bottom: 1.5rem;
}

.instagram .btn {
  background: #F38989;
  padding: 0.75rem 1.5rem;
  color: white;
}

.opiniones {
  background: #f9f9f9;
  padding: 4rem 2rem;
  text-align: center;
}

.opiniones h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
}

.opinion-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.opinion-card {
  background: #fff;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.opinion-card p {
  font-style: italic;
  margin-bottom: 1rem;
}

.opinion-card h4 {
  font-weight: bold;
  color: #517998;
}

.opinion-card img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
}

.servicios {
  background: #f9f9f9;
  padding: 4rem 2rem;
  text-align: center;
}

.servicios h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: #152531;
}

.servicios-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2rem;
}

.servicio {
  background: #517998;
  color: white;
  padding: 1.5rem;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1 1 260px;
  width: 100%;
  max-width: 320px;
}

.servicio-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.servicio h3 {
  font-weight: 700;
  color: #fff;
}

.servicio-descripcion {
  margin-top: 0.75rem;
  color: #fff;
}

.servicios h2,
.about h2,
.contact h2,
.opiniones h2,
.instagram h2 {
  color: #152531;
  scroll-margin-top: 90px; /* Prueba con 120px o ajusta según el alto real del header */
}

/* Animación para elementos que aparecen al hacer scroll */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.22,1,.36,1);
}

.show-on-scroll {
  opacity: 1;
  transform: none;
}

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

/* Tablets y pantallas medianas */
@media (max-width: 1024px) {
  body {
    padding-top: 72px;
  }

  header {
    padding: 0.75rem 1rem;
  }

  .logo-container img {
    height: 44px;
  }

  .logo-text {
    font-size: 1.1rem;
  }

  .navbar {
    gap: 0.75rem;
    flex-wrap: wrap;
  }

  .nav-links {
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
  }

  .nav-links li a {
    padding: 0.25rem 0.5rem;
    display: inline-block;
  }

  .hero {
    /* Evita parallax que da problemas en mobile */
    background-attachment: scroll;
    height: 85vh;
  }

  .hero-content {
    padding: 1.5rem;
  }

  .hero h1 {
    font-size: 2.1rem;
  }

  section {
    padding: 3rem 1.25rem;
  }

  .about-content {
    gap: 1.25rem;
  }

  .map iframe {
    height: 35vh;
    min-height: 240px;
    max-height: 420px;
  }
}

/* Móviles */
@media (max-width: 768px) {
  body {
    padding-top: 0;
  }

  header {
    position: sticky;
    top: 0;
  }
  .navbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links {
    width: 100%;
    justify-content: flex-start;
  }

  .hero {
    height: 72vh;
  }

  .hero h1 {
    font-size: 1.85rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .btn {
    padding: 0.6rem 1rem;
    font-size: 0.95rem;
  }

  .about-content {
    flex-direction: column;
    text-align: left;
  }

  .about-img {
    width: 100%;
    max-width: none;
  }

  .servicios-grid {
    gap: 1rem;
  }

  .servicio {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .instagram h2,
  .opiniones h2,
  .servicios h2,
  .about h2,
  .contact h2 {
    font-size: 1.5rem;
  }

  .whatsapp-button {
    width: 52px;
    height: 52px;
    bottom: 16px;
    right: 16px;
  }

  .whatsapp-button img {
    width: 28px;
    height: 28px;
  }
}

/* Teléfonos pequeños */
@media (max-width: 480px) {
  header {
    padding: 0.6rem 0.9rem;
  }

  .logo-container img {
    height: 38px;
  }

  .logo-text {
    font-size: 1rem;
  }

  .hero {
    height: 64vh;
  }

  .hero h1 {
    font-size: 1.6rem;
  }

  .btn {
    padding: 0.55rem 0.9rem;
    font-size: 0.9rem;
  }

  section {
    padding: 2.25rem 1rem;
  }

  .whatsapp-button {
    width: 48px;
    height: 48px;
    bottom: 14px;
    right: 14px;
  }

  .whatsapp-button img {
    width: 24px;
    height: 24px;
  }
}

