
:root{
  --primary:#0f4c5c;
  --primary-700:#0b3945;
  --light:#f7f9fb;
  --text:#333;
}
*{box-sizing:border-box}
html,body{
  margin:0;
  padding:0;
  height: 100%;
  display: flex;
  flex-direction: column;

}
body {
  opacity: 0; /* Opacidad inicial */
  animation: fadeIn 4s forwards; /* Aplica la animación */
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
main {
  flex: 1;
}
body{
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background:#ffffff;
  line-height:1;
}

span{
  font-size: 19px;
  font-weight: bold;
}
ol{
  padding-left: 20px;
}

/* NAVBAR */
.navbar{
  position: relative;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  padding: 1rem 2rem;
  background: #ffffff;
  color:#fff;
}
.navbar .logo{
  font-weight:700;
  text-decoration:none;
  color:#ce0101;
  letter-spacing:.3px;
}
.navbar .menu-toggle{
  display:none;
  font-size:1.5rem;
  background:transparent;
  color:#0d10c2;
  border:none;
  cursor:pointer;
}
.navbar .nav-links{
  list-style:none;
  display:flex;
  gap:3rem;
  margin:0;
  padding:0;
}
.navbar .nav-links a{
  color:#000000;
  text-decoration:none;
  opacity:.95;
  color:hsl(226, 62%, 55%);
   font-weight: bold;
}
.navbar .nav-links a:hover {
  color:#000000;
  text-decoration:none;
  opacity:.95;
  color:hsl(27, 62%, 55%);
   font-weight: bold;
}
.navbar .nav-links a:hover{opacity:1;text-decoration:underline}

.navbarlogo {
  width: 100px; 
  height: 50px; 
  border: 0px solid black; 
}   

.navbarlogo img {
  max-width: 100%;
  max-height: 100%;
  opacity:1;
  object-fit: cover; 
  display: block; /* Para eliminar espacio extra debajo de la imagen */
  
}

/* HEADER */
.hed{
  background: linear-gradient(rgba(29, 68, 119, 0.6), rgba(15,76,92,.6)),
              url('img/fondo.jpg') center/cover repeat;
  max-width: 100%;        
  max-height: 100%;
  min-height: 50vh;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  text-align:center;
  color:#fff;
  position: relative;
  overflow: hidden;
  transition: opacity 0.5s ease, height 0.5s ease;
}
.hed.hide {
  opacity: 0;
  height: 0;
}
.hed .hed-content{
  padding: 3rem 1rem 0rem;
}
.hed h1{
  margin:0;
  font-size: clamp(2rem, 6vw, 4.5rem);
  font-weight:800;
  letter-spacing:.5px;
}
.hed p{opacity:.95;margin:.5rem 0 0}


/* LAYOUT HELPERS */
.container{ margin:0 auto;padding:2rem 1.25rem;}
.container-narrow{max-width:800px;margin:0 auto;padding:2.5rem 1.25rem;width:100%;height:100%}
.container h2{  
  margin:0;
  margin-bottom: 10px;
  font-size: clamp(2rem, 2vw, 4.5rem);
  font-weight:800;
  letter-spacing:.5px;
  text-align: center;  
}
/* SERVICES (home) */
.services{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap:1.5rem;
  width:100%;
  padding-left:5px;
  padding-right:5px;
  padding-bottom: 2%;justify-content: center;display: flex;align-items: center;
}
.service{
  position:relative;
  background:#f4f6f8;
  padding:1.25rem;
  width:100%;
  border-radius:14px;
  box-shadow:0 1px 3px rgba(0,0,0,.06);
}
.service h3{margin-top:0}

/* TEAM */
.team-section{
  background:#ffffff;
}
.member{
  grid-template-columns: 240px 1fr;
  gap:1.25rem;
  align-items:center;
  background:#f4f6f8;
  padding:1.25rem;
  border-radius:14px;
  box-shadow:0 1px 3px rgba(0,0,0,.06);
  margin-bottom:1rem;
  position: relative;
}
.member2{
  grid-template-columns: 240px 1fr;
  gap:1.25rem;
  align-items:center;
  background:#fff;
  padding:1.25rem;
  border-radius:14px;
  box-shadow:0 1px 3px rgba(0,0,0,.06);
  margin-bottom:1rem;
  position: relative;}
.member img{

  border-radius:11px;
  display:block;
      max-width: 100%;
  max-height: 100%;

}
.member h3{margin:.2rem 0 .2rem}
.member small{color:#666}
.member div{

  padding:1.25rem;
}
/* CONTACT */
.contacto{
  background:var(--light);
}
.contact-form{
  max-width:520px;
  margin:0 auto 1.5rem;
}
.form-group{margin-bottom:1rem}
.form-group label{display:block;margin-bottom:.35rem;font-weight:600;color:#444}
.form-group input,.form-group textarea{
  width:100%;
  padding:12px;
  border:1px solid #d9e0e6;
  border-radius:10px;
  font-size:1rem;
  outline:none;
  transition:border .2s ease;
}
.form-group input:focus,.form-group textarea:focus{border-color:var(--primary)}
.btn{
  display:inline-block;
  padding:12px 20px;
  border-radius:10px;
  border:none;
  text-decoration:none;
  cursor:pointer;
}
.btn-primary{background:var(--primary);color:#fff}
.btn-primary:hover{background:var(--primary-700)}
.whatsapp a{
  display:inline-flex;align-items:center;gap:.6rem;
  background:#25D366;color:#fff;
  padding:12px 18px;border-radius:999px;
  text-decoration:none;font-weight:700
}
.whatsapp img{width:22px;height:22px}

/* FOOTER */
footer{
  background:#07262e;
  color:#cfe3ee;
  text-align:center;
  padding: 15px;
    position: relative;


}

/* RESPONSE */
@media (max-width: 860px){
  .navbar{padding:.75rem 1rem;position: relative;}
  .navbar .menu-toggle{display:block
  
  }
  .navbar .nav-links{
    position:absolute;right:1rem;top:100%;
    background: #ffffff;
    padding: .75rem 2rem;
    border-radius:0px;
    flex-direction:column;
    gap:inherit;
    display:none;
    min-width: 200px;
    
  }
  .navbar .nav-links.open{display:flex; right: 0;  z-index: 999;
    position: fixed;     /* Fija respecto a la ventana */
  top: 6.7%;              /* desde el borde superior */
  height: 100vh;       /* altura completa de la ventana */}

  .services{grid-template-columns:1fr}

  .member{grid-template-columns:1fr}

  .hero{min-height:50vh}
}
p {
  position: relative; /* si tiene z-index alto, bajarlo */
  z-index: 1;
}

/* JS */

#mainHeader {
  position: fixed;
  top:0;
  width: 100%;
  background: white;
  transition: transform 111s ease;
  z-index: 1000;
}

#mainHeader.hide {
  transform: translateY(-100%);
}
/* CARRUSEL */
.carousel {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: auto;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.slide {
  position: relative;
  width: 100%;
  flex-shrink: 0;
}

.slide img {
  width: 100%;
  display: block;
}

.caption {
  position: absolute;
  bottom: 0;
  width: 100%;
  padding: 10px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 1rem;
  text-align: center;
  box-sizing: border-box;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
}

.carousel-btn.prev {
  left: 10px;
}

.carousel-btn.next {
  right: 10px;
}