/* ==========================================================================
   COMPONENT: Hero
   Global hero styles + carousel + page overrides.
   Ensures all hero content starts below the fixed header.
   ========================================================================== */

/* ---------- Common offset for all hero sections ---------- */
.hero,
.hero-about,
.hero-contact,
.hero-service,
.hero-case,
.hero-job-single {
    min-height: 100vh;
    padding-top: 80px;
    display: flex;
    align-items: center;
}

/* ---------- Base Hero (used on case‑study etc.) ---------- */
.hero {
    background:
        radial-gradient(ellipse at 50% 0%, rgba(232,80,2,0.04) 0%, transparent 55%),
        radial-gradient(ellipse at 30% 70%, rgba(193,8,1,0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 40%, rgba(241,96,1,0.02) 0%, transparent 50%),
        var(--bg-deep);
    position: relative;
    overflow: hidden;
    text-align: center;
    padding-bottom: 60px;
}

.hero::before {
    content: "";
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 120px;
    background: linear-gradient(180deg, transparent, rgba(232,80,2,0.3), rgba(232,80,2,0.05));
}

.hero::after {
    content: "";
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 80px;
    border: 1px solid rgba(232,80,2,0.1);
    border-radius: 50%;
    pointer-events: none;
}

.hero-container {
    position: relative;
    z-index: 2;
    max-width: 820px;
    margin: 0 auto;
    padding: 0 24px;
}

.hero-subtext {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 44px;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

/* ---------- Floating diamonds (global) ---------- */
.geo-diamond {
    position: absolute;
    width: 12px;
    height: 12px;
    background: transparent;
    border: 1px solid rgba(232,80,2,0.12);
    transform: rotate(45deg);
    pointer-events: none;
    animation: floatDiamond 8s ease-in-out infinite;
}
.geo-diamond:nth-child(1) { top: 15%; left: 8%; animation-delay: 0s; width: 10px; height: 10px; }
.geo-diamond:nth-child(2) { top: 22%; right: 10%; animation-delay: 2s; width: 14px; height: 14px; border-color: rgba(241,96,1,0.1); }
.geo-diamond:nth-child(3) { bottom: 20%; left: 12%; animation-delay: 4s; width: 8px; height: 8px; }
.geo-diamond:nth-child(4) { bottom: 28%; right: 14%; animation-delay: 6s; width: 16px; height: 16px; border-color: rgba(193,8,1,0.08); }

@keyframes floatDiamond {
    0%,100% { transform: rotate(45deg) translateY(0); opacity: 0.5; }
    25% { transform: rotate(45deg) translateY(-14px); opacity: 0.8; }
    50% { transform: rotate(45deg) translateY(0); opacity: 0.5; }
    75% { transform: rotate(45deg) translateY(10px); opacity: 0.3; }
}

/* ---------- Hero Carousel (Front Page) ---------- */
.hero-carousel {
    position: relative;
    width: 100%;
    height: 100vh;                     /* full height, offset handled inside */
    min-height: 600px;
    overflow: hidden;
}

.carousel {
    position: absolute;
    top: 80px;                         /* header height */
    left: 0;
    width: 100%;
    height: calc(100% - 80px);         /* fill remaining space */
}

.carousel-inner {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease;
}

.carousel-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    flex-shrink: 0;
}

/* Dark overlay */
.hero-carousel::after {
    content: "";
    position: absolute;
    top: 80px;                         /* match carousel position */
    left: 0;
    width: 100%;
    height: calc(100% - 80px);
    background: rgba(0, 0, 0, 0.45);
    z-index: 1;
}

/* Overlay content (text + buttons) – starts below header */
.hero-carousel .hero-content {
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    height: calc(100% - 80px);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 24px;
    box-sizing: border-box;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 5.2vw, 3.7rem);
    font-weight: 900;
    line-height: 1.12;
    letter-spacing: -0.03em;
    margin-bottom: 22px;
    color: var(--text-primary);        /* ensure readability */
}

