/* ===================== */
/* RESET & BASE */
/* ===================== */
* { margin:0; padding:0; box-sizing:border-box; }

body { 
  font-family:"Segoe UI", Arial, sans-serif; 
  line-height:1.6; 
  color:#333; 
  background:#fdfdfd; 
  transition: background 0.3s, color 0.3s; 
}

/* ===================== */
/* HEADER */
/* ===================== */
header {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:15px 30px;
  background: linear-gradient(90deg, #0A4C8A, #0D6EC4);
  color:#fff;
  position:sticky;
  top:0;
  z-index:1000;
  flex-wrap:wrap;
  box-shadow:0 5px 10px rgba(0,0,0,0.2);
}

header .logo img {
  height:55px;
  filter: drop-shadow(0px 0px 4px rgba(0,0,0,0.4));
}

header nav {
  display:flex; 
  align-items:center; 
  flex-wrap:wrap;
  width:100%; 
  justify-content:space-between;
}

header ul.menu {
  list-style:none; 
  display:flex;
  flex-wrap:wrap; 
  gap:10px;
}

header ul.menu li a {
  color:#fff; 
  text-decoration:none; 
  font-weight:600;
  padding:8px 12px; 
  border-radius:6px; 
  transition:0.3s;
}

header ul.menu li a:hover {
  background:#ffcc00; 
  color:#000;
}

.drill-icon { 
  display:none; 
  width:45px; 
  cursor:pointer; 
  margin-left:15px; 
}

.drill-icon img { 
  width:100%; 
}

.dark-toggle { 
  margin-left:10px; 
  background:none; 
  border:none; 
  font-size:1.4rem; 
  cursor:pointer; 
  color:#fff; 
}

/* ===================== */
/* HERO - CON SUPERPOSICIÓN CORRECTA */
/* ===================== */
.hero {
  height:80vh;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.45), rgba(0,0,0,0.75)),
    url("img/hero-bg.jpg") center/cover no-repeat;
  display:flex;
  justify-content:center;
  align-items:center;
  text-align:center;
  color:#fff;
  padding:0 20px;
  position:relative;
  overflow: hidden;
}

/* Logo de fondo - MÁS GRANDE */
.hero::before {
  content:"";
  position:absolute;
  top: 32%;
  left:50%;
  transform:translate(-50%, -50%);
  width:320px;
  height:320px;
  background:url("img/logo.png") center/contain no-repeat;
  opacity:0.22;
  filter:drop-shadow(0 0 10px rgba(0,0,0,0.7));
  pointer-events:none;
  z-index: 1;
}

/* Contenido del hero - MÁS COMPACTO */
.hero-content { 
  position:relative; 
  z-index: 2;
  max-width: 700px;
  margin-top: 90px;
  padding: 18px 25px;
  background-color: rgba(0, 0, 0, 0.35);
  border-radius: 10px;
  backdrop-filter: blur(2px);
}

/* Títulos con buen contraste */
.hero h1 { 
  font-size:2.8rem;
  margin-bottom:12px;
  text-shadow: 2px 2px 10px rgba(0,0,0,0.9);
  color: #fff;
  font-weight: 700;
  line-height: 1.15;
}

.hero .subtitle { 
  font-size:1.2rem;
  margin-bottom:18px;
  text-shadow: 1px 1px 6px rgba(0,0,0,0.8);
  color: #f0f0f0;
  font-weight: 400;
  line-height: 1.4;
}

/* ===================== */
/* BOTONES */
/* ===================== */
.btn { 
  padding:12px 28px; 
  background:#ffcc00; 
  color:#000; 
  border:none; 
  border-radius:8px; 
  text-decoration:none; 
  font-weight:bold; 
  cursor:pointer; 
  transition:0.3s; 
  display: inline-block;
}

.btn:hover { 
  background:#e6b800; 
  transform:scale(1.05); 
}

/* ===================== */
/* SECCIONES */
/* ===================== */
section {
  padding:80px 20px 60px;
  scroll-margin-top: 80px;
}

#inicio {
  padding-top: 0;
  scroll-margin-top: 0;
}

h2 { 
  text-align:center; 
  font-size:2rem; 
  margin-bottom:20px;
  color: #0A4C8A;
}

body.dark h2 {
  color: #4da8da;
}

/* ===================== */
/* SERVICIOS */
/* ===================== */
.servicios-grid { 
  display:grid; 
  grid-template-columns:repeat(auto-fit,minmax(250px,1fr)); 
  gap:20px; 
  margin-top: 30px;
}

