/* Meliman — vivid, sharp, eye-catching photo treatment site-wide */

:root {
  --photo-pop: contrast(1.07) saturate(1.14) brightness(1.04);
  --photo-pop-hover: contrast(1.1) saturate(1.2) brightness(1.06);
  --photo-studio-bg: radial-gradient(circle at 50% 42%, #ffffff 0%, #f3f5f8 52%, #e8ecf1 100%);
}

/* Content photos — crisp colour & clarity (logos/icons excluded) */
img:not(.site-logo):not(.preloader-logo-img):not(.footer-logo) {
  image-rendering: auto;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
}

/* Hero & banner photography */
.hero-slide-img,
.page-banner {
  filter: var(--photo-pop);
}

.hero-slide-img {
  animation: kenBurns 14s ease-in-out infinite alternate;
  will-change: transform;
  object-fit: cover;
  object-position: center center;
}

@keyframes kenBurns {
  0% { transform: scale(1.03) translate3d(0, 0, 0); }
  100% { transform: scale(1.08) translate3d(-1.2%, 0, 0); }
}

/* Let hero backgrounds breathe — lighter overlay */
.hero-overlay {
  background:
    linear-gradient(105deg, rgba(42, 38, 64, 0.78) 0%, rgba(42, 38, 64, 0.42) 40%, rgba(42, 38, 64, 0.18) 68%, rgba(42, 38, 64, 0.1) 100%),
    linear-gradient(180deg, transparent 58%, rgba(30, 26, 48, 0.72) 100%) !important;
}

.hero-slide--has-cards .hero-overlay,
.hero-slide--showcase .hero-overlay {
  background:
    linear-gradient(105deg, rgba(42, 38, 64, 0.82) 0%, rgba(42, 38, 64, 0.48) 38%, rgba(42, 38, 64, 0.2) 62%, rgba(42, 38, 64, 0.12) 100%),
    linear-gradient(180deg, transparent 55%, rgba(30, 26, 48, 0.75) 100%) !important;
}

/* Section background photos — actually visible */
.section-bg::before {
  opacity: 0.16 !important;
  filter: saturate(1.15) contrast(1.05);
}

/* Service cards — show the photo, keep text readable */
.service-card-bg {
  transform: scale(1.02);
  filter: saturate(1.12) contrast(1.06) brightness(1.04);
}

.service-card-bg::after {
  background: linear-gradient(180deg, rgba(42, 38, 64, 0.28) 0%, rgba(42, 38, 64, 0.72) 100%) !important;
}

.service-card:hover .service-card-bg {
  transform: scale(1.1);
  filter: saturate(1.18) contrast(1.08) brightness(1.06);
}

.service-card:hover .service-card-bg::after {
  background: linear-gradient(180deg, rgba(255, 213, 79, 0.22) 0%, rgba(42, 38, 64, 0.78) 100%) !important;
}

/* Showcase & category cards */
.showcase-card img,
.gallery-cut-card-media img,
.news-feature-image img,
.transport-visual img,
.about-img img,
.speaker-photo img,
.training-highlight-photo img {
  filter: var(--photo-pop);
  object-fit: cover;
  object-position: center center;
}

.showcase-card-overlay {
  background: linear-gradient(180deg, rgba(42, 38, 64, 0.08) 0%, rgba(42, 38, 64, 0.82) 100%) !important;
}

.showcase-card:hover .showcase-card-overlay {
  background: linear-gradient(180deg, rgba(255, 213, 79, 0.12) 0%, rgba(42, 38, 64, 0.86) 100%) !important;
}

.showcase-card:hover img,
.about-img:hover img,
.news-feature-image:hover img,
.transport-visual:hover img,
.gallery-cut-card:hover .gallery-cut-card-media img {
  filter: var(--photo-pop-hover);
  transform: scale(1.07);
}

/* Product photography — studio-style presentation */
.product-image,
.home-product-card-image,
.hero-float-card-image {
  background: var(--photo-studio-bg) !important;
}

.product-image {
  aspect-ratio: 1;
}

.product-image img,
.home-product-card-image img {
  object-fit: contain;
  object-position: center;
  padding: 0.55rem;
  filter: drop-shadow(0 10px 22px rgba(42, 38, 64, 0.14)) var(--photo-pop);
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1), filter 0.45s ease;
}

.product-card:hover .product-image img,
.home-product-card:hover .home-product-card-image img {
  transform: scale(1.1);
  filter: drop-shadow(0 14px 28px rgba(42, 38, 64, 0.18)) var(--photo-pop-hover);
}

.hero-float-card-image img {
  filter: drop-shadow(0 8px 18px rgba(42, 38, 64, 0.12)) var(--photo-pop);
}

.hero-float-card:hover .hero-float-card-image img {
  filter: drop-shadow(0 12px 24px rgba(42, 38, 64, 0.16)) var(--photo-pop-hover);
}

/* Gallery */
.photo-gallery-item img,
.gallery-cut-photo img,
.gallery-marquee img {
  filter: var(--photo-pop);
  object-fit: cover;
  object-position: center center;
}

.photo-gallery-item:hover img,
.gallery-cut-photo:hover img {
  filter: var(--photo-pop-hover);
}

.gallery-marquee img {
  min-height: 300px;
}

.photo-gallery-grid {
  grid-auto-rows: minmax(240px, auto);
}

.photo-gallery-item {
  box-shadow: 0 8px 28px rgba(42, 38, 64, 0.1);
}

.photo-gallery-item img {
  width: 100%;
  height: 100%;
  min-height: 240px;
}

.gallery-cut-card-media img {
  min-height: 100%;
}

/* News & team */
.news-feature-image {
  min-height: 320px;
}

.news-feature-image img {
  min-height: 320px;
  transition: transform 0.65s ease, filter 0.45s ease;
}

.speaker-photo img,
.training-highlight-photo img {
  transition: transform 0.55s ease, filter 0.45s ease;
}

.speaker-photo:hover img,
.training-highlight-photo:hover img {
  filter: var(--photo-pop-hover);
  transform: scale(1.04);
}

/* About collage */
.about-img img {
  aspect-ratio: 4/3;
  min-height: 220px;
}

/* Stat strip — hint of background photo on hover */
.stat-card::before {
  filter: saturate(1.15) contrast(1.05);
}

.stat-card:hover::before {
  opacity: 0.2 !important;
}

/* Safety / branch cards with bg images */
.safety-card::before,
.branch-card::before {
  filter: saturate(1.1) contrast(1.05);
}

/* Contact & marketing section backgrounds */
.contact.section-bg::before,
.products.section-bg::before,
.services.section-bg::before {
  opacity: 0.14 !important;
}

/* Logos stay neutral */
.site-logo,
.preloader-logo-img,
.footer-logo {
  filter: none !important;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide-img {
    animation: none;
  }

  .showcase-card:hover img,
  .about-img:hover img,
  .product-card:hover .product-image img,
  .home-product-card:hover .home-product-card-image img {
    transform: none;
  }
}

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .hero-slide-img,
  .showcase-card img,
  .product-image img,
  .home-product-card-image img,
  .news-feature-image img,
  .gallery-cut-card-media img {
    image-rendering: -webkit-optimize-contrast;
  }
}

@media (max-width: 768px) {
  .news-feature-image,
  .news-feature-image img {
    min-height: 240px;
  }

  .gallery-marquee img {
    min-height: 240px;
  }
}
