/* ================= Variables por defecto (serán sobrescritas por light.css / dark.css) ================ */
:root{
  --bg: #f9f9f9;
  --text: #333;
  --primary: #002f6c;       /* header, links */
  --accent: #25d366;        /* whatsapp / botones */
  --card-bg: #f4f4f4;
  --card-text: #333;
  --service-title: #d32f2f;
  --muted-bg: #ffffff;
  --hero-bg-image: url("../Imagenes/Logo/Logo Claro.png"); 
  --hero-bg-size: contain; /* puede ser contain o cover */
  --btn-text: #fff;
  --dark-btn-bg: #333;
}

/* ===== RESET Y BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", Arial, sans-serif;
}

html, body {
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}


/* ===== HEADER ===== */
header {
  background: var(--primary);
  color: #fff;
  padding: 10px 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  z-index: 100;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--btn-text);  
}

.brand .logo {
  height: 55px;
  border-radius: 8px;
  margin-right: 10px;
}

.brand h1 {
  font-size: 22px;
  font-weight: 700;
}

/* ===== NAVBAR ===== */
nav ul {
  list-style: none;
}

nav ul li {
  display: inline-block;
  margin: 0 15px;
}

nav ul li a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s;
}

nav ul li a:hover,
nav ul li a.active {
  color: #ffcc00;
}

/* ===== HERO (usa variable de imagen) ===== */
.hero {
  position: relative;
  background-color: var(--bg);
  background-repeat: no-repeat;
  background-position: center center;
  background-size: var(--hero-bg-size);
  /* background-image: var(--hero-bg-image); */
  pointer-events: none;
  /* min-height: 40vh; */
  min-height: 0 !important;
  height: auto !important;
  width: 100%;
  aspect-ratio: 16 / 4;
  display: block;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0;
  margin: 0;
  -webkit-backface-visibility: hidden; /* mejora repintados en móviles / chrome */
  backface-visibility: hidden;
  transform: translateZ(0);
  will-change: transform;
  overflow: hidden;
  box-sizing: border-box;
}


.hero-text {
  position: relative;
  z-index: 2;
  /* max-width: 600px; */
}

.hero h2 {
  font-size: 38px;
  font-weight: 700;
  margin-bottom: 15px;
}

.hero p {
  font-size: 18px;
  margin-bottom: 25px;
}

/* ===== BOTÓN WHATSAPP ===== */
.what-btn {
  background: var(--accent);
  color: var(--btn-text);
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 16px;
  text-decoration: none;
  transition: transform 0.3s, background 0.3s;
  display: inline-block;
}

.what-btn:hover {
  transform: scale(1.05);
  background: color-mix(in srgb, var(--accent) 80%, black 20%);
}

/* ===== SERVICIOS (tarjetas) ===== */
.services {
  padding: 30px 20px;
  background: var(--muted-bg);
  text-align: center;
}

.services h2 {
  margin-bottom: 30px;
  font-size: 30px;
  color: var(--primary);
  font-weight: 700;
}

.service-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 25px;
}

.service-card {
  background: var(--card-bg);
  color: var(--card-text);
  padding: 25px;
  border-radius: 12px;
  width: 280px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  transition: transform 0.3s, box-shadow 0.3s;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 15px rgba(0,0,0,0.12);
}

.service-card h3 {
  margin-bottom: 10px;
  color: var(--service-title);
  font-size: 20px;
}

.service-card p {
  font-size: 15px;
}

/* ===== CONTACTO ===== */
.contact {
  padding: 60px 20px;
  background: var(--muted-bg, #e3f2fd);
  text-align: center;
  color: var(--text, #333);
}


.contact h2 {
  color: var(--primary);
  margin-bottom: 25px;
  font-size: 28px;
}

#what-btn {
  margin-top: 35px;
  display: inline-block;
}

/* ===== FOOTER ===== */
footer {
  background: var(--primary);
  color: white;
  text-align: center;
  padding: 18px;
  font-size: 15px;
  position: relative;
}

/* ===== WHATSAPP FLOAT ===== */
.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--accent);
  color: white;
  font-size: 24px;
  padding: 15px;
  border-radius: 50%;
  text-decoration: none;
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
  animation: pulse 1.5s infinite;
  z-index: 10;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* ===== DARK MODE BUTTON (común) ===== */
