  /* Botón subir */
  .btn-top{
    position: fixed;
    bottom: 96px;      /* más arriba para no chocar con WhatsApp */
    right: 20px;       /* muévelo si tienes otro botón ahí */
    width: 55px; height: 55px;
    display: grid; place-items: center;
    background: #00000065; color:#fff; text-decoration:none;
    border-radius: 50%;
    box-shadow: 0 6px 20px rgba(0,0,0,.35);
    font-size: 22px; font-weight: 700;
    opacity: 0; pointer-events: none;
    transition: opacity .25s ease;
    z-index: 9999;     /* por encima de todo */
  }
  .btn-top.show{
    opacity: 0.5;
    pointer-events: auto;
  }
  .btn-top:hover{ filter: brightness(1.1); }

/* ===== RESET GENERAL ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Arial, sans-serif;
}

html, body {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  overflow-y: scroll;
  height: 100%;
}


/* ===== HEADER ===== */
header {
  position: fixed;
  top: 0;
  width: 100%;
  background: #002855;
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 40px;
  z-index: 1000;
  transition: background 0.3s;
}
header.scrolled {
  background: #001a3a;
}
header .logo {
  font-size: 1.6rem;
  font-weight: bold;
}
header nav {
  display: flex;
  gap: 15px;
}
header nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}
header nav a:hover {
  color: #ffd700;
}

/* ===== BOTÓN HAMBURGUESA ===== */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 2rem;
  color: white;
  cursor: pointer;
}

/* ===== RESPONSIVE NAV ===== */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  header nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #002855;
    width: 100%;
    padding: 1rem;
  }

  header nav a {
    padding: 10px 0;
    border-bottom: 1px solid #004aad;
  }

  header nav.show {
    display: flex;
  }
}

/* ===== HERO ===== */
.hero {
  background: url('img/fondo-hero.jpg') center/cover no-repeat;
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;     /* esto centra verticalmente */
  text-align: center;
  color: white;
  padding: 20px;
}

.hero-content {
  background: rgba(0, 0, 0, 0.5);
  padding: 30px;
  border-radius: 10px;
  animation: fadeIn 1.5s ease-in-out;
}
.hero h1 {
  font-size: 2.5rem;
}
.hero p {
  margin-top: 10px;
  font-size: 1.2rem;
}
.btn {
  background: #28a745;
  padding: 12px 25px;
  color: white;
  border-radius: 5px;
  text-decoration: none;
  display: inline-block;
  margin-top: 15px;
  transition: background 0.3s;
}
.btn:hover {
  background: #218838;
}

/* ===== SECCIONES ===== */
.section {
  min-height: 100vh;                /* asegura que siempre ocupe toda la pantalla */
  padding-top: 100px;               /* margen superior para que no lo tape el header */
  padding-bottom: 40px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;          /* centra contenido vertical */
  align-items: center;              /* centra horizontal si lo deseas */
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: scroll;    /* para evitar el "freeze" al volver */
  scroll-snap-align: start;         /* si estás usando scroll snapping */
  text-align: center;
}

.section h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: #002855;
  border-bottom: 2px solid #ffd700;
  display: inline-block;
}


/* ===== QUIÉNES SOMOS ===== */
#nosotros .intro {
  max-width: 800px;
  margin: 0 auto 30px auto;
  text-align: center;
  font-size: 1.1rem;
  color: #ffffff;
}
.nosotros-grid {
  display: flex;
  justify-content: center;
  gap: 25px;
  flex-wrap: wrap;
}
.nosotros-grid .card {
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 25px;
  width: 300px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s;
  text-align: center;
  min-height: 250px;
}
.nosotros-grid .card h3 {
  color: #ffd700;
  margin-bottom: 10px;
}

.nosotros-grid .card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

/* ===== SERVICIOS ===== */
.servicios-grid {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}
.servicios-grid .card {
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 25px;
  width: 300px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  text-align: center;
  transition: transform 0.3s;
}
.servicios-grid .card h3 {
  color: #ffd700;
  margin-bottom: 10px;
}

.servicios-grid .card p {
  color: #ffffff;
}
.servicios-grid .card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

