/* =====================================================================
   Homepage-only sections. Shared parts (sections, titles, prose, service cards,
   logo grids, background video) come from components.css.
   ===================================================================== */

/* ---------- Hero: three serif lines over a blue gradient ---------- */
.home-hero {
  position: relative; display: flex; flex-direction: column; justify-content: center;
  min-height: 450px; padding: 0 3vw;
  background: var(--bg) center / cover no-repeat; /* image set in home.php from the media library */
}
.home-hero::before {
  content: ""; position: absolute; inset: 0; opacity: .9;
  background-image: linear-gradient(90deg, var(--c-primary) 0%, rgba(255, 255, 255, 0) 120%);
}
.home-hero__title { position: relative; margin: 0; color: #fff; font: 700 32px/38px var(--f-serif); }
.home-hero__title span { display: block; width: fit-content; transition: transform .4s; }
.home-hero__title span:hover { transform: scale(1.02); }
@media (min-width: 1025px) { .home-hero, .home-hire { background-attachment: fixed; } } /* parallax look */

/* ---------- Service card rows ---------- */
.home-cards { gap: 40px 20px; }

/* ---------- Welcome (faint Dubai skyline behind the text) ---------- */
.home-welcome { background-color: rgba(114, 185, 231, .05); }
.home-welcome::before {
  content: ""; position: absolute; inset: 0; opacity: .1; pointer-events: none;
  background: var(--bg) center / contain no-repeat;
}
.home-welcome .container { position: relative; }

/* ---------- Based in Dubai: video background, morphing blob, counters panel ---------- */
.home-dubai::after { content: ""; position: absolute; inset: 0; background: rgba(189, 189, 189, .5); pointer-events: none; }
.home-dubai__inner { position: relative; z-index: 1; display: grid; gap: 10px; }
@media (min-width: 768px) { .home-dubai__inner { grid-template-columns: 1fr 1fr; } }
.home-dubai__blob { display: flex; align-items: center; justify-content: center; padding: 10px; }
.blob {
  display: flex; align-items: center; justify-content: center; width: 80%; aspect-ratio: 1 / 1; padding: 30px;
  background: linear-gradient(45deg, #1B3D7D66 0%, 50%, #72B9E7C9 100%);
  animation: blob 15s linear infinite alternate;
}
.blob__title { margin: 0; color: #fff; font-size: 36px; font-weight: 700; line-height: 1.5; text-align: center; }
@media (max-width: 767px) { .blob__title { font-size: 28px; } }
.home-dubai__panel { display: flex; flex-direction: column; justify-content: center; gap: 20px; padding: 10px; background: rgba(27, 61, 125, .68); }
.counters { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 10px; }
@media (max-width: 767px) { .counters { grid-template-columns: 1fr; } }
.counter { padding: 10px; text-align: center; }
.counter__num { color: var(--c-sky); font-size: 32px; line-height: 1; }
.counter__label { color: var(--c-accent); font-size: 19px; font-weight: 700; line-height: 2.5; }
.home-dubai__text { padding: 40px; color: #fff; }
.home-dubai__text h2 { margin: 0 0 10px; color: #fff; font-size: 32px; line-height: 1; }
.home-dubai__text p { margin: 0 0 24px; }
.home-dubai__text p:last-child { margin-bottom: 0; }
@media (max-width: 767px) { .home-dubai__text { padding: 20px; } }

/* Counters slide in from the right once, when they come into view (main.js adds .in) */
.anim { opacity: 0; }
.anim.in { animation: fadeInRight 1.25s both; }
@keyframes fadeInRight { from { opacity: 0; transform: translate3d(100%, 0, 0); } to { opacity: 1; transform: none; } }

/* ---------- Sample clients: logos 75% | grey aside 25% ---------- */
.home-clients { display: grid; gap: 20px; padding: 10px; }
@media (min-width: 768px) { .home-clients { grid-template-columns: 3fr 1fr; } }
.home-clients__aside { padding: 20px; background: #DBDBDB; color: #333; text-align: center; }
.home-clients__aside img { display: block; margin: 0 auto; }
.home-clients__aside h3 {
  margin: 20px 0 16px; padding-top: 20px; border-top: 1px solid var(--c-primary);
  color: var(--c-primary); font-size: 29px; line-height: 1;
}
.home-clients__aside p { margin: 0; }

/* ---------- Mission / Vision / Values ---------- */
.home-mvv { display: grid; gap: 20px; }
@media (min-width: 768px) { .home-mvv { grid-template-columns: repeat(3, 1fr); } }
.home-mvv__card {
  display: flex; flex-direction: column; align-items: center; gap: 20px; padding: 40px 3%;
  color: #fff; text-align: center; box-shadow: 0 0 10px rgba(0, 0, 0, .5);
}
.home-mvv__card--1 { background: var(--c-secondary); }
.home-mvv__card--2 { background: #68696D; }   /* live #7A7A7A: 4.3:1 with white */
.home-mvv__card--3 { background: #767676; }   /* live #A7A7A7: 2.4:1 with white */
.home-mvv__icon .icon { width: 50px; height: 50px; }
.home-mvv__title { margin: 0; color: #fff; font: 700 40px/1 var(--f-serif); }
.home-mvv__card p { margin: 0; }

/* ---------- Why us: photo slideshow (fade + Ken Burns) behind a diamond grid ---------- */
.home-why { overflow: hidden; }
.home-why__inner { position: relative; max-width: 1340px; }
.home-why .section-title { color: #fff; text-shadow: 3px 3px 3px #000; }
.slideshow { position: absolute; inset: 0; overflow: hidden; }
.slide { position: absolute; inset: 0; background: center / cover no-repeat; opacity: 0; transition: opacity .5s; }
.slide.active { opacity: 1; }
.slide.active.kb { animation: kenburns 5.5s linear forwards; }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.3); } }

/* 3 + 3 diamonds, the second row offset by half a diamond (7-column grid, each item spans 2) */
.rhombus { --cols: 3; display: grid; grid-template-columns: repeat(calc(var(--cols) * 2 + 1), 1fr); gap: 10px; margin: 0; padding: 0; list-style: none; }
.rhombus__item {
  position: relative; z-index: 1; grid-column: span 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  aspect-ratio: 1 / 1; margin-bottom: -50%; padding: 0 20%; background: #FFFFFFE3; text-align: center;
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%); transition: all .25s;
}
.rhombus__item:hover { z-index: 3; }
.rhombus__item:nth-child(n+4) { margin-bottom: 0; } /* last row: no overlap with the (absent) next row */
.rhombus__item:nth-child(1) { grid-column: 2 / span 2; }
.rhombus__item:nth-child(2) { grid-column: 4 / span 2; }
.rhombus__item:nth-child(3) { grid-column: 6 / span 2; }
.rhombus__item:nth-child(4) { grid-column: 1 / span 2; }
.rhombus__item:nth-child(5) { grid-column: 3 / span 2; }
.rhombus__item:nth-child(6) { grid-column: 5 / span 2; }
.rhombus__icon {
  display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; width: 64px; height: 64px;
  border-radius: 50%; background: #fff; color: #616161; font-size: 20px;
}
.rhombus__text { color: var(--c-secondary); font-weight: 700; }
@media (max-width: 767px) {
  .rhombus { --cols: 1; }
  .rhombus__item:nth-child(odd) { grid-column: 2 / span 2; }
  .rhombus__item:nth-child(even) { grid-column: 1 / span 2; }
  .rhombus__item { padding: 0 15%; }
  .rhombus__item:nth-child(n+4) { margin-bottom: -50%; }
  .rhombus__item:last-child { margin-bottom: 0; }
  .rhombus__icon { width: 48px; height: 48px; }
  .rhombus__text { font-size: 11px; }
}

/* ---------- We hire the best: rotating word ("clip" effect in main.js) ---------- */
.home-hire {
  display: flex; align-items: center; min-height: 400px;
  background: var(--bg) center / cover no-repeat;
  color: #fff; text-align: center;
}
.home-hire::before { content: ""; position: absolute; inset: 0; background: rgba(84, 89, 95, .5); }
.home-hire .container { position: relative; }
.headline { margin: 0 0 16px; color: #fff; font-size: 32px; font-weight: 400; line-height: 1.2; }
.headline > span { display: inline-block; padding: 6px 0; }
.headline__dyn-wrap { position: relative; overflow: hidden; vertical-align: top; color: var(--c-primary); transition: width .6s; }
.headline__dyn-wrap::after { content: ""; position: absolute; top: 0; right: 0; width: 2px; height: 100%; background: #000; }
.headline-dyn { display: inline-block; white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  .anim { opacity: 1; } .anim.in { animation: none; }
  .blob, .slide.active.kb { animation: none; }
}

/* Blob shape morph (Unlimited Elements "Blob Shapes", 15s alternate) */
.blob { clip-path: polygon(83.200% 25.800%, 85.100% 28.100%, 86.900% 30.400%, 88.600% 32.700%, 90.200% 35.000%, 91.800% 37.300%, 93.200% 39.600%, 94.500% 41.900%, 95.800% 44.100%, 96.900% 46.400%, 97.800% 48.700%, 98.600% 51.000%, 99.300% 53.300%, 99.800% 55.700%, 100.000% 58.100%, 100.100% 60.500%, 100.000% 63.000%, 99.700% 65.400%, 99.200% 67.800%, 98.500% 70.200%, 97.600% 72.600%, 96.500% 75.000%, 95.200% 77.400%, 93.700% 79.700%, 92.100% 81.900%, 90.300% 84.000%, 88.300% 86.100%, 86.200% 88.100%, 84.000% 89.900%, 81.600% 91.600%, 79.100% 93.200%, 76.500% 94.600%, 73.800% 95.800%, 71.000% 96.900%, 68.000% 97.900%, 65.000% 98.600%, 61.900% 99.200%, 58.800% 99.600%, 55.700% 99.800%, 52.600% 99.900%, 49.500% 99.800%, 46.400% 99.600%, 43.400% 99.200%, 40.400% 98.600%, 37.500% 97.900%, 34.700% 97.000%, 32.000% 96.000%, 29.400% 94.800%, 27.000% 93.500%, 24.700% 92.000%, 22.300% 90.500%, 20.400% 88.800%, 18.600% 87.000%, 16.900% 85.100%, 15.400% 83.000%, 14.000% 80.800%, 12.600% 78.600%, 11.400% 76.300%, 10.200% 74.000%, 8.900% 71.300%, 8.000% 68.800%, 7.100% 66.300%, 6.200% 63.800%, 5.400% 61.200%, 4.600% 58.600%, 3.800% 55.900%, 3.100% 53.200%, 2.400% 50.500%, 1.700% 47.800%, 1.100% 45.200%, 0.700% 42.500%, 0.400% 39.900%, 0.200% 37.300%, 0.000% 34.700%, 0.100% 32.200%, 0.300% 29.700%, 0.700% 27.300%, 1.300% 24.900%, 2.100% 22.600%, 3.100% 20.300%, 4.300% 18.100%, 5.800% 16.000%, 7.500% 14.000%, 9.400% 12.100%, 11.500% 10.300%, 13.800% 8.600%, 16.200% 7.000%, 18.800% 5.600%, 21.500% 4.300%, 24.300% 3.100%, 27.200% 2.200%, 30.100% 1.400%, 33.100% 0.800%, 36.000% 0.400%, 38.900% 0.200%, 41.800% 0.200%, 44.600% 0.400%, 47.400% 0.800%, 50.200% 1.500%, 52.900% 2.400%, 55.500% 3.400%, 58.100% 4.600%, 60.600% 6.000%, 63.100% 7.600%, 65.500% 9.200%, 67.800% 11.000%, 70.100% 12.900%, 72.300% 14.900%, 74.500% 17.000%, 76.600% 19.200%, 78.600% 21.400%, 80.700% 23.600%, 83.200% 25.800%); }
@keyframes blob {
  0% { clip-path: polygon(83.200% 25.800%, 85.100% 28.100%, 86.900% 30.400%, 88.600% 32.700%, 90.200% 35.000%, 91.800% 37.300%, 93.200% 39.600%, 94.500% 41.900%, 95.800% 44.100%, 96.900% 46.400%, 97.800% 48.700%, 98.600% 51.000%, 99.300% 53.300%, 99.800% 55.700%, 100.000% 58.100%, 100.100% 60.500%, 100.000% 63.000%, 99.700% 65.400%, 99.200% 67.800%, 98.500% 70.200%, 97.600% 72.600%, 96.500% 75.000%, 95.200% 77.400%, 93.700% 79.700%, 92.100% 81.900%, 90.300% 84.000%, 88.300% 86.100%, 86.200% 88.100%, 84.000% 89.900%, 81.600% 91.600%, 79.100% 93.200%, 76.500% 94.600%, 73.800% 95.800%, 71.000% 96.900%, 68.000% 97.900%, 65.000% 98.600%, 61.900% 99.200%, 58.800% 99.600%, 55.700% 99.800%, 52.600% 99.900%, 49.500% 99.800%, 46.400% 99.600%, 43.400% 99.200%, 40.400% 98.600%, 37.500% 97.900%, 34.700% 97.000%, 32.000% 96.000%, 29.400% 94.800%, 27.000% 93.500%, 24.700% 92.000%, 22.300% 90.500%, 20.400% 88.800%, 18.600% 87.000%, 16.900% 85.100%, 15.400% 83.000%, 14.000% 80.800%, 12.600% 78.600%, 11.400% 76.300%, 10.200% 74.000%, 8.900% 71.300%, 8.000% 68.800%, 7.100% 66.300%, 6.200% 63.800%, 5.400% 61.200%, 4.600% 58.600%, 3.800% 55.900%, 3.100% 53.200%, 2.400% 50.500%, 1.700% 47.800%, 1.100% 45.200%, 0.700% 42.500%, 0.400% 39.900%, 0.200% 37.300%, 0.000% 34.700%, 0.100% 32.200%, 0.300% 29.700%, 0.700% 27.300%, 1.300% 24.900%, 2.100% 22.600%, 3.100% 20.300%, 4.300% 18.100%, 5.800% 16.000%, 7.500% 14.000%, 9.400% 12.100%, 11.500% 10.300%, 13.800% 8.600%, 16.200% 7.000%, 18.800% 5.600%, 21.500% 4.300%, 24.300% 3.100%, 27.200% 2.200%, 30.100% 1.400%, 33.100% 0.800%, 36.000% 0.400%, 38.900% 0.200%, 41.800% 0.200%, 44.600% 0.400%, 47.400% 0.800%, 50.200% 1.500%, 52.900% 2.400%, 55.500% 3.400%, 58.100% 4.600%, 60.600% 6.000%, 63.100% 7.600%, 65.500% 9.200%, 67.800% 11.000%, 70.100% 12.900%, 72.300% 14.900%, 74.500% 17.000%, 76.600% 19.200%, 78.600% 21.400%, 80.700% 23.600%, 83.200% 25.800%); }
  50% { clip-path: polygon(98.400% 19.800%, 99.300% 22.300%, 99.800% 24.900%, 100.000% 27.600%, 99.900% 30.400%, 99.600% 33.200%, 99.000% 36.100%, 98.200% 39.000%, 97.300% 42.000%, 96.200% 45.000%, 95.000% 48.000%, 93.700% 51.000%, 92.400% 54.000%, 91.100% 57.000%, 89.800% 60.000%, 88.500% 63.000%, 87.200% 65.900%, 86.000% 68.800%, 84.900% 71.600%, 83.900% 74.300%, 82.900% 77.000%, 81.900% 79.600%, 80.900% 82.100%, 80.000% 84.400%, 79.000% 86.600%, 78.000% 88.700%, 77.000% 90.600%, 75.900% 92.400%, 74.800% 94.000%, 73.600% 95.400%, 72.300% 96.600%, 70.900% 97.600%, 69.400% 98.400%, 67.800% 99.000%, 66.100% 99.400%, 64.200% 99.600%, 62.200% 99.600%, 60.100% 99.500%, 58.000% 99.200%, 55.800% 98.800%, 53.500% 98.200%, 51.100% 97.500%, 48.700% 96.700%, 46.200% 95.800%, 43.700% 94.900%, 41.100% 93.900%, 38.500% 92.900%, 35.900% 91.800%, 33.300% 90.700%, 30.700% 89.600%, 28.100% 88.500%, 25.500% 87.400%, 23.000% 86.300%, 20.500% 85.100%, 18.100% 83.900%, 15.800% 82.700%, 13.600% 81.400%, 11.500% 80.100%, 9.500% 78.700%, 7.700% 77.300%, 6.000% 75.800%, 4.500% 74.200%, 3.200% 72.500%, 2.100% 70.800%, 1.400% 69.400%, 0.700% 67.500%, 0.300% 65.500%, 0.100% 63.400%, 0.000% 61.200%, 0.200% 59.000%, 0.600% 56.700%, 1.100% 54.400%, 1.800% 52.000%, 2.700% 49.600%, 3.700% 47.100%, 4.900% 44.600%, 6.200% 42.000%, 7.600% 39.400%, 9.200% 36.800%, 10.900% 34.200%, 12.700% 31.600%, 14.600% 29.000%, 16.600% 26.400%, 18.700% 23.800%, 20.900% 21.300%, 23.100% 18.800%, 25.400% 16.400%, 27.800% 14.100%, 30.300% 11.900%, 32.900% 9.800%, 35.600% 7.900%, 38.400% 6.200%, 41.300% 4.600%, 44.300% 3.200%, 47.400% 2.100%, 50.600% 1.200%, 53.900% 0.600%, 57.200% 0.200%, 60.500% 0.000%, 63.900% 0.100%, 67.300% 0.500%, 70.700% 1.100%, 74.100% 1.900%, 77.400% 2.900%, 80.600% 4.100%, 83.600% 5.500%, 86.500% 7.100%, 89.200% 8.900%, 91.600% 10.800%, 93.800% 12.800%, 95.700% 15.000%, 97.300% 17.300%, 98.400% 19.800%); }
  100% { clip-path: polygon(96.500% 13.800%, 97.700% 15.900%, 98.600% 18.100%, 99.300% 20.500%, 99.700% 23.000%, 99.900% 25.600%, 99.900% 28.300%, 99.700% 31.100%, 99.500% 34.000%, 99.000% 36.900%, 98.400% 39.900%, 97.700% 42.900%, 96.900% 45.900%, 96.000% 49.000%, 95.100% 52.100%, 94.100% 55.200%, 93.100% 58.200%, 92.100% 61.200%, 91.100% 64.100%, 90.100% 67.000%, 89.100% 69.800%, 88.000% 72.600%, 86.900% 75.300%, 85.700% 77.900%, 84.500% 80.400%, 83.200% 82.800%, 81.800% 85.100%, 80.300% 87.200%, 78.700% 89.200%, 77.000% 91.000%, 75.200% 92.700%, 73.300% 94.200%, 71.200% 95.600%, 69.000% 96.800%, 66.700% 97.800%, 64.300% 98.600%, 61.800% 99.200%, 59.200% 99.700%, 56.500% 100.000%, 53.800% 100.100%, 51.000% 100.100%, 48.200% 99.900%, 45.400% 99.600%, 42.600% 99.100%, 39.800% 98.500%, 37.000% 97.700%, 34.300% 96.800%, 31.700% 95.700%, 29.100% 94.500%, 26.600% 93.100%, 24.200% 91.600%, 21.900% 90.000%, 19.700% 88.300%, 17.600% 86.500%, 15.600% 84.500%, 13.700% 82.400%, 11.900% 80.300%, 10.300% 78.100%, 8.800% 75.800%, 7.400% 73.400%, 6.100% 70.900%, 4.900% 68.400%, 3.800% 65.800%, 2.800% 63.100%, 2.000% 60.400%, 1.300% 57.600%, 0.700% 54.800%, 0.200% 52.000%, -0.100% 49.200%, -0.300% 46.400%, 0.000% 43.300%, 0.100% 40.500%, 0.300% 37.700%, 0.700% 35.000%, 1.200% 32.300%, 1.900% 29.700%, 2.800% 27.200%, 3.800% 24.700%, 5.000% 22.300%, 6.400% 20.000%, 8.000% 17.900%, 9.800% 15.900%, 11.700% 14.000%, 13.800% 12.200%, 16.100% 10.500%, 18.500% 9.000%, 21.000% 7.600%, 23.700% 6.300%, 26.500% 5.100%, 29.400% 4.100%, 32.400% 3.200%, 35.500% 2.400%, 38.700% 1.700%, 41.900% 1.100%, 45.200% 0.600%, 48.500% 0.300%, 51.900% 0.100%, 55.300% 0.000%, 58.700% 0.000%, 62.100% 0.100%, 65.500% 0.300%, 68.800% 0.700%, 72.100% 1.200%, 75.300% 1.800%, 78.400% 2.600%, 81.300% 3.500%, 84.100% 4.500%, 86.700% 5.700%, 89.100% 7.000%, 91.300% 8.500%, 93.300% 10.100%, 95.000% 11.900%, 96.500% 13.800%); }
}
