/* ==========================================================================
   LogoFacilito - Dedicated Home Stylesheet (css/home.css)
   Clean, adaptive styles for the homepage across all resolutions.
   ========================================================================== */

:root {
  /* ========================================================================
     SISTEMA TIPOGRÁFICO DE 3 NIVELES (Todo el sitio excepto Hero)
     1. Grande: Títulos de secciones principales
     2. Mediano: Descripciones, subtítulos, textos explicativos y párrafos
     3. Pequeño: Detalles puntuales, badges, tags, fechas y botones compactos
     ======================================================================== */
  --home-title-lg: clamp(2.5rem, 3vw, 3.25rem);
  --home-text-md: clamp(0.975rem, 1.15vw, 1.125rem);
  --home-detail-sm: 0.85rem;
  
  --home-card-title: clamp(1.2rem, 1.5vw, 1.45rem);
}

/* Clases utilitarias tipográficas universales */
.home-title-lg,
.section-title,
.big-text {
  font-size: var(--home-title-lg) !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  letter-spacing: -0.02em;
}

.home-text-md {
  font-size: var(--home-text-md) !important;
  font-weight: 400 !important;
  line-height: 1.55 !important;
}

.home-detail-sm {
  font-size: var(--home-detail-sm) !important;
  font-weight: 500 !important;
  line-height: 1.4 !important;
}

.home-card-title {
  font-size: var(--home-card-title) !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
}

/* Subtítulos y descripciones de cabecera en páginas secundarias */
.main-headline h5,
.top-section h5 {
  font-size: var(--home-text-md) !important;
  font-weight: 400 !important;
  line-height: 1.55 !important;
}

/* Tarjetas de portafolio sincronizadas */
.box-portafolio-title {
  font-size: var(--home-card-title) !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
}

.box-portafolio-category {
  font-size: var(--home-detail-sm) !important;
  font-weight: 500 !important;
  line-height: 1.4 !important;
}

/* ==========================================================================
   HERO ADAPTATIVO (FLEX-BASED, SIN ESPACIOS MUERTOS NI CORTES)
   ========================================================================== */
.home-hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  background-color: #0b0c10;
  margin-bottom: 0 !important;
  z-index: 1;
}

/* Fondo panorámico con animación continua */
.home-hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
}

.home-hero-bg .panorama-image {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: auto;
  min-width: 100%;
  max-width: none;
  object-fit: cover;
  will-change: transform, opacity;
  animation: panoramaPan 32s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite alternate;
  transition: opacity 0.35s ease;
  z-index: 1;
}

@keyframes panoramaPan {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(calc(-100% + 100vw), 0, 0);
  }
}

/* Degradado oscuro para máxima legibilidad del texto */
.home-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    linear-gradient(90deg, rgba(11, 12, 16, 0.92) 0%, rgba(11, 12, 16, 0.75) 45%, rgba(11, 12, 16, 0.35) 75%, rgba(11, 12, 16, 0.15) 100%),
    linear-gradient(180deg, rgba(11, 12, 16, 0.4) 0%, transparent 25%, rgba(11, 12, 16, 0.85) 100%);
  z-index: 2;
  pointer-events: none;
}

/* Capa de contenido central del Hero */
.home-hero-content {
  position: relative;
  z-index: 3;
  width: 100%;
  flex: 1;
  display: flex;
  align-items: center;
  padding-top: clamp(80px, 12vh, 120px);
  padding-bottom: clamp(1rem, 2vh, 2.5rem);
}

.home-hero-content-inner {
  max-width: 720px;
}

.home-hero-title {
  font-size: clamp(2.1rem, 4vw, 3.6rem);
  font-weight: 700;
  line-height: 1.15;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin-bottom: clamp(1rem, 1.8vh, 1.5rem);
}

.home-hero-desc {
  font-size: clamp(1rem, 1.25vw, 1.25rem);
  font-weight: 400;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: clamp(1.25rem, 2.2vh, 2rem);
  max-width: 600px;
}

/* Badge de Cliente y Botón "Ver proyecto" */
.home-hero-action-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem 2.5rem;
}

.hero-client-div-top {
  width: fit-content;
  background: #f3324c;
  border-top-right-radius: 1rem;
  border-top-left-radius: 1rem;
  padding: 0.4rem 1.35rem 0.1rem 1.35rem;
}

.hero-client-div-bottom {
  background: #f3324c;
  border-top-right-radius: 1rem;
  border-bottom-right-radius: 1rem;
  border-bottom-left-radius: 1rem;
  padding: 0.25rem 1.25rem 0.5rem 1.25rem;
  font-size: clamp(1.25rem, 1.6vw, 1.75rem);
  color: white;
}

/* .home-hero-client-pill {
  background: #f3324c;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 1rem;
  padding: 0.5rem 1.5rem;
  display: inline-flex;
  flex-direction: column;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
} */

.hero-client-div-top .client-label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.829);
  font-weight: 400;
}

.hero-client-div-bottom .client-name {
  font-size: clamp(1rem, 1.3vw, 1.25rem);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}