.hero-content .accent-word {
    background: linear-gradient(160deg, #FF7A2E, #E85002, #F16001, #B84000);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content .btn {
    margin-bottom: 14px;
}

/* ---------- Case‑Studies Hero Overrides ---------- */
body.page-template-page-case-studies .hero-case {
    background:
        radial-gradient(ellipse at 48% 0%, rgba(232,80,2,0.04) 0%, transparent 60%),
        radial-gradient(ellipse at 22% 60%, rgba(193,8,1,0.028) 0%, transparent 55%),
        radial-gradient(ellipse at 72% 32%, rgba(241,96,1,0.022) 0%, transparent 55%),
        radial-gradient(ellipse at 50% 85%, rgba(232,80,2,0.015) 0%, transparent 60%),
        var(--bg-void);
    position: relative;
    overflow: hidden;
    text-align: center;
    padding-top: 80px;                 /* key for header clearance */
    padding-bottom: 60px;
}

body.page-template-page-case-studies .hero-case::before {
    content: "";
    position: absolute;
    top: -70px;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 110px;
    background: linear-gradient(180deg, transparent, rgba(232,80,2,0.3) 30%, rgba(232,80,2,0.15) 60%, rgba(232,80,2,0.03) 100%);
}

body.page-template-page-case-studies .hero-case::after {
    content: "";
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 80px;
    border: 1px solid rgba(232,80,2,0.07);
    border-radius: 50%;
    pointer-events: none;
}

body.page-template-page-case-studies .floating-diamonds {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

body.page-template-page-case-studies .geo-diamond {
    position: absolute;
    background: transparent;
    border: 1px solid rgba(232,80,2,0.1);
    transform: rotate(45deg);
    animation: floatDiamondCaseStudies 10s ease-in-out infinite;
}

body.page-template-page-case-studies .geo-diamond:nth-child(1) {
    top: 16%; left: 5%; width: 11px; height: 11px; animation-delay: 0s;
}

body.page-template-page-case-studies .geo-diamond:nth-child(2) {
    top: 28%; right: 7%; width: 14px; height: 14px;
    border-color: rgba(241,96,1,0.09); animation-delay: 2.8s;
}

body.page-template-page-case-studies .geo-diamond:nth-child(3) {
    bottom: 20%; left: 9%; width: 9px; height: 9px; animation-delay: 5.2s;
}

body.page-template-page-case-studies .geo-diamond:nth-child(4) {
    bottom: 28%; right: 11%; width: 16px; height: 16px;
    border-color: rgba(193,8,1,0.08); animation-delay: 7.5s;
}

@keyframes floatDiamondCaseStudies {
    0%,100% { transform: rotate(45deg) translateY(0); opacity: 0.35; }
    20% { transform: rotate(45deg) translateY(-18px); opacity: 0.7; }
    40% { transform: rotate(45deg) translateY(-6px); opacity: 0.5; }
    60% { transform: rotate(45deg) translateY(14px); opacity: 0.25; }
    80% { transform: rotate(45deg) translateY(4px); opacity: 0.45; }
}
/* ---------- Generic responsive fixes ---------- */

/* Tablet */
@media (max-width: 768px) {
  .hero,
  .hero-about,
  .hero-contact,
  .hero-service,
  .hero-case,
  .hero-job-single {
    min-height: 100vh;
    padding-top: 70px;
  }
  .hero-carousel {
    height: 100vh;
  }
  .carousel,
  .hero-carousel::after,
  .hero-carousel .hero-content {
    top: 70px;
  }
}

/* Mobile */
@media (max-width: 480px) {
  .hero,
  .hero-about,
  .hero-contact,
  .hero-service,
  .hero-case,
  .hero-job-single {
    min-height: 100vh;
    padding-top: 60px;
  }
  .hero-carousel {
    height: 100vh;
  }
  .carousel,
  .hero-carousel::after,
  .hero-carousel .hero-content {
    top: 60px;
  }
}