/* =========================================================================
   Agate Mart - Hero Banner (theme5)
   Styles for application/modules/Front/views/theme5/common/banner.php
   Class prefix "am-hero" keeps this independent of the legacy
   section.cms-banner rules in style.css.
   ========================================================================= */
.am-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #fbf7f2 0%, #f6ede3 55%, #f0e3d3 100%);
  border-bottom: 1px solid rgba(140, 67, 19, 0.08);
  padding: 56px 0 40px;
}
.am-hero::before,
.am-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.am-hero::before {
  width: 560px; height: 560px; right: -180px; top: -220px;
  background: radial-gradient(circle, rgba(217, 119, 6, 0.16) 0%, rgba(217, 119, 6, 0) 70%);
}
.am-hero::after {
  width: 460px; height: 460px; left: -200px; bottom: -240px;
  background: radial-gradient(circle, rgba(140, 67, 19, 0.12) 0%, rgba(140, 67, 19, 0) 70%);
}
.am-hero .container { position: relative; z-index: 1; }

/* Carousel shell: never flash all slides stacked before Owl initialises */
#banner-carousel.am-hero__carousel { position: relative; }
#banner-carousel:not(.owl-loaded) .am-hero__slide + .am-hero__slide { display: none; }

.am-hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
  min-height: 430px;
}

/* ---- Text column ---- */
.am-hero__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 999px;
  background: #fff; border: 1px solid rgba(217, 119, 6, 0.35);
  color: #8c4313; font-size: 12px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  margin-bottom: 18px;
  box-shadow: 0 4px 14px rgba(140, 67, 19, 0.06);
}
.am-hero__eyebrow i { color: #d97706; }
.am-hero__title {
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-size: clamp(30px, 3.4vw, 46px);
  line-height: 1.12; font-weight: 800; letter-spacing: -0.01em;
  color: #2c1a10; margin: 0 0 16px;
}
.am-hero__title span {
  background: linear-gradient(90deg, #8c4313, #d97706);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: #8c4313;
}
.am-hero__desc {
  font-size: 16px; line-height: 1.7; color: #5b4a3f;
  margin: 0 0 26px; max-width: 560px;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
}
.am-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 26px; }
.am-hero__btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px; border-radius: 12px;
  font-size: 15px; font-weight: 700; white-space: nowrap;
  text-decoration: none !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}