.home-hero-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0rem;
  background-color: transparent;
  color: #ffffff !important;
  font-size: clamp(1rem, 1.3vw, 1.25rem);
  font-weight: 700;
  text-decoration: underline;
  border-bottom: 1px solid transparent;
  transition: transform 0.35s ease-in-out, color 0.35s ease-in-out, border 0.5s ease-in;
}

.home-hero-btn:hover {
  color: #f36868 !important;
  border-bottom: 1px solid #f36868;
}

.home-hero-btn .material-symbols-outlined {
  font-size: 1.15rem;
  transition: transform 0.2s ease;
}

.home-hero-btn:hover .material-symbols-outlined {
  transform: translate(2px, -2px);
}

/* Capa de Miniaturas de Proyectos en el Hero (Swiper) */
.home-hero-thumbnails {
  position: relative;
  z-index: 3;
  width: 100%;
  padding-bottom: clamp(1.5rem, 3.5vh, 2.75rem);
  margin-top: auto;
}

.home-hero .mySwiper {
  overflow: visible !important;
}

.home-hero .swiper-slide {
  cursor: pointer;
}

.home-hero .thumb-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #1a1c22;
  border: 2px solid transparent;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  aspect-ratio: 16 / 9;
}

.home-hero .inside-swipper.selected .thumb-card {
  border-color: #eeeeee;
  box-shadow: 0 0 0 2px #eeeeee;
  scale: .99;
}

.home-hero .thumb-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.home-hero .swiper-slide:hover .thumb-card img {
  transform: scale(1.05);
}

.home-hero-thumb-caption {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 0.65rem;
  color: rgba(255, 255, 255, 0.75);
  transition: color 0.25s ease;
}

.home-hero-thumb-caption .thumb-name {
  font-size: var(--home-detail-sm);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-hero .swiper-slide:hover .home-hero-thumb-caption,
.home-hero .inside-swipper.selected + .home-hero-thumb-caption,
.home-hero .inside-swipper.selected ~ * .home-hero-thumb-caption {
  color: #ffffff;
}

.inverted-radius {
  background: var(--primary-color);
  border-radius: 1rem;
  padding-block: 0.75rem;
  box-shadow: 6px 12px 24px 1px rgba(0,0,0,0.33);
}


/* ==========================================================================
   SERVICIOS Y RESTO DE SECCIONES DE LA HOME
   ========================================================================== */
.services-section {
  margin-top: 0 !important;
  padding-top: clamp(2.5rem, 5vh, 4.5rem) !important;
  margin-bottom: clamp(3rem, 6vh, 5.5rem) !important;
}

.services-section .bg-grey {
  background-color: #f4f5f6;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

/* Tarjetas interactivas de servicios (Marquesina continua) */
.myPackageSwiper {
  width: 100%;
  padding-bottom: 2rem !important;
}

.myPackageSwiper .swiper-wrapper {
  transition-timing-function: linear !important;
}

.myPackageSwiper .card {
  width: 100% !important;
  margin: 10px 0 !important;
  border: none !important;
  border-radius: 18px !important;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.myPackageSwiper .card .face.face2 h2,
.myPackageSwiper .card .face.face2 h3 {
  font-size: var(--home-card-title) !important;
  font-weight: 700;
  margin: 0;
  padding: 0;
}

.myPackageSwiper .card .face.face2 p {
  font-size: var(--home-text-md) !important;
  line-height: 1.5;
}

.services-swiper-prev,
.services-swiper-next {
  transition: all 0.2s ease;
  border-color: rgba(0, 0, 0, 0.2) !important;
  background-color: #ffffff;
}

.services-swiper-prev:hover,
.services-swiper-next:hover {
  background-color: #111111 !important;
  color: #ffffff !important;
  transform: scale(1.06);
}

.myPackageSwiper .swiper-pagination-bullet {
  width: 8px;
  height: 8px;
  background: #111;
  opacity: 0.25;
  transition: all 0.3s ease;
}

.myPackageSwiper .swiper-pagination-bullet-active {
  opacity: 1;
  width: 24px;
  border-radius: 4px;
  background: #f3324c;
}

/* Sección Paquetes */
.packages-section {
  margin-bottom: clamp(3rem, 6vh, 5.5rem) !important;
}

.packages-section .package-card h3 {
  font-size: var(--home-card-title) !important;
}

.packages-section .package-card h6 {
  font-size: var(--home-detail-sm) !important;
}

.packages-section .package-features li {
  font-size: 0.925rem;
}

/* Sección Portafolio */
.portfolio-section {
  margin-bottom: clamp(3rem, 6vh, 5.5rem) !important;
}

/* Sección Testimonios */
#testimonios {
  margin-bottom: clamp(3rem, 6vh, 5.5rem) !important;
}

#testimonios .testimonial-card p {
  font-size: var(--home-text-md) !important;
  line-height: 1.6;
}

#testimonios .testimonial-author h5 {
  font-size: clamp(1rem, 1.2vw, 1.15rem) !important;
  font-weight: 700;
}

