/*
 * Inner-page building blocks. Uses the tokens and components from site.css,
 * so page content must sit inside <div class="hm">.
 * Partials: resources/views/site/partials/{page-hero,cta,service-sections,split-rows}.blade.php
 */

/* ---------- Page hero ---------- */

.pg-hero {
    position: relative;
    overflow: hidden;
    padding: calc(70px + clamp(44px, 6vw, 80px)) 0 clamp(56px, 7vw, 96px);
    background:
        radial-gradient(800px 460px at 88% 10%, rgba(21, 119, 187, .45), transparent 60%),
        radial-gradient(640px 400px at 5% 100%, rgba(63, 178, 74, .2), transparent 60%),
        linear-gradient(160deg, var(--hm-navy) 0%, var(--hm-navy-2) 100%);
    color: #c9d6e6;
}

.pg-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(ellipse at 60% 40%, #000 20%, transparent 75%);
    mask-image: radial-gradient(ellipse at 60% 40%, #000 20%, transparent 75%);
    pointer-events: none;
}

.pg-hero .particles-js { opacity: .25; z-index: 0; }

.pg-hero__inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(32px, 5vw, 64px);
    align-items: center;
}

.pg-hero--media .pg-hero__inner { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }

.pg-hero__copy { max-width: 820px; }

.pg-hero .hm-eyebrow { color: var(--hm-green-300); }

.pg-crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    margin: 0 0 22px;
    padding: 0;
    list-style: none;
    font-size: 13.5px;
    color: #8ea3bb;
}

.pg-crumbs li { display: flex; align-items: center; gap: 10px; }
.pg-crumbs li + li::before { content: "/"; opacity: .5; }
.pg-crumbs a { color: #c9d6e6; border-radius: 4px; }
.pg-crumbs a:hover { color: #fff; }
.pg-crumbs a:focus-visible { outline: 2px solid var(--hm-green-300); outline-offset: 2px; }
.pg-crumbs [aria-current] { color: #fff; font-weight: 600; }

.pg-hero__title {
    color: #fff !important;
    font-size: clamp(32px, 4.4vw, 52px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.03em;
}

.pg-hero__title em {
    font-style: normal;
    background: linear-gradient(90deg, #6fc6ff, var(--hm-green-300));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.pg-hero__text {
    margin-top: 20px !important;
    max-width: 680px;
    font-size: clamp(16px, 1.5vw, 18.5px);
    color: #b8c7da;
}

.pg-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 32px;
}

.pg-hero__media {
    position: relative;
    justify-self: center;
    width: min(100%, 420px);
}

.pg-hero__media img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 24px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, .35);
}

.pg-hero__media--badge {
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border-radius: 50%;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 0 0 14px rgba(255, 255, 255, .05), 0 0 0 28px rgba(255, 255, 255, .03), 0 40px 80px rgba(0, 0, 0, .4);
}

.pg-hero__media--badge img { border-radius: 0; box-shadow: none; }

/* ---------- Intro paragraph under the hero ---------- */

.pg-intro-wrap { padding: clamp(48px, 6vw, 72px) 0; }

.pg-intro {
    max-width: 860px;
    margin: 0 auto;
    text-align: center;
    font-size: clamp(17px, 1.6vw, 20px);
    line-height: 1.7;
    color: var(--hm-text);
}

/* ---------- Alternating image / text rows ---------- */

.pg-rows {
    display: grid;
    gap: clamp(56px, 8vw, 96px);
}

.pg-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(32px, 6vw, 80px);
    align-items: center;
    scroll-margin-top: 90px;
}

.pg-split--reverse .pg-split__media { order: 2; }

.pg-split__media {
    position: relative;
}

.pg-split__media img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: var(--hm-shadow-lg);
}

.pg-split__media img.is-contain {
    object-fit: contain;
    background: #fff;
    padding: 24px;
}

/* small source images: whole image, never wider than its own pixels */
.pg-split__media.is-lowres {
    justify-self: center;
    width: 100%;
    max-width: var(--img-w);
}

.pg-split__media.is-lowres img { aspect-ratio: auto; }

/* soft brand glow behind the image */
.pg-split__media::before {
    content: "";
    position: absolute;
    inset: 18px -18px -18px 18px;
    z-index: -1;
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(21, 119, 187, .14), rgba(63, 178, 74, .14));
}

.pg-split--reverse .pg-split__media::before { inset: 18px 18px -18px -18px; }

.pg-split__num {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .1em;
    color: var(--hm-green);
    margin-bottom: 10px;
}

.pg-split__title {
    font-size: clamp(24px, 2.8vw, 34px);
    font-weight: 800;
    line-height: 1.2;
}

.pg-split__text {
    margin-top: 16px !important;
    font-size: 16.5px;
    line-height: 1.75;
}

.pg-split__text + .pg-split__text { margin-top: 12px !important; }

.pg-split .hm-btn,
.pg-split .hm-link { margin-top: 24px; }

/* ---------- Process cards ---------- */

.pg-process {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    counter-reset: pg-step;
}

.pg-process--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.pg-step {
    position: relative;
    padding: 30px 28px;
    background: #fff;
    border: 1px solid var(--hm-line);
    border-radius: var(--hm-radius);
    box-shadow: var(--hm-shadow);
    transition: transform .3s var(--hm-ease), box-shadow .3s var(--hm-ease);
}

.pg-step:hover { transform: translateY(-4px); box-shadow: var(--hm-shadow-lg); }

