/* -------------------------------------
   VARIABLES PRINCIPALES
-------------------------------------- */
:root {
  --color-bg: #ffffff;
  --color-text: #222;
  --color-primary: #003b6f;
  --color-accent: #0077ff;
  --color-card: #f7f7f7;
  --transition: 0.25s ease;
}

/* DARK MODE */
.dark {
  --color-bg: #0d1117;
  --color-text: #e2e2e2;
  --color-primary: #4fa8ff;
  --color-card: #161b22;
}

/* -------------------------------------
   RESET
-------------------------------------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: "Inter", sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  transition: background var(--transition), color var(--transition);
}

/* -------------------------------------
   HEADER
-------------------------------------- */
.sticky-header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: var(--color-bg);
  border-bottom: 1px solid #ddd;
  padding: 10px 0;
}

.container {
  width: 92%;
  max-width: 1100px;
  margin: auto;
}

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

.nav-links a {
  margin: 0 14px;
  text-decoration: none;
  color: var(--color-text);
  font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-accent);
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1.1rem;
  font-weight: 600;
}

.logo-icon {
  background: var(--color-accent);
  color: #fff;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.8rem;
}

/* Controles derechos */
.right-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Botón idioma */
.lang-switch {
  text-decoration: none;
  background: var(--color-accent);
  color: #fff !important;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid transparent;
}

.lang-switch:hover {
  background: #005fd0;
}

/* Botón dark mode */
#darkToggle {
  background: transparent;
  border: 1px solid #ccc;
  cursor: pointer;
  font-size: 18px;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

body:not(.dark) #darkToggle::after { content: "🌙"; }
body.dark #darkToggle::after { content: "☀️"; }

/* -------------------------------------
   HERO GENERAL (FORZADO)
-------------------------------------- */

/* 🔥 Ruta absoluta: funciona siempre */
.hero,
.page-hero {
  background-image: url("https://ecomhillglobal.com/image/Ecom-background.jpeg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  text-align: center;
  color: #fff;
}

.hero {
  padding: 150px 20px 130px;
}

.page-hero {
  padding: 110px 20px 80px;
}

.hero::before,
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
}

.hero-content,
.page-hero * {
  position: relative;
  z-index: 2;
}

.hero h1,
.page-hero h1 {
  font-size: 2.6rem;
  margin-bottom: 10px;
}

.hero p,
.page-hero p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 16px;
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
  padding: 10px 22px;
  display: inline-block;
  border-radius: 6px;
  text-decoration: none;
  transition: background var(--transition), transform var(--transition);
}

.btn-primary:hover {
  background: #0057c2;
  transform: translateY(-2px);
}

/* -------------------------------------
   SECCIONES
-------------------------------------- */
.section { padding: 50px 0; }
.section p { margin-bottom: 14px; }

.grid-3-cols {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 22px;
}

.card {
  background: var(--color-card);
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 3px 12px #00000010;
}

/* -------------------------------------
   FOOTER
-------------------------------------- */
.footer {
  background: #0d1117;
  color: #ccc;
  padding: 40px 0 20px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 25px;
}

.footer a {
  color: #ccc;
  text-decoration: none;
}

.footer a:hover { color: #fff; }

.footer-bottom {
  text-align: center;
  opacity: 0.7;
  margin-top: 20px;
  font-size: 0.85rem;
}

/* -------------------------------------
   RESPONSIVE
-------------------------------------- */
@media (max-width: 900px) {
  .nav-flex {
    flex-direction: column;
    gap: 8px;
  }
  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
  }
  .grid-3-cols { grid-template-columns: 1fr; }
  .hero h1, .page-hero h1 { font-size: 2.1rem; }
}