#testimonios .testimonial-author p {
  font-size: var(--home-detail-sm) !important;
  margin-bottom: 0;
  opacity: 0.8;
}

/* Sección Soluciones / Agencias */
.agency-section {
  margin-bottom: clamp(3rem, 6vh, 5.5rem) !important;
}

/* ==========================================================================
   ADAPTACIONES RESPONSIVAS (MÓVIL, TABLET Y PANTALLAS GRANDES)
   ========================================================================== */

/* Tablets y Móviles (< 992px) */
@media (max-width: 991.98px) {
  .home-hero {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-top: 0;
    padding-bottom: 0;
  }

  /* Scrim vertical selectivo: ventana superior despejada para que el stylescape luzca con total claridad */
  .home-hero-overlay {
    background: linear-gradient(
      180deg,
      rgba(11, 12, 16, 0.7) 0%,
      rgba(11, 12, 16, 0.15) 12%,
      rgba(11, 12, 16, 0) 24%,
      rgba(11, 12, 16, 0) 42%,
      rgba(11, 12, 16, 0.45) 58%,
      rgba(11, 12, 16, 0.85) 75%,
      rgba(11, 12, 16, 0.98) 94%,
      #0b0c10 100%
    ) !important;
  }

  /* Empujar el contenido al tercio inferior, dejando el 40% superior totalmente libre */
  .home-hero-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: stretch;
    padding-top: clamp(140px, 30vh, 260px);
    padding-bottom: 0.5rem;
  }

  .home-hero-content-inner {
    max-width: 100%;
  }

  /* Tipografía compacta y elegante */
  .home-hero-title {
    font-size: clamp(1.4rem, 5.4vw, 1.85rem);
    line-height: 1.18;
    letter-spacing: -0.015em;
    margin-bottom: 0.4rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.85);
  }

  .home-hero-desc {
    font-size: clamp(0.82rem, 3.2vw, 0.92rem);
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.82);
    margin-bottom: 0.85rem;
    max-width: 520px;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
  }

  .home-hero-action-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.85rem 1.5rem;
    margin-bottom: 0.25rem;
  }

  .hero-client-div-top {
    padding: 0.15rem 0.85rem 0.05rem 0.85rem;
    border-top-right-radius: 0.65rem;
    border-top-left-radius: 0.65rem;
  }

  .hero-client-div-top .client-label {
    font-size: 0.72rem;
    letter-spacing: 0.03em;
  }

  .hero-client-div-bottom {
    padding: 0.15rem 0.85rem 0.35rem 0.85rem;
    border-top-right-radius: 0.65rem;
    border-bottom-right-radius: 0.65rem;
    border-bottom-left-radius: 0.65rem;
  }

  .hero-client-div-bottom .client-name {
    font-size: clamp(0.95rem, 3.8vw, 1.15rem);
  }

  .home-hero-btn {
    font-size: clamp(0.95rem, 3.8vw, 1.1rem);
    padding: 0.25rem 0;
  }

  .home-hero-thumbnails {
    padding-bottom: clamp(1rem, 2.5vh, 1.75rem);
  }

  .home-hero-thumb-caption {
    margin-top: 0.35rem;
    gap: 0.25rem;
  }

  .home-hero-thumb-caption .thumb-name {
    font-size: 0.78rem;
  }
}

/* Móviles pequeños (< 576px) */
@media (max-width: 575.98px) {
  #nombre-cliente {
    font-size: 1.2rem;
  }

  .home-hero-content {
    padding-top: clamp(160px, 34vh, 280px);
  }

  .home-hero-title {
    font-size: clamp(1.3rem, 7.25vw, 1.75rem);
    line-height: 1.1;
    margin-bottom: 0.35rem;
  }

  .home-hero-desc {
    font-size: 0.9rem;
    line-height: 1.25;
    margin-bottom: 0.7rem;
  }

  .hero-client-div-top .client-label {
    font-size: 0.68rem;
  }

  .hero-client-div-bottom {
    padding: 0.25rem 1.25rem 0.25rem 1.25rem;
  }

  .hero-client-div-bottom .client-name {
    font-size: 0.85rem;
  }

  .home-hero-btn {
    font-size: 0.92rem;
  }

  .home-title-lg,
  .section-title,
  .big-text {
    font-size: 2.25rem !important;
    line-height: 1.15 !important;
  }

  .services-section {
    padding: 0;
  }
}

/* Pantallas Laptops Medianas (1200px - 1440px) */
@media (min-width: 992px) and (max-height: 820px) {
  .home-hero {
    min-height: 100vh;
  }

  .home-hero-content {
    padding-top: 90px;
    padding-bottom: 1rem;
  }

  .home-hero-title {
    font-size: 2.75rem;
    margin-bottom: 0.85rem;
  }

  .home-hero-desc {
    font-size: 1.05rem;
    margin-bottom: 1.25rem;
  }

  .home-hero-thumbnails {
    padding-bottom: 1.5rem;
  }
}