.pg-step__head {
    display: flex;
    align-items: center;
    gap: 16px;
}

.pg-step__num {
    flex: none;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--hm-blue), var(--hm-green));
}

.pg-step__title {
    font-size: 19px;
    font-weight: 700;
    line-height: 1.3;
}

.pg-step__text {
    margin-top: 16px !important;
    font-size: 15px;
}

.pg-ticks {
    display: grid;
    gap: 10px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}

.pg-ticks li {
    display: flex;
    gap: 10px;
    font-size: 15px;
    line-height: 1.55;
}

.pg-ticks li::before {
    content: "";
    flex: none;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    border-radius: 50%;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M4 8.5l2.5 2.5L12 5.5'/%3E%3C/svg%3E") center / 12px no-repeat,
        var(--hm-green);
}

/* on dark sections */
.hm-spotlight .pg-ticks li { color: #c9d6e6; }

/* ---------- Technology groups ---------- */

.pg-tech {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}

.pg-tech__card {
    padding: 28px 24px;
    background: #fff;
    border: 1px solid var(--hm-line);
    border-radius: var(--hm-radius);
}

.pg-tech__card h3 {
    margin-top: 18px;
    font-size: 18px;
    font-weight: 700;
}

.pg-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
}

.pg-chips li {
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--hm-soft);
    border: 1px solid var(--hm-line);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--hm-text);
}

/* ---------- Related pages ---------- */

.pg-related {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 16px;
}

.pg-related a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid var(--hm-line);
    border-radius: var(--hm-radius-sm);
    color: var(--hm-ink);
    font-weight: 700;
    font-size: 15.5px;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}

.pg-related a:hover {
    border-color: transparent;
    box-shadow: var(--hm-shadow-lg);
    transform: translateY(-2px);
    color: var(--hm-blue);
}

.pg-related a:focus-visible { outline: 3px solid var(--hm-blue-300); outline-offset: 3px; }

.pg-related .hm-solution__icon { width: 44px; height: 44px; border-radius: 12px; font-size: 17px; }
.pg-related .fa-arrow-right { margin-left: auto; color: var(--hm-blue); font-size: 13px; }

/* ---------- Contact page ---------- */

.pg-map {
    margin-top: 32px;
    overflow: hidden;
    border-radius: var(--hm-radius);
    border: 1px solid var(--hm-line);
    box-shadow: var(--hm-shadow);
    background: #e9eef4;
}

.pg-map iframe {
    display: block;
    width: 100%;
    height: 300px;
}

.pg-form-title {
    margin-bottom: 22px !important;
    font-size: 22px;
    font-weight: 700;
}

.pg-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 12px 16px;
    border-radius: var(--hm-radius-sm);
    font-size: 14.5px;
    font-weight: 600;
}

.pg-alert--success {
    background: #e7f6e9;
    color: #1f6b28;
}

/* ---------- Embedded map (location intelligence) ---------- */

.pg-embed {
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid var(--hm-line);
    box-shadow: var(--hm-shadow-lg);
    background: #e9eef4;
}

.pg-embed iframe {
    display: block;
    width: 100%;
    height: min(72vh, 640px);
    min-height: 420px;
    border: 0;
}

/* ---------- Image icons inside feature cards (Milansaar) ---------- */

.pg-feature-icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(21, 119, 187, .1), rgba(63, 178, 74, .1));
}

.pg-feature-icon img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

/* ---------- Technology logo band (services hub) ---------- */

.pg-techband { padding: 44px 0 48px; }

.pg-techband .hm-logos__label { color: #9fb2c8; }

.pg-techband .hm-marquee__group img {
    height: 40px;
    max-width: 150px;
    opacity: .85;
}

/* ---------- Step flow (services hub) ---------- */

.pg-flow {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pg-flow__step {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 12px 22px;
    text-align: center;
    background: #fff;
    border: 1px solid var(--hm-line);
    border-radius: var(--hm-radius);
}

/* arrow between steps */
.pg-flow__step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -13px;
    z-index: 1;
    width: 10px;
    height: 10px;
    border-top: 2px solid var(--hm-blue-300);
    border-right: 2px solid var(--hm-blue-300);
    transform: translateY(-50%) rotate(45deg);
}

.pg-flow__num {
    margin-top: 14px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--hm-green);
}

.pg-flow__step h3 {
    margin-top: 6px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
}

/* ---------- Responsive ---------- */

@media (max-width: 991.98px) {
    .pg-flow { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .pg-flow__step:nth-child(4)::after { display: none; }

    .pg-hero--media .pg-hero__inner { grid-template-columns: minmax(0, 1fr); }
    .pg-hero__media { width: min(100%, 340px); }

    .pg-process,
    .pg-process--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .pg-tech { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767.98px) {
    .pg-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pg-flow__step::after { display: none; }

    .pg-split { grid-template-columns: minmax(0, 1fr); }
    .pg-split--reverse .pg-split__media { order: 0; }
    .pg-split__media::before,
    .pg-split--reverse .pg-split__media::before { inset: 12px -10px -12px 10px; }

    .pg-process,
    .pg-process--2,
    .pg-tech { grid-template-columns: minmax(0, 1fr); }

    .pg-hero__actions .hm-btn { flex: 1 1 100%; }
}

/* reCAPTCHA v3 badge would sit under the WhatsApp button; the contact form shows
   the required reCAPTCHA notice instead, which Google allows. */
.grecaptcha-badge { visibility: hidden; }
