/* ==========================================================================
   SOCEC-BA — home.css
   Hero carousel, trust panel, product families, campaign, news, app band, partners.
   ========================================================================== */

/* Hero carousel */
.hero { position: relative; height: 680px; overflow: hidden; color: #fff; background: #06185a; }
.hero__slides { position: absolute; inset: 0; }
.hero__slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .9s ease, visibility .9s; }
.hero__slide.is-active { opacity: 1; visibility: visible; }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 75% 50%; transform: scale(1.02); }
.hero__slide.is-active .hero__img { animation: kenburns 9s ease-out forwards; }
@keyframes kenburns { from { transform: scale(1.02); } to { transform: scale(1.09); } }
.hero__shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5, 18, 66, .93) 0%, rgba(5, 18, 66, .72) 38%, rgba(5, 18, 66, .12) 72%), linear-gradient(0deg, rgba(5, 18, 66, .55), transparent 35%); }
.hero__inner { position: relative; z-index: 2; height: 100%; display: flex; align-items: center; padding-top: calc(var(--header-h) + 10px); padding-bottom: 120px; }
.hero__copy { max-width: 620px; display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.hero__title { font-size: clamp(36px, 5.2vw, 62px); font-weight: 600; line-height: 1.05; }
.hero__lead { font-size: clamp(16px, 1.6vw, 19px); line-height: 1.6; max-width: 540px; color: rgba(255, 255, 255, .92); }
.hero__btns { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.hero__slide.is-active .hero__copy > * { animation: rise .8s both; }
.hero__slide.is-active .hero__copy > :nth-child(2) { animation-delay: .1s; }
.hero__slide.is-active .hero__copy > :nth-child(3) { animation-delay: .2s; }
.hero__slide.is-active .hero__copy > :nth-child(4) { animation-delay: .3s; }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

.hero__arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 5; width: 50px; height: 50px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .45); background: rgba(7, 33, 109, .35); color: #fff; display: grid; place-items: center; transition: background .2s; }
.hero__arrow:hover { background: rgba(7, 33, 109, .75); }
.hero__arrow--prev { left: max(16px, env(safe-area-inset-left, 0px)); }
.hero__arrow--next { right: max(16px, env(safe-area-inset-right, 0px)); }
.hero__ctrl { position: absolute; left: 0; right: 0; bottom: 110px; z-index: 5; display: flex; align-items: center; gap: 18px; margin-inline: auto; }
.hero__dots { display: flex; gap: 8px; }
.hero__dots button { position: relative; width: 52px; height: 14px; background: transparent; border: 0; padding: 0; }
.hero__dots button::before { content: ""; position: absolute; left: 0; right: 0; top: 5px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .35); }
.hero__dots button::after { content: ""; position: absolute; left: 0; top: 5px; height: 4px; width: 0; border-radius: 4px; background: #fff; }
.hero__dots button.is-done::after { width: 100%; }
.hero__dots button.is-current::after { animation: progress var(--ms, 6500ms) linear forwards; }
.hero.is-paused .hero__dots button.is-current::after { animation-play-state: paused; }
@keyframes progress { from { width: 0; } to { width: 100%; } }
.hero__count { font-size: 14px; font-variant-numeric: tabular-nums; opacity: .9; }
.hero__count b { font-size: 18px; }
.hero__pause { width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .5); background: transparent; color: #fff; display: grid; place-items: center; }

/* Trust panel overlapping the hero */
.over { position: relative; z-index: 6; margin-top: -92px; }
.panel { background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
.trust { display: grid; grid-template-columns: repeat(4, 1fr); padding: 30px 24px; }
.trust__item { display: flex; align-items: center; gap: 16px; padding: 6px 20px; min-width: 0; }
.trust__item + .trust__item { border-left: 1px solid var(--line); }
.trust__item strong { display: block; font-family: var(--font-display); font-size: 19px; line-height: 1.2; }
.trust__item span { color: var(--muted); font-size: 14px; display: block; margin-top: 2px; }
.trust__item strong span { display: inline; font-size: inherit; color: inherit; margin: 0; }
.trust__item b { font-variant-numeric: tabular-nums; }

/* Product families */
.families { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.family { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .25s, box-shadow .25s; min-width: 0; }
.family:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.family__img { display: block; overflow: hidden; aspect-ratio: 16 / 11; background: var(--alt); }
.family__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.family:hover .family__img img { transform: scale(1.06); }
.family__body { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 0 24px 26px; flex: 1; }
.family__ico { margin-top: -34px; box-shadow: 0 10px 22px rgba(7, 33, 109, .18); background: #fff; border: 3px solid var(--surface); }
.family h3 { font-size: 22px; font-weight: 600; margin-top: 8px; }
.family p { color: var(--muted); flex: 1; }
.family .link-arrow { margin-top: 6px; }

/* Campaign */
.campaign { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; align-items: center; }
.campaign__flyer { display: flex; justify-content: center; }
.flyer-btn { position: relative; display: block; border: 0; padding: 10px; background: #fff; border-radius: 22px; box-shadow: var(--shadow-lg); transform: rotate(-2deg); transition: transform .3s; max-width: 420px; width: 100%; cursor: zoom-in; }
.flyer-btn:hover { transform: rotate(0) scale(1.02); }
.flyer-btn img { width: 100%; border-radius: 14px; }
.flyer-btn__zoom { position: absolute; right: 22px; bottom: 22px; width: 44px; height: 44px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; box-shadow: 0 6px 16px rgba(0, 0, 0, .3); }
.campaign__txt { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; min-width: 0; }
.campaign__txt h3 { font-size: clamp(30px, 3.8vw, 46px); font-weight: 600; }
.campaign__sub { font-family: var(--font-display); font-size: 21px; font-weight: 600; color: var(--blue); }
.campaign__txt > p { color: var(--muted); font-size: 17px; }
.campaign__txt h4 { font-size: 18px; margin-top: 6px; color: var(--green-text); }
.checks { display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; color: var(--muted); }
.checks strong { color: var(--fg); }
.checks__i { width: 26px; height: 26px; border-radius: 50%; background: var(--grad-btn); color: #fff; display: grid; place-items: center; flex: none; margin-top: 1px; }
.checks__i svg { width: 15px; height: 15px; stroke-width: 3; }
.campaign__q { font-family: var(--font-display); font-size: 20px; font-weight: 500; color: var(--fg) !important; border-left: 4px solid var(--lime); padding-left: 16px; margin-top: 6px; }

/* News */
.news-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; align-items: stretch; }
.news-card { grid-column: span 5; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .25s, border-color .25s, transform .25s; min-width: 0; }
.news-card:hover { box-shadow: var(--shadow); border-color: var(--blue); transform: translateY(-3px); }
.news-card[hidden] { display: none; }
.news-card__link { display: grid; grid-template-columns: 132px 1fr; gap: 18px; align-items: center; padding: 14px; height: 100%; }
.news-card__media { aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--alt); }
.news-card__media img { width: 100%; height: 100%; object-fit: cover; }
.news-card__meta { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.news-card h3 { font-size: 18px; font-weight: 600; margin: 6px 0; }
.news-card__body > p, .news-card .link-arrow { display: none; }
.news-card.is-featured { grid-column: span 7; grid-row: span 3; }
.news-card.is-featured .news-card__link { grid-template-columns: 1fr; gap: 0; padding: 0; align-content: start; }
.news-card.is-featured .news-card__media { aspect-ratio: 16 / 10; border-radius: 0; }
.news-card.is-featured .news-card__media img { object-position: 50% 25%; }
.news-card.is-featured .news-card__body { padding: 26px 28px 30px; display: flex; flex-direction: column; gap: 12px; }
.news-card.is-featured h3 { font-size: clamp(24px, 2.6vw, 32px); margin: 0; }
.news-card.is-featured .news-card__body > p { display: block; color: var(--muted); }
.news-card.is-featured .link-arrow { display: inline-flex; }
.news-grid.is-even .news-card, .news-grid.is-even .news-card.is-featured { grid-column: span 6; grid-row: auto; }

/* App band */
.app-band { display: flex; align-items: center; gap: 26px; padding: 30px 36px; border-radius: 22px; color: #fff; background: radial-gradient(500px 220px at 90% 120%, rgba(123, 184, 42, .5), transparent 60%), linear-gradient(120deg, #07216d, #0a59b4); flex-wrap: wrap; }
.app-band__ico { width: 76px; height: 76px; border-radius: 22px; background: rgba(255, 255, 255, .14); display: grid; place-items: center; flex: none; }
.app-band h2 { font-size: clamp(22px, 2.6vw, 30px); font-weight: 500; }
.app-band p { color: rgba(255, 255, 255, .88); margin-top: 4px; }
.app-band > div { flex: 1; min-width: 240px; }

/* Partners */
.partners { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px}

.partner { display: grid; place-items: center; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);opacity: .85; transition: filter .25s, opacity .25s, border-color .25s, transform .2s; min-width: 0; }
.partner img { width: 100%; max-height: 90px; object-fit: contain; }
.partner:hover { filter: none; opacity: 1; border-color: var(--lime); transform: translateY(-3px); }

@media (max-width: 1080px) {
  .families { grid-template-columns: repeat(2, 1fr); }
  .partners { grid-template-columns: repeat(3, 1fr); }
  .trust { grid-template-columns: repeat(2, 1fr); row-gap: 22px; }
  .trust__item:nth-child(3) { border-left: 0; }
  .news-card, .news-card.is-featured { grid-column: span 12; grid-row: auto; }
  .news-card.is-featured .news-card__link { grid-template-columns: 1fr 1fr; align-items: center; }
  .news-card.is-featured .news-card__media { aspect-ratio: 4 / 3; height: 100%; }
}
@media (max-width: 960px) {
  .hero__arrow { display: none; }
  .campaign { grid-template-columns: 1fr; gap: 44px; }
}
@media (max-width: 720px) {
  .hero { height: 640px; }
  .hero__ctrl { bottom: 112px; }
  .hero__dots button { width: 38px; }
  .over { margin-top: -80px; }
  .trust { grid-template-columns: 1fr; padding: 20px 8px; }
  .trust__item + .trust__item, .trust__item:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); padding-top: 16px; margin-top: 6px; }
  .families { grid-template-columns: 1fr; }
  .partners { grid-template-columns: repeat(2, 1fr); }
  .news-card__link { grid-template-columns: 96px 1fr; gap: 14px; }
  .news-card.is-featured .news-card__link { grid-template-columns: 1fr; }
  .news-card.is-featured .news-card__media { aspect-ratio: 16 / 9; }
  .app-band { padding: 26px 22px; }
}
