/* Only JavaScript-armed images wait for their viewport entrance. */
.ghk-image-waiting { opacity: 0; }
.ghk-image-entering { animation: ghk-text-slide-up 1.25s ease both; }
.ghk-enter-from-left.ghk-image-entering { animation-name: ghk-text-slide-left; animation-duration: 1.25s; }
.ghk-enter-from-right.ghk-image-entering { animation-name: ghk-text-slide-right; }
.ghk-enter-from-up.ghk-image-entering { animation-name: ghk-text-slide-up; }
@keyframes ghk-text-slide-left {
  from { translate: -100vw 0; visibility: visible; }
  to { translate: 0 0; }
}
@keyframes ghk-text-slide-right {
  from { translate: 100vw 0; visibility: visible; }
  to { translate: 0 0; }
}
@keyframes ghk-text-slide-up {
  from { translate: 0 100vh; visibility: visible; }
  to { translate: 0 0; }
}
/* Clip temporary offscreen entrances, including the right-hand mobile cards. */
html { overflow-x:clip; }
/* Classic news cards crop their thumbnail link; let that link enter from the screen edge. */
body :is(main,.elementor-location-archive,.gh-solar) :is(article,section,div,figure):has(> .ghk-image-entering) { overflow:visible !important; }
/* The Solar/Migrol pages already own their viewport trigger; share its text animation. */
@media (prefers-reduced-motion: no-preference) {
  body .gh-solar [data-gh-direction].gh-enter {
    animation-duration: 1.25s;
  }
  body .gh-solar [data-gh-direction="left"].gh-enter { animation-name: ghk-text-slide-left !important; }
  body .gh-solar [data-gh-direction="right"].gh-enter { animation-name: ghk-text-slide-right !important; }
  body .gh-solar [data-gh-direction="up"].gh-enter { animation-name: ghk-text-slide-up !important; }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .ghk-services-card, .ghk-equipment-item { transition: transform .25s ease, box-shadow .25s ease; }
  .ghk-services-card:hover, .ghk-equipment-item:hover { transform: translateY(-5px); box-shadow: 0 10px 24px #102b4219; }
  .ghk-services .ghk-service-photo img, .ghk-services-hero-photo img { transition: transform .4s ease; }
  .ghk-services .ghk-service-photo:hover img, .ghk-services-hero-photo:hover img { transform: scale(1.025); }
  .ghk-services .ghk-services-button { transition: transform .2s ease, filter .2s ease; }
  .ghk-services .ghk-services-button:hover { transform: translateY(-2px); }
}
@keyframes ghk-image-slide-up {
  from { opacity: 0; translate: 0 48px; }
  to { opacity: 1; translate: 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  .ghk-image-waiting { opacity: 1; }
  .ghk-image-entering { animation: none; }
}
/* Existing Elementor text entrances use the same offscreen starting point. */
@media (prefers-reduced-motion:no-preference) {
  main .animated:is(.slideInLeft,.fadeInLeft,.fadeInLeftBig) { animation-name:ghk-viewport-left !important; }
  main .animated:is(.slideInRight,.fadeInRight,.fadeInRightBig) { animation-name:ghk-viewport-right !important; }
  main .animated:is(.slideInUp,.fadeInUp,.fadeInUpBig) { animation-name:ghk-viewport-up !important; }
  main .animated:is(.slideInDown,.fadeInDown,.fadeInDownBig) { animation-name:ghk-viewport-down !important; }
}
@keyframes ghk-viewport-left { from { transform:translate3d(-100vw,0,0); visibility:visible; } to { transform:translate3d(0,0,0); } }
@keyframes ghk-viewport-right { from { transform:translate3d(100vw,0,0); visibility:visible; } to { transform:translate3d(0,0,0); } }
@keyframes ghk-viewport-up { from { transform:translate3d(0,100vh,0); visibility:visible; } to { transform:translate3d(0,0,0); } }
@keyframes ghk-viewport-down { from { transform:translate3d(0,-100vh,0); visibility:visible; } to { transform:translate3d(0,0,0); } }
@media (prefers-reduced-motion:reduce) {
  main .animated:is(.slideInLeft,.fadeInLeft,.fadeInLeftBig,.slideInRight,.fadeInRight,.fadeInRightBig,.slideInUp,.fadeInUp,.fadeInUpBig,.slideInDown,.fadeInDown,.fadeInDownBig) { animation:none !important; transform:none !important; opacity:1 !important; }
}
