/* =========================================================
   FIXORUS · Hoja de estilos
   Los colores y la fuente se cambian en un único sitio: :root
   ========================================================= */

:root {
  /* Colores de marca */
  --navy: #08152e;     /* azul oscuro: cabecera, textos, barra */
  --gold: #d9be87;     /* dorado: logo y enlaces del menú */
  --page: #e9dcc2;     /* color de fondo de toda la página */

  --text: var(--navy);

  /* Avenir Next Arabic es una fuente de pago: se usa si el visitante la tiene
     instalada; si no, se carga Mulish (gratuita y muy parecida). */
  --font: "Avenir Next Arabic", "Avenir Next", "Avenir", "Mulish", system-ui, sans-serif;

  /* Imagen de fondo del hero (el halcón/ojo de Horus) y lo visible que se ve.
     Sube --hero-image-opacity para verlo más marcado, bájala para más sutil. */
  --hero-image: url("../img/horus.png");
  --hero-image-opacity: 0.05;

  --nav-height: 84px;
}

/* ---------- Reset básico ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-height); }

body {
  background: var(--page);
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ---------- Cabecera ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--navy);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.header-inner {
  height: var(--nav-height);
  padding: 0 clamp(20px, 4vw, 48px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo { display: flex; align-items: center; }
.logo img { height: clamp(26px, 2.6vw, 36px); width: auto; display: block; }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 36px);
}

.nav-link {
  color: var(--gold);
  font-size: clamp(1.05rem, 1.5vw, 1.35rem);
  font-weight: 300;
  transition: opacity 0.15s ease;
}
.nav-link:hover { opacity: 0.75; }

.social {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2vw, 28px);
}
.social a {
  color: var(--gold);
  display: flex;
  transition: opacity 0.15s ease;
}
.social a:hover { opacity: 0.75; }
.social svg { width: 18px; height: 18px; }

.btn-whatsapp {
  background: var(--page);
  color: var(--navy);
  font-size: 1.05rem;
  font-weight: 400;
  padding: 10px 26px;
  border-radius: 999px;
  transition: transform 0.15s ease;
}
.btn-whatsapp:hover { transform: translateY(-1px); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background-color: var(--page);
  overflow: hidden;
}

/* Marca de agua (se activa con la variable --hero-image) */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--hero-image);
  background-repeat: no-repeat;
  background-position: right calc(38px - 2%) top 0;
  background-size: auto 105%;
  opacity: var(--hero-image-opacity);
  pointer-events: none;
  /* Difumina el borde inferior para que no se vea un corte seco */
  -webkit-mask-image: linear-gradient(to bottom, #000 80%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 80%, transparent 100%);
}

.hero-inner {
  position: relative;
  padding-bottom: clamp(70px, 9vw, 130px) !important;
  max-width: 1400px;
  margin: 0 auto;
  padding: clamp(48px, 8vw, 100px) clamp(20px, 6vw, 80px) clamp(40px, 5vw, 60px);
}

.hero h1 {
  max-width: 16em;
  font-size: clamp(2.2rem, 4.8vw, 3.6rem);
  font-weight: 300;
  line-height: 1.12;
}

.lead {
  margin: 12px 0 0 clamp(0px, 4vw, 70px);
  font-size: clamp(1.15rem, 2.2vw, 1.7rem);
  font-weight: 300;
}

/* Tres ventajas, ligeramente escalonadas como en el diseño original */
.features {
  margin: clamp(48px, 9vw, 120px) 0 0;
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: clamp(24px, 4vw, 64px);
  align-items: first baseline;
}

.feature h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 14px;
}
.feature p { font-size: 1.2rem; font-weight: 300; max-width: 24em; }
.feature strong { font-weight: 700; }
.feature h2 { font-size: 1.45rem; }

/* ---------- Contacto ---------- */
.contact { background: var(--page); position: relative; box-shadow: 0 -14px 28px -14px rgba(8, 21, 46, 0.12); }

.contact-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: clamp(40px, 7vw, 90px) clamp(20px, 6vw, 80px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 40px;
}

.contact-logo { height: clamp(28px, 3.4vw, 50px); width: auto; display: block; margin-left: clamp(0px, 7vw, 120px); }

.contact-mail {
  font-size: clamp(1.1rem, 1.9vw, 1.6rem);
  font-weight: 300;
  line-height: 1.1;
  overflow-wrap: anywhere;
  transition: opacity 0.15s ease;
}
.contact-mail:hover { opacity: 0.75; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--page);
  color: var(--navy);
  opacity: 0.6;
  text-align: center;
  padding: 0 20px 28px;
  font-size: 0.8rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .features { grid-template-columns: 1fr; gap: 28px; }
  .feature:nth-child(2),
  .feature:nth-child(3) { margin-top: 0; }
}

