/* ===== Iesmart — Home ===== */

/* ---------- Hero Slider ---------- */
.hero-slider {
  padding: 0;
  position: relative;
  height: 100vh;
  min-height: 600px;
  max-height: 860px;
  overflow: hidden;
}

.slider-track { position: relative; width: 100%; height: 100%; }

.slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.9s ease;
}
.slide.active { opacity: 1; z-index: 1; }

.slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.3) 55%, transparent 100%);
}

.slide-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 8%;
  max-width: 780px;
}

.slide-content .hero-tag {
  background: rgba(107,191,78,0.2);
  color: #b2e896;
  border: 1px solid rgba(107,191,78,0.4);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 8px 18px;
  border-radius: 50px;
  margin-bottom: 20px;
  width: fit-content;
}

.slide-content h1 {
  color: #fff;
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 18px;
  text-shadow: 0 2px 16px rgba(0,0,0,0.3);
}
.slide-content h1 .highlight { color: var(--color-green); }

.slide-content p {
  color: rgba(255,255,255,0.88);
  font-size: 1.1rem;
  max-width: 520px;
  margin-bottom: 32px;
  text-shadow: 0 1px 6px rgba(0,0,0,0.3);
  line-height: 1.6;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.animate-in { opacity: 0; transform: translateY(30px); transition: opacity 0.65s ease, transform 0.65s ease; }
.slide.active .animate-in { opacity: 1; transform: translateY(0); }
.slide.active .delay-1 { transition-delay: 0.15s; }
.slide.active .delay-2 { transition-delay: 0.28s; }
.slide.active .delay-3 { transition-delay: 0.42s; }

/* Slider controls */
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  backdrop-filter: blur(6px);
  color: #fff;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
}
.slider-btn:hover { background: var(--color-green); transform: translateY(-50%) scale(1.08); }
.slider-btn svg { width: 22px; height: 22px; }
.slider-prev { left: 28px; }
.slider-next { right: 28px; }

.slider-dots {
  position: absolute;
  bottom: 108px;
  left: 8%;
  z-index: 10;
  display: flex;
  gap: 10px;
}
.dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  border: none;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}
.dot.active { background: var(--color-green); transform: scale(1.35); }

/* Stats bar */
.hero-stats-bar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 10;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 40px;
  border-top: 1px solid rgba(0,0,0,0.07);
  gap: 0;
}
.stat-item { text-align: center; padding: 0 52px; }
.stat-item strong {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--color-green-dark);
  line-height: 1;
}
.stat-item span { font-size: 0.78rem; color: var(--color-gray-text); font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; margin-top: 4px; display: block; }
.stat-sep { width: 1px; height: 44px; background: rgba(0,0,0,0.1); flex-shrink: 0; }

/* ---------- Quick contact bar ---------- */
.quick-contact-bar {
  background: var(--color-dark);
  padding: 14px 0;
}
.quick-contact-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.qc-label {
  color: rgba(255,255,255,0.75);
  font-size: 0.9rem;
  font-weight: 500;
}
.qc-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.qc-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, opacity 0.2s;
  text-decoration: none;
}
.qc-btn:hover { transform: translateY(-2px); opacity: 0.9; }
.qc-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.qc-whatsapp { background: #25D366; color: #fff; }
.qc-email { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.85); border: 1px solid rgba(255,255,255,0.15); }
.qc-catalog { background: var(--color-green); color: #fff; }

/* ---------- Categorías / Uso ---------- */
.uso-section { padding: 80px 0; }
.uso-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.uso-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  height: 260px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 24px;
  background-size: cover;
  background-position: center;
  text-decoration: none;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  cursor: pointer;
}
.uso-card:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(0,0,0,0.2); }
.uso-card:hover .uso-overlay { background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.2) 100%); }

.uso-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.1) 100%);
  transition: background 0.35s ease;
}

.uso-card-dark { background: var(--color-dark); }
.uso-card-dark .uso-overlay { display: none; }

.uso-icon {
  font-size: 2rem;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}
.uso-card h3 {
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 4px;
  position: relative;
  z-index: 1;
}
.uso-card span {
  color: rgba(255,255,255,0.75);
  font-size: 0.82rem;
  position: relative;
  z-index: 1;
}