.am-hero__btn--primary {
  background: linear-gradient(135deg, #8c4313 0%, #b45309 100%);
  color: #fff !important;
  box-shadow: 0 10px 24px -8px rgba(140, 67, 19, 0.55);
}
.am-hero__btn--primary i { transition: transform 0.25s ease; }
.am-hero__btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -10px rgba(140, 67, 19, 0.6); }
.am-hero__btn--primary:hover i { transform: translateX(4px); }
.am-hero__btn--whatsapp {
  background: #fff; color: #1f2937 !important;
  border: 1px solid rgba(37, 211, 102, 0.45);
}
.am-hero__btn--whatsapp i { color: #25d366; font-size: 19px; }
.am-hero__btn--whatsapp:hover { background: #f0fdf4; border-color: #25d366; transform: translateY(-2px); }
.am-hero__trust { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 0; padding: 0; list-style: none; }
.am-hero__trust li { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: #4b3b31; }
.am-hero__trust i { color: #d97706; font-size: 14px; }

/* ---- Media column ---- */
.am-hero__media { position: relative; display: flex; justify-content: center; align-items: center; padding: 18px 10px 18px 26px; }
.am-hero__frame { position: relative; width: 100%; max-width: 480px; }
.am-hero__frame::before {
  content: ""; position: absolute; z-index: 0;
  top: 18px; right: -18px; bottom: -18px; left: 18px;
  border-radius: 28px; transform: rotate(-3deg);
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.22), rgba(140, 67, 19, 0.10));
}
.am-hero__frame img {
  position: relative; z-index: 1; display: block;
  width: 100%; height: auto; aspect-ratio: 5 / 4; object-fit: cover;
  border-radius: 24px; background: #fff; padding: 8px;
  box-shadow: 0 30px 60px -20px rgba(44, 26, 16, 0.35), 0 8px 20px -10px rgba(140, 67, 19, 0.2);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.am-hero__frame:hover img { transform: translateY(-4px) scale(1.01); }
.am-hero__tag {
  position: absolute; z-index: 2;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: 999px;
  background: rgba(44, 26, 16, 0.92); color: #fff;
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.02em; white-space: nowrap;
  box-shadow: 0 10px 24px -8px rgba(0, 0, 0, 0.4);
}
.am-hero__tag--natural { left: -14px; bottom: 26px; }
.am-hero__tag--direct { right: -10px; top: 22px; background: #fff; color: #8c4313; border: 1px solid rgba(140, 67, 19, 0.15); }
.am-hero__tag--direct i { color: #d97706; }
.am-hero__pulse { width: 9px; height: 9px; border-radius: 50%; background: #22c55e; animation: amPulse 1.8s infinite; }
@keyframes amPulse {
  0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70%  { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* ---- Stats bar ---- */
.am-hero__stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  margin-top: 34px; overflow: hidden;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(140, 67, 19, 0.12); border-radius: 18px;
  box-shadow: 0 12px 30px -16px rgba(140, 67, 19, 0.25);
}
.am-hero__stat { display: flex; align-items: center; gap: 14px; padding: 16px 22px; border-right: 1px solid rgba(140, 67, 19, 0.1); }
.am-hero__stat:last-child { border-right: 0; }
.am-hero__stat i {
  flex: 0 0 42px; width: 42px; height: 42px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #fdf3e7; color: #b45309; font-size: 17px;
}
.am-hero__stat strong {
  display: block; font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-size: 20px; font-weight: 800; color: #2c1a10; line-height: 1.1;
}
.am-hero__stat span { display: block; font-size: 12.5px; color: #78716c; font-weight: 600; margin-top: 2px; }

/* ---- Owl navigation & dots ---- */
#banner-carousel .owl-nav { margin: 0; }
#banner-carousel .owl-nav button.owl-prev,
#banner-carousel .owl-nav button.owl-next {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 46px; height: 46px; border-radius: 50% !important;
  background: #fff !important; color: #8c4313 !important;
  border: 1px solid rgba(140, 67, 19, 0.15) !important;
  box-shadow: 0 8px 20px -8px rgba(44, 26, 16, 0.35);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; opacity: 0.9; transition: all 0.25s ease;
}
#banner-carousel .owl-nav button.owl-prev { left: -58px; }
#banner-carousel .owl-nav button.owl-next { right: -58px; }
#banner-carousel .owl-nav button:hover { background: #8c4313 !important; color: #fff !important; opacity: 1; }
#banner-carousel .owl-dots { display: flex; justify-content: center; gap: 6px; margin-top: 22px; }
#banner-carousel .owl-dots .owl-dot { width: auto; height: auto; margin: 0; padding: 0; border: 0; background: transparent; }
#banner-carousel .owl-dots .owl-dot span { display: block; width: 9px; height: 9px; margin: 0; border-radius: 5px; background: rgba(140, 67, 19, 0.25); transition: all 0.3s ease; }
#banner-carousel .owl-dots .owl-dot.active span { width: 26px; background: #8c4313; }

/* ---- Entrance animation for the active slide ---- */
.owl-item.active .am-hero__text > * { animation: amRise 0.7s cubic-bezier(0.16, 1, 0.3, 1) both; }
.owl-item.active .am-hero__text > :nth-child(2) { animation-delay: 0.08s; }
.owl-item.active .am-hero__text > :nth-child(3) { animation-delay: 0.16s; }
.owl-item.active .am-hero__text > :nth-child(4) { animation-delay: 0.24s; }
.owl-item.active .am-hero__text > :nth-child(5) { animation-delay: 0.32s; }
.owl-item.active .am-hero__media { animation: amRise 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both; }
@keyframes amRise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .am-hero * { animation: none !important; transition: none !important; } }

/* ---- Responsive ---- */
@media (max-width: 1399px) {
  #banner-carousel .owl-nav button.owl-prev { left: -22px; }
  #banner-carousel .owl-nav button.owl-next { right: -22px; }
}
@media (max-width: 991px) {
  .am-hero { padding: 34px 0 28px; }
  .am-hero__grid { grid-template-columns: 1fr; gap: 26px; min-height: 0; }
  .am-hero__media { padding: 8px 14px 12px; }
  .am-hero__frame { max-width: 440px; margin: 0 auto; }
  .am-hero__frame img { aspect-ratio: 16 / 10; max-height: 270px; }
  .am-hero__tag--natural { left: 6px; bottom: 14px; }
  .am-hero__tag--direct { right: 6px; top: 12px; }
  .am-hero__actions { gap: 10px; }
  .am-hero__btn { flex: 1 1 100%; justify-content: center; }
  .am-hero__trust { gap: 8px 16px; }
  .am-hero__trust li { font-size: 12.5px; }
  .am-hero__stats { grid-template-columns: repeat(2, 1fr); margin-top: 24px; }
  .am-hero__stat { padding: 14px 16px; border-bottom: 1px solid rgba(140, 67, 19, 0.1); }
  .am-hero__stat:nth-child(even) { border-right: 0; }
  .am-hero__stat:nth-last-child(-n + 2) { border-bottom: 0; }
  #banner-carousel .owl-nav { display: none; }
}
@media (max-width: 575px) {
  .am-hero__title { font-size: 27px; }
  .am-hero__desc { font-size: 14.5px; }
  .am-hero__stat strong { font-size: 17px; }
  .am-hero__stat i { flex-basis: 36px; width: 36px; height: 36px; font-size: 15px; }
}