.dark-mode-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--muted-bg);
  color: var(--primary);
  border: none;
  border-radius: 30px;
  padding: 10px 16px;
  font-size: 14px;
  /* font-weight: bold; */
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.3s, color 0.3s, transform 0.2s;
  /*z-index: 1000;*/
  z-index: 1200;
}

.dark-mode-btn:hover {
  transform: scale(1.05);
  background: color-mix(in srgb, var(--primary) 85%, white 15%);
  color: #fff;
}

.dark-mode-btn .icon {
  display: inline-block;
  font-size: 18px;
  line-height: 1;
  transition: transform 0.6s ease, opacity 0.3s ease;
}

.dark-mode-btn.rotating .icon { 
    transform: rotate(360deg); 
    opacity: 0.6; 
}

#dark-mode-text {
  display: inline-block;
}

.dark-mode-btn.compact {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  justify-content: center;
}

/* ===== Utility / small adjustments ===== */
.social-icons { 
    margin-top: 10px; 
}

.instagram-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: white;
  background: linear-gradient(45deg,#f58529,#dd2a7b,#8134af,#515bd4);
  padding: 10px 15px;
  border-radius: 30px;
  transition: transform .3s, box-shadow .3s;
}

.instagram-btn img { 
    width:20px;
    height:20px;
    border-radius:50%; 
}

.instagram-btn:hover { 
    transform: scale(1.05) rotate(2deg); 
    box-shadow:0 4px 12px rgba(255,105,180,0.5); 
}



/* ===== RESPONSIVE ===== */

/* Movil medio / tablet */
@media (max-width: 768px) {
  /* Forzar que el contenedor de nav se organice horizontalmente y no centre el contenido */
  .nav-container {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* <- empieza a la izquierda */
    gap: 12px;
    padding: 8px 12px;
    flex-wrap: nowrap; /* evita que los items bajen de línea */
  }

  /* El brand (logo) mantiene su tamaño pero no empuja el nav al centro */
  .brand {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  /* Menú como fila (en lugar de lista centrada). Permite scroll horizontal si falta espacio. */
  nav {
    flex: 1 1 auto;
    overflow-x: auto; /* si no entra, permite desplazar */
  }

  nav ul {
    display: flex;
    gap: 18px;
    align-items: center;
    justify-content: flex-start; /* items alineados a la izquierda */
    white-space: nowrap; /* evitar que los enlaces se rompan en varias líneas */
    padding-left: 0;
    margin: 0;
  }

  nav ul li {
    display: inline-flex;
    margin: 0;
  }

  nav ul li a {
    font-size: 15px;
    padding: 6px 0;
  }

  /* botón más pequeño y menos intrusivo */
  .dark-mode-btn {
    top: 12px;
    right: 12px;
    padding: 8px 10px;
    font-size: 13px;
  }

  header {
    padding-top: 12px; 
  }

}

/* Teléfonos pequeños: esconder texto del botón y dejar solo emoji (compactar más y controlar la imagen) */
@media (max-width: 670px) {
  .nav-container { gap: 8px; padding: 6px 8px; }
  nav ul { gap: 12px; }
  nav ul li a { font-size: 14px; }

  /* convierte el botón en círculo y oculta texto */
  .dark-mode-btn {
    top: 10px;
    right: 10px;
    padding: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    justify-content: center;
  }

  /* ocultar el texto para que solo se vea el emoji */
  #dark-mode-text { display: none !important; }

  /* agrandar ligeramente la emoji para visibilidad */
  .dark-mode-btn .icon { font-size: 20px; }

  /* reducir gap dentro de .service-container para pantallas pequeñas */
  .service-container { gap: 18px; } 
}


/* Muy pequeños (pantallas ultra estrechas) */
@media (max-width: 318px) {
  .dark-mode-btn { width: 35px; height: 35x; top: 8px; right: 4px; }
  .hero { min-height: 24vh; padding: 10px;}
  .hero h2 { font-size: 20px; }
  .service-card { width: 90%; max-width: 320px; }
}
