/* ============================================================
   STAMPA — IMPRENTA PROFESIONAL
   styles.css v1
   ============================================================ */

/* ---- VARIABLES ---- */
:root {
  --blue:    #1A6EFF;
  --pink:    #E83E8C;
  --yellow:  #F5C400;
  --black:   #111111;
  --white:   #FFFFFF;
  --grey-50: #F8F8F8;
  --grey-100:#EFEFEF;
  --grey-400:#9A9A9A;
  --grey-700:#444444;
  --text:    #1A1A1A;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Outfit', sans-serif;

  --radius: 10px;
  --shadow: 0 4px 32px rgba(0,0,0,0.08);
  --tr:     0.28s cubic-bezier(0.4,0,0.2,1);

  --header-h-desktop: 72px;
  --header-h-mobile:  0px; /* set by JS */
}

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a   { text-decoration: none; color: inherit; }
ul  { list-style: none; }

/* ---- CONTAINER ---- */
.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- SECTIONS ---- */
.section { padding: 88px 0; }

.sec-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 60px;
}

.sec-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue);
  background: rgba(26,110,255,0.08);
  border-radius: 20px;
  padding: 4px 14px;
  margin-bottom: 14px;
}
.sec-tag.light {
  color: var(--yellow);
  background: rgba(245,196,0,0.12);
}

.sec-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 400;
  line-height: 1.18;
  color: var(--black);
  margin-bottom: 14px;
}
.sec-title strong { font-weight: 700; }
.sec-title.light  { color: var(--white); }

.sec-sub {
  color: var(--grey-700);
  font-size: 1rem;
}

/* ============================================================
   HEADER
   ============================================================ */
#header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--grey-100);
  transition: box-shadow var(--tr);
}
#header.scrolled { box-shadow: 0 2px 24px rgba(0,0,0,0.10); }

/* Desktop header row */
.header-desktop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h-desktop);
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.logo-img {
  height: 46px;
  width: auto;
  object-fit: contain;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey-700);
  padding: 8px 14px;
  border-radius: 6px;
  position: relative;
  transition: color var(--tr);
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px; left: 50%; right: 50%;
  height: 2px;
  background: var(--blue);
  border-radius: 2px;
  transition: left var(--tr), right var(--tr);
}
.nav-link:hover,
.nav-link.active { color: var(--blue); }
.nav-link:hover::after,
.nav-link.active::after { left: 14px; right: 14px; }

/* Mobile header — hidden on desktop */
.header-mobile { display: none; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #1a1a2e; /* fallback while image loads */
}

/* THE HERO IMAGE — local file, no background-image */
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    135deg,
    rgba(0,0,0,0.75) 0%,
    rgba(0,0,0,0.40) 55%,
    rgba(26,110,255,0.18) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
  padding: 0 24px;
  margin-left: max(24px, calc((100vw - 1160px) / 2 + 24px));
}

.hero-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--yellow);
  border-left: 3px solid var(--yellow);
  padding-left: 12px;
  margin-bottom: 22px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.08;
  margin-bottom: 22px;
}
.hero-title em { font-style: italic; color: var(--yellow); }

.hero-sub {
  color: rgba(255,255,255,0.80);
  font-size: 1.08rem;
  font-weight: 300;
  max-width: 480px;
  margin-bottom: 38px;
  line-height: 1.72;
}

.btn-hero {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--blue);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 15px 30px;
  border-radius: 5px;
  box-shadow: 0 4px 20px rgba(26,110,255,0.38);
  transition: background var(--tr), transform var(--tr), box-shadow var(--tr);
}
.btn-hero:hover {
  background: #0452cc;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(26,110,255,0.44);
}
.btn-hero i { transition: transform var(--tr); }
.btn-hero:hover i { transform: translateX(4px); }

.hero-colorbar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 3;
  display: flex;
  height: 5px;
}
.hero-colorbar span { flex: 1; }