@media (max-width: 820px) {
  :root { --nav-height: 68px; }

  .nav-toggle { display: flex; }

  .nav {
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--navy);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 24px 24px;
    display: none;
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
  }
  .nav.open { display: flex; }

  .nav-link {
    width: 100%;
    padding: 14px 0;
    border-bottom: 1px solid rgba(217, 190, 135, 0.2);
  }
  .social { padding: 18px 0 14px; }
  .btn-whatsapp { align-self: stretch; text-align: center; padding: 12px 16px; }
  .contact-inner { flex-direction: column; align-items: flex-start; }
  .contact-logo { margin-left: 0; }
}

/* =========================================================
   Desplegable "Reparaciones"
   ========================================================= */
.dropdown { position: relative; }

.dropdown-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.chev { width: 11px; height: 8px; transition: transform 0.2s ease; }
.dropdown-toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }

.dropdown-menu {
  list-style: none;
  position: absolute;
  top: calc(100% + 18px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 260px;
  background: var(--navy);
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
  display: none;
}
.dropdown.open .dropdown-menu { display: block; }

.dropdown-menu a {
  display: block;
  padding: 12px 16px;
  border-radius: 10px;
  color: var(--gold);
  font-size: 1.05rem;
  font-weight: 300;
  white-space: nowrap;
  transition: background 0.15s ease;
}
.dropdown-menu a:hover,
.dropdown-menu a:focus-visible { background: rgba(217, 190, 135, 0.14); }

/* =========================================================
   Páginas de producto (PS5, XBOX)
   ========================================================= */
.page-hero .hero-inner { max-width: 1100px; }
.page-hero h1 { max-width: 18em; }

/* Lista de reparaciones (índice) */
.repair-list {
  margin-top: clamp(32px, 5vw, 56px);
  max-width: 760px;
  border-top: 1px solid rgba(8, 21, 46, 0.18);
}
.repair-list a {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "name arrow" "sub arrow";
  align-items: center;
  column-gap: 20px;
  padding: 20px 6px;
  border-bottom: 1px solid rgba(8, 21, 46, 0.18);
  transition: background 0.15s ease, padding-left 0.15s ease;
}
.repair-list a:hover { background: rgba(8, 21, 46, 0.05); padding-left: 14px; }
.repair-name { grid-area: name; font-size: clamp(1.3rem, 2.4vw, 1.7rem); font-weight: 600; }
.repair-sub { grid-area: sub; font-size: 1.05rem; font-weight: 300; opacity: 0.85; }
.repair-arrow { grid-area: arrow; font-size: 1.6rem; }

/* Secciones de detalle */
.repair {
  max-width: 760px;
  margin-top: clamp(64px, 9vw, 110px);
  scroll-margin-top: calc(var(--nav-height) + 20px);
}
.repair h2 { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 300; line-height: 1.1; margin-bottom: 18px; }
.repair h3 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 300; margin: 32px 0 14px; }
.repair p { font-size: 1.15rem; font-weight: 400; margin-bottom: 14px; }
.includes { margin-left: 22px; }
.includes li { font-size: 1.1rem; margin-bottom: 8px; }

.repair-actions { margin-top: 30px; display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; }
.btn-primary {
  background: var(--navy);
  color: var(--gold);
  padding: 13px 26px;
  border-radius: 999px;
  font-size: 1.05rem;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.btn-primary:hover { transform: translateY(-1px); opacity: 0.92; }
.back-link { font-size: 1rem; opacity: 0.75; }
.back-link:hover { opacity: 1; text-decoration: underline; }

/* ---------- Desplegable en móvil ---------- */
@media (max-width: 820px) {
  .dropdown { width: 100%; }
  .dropdown-toggle {
    width: 100%;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid rgba(217, 190, 135, 0.2);
  }
  .dropdown-menu {
    position: static;
    transform: none;
    min-width: 0;
    box-shadow: none;
    background: transparent;
    padding: 0 0 4px 12px;
  }
  .dropdown-menu a { padding: 12px 0; border-radius: 0; white-space: normal; }
}

/* En las páginas largas, el halcón ocupa solo la parte de arriba */
.page-hero::before {
  bottom: auto;
  height: min(900px, 100vh + 200px);
  background-size: auto 100%;
  background-position: right -4% top 0;
}

/* ---------- Precios ---------- */
.repair-list a {
  grid-template-columns: 1fr auto auto;
  grid-template-areas: "name price arrow" "sub price arrow";
}
.repair-price {
  grid-area: price;
  font-size: 1.15rem;
  font-weight: 600;
  white-space: nowrap;
  padding-right: 6px;
}

.prices { list-style: none; max-width: 460px; border-top: 1px solid rgba(8, 21, 46, 0.18); }
.prices li {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 2px;
  border-bottom: 1px solid rgba(8, 21, 46, 0.18);
  font-size: 1.15rem;
}
.price-val { font-weight: 700; white-space: nowrap; }

@media (max-width: 520px) {
  .repair-list a {
    grid-template-columns: 1fr auto;
    grid-template-areas: "name arrow" "sub arrow" "price arrow";
    row-gap: 2px;
  }
  .repair-price { padding-top: 4px; font-size: 1.05rem; }
}