/* ===== GALERÍA ===== */
.galeria {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 10px;
}
.galeria img {
  width: 100%;
  border-radius: 10px;
  transition: transform 0.3s;
}
.galeria img:hover {
  transform: scale(1.05);
}

/* ===== TESTIMONIOS ===== */
.reseñas-grid {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}
.reseñas {
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 20px;
  width: 300px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  font-style: italic;
  text-align: center;
  transition: transform 0.3s;
}
.reseñas span {
  display: block;
  margin-top: 10px;
  font-weight: bold;
  color: #ffd700;
}

.reseñas:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

/* ===== FORMULARIO ===== */
form {
  text-align: center;
  display: flex;
  flex-direction: column;
  max-width: 400px;
  margin: auto;
}
form input,
form textarea {
  text-align: center;
  padding: 10px;
  margin: 5px 0;
  border: 1px solid #ccc;
  border-radius: 5px;
}
form button {
  background: #002855;
  color: white;
  padding: 10px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}
form button:hover {
  background: #004aad;
}

/* ===== MAPA ===== */
.mapa {
  width: 100%;
  height: 350px;
  border: none;
  border-radius: 10px;
  margin-top: 15px;
}

/* ===== BOTÓN WHATSAPP ===== */
.whatsapp {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #25d366;
  color: white;
  font-size: 30px;
  padding: 10px 15px;
  border-radius: 50%;
  text-decoration: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s;
  z-index: 999;
}
.whatsapp:hover {
  transform: scale(1.1);
}

/* ===== FOOTER ===== */
footer {
  background: #001a3a;
  color: white;
  text-align: center;
  padding: 15px;
  margin-top: 30px;
}

/* ===== ANIMACIÓN ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.6rem;
    font-weight: bold;
}

.logo-img {
    height: 40px; /* ajusta según tu logo */
    width: auto;
}

.whatsapp {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
    display: block;
    width: 55px;
    height: 55px;
}

.whatsapp-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.whatsapp:hover .whatsapp-icon {
    transform: scale(1.1);
}

#nosotros {
  background: url('img/fondo-nosotros.jpg') center/cover no-repeat;
  background-attachment: scroll; /* antes: fixed */
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  color: white;
}

/* ======= FIX RESPONSIVE: tarjetas que se salen en móvil ======= */
@media (max-width: 768px) {
  /* Títulos y espaciado más compactos */
  .section { padding: 64px 16px; }
  .section h2 { font-size: 1.6rem; }

  /* Grid más estrecho y columnas en una sola */
  .nosotros-grid,
  .servicios-grid,
  .testimonios-grid {
    gap: 14px;
  }

  /* Tarjetas a 100% del ancho disponible */
  .nosotros-grid .card,
  .servicios-grid .card,
  .testimonio {
    width: 100%;
    max-width: 480px;        /* evita que sean demasiado anchas */
    margin-inline: auto;     /* centradas */
    padding: 16px 18px;      /* menos padding */
    min-height: auto;        /* deja que la altura fluya */
    overflow-wrap: anywhere; /* rompe palabras largas si hace falta */
  }

  /* Tipografías más legibles en chico */
  .nosotros-grid .card h3,
  .servicios-grid .card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
  }
  .nosotros-grid .card p,
  .servicios-grid .card p,
  .testimonio { 
    font-size: 0.95rem;
    line-height: 1.5;
  }
}

@media (max-width: 420px) {
  /* Aún más compacto en teléfonos muy pequeños */
  .section { padding: 56px 12px; }

  .nosotros-grid .card,
  .servicios-grid .card,
  .testimonio {
    max-width: 360px;
    padding: 14px 14px;
  }

  .nosotros-grid .card h3,
  .servicios-grid .card h3 {
    font-size: 1.05rem;
  }
  .nosotros-grid .card p,
  .servicios-grid .card p,
  .testimonio {
    font-size: 0.9rem;
  }
}

@media (max-width: 768px) {
  .section {
    min-height: 100vh;
    padding-top: 120px;
    padding-bottom: 60px;
    justify-content: flex-start; /* en móviles puede ser mejor no centrar vertical */
  }
}