.card { 
  background:#fff; 
  padding:20px; 
  border-radius:12px; 
  text-align:center; 
  box-shadow:0 8px 20px rgba(0,0,0,0.1); 
  transition:0.3s; 
}

.card:hover { 
  transform:translateY(-6px); 
  box-shadow:0 10px 25px rgba(0,0,0,0.15); 
}

/* ===================== */
/* ICONOS GENERALES */
/* ===================== */
.icono-servicio, .icono-seccion { 
  width:70px; 
  height:70px; 
  margin:0 auto 15px; 
  animation: flotar 3s ease-in-out infinite; 
}

.icono-servicio img, .icono-seccion img { 
  width:100%; 
  height:100%; 
  transition:transform 0.3s, filter 0.3s; 
  animation: brillo 3s infinite alternate; 
}

.icono-servicio img:hover,
.icono-seccion img:hover { 
  transform:scale(1.2); 
  filter: drop-shadow(0 0 12px #ffcc00); 
}

/* ===================== */
/* NOSOTROS */
/* ===================== */
.nosotros-texto { 
  text-align:center; 
  margin-top:10px; 
  font-size:1.2rem; 
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.trust-grid { 
  display:flex; 
  justify-content:center; 
  gap:20px; 
  margin-top:20px; 
  flex-wrap:wrap; 
}

.trust-grid div { 
  background:#fff; 
  padding:10px; 
  border-radius:8px; 
  box-shadow:0 4px 12px rgba(0,0,0,0.1); 
  transition:0.3s; 
  text-align:center; 
  flex:1; 
  min-width: 150px;
}

.trust-grid div:hover { 
  transform:scale(1.05); 
}

/* ===================== */
/* TESTIMONIOS */
/* ===================== */
.testimonials-container { 
  overflow:hidden; 
  max-width:1000px; 
  margin:0 auto; 
  padding:40px 20px; 
}

.testimonials-wrapper { 
  display:flex; 
  gap:20px; 
  transition:transform 0.5s ease-in-out; 
  flex-wrap:nowrap; 
  justify-content:flex-start; 
  scroll-behavior:smooth; 
  overflow-x:auto; 
}

.testimonial-card { 
  flex:0 0 280px; 
  max-width:280px; 
  background:#fff; 
  padding:20px; 
  border-radius:12px; 
  box-shadow:0 4px 12px rgba(0,0,0,0.15); 
  text-align:center; 
  margin-bottom:20px; 
}

.testimonial-card .avatar { 
  width:80px; 
  height:80px; 
  margin:0 auto 10px; 
  border-radius:50%; 
  overflow:hidden; 
  border:2px solid #ffcc00; 
}

.testimonial-card .avatar img { 
  width:100%; 
  height:100%; 
  object-fit:cover; 
}

.testimonial-card .stars { 
  color:#ffcc00; 
  margin:5px 0; 
  font-size:1.2rem; 
}

/* ===================== */
/* BLOG */
/* ===================== */
.blog-grid { 
  display:grid; 
  grid-template-columns:repeat(auto-fit,minmax(250px,1fr)); 
  gap:15px; 
  max-width:1000px; 
  margin:0 auto; 
}

.blog-grid article { 
  background:#fff; 
  padding:15px; 
  border-radius:12px; 
  box-shadow:0 4px 12px rgba(0,0,0,0.1); 
  transition:0.3s; 
  display:flex; 
  flex-direction:column; 
}

.blog-grid article:hover { 
  transform:scale(1.03); 
}

.blog-thumb { 
  width:100%; 
  height:180px; 
  object-fit:cover; 
  border-radius:12px; 
  margin-bottom:10px; 
}

/* Acordeón Blog */
.accordion { 
  background:#0077b6; 
  color:#fff; 
  cursor:pointer; 
  padding:10px 15px; 
  margin-top:10px; 
  border:none; 
  outline:none; 
  font-size:1rem; 
  border-radius:8px; 
  transition:background 0.3s ease; 
  width:100%; 
  text-align:left; 
}

.accordion:hover { 
  background:#005f87; 
}

.accordion.active { 
  background:#023e8a; 
}

.accordion-content { 
  max-height:0; 
  overflow:hidden; 
  transition:max-height 0.4s ease, padding 0.3s ease; 
  background:#f9f9f9; 
  padding:0 15px; 
  border-radius:0 0 8px 8px; 
}

.accordion-content p { 
  margin:10px 0; 
  font-size:0.95rem; 
  line-height:1.5; 
}

/* ===================== */
/* CONTACTO */
/* ===================== */
form { 
  display:flex; 
  flex-direction:column; 
  max-width:400px; 
  margin:0 auto; 
  gap:5px; 
}

form input, form textarea, form select { 
  margin:8px 0; 
  padding:10px; 
  border:1px solid #ccc; 
  border-radius:6px; 
  width:100%; 
}

form textarea { 
  min-height:120px; 
  resize:vertical; 
}

form button { 
  margin:5px 0; 
  transition:0.3s; 
  cursor:pointer; 
  padding:12px; 
  border-radius:6px; 
  border: none; 
  font-weight: bold; 
  width: 100%;
  margin-top: 15px;
}

form button:hover { 
  transform:scale(1.05); 
}

.field-error { 
  color:red; 
  font-size:0.9rem; 
  min-height:1em; 
  margin-top: -5px; 
  margin-bottom: 5px; 
}

#formMessage { 
  margin-top:15px; 
  font-weight:bold; 
  text-align:center; 
  padding:10px; 
  border-radius:6px; 
}

/* Botón WhatsApp en formulario */
.btn-whatsapp {
  background: #25d366;
  color: white;
}

/* Información de contacto */
.info-contacto {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  gap: 25px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.contacto-persona {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.contacto-persona h3 {
  color: #0A4C8A;
  margin-bottom: 15px;
  font-size: 1.2rem;
}

.contacto-persona p {
  margin: 8px 0;
  line-height: 1.5;
}

/* Mapa */
.map { 
  margin-top:30px; 
  border-radius:10px; 
  overflow:hidden; 
  box-shadow:0 4px 12px rgba(0,0,0,0.1); 
}

.map iframe { 
  width:100%; 
  height:400px; 
  border:0; 
}

/* ===================== */
/* BOTONES FLOTANTES */
/* ===================== */
.btn-social { 
  position:fixed; 
  right:20px; 
  width:55px; 
  height:55px; 
  border-radius:50%; 
  background:#fff; 
  display:flex; 
  align-items:center; 
  justify-content:center; 
  box-shadow:0 4px 12px rgba(0,0,0,0.3); 
  transition:0.3s; 
  z-index:1000; 
  overflow:hidden; 
}

.btn-social img { 
  width:60%; 
  height:60%; 
  object-fit:contain; 
}

.btn-social:hover { 
  transform:scale(1.1); 
}

.whatsapp { 
  bottom:20px; 
  background:#25d366; 
}

.facebook { 
  bottom:90px; 
  background:#1877f2; 
}

.instagram { 
  bottom:160px; 
  background:#e4405f; 
}

/* Botón volver arriba */
.back-to-top { 
  position:fixed; 
  bottom:230px; 
  right:20px; 
  width:45px; 
  height:45px; 
  border:none; 
  border-radius:50%; 
  background:#004080; 
  color:#fff; 
  display:none; 
  cursor:pointer; 
  transition:0.3s; 
  z-index:1000; 
}

.back-to-top.show { 
  display:block; 
}

.back-to-top:hover { 
  background:#0066cc; 
}

/* ===================== */
/* FOOTER */
/* ===================== */
.footer {
  background: #111;
  color: #fff;
  text-align: center;
  padding: 30px 15px;
}

.footer-payments {
  margin-bottom: 15px;
}

.footer-payments h4 {
  margin-bottom: 10px;
  font-size: 1rem;
  font-weight: 500;
}

.payments {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.payments img {
  height: 35px;
  opacity: 0.9;
}

.footer-copy {
  font-size: 0.9rem;
  opacity: 0.8;
}

/* ===================== */
/* ANIMACIONES */
/* ===================== */
.reveal { 
  opacity:0; 
  transform:translateY(20px); 
  transition:opacity .6s, transform .6s; 
}

.reveal.active { 
  opacity:1; 
  transform:none; 
}

@keyframes brillo { 
  0% { filter: drop-shadow(0 0 2px #ffcc00); } 
  50% { filter: drop-shadow(0 0 8px #ffcc00); } 
  100% { filter: drop-shadow(0 0 2px #ffcc00); } 
}

@keyframes flotar { 
  0%{transform:translateY(0);} 
  50%{transform:translateY(-10px);} 
  100%{transform:translateY(0);} 
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===================== */
/* DARK MODE */
/* ===================== */
body.dark { 
  background:#0b1220; 
  color:#e6eef8; 
}

body.dark .card, 
body.dark .blog-grid article, 
body.dark .trust-grid div, 
body.dark .testimonial-card,
body.dark .contacto-persona { 
  background:#1a2233; 
  color:#e6eef8; 
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

body.dark .icono-servicio img, 
body.dark .icono-seccion img { 
  animation: brillo 3s infinite alternate; 
}

body.dark .icono-servicio img:hover,
body.dark .icono-seccion img:hover {
  filter: drop-shadow(0 0 12px #ffe066);
}

body.dark .accordion { 
  background:#023e8a; 
  color:#e6eef8; 
}

body.dark .accordion:hover { 
  background:#005f87; 
}

body.dark .accordion.active { 
  background:#0077b6; 
}

body.dark .accordion-content { 
  background:#1a2233; 
  color:#e6eef8; 
}

body.dark .contacto-persona h3 { 
  color: #4da8da; 
}

/* ===================== */
/* RESPONSIVE */
/* ===================== */
@media (max-width:1024px){
  header { 
    flex-direction:column; 
    align-items:flex-start; 
    padding: 12px 15px; 
  }
  
  header .logo img { 
    height: 45px; 
  }
  
  .drill-icon { 
    display:block; 
    width: 40px; 
  }
  
  /* Menú móvil mejorado */
  header ul.menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: linear-gradient(90deg, #0A4C8A, #0D6EC4);
    padding: 15px;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    z-index: 1001;
    flex-direction: column;
  }
  
  header ul.menu.show {
    display: flex;
    animation: slideDown 0.3s ease-out;
  }
  
  header ul.menu li { 
    width: 100%; 
  }
  
  header ul.menu li a {
    display: block;
    padding: 12px 15px;
    margin: 5px 0;
    text-align: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
  }
  
  /* Ajustes para secciones en móvil */
  section {
    scroll-margin-top: 100px;
    padding-top: 100px;
    padding-bottom: 40px;
  }
}

@media (max-width:768px){
  .hero {
    height: 70vh;
  }
  
  .hero h1 { 
    font-size: 2.1rem;
    margin-bottom: 10px;
  }
  
  .hero .subtitle { 
    font-size: 1.05rem;
    margin-bottom: 15px;
  }
  
  /* Logo MÁS GRANDE en tablet */
  .hero::before {
    width: 260px;
    height: 260px;
    top: 28%;
    opacity: 0.18;
  }
  
  .hero-content {
    max-width: 85%;
    margin-top: 70px;
    padding: 15px 20px;
    background-color: rgba(0, 0, 0, 0.4);
  }
  
  .servicios-grid, 
  .trust-grid, 
  .blog-grid { 
    grid-template-columns:1fr; 
    gap: 15px;
  }
  
  .trust-grid div {
    flex: 0 0 100%;
    margin-bottom: 10px;
  }
  
  /* Carrusel testimonios móvil */
  .testimonials-wrapper {
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px;
  }

  .testimonial-card {
    flex: 0 0 85%;
    scroll-snap-align: start;
    margin-right: 15px;
  }
  
  /* Información de contacto en móvil */
  .info-contacto {
    padding: 0 15px;
  }
  
  .contacto-persona {
    padding: 15px;
  }
  
  /* Botones flotantes móvil */
  .btn-social { 
    width:45px; 
    height:45px; 
    right:15px; 
  }
  
  .whatsapp { bottom:15px; }
  .facebook { bottom:70px; }
  .instagram { bottom:125px; }

  .back-to-top {
    width:40px; 
    height:40px;
    bottom:180px; 
    right:15px;
    font-size:0.9rem;
  }

  .accordion { 
    font-size:0.95rem; 
    padding:8px 12px; 
  }
  
  .accordion-content { 
    padding:0 12px; 
  }
  
  .map iframe {
    height: 300px;
  }
}

@media (max-width:480px){
  header { 
    padding:10px 15px; 
  }
  
  .hero { 
    height:65vh; 
  }
  
  .hero h1 {
    font-size: 1.8rem;
  }
  
  .hero .subtitle {
    font-size: 1rem;
  }
  
  /* Logo aún más pequeño en móvil pequeño */
  .hero::before {
    width: 200px;
    height: 200px;
    top: 25%;
    opacity: 0.15;
  }
  
  .hero-content {
    margin-top: 60px;
    padding: 12px 18px;
  }
  
  .btn { 
    padding:10px 20px; 
    font-size: 0.9rem;
  }
  
  section {
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .testimonial-card {
    flex: 0 0 90%;
  }
}

@media (max-width:360px){
  .hero h1 {
    font-size: 1.5rem;
  }
  
  .hero .subtitle {
    font-size: 0.85rem;
  }
  
  .hero::before {
    width: 170px;
    height: 170px;
    top: 22%;
  }
  
  .hero-content {
    margin-top: 50px;
    padding: 10px 15px;
  }
}