/* ===== Estilos Generales ===== */
body {
  font-family: "Open Sans", sans-serif;
  margin: 0;
  padding: 0;
  color: #333;
  line-height: 1.6;
  font-size: 16px;
}

h1, h2, h3 {
  font-family: "Open Sans", sans-serif;
  margin: 0 0 20px 0;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  background: #256D7B;
  color: #fff;
  border-radius: 5px;
  transition: background 0.3s ease;
  text-decoration: none;
}
 
@keyframes btn {
    0%,
    20%,
    50%,
    80%,
    100% {
      transform: translateY(0);
    }
    40% {
      transform: translateY(-30px);
    }
    60% {
      transform: translateY(-15px);
    }
  }

.btn {
  font: var(--p2);
  margin-top: 40px;
  animation: bounce 2s infinite ease-in-out;
}


.btn:hover {
  background: #1a4f5a;
}

/* ===== Encabezado ===== */
header {
  background: #fff;
  padding: 20px 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

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

.logo {
  max-width: 160px;
}

.logo h1 {
  color: #256D7B;
  font-size: 24px;
  margin: 0;
}

.logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: bottom;
}

.desktop-logo {
  display: block;
  border-radius: 50%;
}

.mobile-logo {
  display: none;
}

nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 20px;
}

nav ul li a {
  font-weight: 700;
  color: #256D7B;
  transition: color 0.3s ease;
  text-decoration: none;
}

nav ul li a:hover {
  color: #1a4f5a;
}

.header-buttons {
  display: flex;
  gap: 10px;
}

/* ===== Menú Toggle (Solo para móviles) ===== */
.menu-toggle {
  display: none; /* Oculto por defecto */
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 20px;
  cursor: pointer;
  z-index: 1001; /* Asegura que esté por encima del menú */
  margin-left: auto; /* Alinea el botón a la derecha */
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  background: #256D7B;
  transition: all 0.3s ease;
}

/* ===== Media Queries para Encabezado ===== */
@media (max-width: 1010px) {
  .desktop-logo {
    display: none;
  }

  .mobile-logo {
    display: block;
    max-width: 50px;
  }

  .logo h1 {
    font-size: 1.2rem;
  }

  .menu-toggle {
    display: flex; /* Mostrar el ícono de menú en móviles */
  }

  .nav-menu {
    display: none; /* Ocultar el menú por defecto en móviles */
    position: absolute;
    top: 100%; /* Despliega el menú hacia abajo */
    left: 0;
    width: 100%;
    background: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000; /* Asegura que esté por encima del contenido */
  }

  .nav-menu.active {
    display: flex; /* Mostrar el menú cuando está activo */
    flex-direction: column;
    padding: 20px 0;
  }

  .nav-menu ul {
    flex-direction: column;
    gap: 10px;
    align-items: center
  }

  .nav-menu ul li a {
    padding: 10px 15px;
    text-align: center;
    display: block;
    border-bottom: 1px solid #eee;
    align-items: center
  }

  .nav-menu ul li:last-child a {
    border-bottom: none;
  }

  .header-buttons {
    display: none; /* Ocultar los botones en móviles */
    align-items: center
  }

  .header-buttons.active {
    display: flex; /* Mostrar los botones cuando el menú está activo */
    justify-content: center;
    margin-top: 15px;
    align-items: center;
    flex:1;
  }

  /* Animación del ícono de menú */
  .menu-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .menu-toggle.open span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
}

@media (max-width: 420px) {
  header .container {
    padding: 0 10px; /* Reduce el padding para aprovechar el espacio */
  }

  .logo {
    max-width: 120px;
  }

  .mobile-logo {
    max-width: 40px;
  }

  .nav-menu ul li a {
    font-size: 0.9rem;
    padding: 8px 0;
  }

  .menu-toggle {
    margin-top: 0; /* Elimina el margen superior */
  }
}
/* ===== Sección Hero ===== */
.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  overflow: hidden;
  padding: 40px 0;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 90%;
  padding: 20px;
}
.hero h1 {
  font-size: 3rem;
  margin: 0 0 15px 0;
  line-height: 1.2;
  text-shadow: 0.5px 0.5px #333;
}
.hero h2 {
  font-size: 3rem;
  margin: 0 0 15px 0;
  line-height: 1.2;
  text-shadow: 0.5px 0.5px #333;
}

.hero p {
  font-size: 1.4rem;
  margin: 0 0 25px 0;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 0.5px 0.5px #333;
}

.hero .btn {
  padding: 12px 25px;
  font-size: 1rem;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-background img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(50%);
}