/* ---------- Por qué Iesmart ---------- */
.why-section { padding: 80px 0; background: var(--color-bg); }
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 1020px;
  margin: 0 auto;
  gap: 28px;
}
@media (max-width: 900px) { .why-grid { grid-template-columns: minmax(0, 420px); } }
.why-card {
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 36px 28px;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.why-card:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(0,0,0,0.1); }
.why-icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: rgba(107,191,78,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.why-icon svg { width: 26px; height: 26px; color: var(--color-green-dark); }
.why-card h3 { font-size: 1.05rem; margin-bottom: 10px; }
.why-card p { color: var(--color-gray-text); font-size: 0.9rem; line-height: 1.65; }

/* ---------- CTA verde ---------- */
.cta-green {
  background: var(--color-green);
  padding: 60px 0;
}
.cta-green-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.cta-green-text h2 { color: #fff; font-size: 1.8rem; margin-bottom: 10px; }
.cta-green-text p { color: rgba(255,255,255,0.85); font-size: 1rem; max-width: 480px; }
.cta-green-actions { display: flex; gap: 14px; flex-wrap: wrap; flex-shrink: 0; }

/* ---------- Productos destacados ---------- */
.featured-products { padding: 80px 0; }
.featured-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.feat-card {
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.feat-card:hover { transform: translateY(-5px); box-shadow: 0 18px 36px rgba(0,0,0,0.12); }
.feat-card-img {
  background: var(--color-bg);
  height: 180px;
  overflow: hidden;
  position: relative;
}
.feat-card-img img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 20px;
  mix-blend-mode: multiply;
  transition: transform 0.4s ease;
}
.feat-card:hover .feat-card-img img { transform: scale(1.07); }
.feat-card-body { padding: 16px 18px 20px; flex-grow: 1; display: flex; flex-direction: column; }
.feat-card-tipo {
  font-size: 0.7rem;
  color: var(--color-green-dark);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.feat-card-name { font-size: 0.92rem; font-weight: 600; line-height: 1.35; margin-bottom: 8px; color: var(--color-dark); }
.feat-card-code { font-size: 0.75rem; color: #aaa; font-family: monospace; margin-top: auto; padding-top: 10px; }

/* ---------- Proveedores ---------- */
.proveedores-section { padding: 70px 0 50px; }
.proveedores-section .section-header { margin-bottom: 36px; }

/* ---------- Marquee logos ---------- */
.logos-marquee-section { padding: 60px 0 50px; overflow: hidden; }
.logos-marquee-alt { background: var(--color-bg); }
.logos-marquee-section .section-header { margin-bottom: 36px; }

.marquee-wrapper {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}
.marquee-track {
  display: flex;
  gap: 20px;
  width: max-content;
  animation: marquee 30s linear infinite;
}
.marquee-track:hover { animation-play-state: paused; }
.marquee-reverse { animation-direction: reverse; }

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee-track .logo-box {
  width: 160px; height: 90px;
  flex-shrink: 0;
  padding: 14px 20px;
  border-radius: 12px;
}
.marquee-track .logo-box img { filter: none; opacity: 1; }

/* ---------- CTA Final ---------- */
.final-cta { padding: 80px 0; }
.final-cta-box {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  padding: 90px 40px;
  text-align: center;
  min-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.final-cta-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
.final-cta-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.58);
}
.final-cta-content {
  position: relative;
  z-index: 1;
  max-width: 580px;
}
.final-cta-content h2 { color: #fff; font-size: 2.2rem; margin-bottom: 14px; }
.final-cta-content p { color: rgba(255,255,255,0.8); font-size: 1rem; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.revealed { opacity: 1; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .featured-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .uso-grid { grid-template-columns: repeat(2, 1fr); }
  .featured-grid { grid-template-columns: repeat(2, 1fr); }
  .cta-green-inner { flex-direction: column; text-align: center; }
  .cta-green-text p { max-width: 100%; }
}

@media (max-width: 768px) {
  .hero-slider { max-height: 760px; }
  .slide-content { padding: 0 6%; }
  .slider-dots { bottom: 168px; }
  .slider-btn { display: none; }
  .hero-stats-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 0; padding: 12px 8px; }
  .stat-sep { display: none; }
  .stat-item { padding: 4px 6px; }
  .stat-item strong { font-size: 1.2rem; }
  .stat-item span { font-size: 0.66rem; letter-spacing: 0.3px; }
  .stat-item:last-child strong { font-size: 1rem; white-space: nowrap; }
  .stat-item:last-child svg { width: 18px !important; height: 18px !important; margin-right: 2px !important; }
  .quick-contact-inner { flex-direction: column; text-align: center; }
  .why-grid { grid-template-columns: minmax(0, 340px); }
  .uso-grid { grid-template-columns: 1fr 1fr; }
  .featured-grid { grid-template-columns: repeat(2, 1fr); }
  .final-cta-content h2 { font-size: 1.7rem; }
}

@media (max-width: 520px) {
  .uso-grid { grid-template-columns: 1fr; }
  .featured-grid { grid-template-columns: 1fr 1fr; }
}