/* ============================================================
   SERVICIOS
   ============================================================ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.svc-card {
  background: var(--white);
  border: 1px solid var(--grey-100);
  border-radius: var(--radius);
  padding: 32px 24px 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform var(--tr), box-shadow var(--tr);
}
.svc-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 48px rgba(0,0,0,0.09);
}

.svc-icon {
  width: 54px; height: 54px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  color: var(--white);
  margin-bottom: 18px;
  flex-shrink: 0;
}

.svc-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--black);
}

.svc-desc {
  font-size: 0.9rem;
  color: var(--grey-700);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 26px;
}

.svc-bar {
  height: 4px;
  margin: 0 -24px;
  margin-top: auto;
}

/* ============================================================
   NUESTRA SEDE — CARRUSEL
   ============================================================ */
.sede-section { background: var(--grey-50); }

.carousel-wrap {
  position: relative;
  display: flex;
  align-items: center;
  margin-top: 16px;
  padding: 0 64px;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

.carousel-viewport {
  overflow: hidden;
  width: 100%;
  border-radius: var(--radius);
}

.carousel-track {
  display: flex;
  gap: 20px;
  transition: transform 0.5s cubic-bezier(0.4,0,0.2,1);
  will-change: transform;
  align-items: center;
}

/* Slides */
.car-slide {
  flex: 0 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.5s ease, opacity 0.5s ease, box-shadow 0.5s ease;
}

.car-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Active (center) slide is bigger */
.car-slide.active {
  transform: scale(1.06);
  box-shadow: 0 20px 60px rgba(0,0,0,0.22);
  z-index: 2;
}
.car-slide:not(.active) {
  opacity: 0.65;
}

/* Arrow buttons */
.car-btn {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  z-index: 10;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 2px solid rgba(0,0,0,0.12);
  background: var(--white);
  color: var(--black);
  font-size: 1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.10);
  transition: background var(--tr), color var(--tr), border-color var(--tr);
}
.car-btn:hover {
  background: var(--blue);
  color: var(--white);
  border-color: var(--blue);
}
.car-prev { left: 12px; }
.car-next { right: 12px; }

/* Dots */
.car-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}
.car-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--grey-100);
  border: 2px solid var(--grey-400);
  cursor: pointer;
  transition: background var(--tr), border-color var(--tr), transform var(--tr);
}
.car-dot.active {
  background: var(--blue);
  border-color: var(--blue);
  transform: scale(1.3);
}

/* ============================================================
   NOSOTROS
   ============================================================ */
.nosotros-section { background: var(--white); }

.nosotros-grid {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 60px;
  align-items: start;
}

.nos-deco {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding-top: 58px;
}
.nos-line {
  display: block;
  height: 3px;
  border-radius: 2px;
}

.nos-text .sec-tag { margin-bottom: 14px; }

.nos-text p {
  color: var(--grey-700);
  font-size: 0.97rem;
  max-width: 560px;
  margin-bottom: 14px;
}

.nos-list {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.nos-list li {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 0.93rem;
  font-weight: 500;
}

/* ============================================================
   CONTACTO
   ============================================================ */
.contacto-section { background: var(--black); }

.contacto-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: start;
}

.ct-sub {
  color: rgba(255,255,255,0.55);
  font-size: 0.97rem;
  font-weight: 300;
  margin-bottom: 36px;
  max-width: 380px;
  line-height: 1.7;
}

.ct-items {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 36px;
}

.ct-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.ct-icon {
  width: 40px; height: 40px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  font-size: 0.9rem;
  flex-shrink: 0;
}

.ct-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-bottom: 2px;
}

.ct-val {
  display: block;
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  line-height: 1.55;
  transition: color var(--tr);
}
.ct-val:hover { color: var(--yellow); }

.btn-wa {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #25D366;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 15px 30px;
  border-radius: 6px;
  box-shadow: 0 4px 20px rgba(37,211,102,0.28);
  transition: background var(--tr), transform var(--tr), box-shadow var(--tr);
}
.btn-wa i { font-size: 1.15rem; }
.btn-wa:hover {
  background: #1ebe5d;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(37,211,102,0.36);
}

/* Map */
.ct-map { position: relative; }

.map-frame {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  height: 420px;
}
.map-frame iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: #0A0A0A; color: rgba(255,255,255,0.65); }

.footer-bar {
  display: flex;
  height: 4px;
}
.footer-bar span { flex: 1; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1.5fr;
  gap: 48px;
  padding: 52px 24px 36px;
}