@media (max-width: 768px) {
  .hero {
    min-height: 70vh;
    padding: 30px 0;
  }

  .hero h2 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
    margin-bottom: 20px;
  }

  .hero .btn {
    font-size: 0.9rem;
    object-position: center;
    align-items: center;
  }

  .hero-background img {
    object-position: 75% center;
  }
}

@media (max-width: 420px) {
  .hero {
    min-height: 50vh;
    padding: 20px 0;
  }

  .hero h2 {
    font-size: 1.5rem;
  }

  .hero p {
    font-size: 0.9rem;
    margin-bottom: 15px;
  }

  .hero .btn {
    font-size: 0.9rem;
    align-items: center;
  }
}

/* ===== Sección Acerca de Nosotros ===== */
.about-content {
  display: flex;
  align-items: center;
  gap: 20px;
  
}

.about-title {
  padding: 60px 0;
  font-size: 25px;
  margin-bottom: 10px;
  text-align: center;
}

.about-text {
  flex: 1;
  min-width: 40vh;
}

.about-image {
  flex-shrink: 0;
  padding-bottom: 40px;
}

.about-image img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

@media (max-width: 1160px) {
  .about-content {
    flex-direction: column;
    text-align: center;
  }

  .about-image img {
    width: 100%;
    max-width: 300px;
  }
}

/* ===== Sección Servicios ===== */
.services {
  padding: 60px 0;
  background: #f9f9f9;
  text-align: center;
  align-items: center
}

.services h2 {
  font-size: 36px;
  margin-bottom: 40px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 20px;
}

.service {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.service img {
  width: 50px;
  height: 50px;
  margin-bottom: 10px;
}

.service h3 {
  font-size: 24px;
  margin-bottom: 10px;
}

@media (max-width: 420px) {
  .service-grid {
    grid-template-columns: 1fr;
  }

  .service {
    padding: 15px;
  }

  .service h3 {
    font-size: 1.2rem;
  }

  .service p {
    font-size: 0.9rem;
  }
}

/* ===== Sección Testimonios ===== */
.testimonials {
  padding: 60px 20px;
  text-align: center;
  align-items: center;
  flex:1;
  justify-items: center;
}

.testimonials h2 {
  font-size: 36px;
  margin-bottom: 40px;
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  justify-items: center;
  align-items: center;
}

.testimonial {
  background: #fff;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  flex: 1;
  align-items: center;
  justify-items: center;
}

.testimonial p {
  font-style: italic;
  align-items: center;
  justify-items: center;
}

.testimonial span {
  display: block;
  margin-top: 10px;
  font-weight: 700;
}

@media (max-width: 420px) {
  .testimonial-grid {
    grid-template-columns: 1fr;
  }

  .testimonial {
    padding: 15px;
  }

  .testimonial p {
    font-size: 0.9rem;
  }

  .testimonial span {
    font-size: 0.9rem;
  }
}

/* ===== Sección Contacto ===== */
.contact {
  padding: 60px 0;
  text-align: center;
}

.contact h2 {
  font-size: 36px;
  margin-bottom: 20px;
}

.contact form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.contact input, .contact textarea {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  width: 100%;
}

.contact button {
  align-self: center;
}

@media (max-width: 430px) {
  .contact form {
    width: 100%;
  }

  .contact input, .contact textarea {
    font-size: 0.9rem;
    padding: 5px;
  }

  .contact button {
    width: 100%;
    padding: 10px;
  }
}

/* ===== Pie de Página ===== */
footer {
  background: #333;
  color: #fff;
  padding: 40px 0;
  text-align: center;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.footer-section h3 {
  font-size: 20px;
  margin-bottom: 10px;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section ul li {
  margin-bottom: 10px;
}

.footer-section ul li a {
  color: #fff;
  text-decoration: none;
}

.footer-section ul li a:hover {
  text-decoration: underline;
}

.copyright {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
}

@media (max-width: 420px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .footer-section h3 {
    font-size: 1.2rem;
  }

  .footer-section ul li a {
    font-size: 0.9rem;
  }

  .copyright {
    font-size: 0.8rem;
  }
}

/* ===== Botón Flotante de WhatsApp ===== */
.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #25d366;
  color: #fff;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  transition: background 0.3s ease;
}

.whatsapp-float img {
  width: 30px;
  height: 30px;
}

.whatsapp-float:hover {
  background: #128c7e;
}

@media (max-width: 420px) {
  .whatsapp-float {
    width: 50px;
    height: 50px;
    bottom: 10px;
    right: 10px;
  }

  .whatsapp-float img {
    width: 25px;
    height: 25px;
  }
}

/* ===== Scroll Suave ===== */
html {
  scroll-behavior: smooth;
}