/**
 * Home page — modern layout + GPU-friendly animations.
 * Pair with assets/js/aed-home.js for scroll reveals.
 */

/* --- Scroll reveal (transform + opacity only) --- */
[data-aed-reveal] {
  opacity: 0;
  transform: translate3d(0, 32px, 0);
  transition:
    opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

[data-aed-reveal].aed-reveal--visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  will-change: auto;
}

@media (prefers-reduced-motion: reduce) {
  [data-aed-reveal] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* --- Page shell --- */
.aed-home-page {
  background: #f8fafc;
}

/* --- Hero / slider --- */
.aed-home-page .w3l-main-slider {
  position: relative;
  overflow: hidden;
}

.aed-home-page .slider-info.banner-view {
  position: relative;
  min-height: min(72vh, 640px);
}

.aed-home-page .slider-info.banner-view::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(15, 23, 42, 0.72) 0%,
    rgba(30, 58, 138, 0.45) 45%,
    rgba(15, 23, 42, 0.35) 100%
  );
  z-index: 0;
  pointer-events: none;
}

.aed-home-page .banner-info {
  position: relative;
  z-index: 1;
}

.aed-home-page .banner-info-bg {
  max-width: 44rem;
  padding: 2rem 1rem 3rem;
}

.aed-hero-slide__inner {
  position: relative;
  z-index: 1;
}

.aed-hero__title {
  font-size: clamp(1.35rem, 3.5vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.25;
  color: #f8fafc;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
  margin-bottom: 1.5rem;
}

.aed-hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.65rem 1.35rem;
  font-weight: 600;
  border-radius: 999px !important;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.35) !important;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.aed-hero__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(37, 99, 235, 0.45) !important;
}

/* Hero line animation when slide is active (CSS only — no extra JS) */
@media (prefers-reduced-motion: no-preference) {
  .aed-home-page .owl-item:not(.active) .aed-hero-slide__inner {
    opacity: 0;
    transform: translate3d(0, 24px, 0);
  }

  .aed-home-page .owl-item.active .aed-hero-slide__inner {
    animation: aedHeroEnter 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
  }

  @keyframes aedHeroEnter {
    from {
      opacity: 0;
      transform: translate3d(0, 28px, 0);
    }
    to {
      opacity: 1;
      transform: translate3d(0, 0, 0);
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .aed-home-page .owl-item .aed-hero-slide__inner {
    opacity: 1;
    transform: none;
  }
}

/* Decorative sheen on hero (subtle, one pass) */
.aed-home-page .companies20-content::after {
  content: "";
  position: absolute;
  top: -40%;
  right: -20%;
  width: 55%;
  height: 120%;
  background: radial-gradient(
    circle at 30% 40%,
    rgba(56, 189, 248, 0.12),
    transparent 55%
  );
  pointer-events: none;
  z-index: 0;
}

.aed-home-page .companies20-content {
  position: relative;
}

/* --- About --- */
.aed-about {
  position: relative;
  background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
}

.aed-about .calltoaction-20 {
  background: transparent;
}

.aed-about .about-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.aed-about .about-title-row h5 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.aed-about .more-gap {
  font-size: 1rem;
  line-height: 1.75;
  color: #475569;
}

.aed-about__visual {
  position: relative;
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow:
    0 4px 6px rgba(15, 23, 42, 0.06),
    0 20px 40px -12px rgba(30, 58, 138, 0.18);
}

.aed-about__visual::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

.aed-about__visual img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.aed-about__visual:hover img {
  transform: scale(1.03);
}

@media (prefers-reduced-motion: reduce) {
  .aed-about__visual:hover img {
    transform: none;
  }
}

/* --- Latest news --- */
.aed-news {
  background: #f8fafc;
}

.aed-news .price-main {
  background: transparent;
}

.aed-news__title {
  font-size: clamp(1.5rem, 2.5vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0f172a;
  margin-bottom: 2rem !important;
  position: relative;
  display: inline-block;
  width: 100%;
  text-align: center;
}

.aed-news__title::after {
  content: "";
  display: block;
  width: 3rem;
  height: 3px;
  margin: 0.75rem auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb, #38bdf8);
}

/* Card: static surface — no lift on hover (avoids clash with row hovers) */
.aed-news-card {
  border-radius: 1.125rem !important;
  border: 1px solid rgba(30, 58, 138, 0.1) !important;
  background: #fff !important;
  overflow: hidden;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 6px 16px -4px rgba(30, 58, 138, 0.08) !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.aed-news-card:hover {
  border-color: rgba(37, 99, 235, 0.18) !important;
  box-shadow:
    0 1px 3px rgba(15, 23, 42, 0.06),
    0 10px 28px -8px rgba(30, 58, 138, 0.12) !important;
}

@media (prefers-reduced-motion: reduce) {
  .aed-news-item {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

.aed-news-card .card-body {
  padding: 0.35rem 0.5rem 0.85rem !important;
}

/* Rows: calm hover — background + accent bar only (no transform / scale) */
.aed-news-item {
  list-style: none;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  opacity: 0;
  transform: translate3d(0, 10px, 0);
  transition:
    opacity 0.45s ease,
    transform 0.45s ease;
  transition-delay: var(--aed-stagger, 0ms);
}

[data-aed-reveal].aed-reveal--visible .aed-news-item {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.aed-news-item:last-child {
  border-bottom: none;
}

.aed-news-item__link {
  display: block;
  padding: 0.85rem 0.75rem;
  margin: 0.2rem 0;
  border-radius: 0.5rem;
  color: #1e293b !important;
  text-decoration: none !important;
  transition: background 0.18s ease, box-shadow 0.18s ease;
  border: 1px solid transparent;
}

.aed-news-item__link:hover {
  background: rgba(241, 245, 249, 0.95);
  border-color: rgba(37, 99, 235, 0.12);
  box-shadow: inset 3px 0 0 #2563eb;
  color: #0f172a !important;
}

.aed-news-item__link:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.45);
  outline-offset: 2px;
}

.aed-news-item strong {
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  display: block !important;
  margin-bottom: 0.35rem !important;
  line-height: 1.35 !important;
}

.aed-news-item .badge {
  font-size: 0.65rem !important;
  font-weight: 600;
  padding: 0.2rem 0.45rem;
  border-radius: 0.25rem;
}

.aed-news-cta {
  margin-top: 0.5rem;
}