.ft-logo {
  height: 40px;
  width: auto;
  object-fit: contain;
  margin-bottom: 10px;
  filter: brightness(0) invert(1);
  opacity: 0.8;
}
.ft-tag {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.35);
  font-style: italic;
  font-family: var(--font-display);
}

.ft-nav h4,
.ft-contact h4 {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.28);
  margin-bottom: 14px;
}

.ft-nav {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.ft-nav a {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.55);
  transition: color var(--tr);
}
.ft-nav a:hover { color: var(--blue); }

.ft-contact {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.ft-contact a {
  font-size: 0.83rem;
  color: rgba(255,255,255,0.55);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 9px;
  transition: color var(--tr);
  word-break: break-all;
}
.ft-contact a i { margin-top: 3px; flex-shrink: 0; }
.ft-contact a:hover { color: var(--blue); }

.ft-social {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}
.ft-social a {
  width: 34px; height: 34px;
  border-radius: 7px;
  border: 1px solid rgba(255,255,255,0.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.45);
  margin-bottom: 0 !important;
  word-break: normal;
  transition: background var(--tr), color var(--tr), border-color var(--tr);
}
.ft-social a:hover {
  background: var(--blue);
  color: var(--white);
  border-color: var(--blue);
}

.footer-copy {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 18px 24px;
  text-align: center;
  font-size: 0.76rem;
  color: rgba(255,255,255,0.22);
  max-width: 1160px;
  margin: 0 auto;
}

/* ============================================================
   FADE-IN ANIMATIONS
   ============================================================ */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }
.fade-up.d1 { transition-delay: 0.10s; }
.fade-up.d2 { transition-delay: 0.20s; }
.fade-up.d3 { transition-delay: 0.30s; }
.fade-up.d4 { transition-delay: 0.40s; }

/* ============================================================
   RESPONSIVE — TABLET (max 1024px)
   ============================================================ */
@media (max-width: 1024px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .contacto-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .map-frame { height: 320px; }
  .nosotros-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .nos-deco {
    padding-top: 0;
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }
  .nos-line { height: 4px; width: 40px !important; }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

/* ============================================================
   RESPONSIVE — MOBILE (max 768px)
   ============================================================ */
@media (max-width: 768px) {

  /* ---- HEADER ---- */
  /* En móvil: ocultar el header-desktop completo */
  .header-desktop { display: none; }

  /* Mostrar solo el header-mobile con logo centrado */
  .header-mobile {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 58px;
    padding: 0 16px;
  }

  /* Solo el logo, sin menú */
  .header-mobile .logo-img { height: 38px; }

  /* Ocultar todo lo que no sea el logo en móvil */
  .mob-topbar  { display: contents; } /* permite que logo-link sea hijo directo */
  .mob-toggle  { display: none; }     /* botón hamburguesa: invisible */
  .nav-mobile  { display: none; }     /* menú desplegable: invisible */

  /* ---- SECTIONS ---- */
  .section { padding: 60px 0; }

  /* ---- HERO ---- */
  .hero { min-height: 100svh; }
  .hero-content {
    margin-left: 0;
    padding: 0 20px;
  }

  /* ---- SERVICIOS ---- */
  .cards-grid { grid-template-columns: 1fr; gap: 14px; }

  /* ---- CARRUSEL ---- */
  .carousel-wrap { padding: 0 48px; }
  .car-btn { width: 38px; height: 38px; font-size: 0.85rem; }
  .car-prev { left: 4px; }
  .car-next { right: 4px; }

  /* ---- NOSOTROS ---- */
  .nosotros-grid { gap: 16px; }

  /* ---- CONTACTO ---- */
  .contacto-grid { grid-template-columns: 1fr; gap: 36px; }
  .map-frame { height: 260px; }

  /* ---- FOOTER ---- */
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

/* ============================================================
   RESPONSIVE — SMALL (max 420px)
   ============================================================ */
@media (max-width: 420px) {
  .hero-title { font-size: 2.2rem; }
  .btn-hero, .btn-wa { width: 100%; justify-content: center; }
  .carousel-wrap { padding: 0 36px; }
}
