/* ==========================================================
   Midas Shipping Store - estilos.css (versión unificada)
   ========================================================== */

/* ---------- Fuentes ---------- */
@font-face {
  font-family: "Philosopher";
  src: url("../fonts/Philosopher-Regular.ttf");
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: "Philosopher";
  src: url("../fonts/Philosopher-Italic.ttf");
  font-weight: 400;
  font-style: italic;
}
@font-face {
  font-family: "Philosopher";
  src: url("../fonts/Philosopher-Bold.ttf");
  font-weight: 700;
  font-style: normal;
}
@font-face {
  font-family: "Philosopher";
  src: url("../fonts/Philosopher-BoldItalic.ttf");
  font-weight: 700;
  font-style: italic;
}

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

body {
  font-family: Arial, sans-serif;
  color: #222;
  background: #f4f6f8;
  line-height: 1.5;
}

main { max-width: 1000px; margin: 0 auto; padding: 24px; }

section {
  background: #fff;
  padding: 24px;
  margin-bottom: 20px;
  border-radius: 8px;
}

footer { text-align: center; padding: 20px; color: #666; }

/* ---------- Pilares laterales ---------- */
body::before,
body::after {
  content: "";
  position: fixed;
  top: 0;
  bottom: 0;
  width: calc((100vw - 1000px) / 2);
  z-index: -1;
  background: repeating-linear-gradient(
    90deg,
    #d9d3c5 0 8px,
    #f7f4ec 8px 22px,
    #cfc8b8 22px 30px,
    transparent 30px 64px
  );
  opacity: 0.7;
}

body::before {
  left: 0;
  -webkit-mask-image: linear-gradient(to right, #000 35%, transparent 100%);
  mask-image: linear-gradient(to right, #000 35%, transparent 100%);
}

body::after {
  right: 0;
  -webkit-mask-image: linear-gradient(to left, #000 35%, transparent 100%);
  mask-image: linear-gradient(to left, #000 35%, transparent 100%);
}

/* ---------- Encabezado ---------- */
header {
  position: relative;
  background: url("../img/banner_midas.jpg") center / cover no-repeat;
  min-height: 120px;
  color: #fff;
  padding: 10px 24px;
  margin-bottom: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Transición del banner hacia el fondo */
header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 60px;
  background: linear-gradient(to bottom, transparent, #f4f6f8);
  pointer-events: none;
}

/* Nombre escalonado */
header h1 {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  font-family: "Philosopher", Georgia, serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: #ffd700;
  white-space: nowrap;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
  -webkit-mask-image: linear-gradient(to bottom, #000 92%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 92%, transparent 100%);
}

header h1 span:nth-child(2) { margin-left: 1.2em; }
header h1 span:nth-child(3) { margin-left: 3.4em; }

/* Letrero que se desplaza */
.banner {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  margin: 0 24px;
  padding: 6px 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
}

.banner span {
  display: inline-block;
  padding-left: 100%;
  font-size: 1.3rem;
  font-weight: 600;
  color: #0b3d91;
  animation: letrero 18s linear infinite;
}

@keyframes letrero {
  from { transform: translateX(0); }
  to   { transform: translateX(-100%); }
}

/* Menú */
nav {
  background: none;
  padding: 0;
  white-space: nowrap;
}

nav a {
  color: #fff;
  text-decoration: none;
  margin-left: 20px;
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
}

nav a:hover { text-decoration: underline; }

/* ---------- Bloque central ---------- */
.hero {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 20px;
}

#inicio {
  position: relative;
  min-height: 480px;
  padding: 0;
  text-align: left;
}

.hero #inicio {
  flex: 1;
  margin-bottom: 0;
}

#inicio .f1,
#inicio .f2,
#inicio .f3,
#inicio .f4,
#inicio .resaltado {
  font-family: "Philosopher", Georgia, serif;
  font-weight: 700;
}

.f1 {
  position: absolute;
  top: 5%;
  left: 3%;
  font-size: 2.6rem;
  color: #000;
  white-space: nowrap;
}

.resaltado {
  position: absolute;
  top: 14%;
  right: 6%;
  font-size: 3rem;
  font-style: italic;
  color: #ff8c1a;
  transform: rotate(-6deg);
  transform-origin: right bottom;
}

.f2 {
  position: absolute;
  top: 35%;
  left: 4%;
  font-size: 2.1rem;
  color: #3a96ea;
}

.f3 {
  position: absolute;
  top: 56%;
  left: 3%;
  width: 55%;
  font-size: 1.7rem;
  color: #222;
}

.f4 {
  position: absolute;
  top: 68%;
  left: 3%;
  width: 55%;
  font-size: 1.4rem;
  font-weight: 400;
  color: #555;
}

.rojo { color: #e8554a; }

#inicio a {
  position: absolute;
  bottom: 8%;
  right: 3%;
  padding: 10px 24px;
  background: #f7c600;
  color: #000;
  font-weight: 700;
  text-decoration: none;
  border-radius: 999px;
}

/* Camión animado */
.camion {
  position: absolute;
  right: 5%;
  bottom: 150px;
  width: 260px;
}

.lineas line { animation: correr 0.8s linear infinite; }
.lineas line:nth-child(2) { animation-delay: 0.15s; }
.lineas line:nth-child(3) { animation-delay: 0.3s; }
.lineas line:nth-child(4) { animation-delay: 0.45s; }
.lineas line:nth-child(5) { animation-delay: 0.6s; }

@keyframes correr {
  0%   { transform: translateX(0); opacity: 1; }
  100% { transform: translateX(-25px); opacity: 0; }
}

.cuerpo { animation: rebote 0.6s ease-in-out infinite; }

@keyframes rebote {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-3px); }
}

/* ---------- Botones de servicios ---------- */
/* Pantallas anchas: sobre el pilar izquierdo */
.servicios {
  position: fixed;
  left: 0;
  top: 180px;
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 5;
}

.btn-servicio {
  display: block;
  padding: 6px 10px;
  background: linear-gradient(to right, rgba(255, 255, 255, 0.75), transparent);
  color: #0b3d91;
  font-family: "Philosopher", Georgia, serif;
  font-weight: 700;
  font-size: 0.9rem;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 6px 0 0 6px;
}

.btn-servicio:hover {
  background: linear-gradient(to right, rgba(255, 215, 0, 0.35), transparent);
}

/* Pantallas angostas: botones en fila arriba, recuadro completo debajo */
@media (max-width: 1500px) {
  .hero {
    flex-direction: column;
    gap: 10px;
  }

  .servicios {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
    padding-left: 0;
    gap: 6px;
  }

  .hero #inicio {
    flex: none;
    width: 100%;
  }
}


/* ==========================================================
   VERSIÓN NOCHE (sobrescribe lo anterior)
   ========================================================== */
body {
  background-color: #0a0f1c;
  background-image:
    radial-gradient(1px 1px at 30px 40px, #fff, transparent),
    radial-gradient(1px 1px at 120px 90px, #cfd8ff, transparent),
    radial-gradient(1.5px 1.5px at 210px 20px, #fff, transparent),
    radial-gradient(1px 1px at 260px 150px, #ffe9a8, transparent),
    radial-gradient(1px 1px at 70px 200px, #fff, transparent),
    radial-gradient(1.5px 1.5px at 180px 250px, #cfd8ff, transparent);
  background-size: 300px 300px;
  background-attachment: fixed;
}

/* Pilares tenues */
body::before, body::after {
  background: repeating-linear-gradient(90deg,
    rgba(255,255,255,.10) 0 8px, rgba(255,255,255,.04) 8px 22px,
    rgba(255,255,255,.09) 22px 30px, transparent 30px 64px);
  opacity: 1;
}

/* Encabezado: nombre arriba al centro, letrero y menú abajo */
header {
  background: url("../img/banner_noche.jpg") center / cover no-repeat;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  align-items: end;
  min-height: 230px;
  padding: 14px 24px 12px;
}
header::after { background: linear-gradient(to bottom, transparent, #0a0f1c); }

header h1 {
  display: block;
  grid-column: 1 / -1;
  justify-self: center;
  align-self: start;
  -webkit-mask-image: none;
  mask-image: none;
  text-shadow: none;
}

.constelacion { width: min(760px, 92vw); height: auto; display: block; overflow: visible; }

.c-text {
  font-family: "Philosopher", Georgia, serif;
  font-weight: 700;
  font-size: 64px;
  fill: rgba(255, 215, 0, .3);
  stroke: #ffe27a;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-dasharray: .1 7;
  filter: drop-shadow(0 0 4px rgba(255, 215, 0, .8));
  animation: titilar 3.5s ease-in-out infinite;
}

@keyframes titilar { 50% { opacity: .75; } }

.banner {
  grid-row: 2;
  grid-column: 1;
  margin: 0 24px 0 220px; /* espacio libre a la izquierda */
  background: rgba(8, 12, 30, .6);
}
.banner span { color: #ffe9a8; font-size: 1.1rem; }

nav { grid-row: 2; grid-column: 2; }
nav a { font-size: .85rem; margin-left: 14px; }

/* Botones de servicios sobre el pilar */
.btn-servicio {
  color: #ffe27a;
  background: linear-gradient(to right, rgba(255,215,0,.14), transparent);
}
.btn-servicio:hover { background: linear-gradient(to right, rgba(255,215,0,.35), transparent); }

/* Secciones oscuras */
#inicio, main section:not(#inicio) {
  background: #121826;
  color: #e6e8ee;
  border: 1px solid rgba(255,215,0,.25);
}
#inicio .f1 { color: #fff; }
#inicio .f2 { color: #5db0ff; }
#inicio .f3 { color: #e6e8ee; }
#inicio .f4 { color: #b9bfcc; }
#inicio .rojo { color: #ff6b5e; }

main section:not(#inicio) h2 { font-family: "Philosopher", Georgia, serif; color: #ffd700; margin-bottom: 14px; }
main section:not(#inicio) label { display: block; font-size: .9rem; }
main section:not(#inicio) input {
  display: block; width: 100%; margin-top: 4px; padding: 8px 10px;
  background: #1d2638; color: #fff; border: 1px solid #3a4560; border-radius: 6px;
}
main section:not(#inicio) input:focus { outline: none; border-color: #ffd700; }
main section:not(#inicio) button {
  padding: 10px 22px; background: #ffd700; color: #121826; font-weight: 700;
  border: none; border-radius: 999px; cursor: pointer;
}
.form-cotizador { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; align-items: end; }

footer {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 28px;
  padding: 28px 20px; background: #070b15; color: #b9bfcc;
}

/* Furgoneta en el recuadro de inicio */
.van {
  position: absolute;
  right: 2%;
  bottom: 70px;
  width: 44%;
  max-width: 470px;
  height: auto;
  mix-blend-mode: lighten; /* funde el fondo de la imagen con el recuadro */
  -webkit-mask-image: radial-gradient(ellipse at center, #000 55%, transparent 100%);
  mask-image: radial-gradient(ellipse at center, #000 55%, transparent 100%);
  pointer-events: none;
}
#inicio a { z-index: 2; }
