/* ============================================================
   Phone-first hero (landing-page brief v1.1, section 2)

   Linked last on:
   - the 13 category pages (body.category-page, section.spot-hero);
   - the single-slide pages dubai, abu-dhabi, sharjah and projects
     (section.hero > .hero-slider > one .hero-slide).
   Do not link it on index.html as it is: the section.hero rules below
   assume a single slide.

   Nothing here starts hidden or waits for JavaScript.
   ============================================================ */

/* --- Hero photo as <picture> ---------------------------------------------- */
/* Category pages: the wrapper must fill, or the 100%-high .spot-hero-image
   would collapse to its intrinsic size. */
body.category-page .spot-hero-image-wrapper picture {
    display: block;
    width: 100%;
    height: 100%;
}

/* Single-slide pages: the photo used to be a CSS background on .hero-image.
   The picture fills .hero-image, so it still covers the hero and moves with
   the desktop parallax (js/main.js moves .hero-image). */
section.hero .hero-image > picture {
    position: absolute;
    inset: 0;
    display: block;
}
section.hero .hero-image > picture > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* --- Readability ---------------------------------------------------------- */
/* A full-width overlay that deepens towards the buttons (about 0.7 black).
   style.css sets the category phone overlay with !important, hence here. */
body.category-page .spot-hero-overlay,
section.hero .hero-slide:only-child .hero-overlay {
    clip-path: none;
    background: linear-gradient(to bottom,
        rgba(0, 0, 0, 0.50) 0%,
        rgba(0, 0, 0, 0.58) 45%,
        rgba(0, 0, 0, 0.72) 100%) !important;
}

/* --- Visible from the first frame ------------------------------------------ */
/* Category pages: style.css fades the lead in on wider screens. */
body.category-page .spot-hero-subtitle {
    animation: none;
    opacity: 1;
}

/* Single-slide pages: the slider in js/main.js (166-291) fades the title and
   subtitle in on load and again every 5 seconds, even with one slide. Keep
   them still and visible. The buttons and labels are never targeted: the
   slider animates .hero-title, .hero-subtitle and .btn only. */
section.hero .hero-slide:only-child .hero-title,
section.hero .hero-slide:only-child .hero-subtitle {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

/* --- Buttons ------------------------------------------------------------ */
body.category-page .hero-cta,
section.hero .hero-cta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
}

/* .hero-content is a centred flex column; let the button row and the labels
   use its full width, as they do inside the category hero. */
section.hero .hero-cta,
section.hero .hero-proof {
    align-self: stretch;
}

body.category-page .hero-cta__btn,
section.hero .hero-cta__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 12px 24px;
    border-radius: 8px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0;
    text-decoration: none;
    text-shadow: none;
    box-sizing: border-box;
    transition: background-color 0.2s ease, color 0.2s ease;
}

body.category-page .hero-cta__btn--wa,
section.hero .hero-cta__btn--wa {
    background-color: #A23629;
    color: #FFFFFF;
    border: 2px solid #A23629;
}
body.category-page .hero-cta__btn--wa:hover,
section.hero .hero-cta__btn--wa:hover {
    background-color: #8A2C21;
    border-color: #8A2C21;
    color: #FFFFFF;
}

body.category-page .hero-cta__btn--call,
section.hero .hero-cta__btn--call {
    background-color: #FFFFFF;
    color: #2F2F2F;
    border: 2px solid #FFFFFF;
}
body.category-page .hero-cta__btn--call:hover,
section.hero .hero-cta__btn--call:hover {
    background-color: #F1F1F1;
    border-color: #F1F1F1;
    color: #2F2F2F;
}

body.category-page .hero-cta__btn:focus-visible,
section.hero .hero-cta__btn:focus-visible {
    outline: 3px solid #FFFFFF;
    outline-offset: 3px;
}

body.category-page .hero-cta__icon,
section.hero .hero-cta__icon {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
}

/* css/icons-modern.css styles every [class*="btn"] svg as an outline
   (fill:none; stroke-width:2), which turned the filled WhatsApp glyph into
   a hand-drawn-looking outline. Draw it filled, exactly as the floating
   button does (same path as js/contact-widget.js). */
body.category-page .hero-cta__btn--wa .hero-cta__icon,
section.hero .hero-cta__btn--wa .hero-cta__icon {
    fill: currentColor;
    stroke: none;
}

/* --- Proof labels --------------------------------------------------------- */
body.category-page .hero-proof,
section.hero .hero-proof {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
}

/* Padding is sized so the pills wrap the same way before and after the
   web font arrives (at 360px: two on the first row, one on the second). */
body.category-page .hero-proof li,
section.hero .hero-proof li {
    margin: 0;
    padding: 4px 10px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.35);
    color: #FFFFFF;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
}

/* --- Intro paragraph moved out of the hero (category pages) ---------------- */
body.category-page .category-intro {
    max-width: 760px;
    margin: 0 auto 32px;
    color: var(--color-dark-gray, #2F2F2F);
    font-size: 1rem;
    line-height: 1.7;
    text-align: center;
}

/* --- Phones ------------------------------------------------------------- */
@media (max-width: 767px) {
    body.category-page .hero-cta,
    section.hero .hero-cta {
        flex-direction: column;
        gap: 10px;
        margin-top: 20px;
    }

    body.category-page .hero-cta__btn,
    section.hero .hero-cta__btn {
        width: 100%;
        max-width: 360px;
    }

    /* Products first (category pages only): the layout is a one-column grid
       at this width (style.css), so the Categories box can follow the product
       grid by order alone. Breadcrumb, count, grid and the crawlable list stay
       together in .spotlight-main-content. */
    body.category-page .spotlight-layout .spotlight-main-content {
        order: 1;
    }
    body.category-page .spotlight-layout .spotlight-sidebar {
        order: 2;
        margin-top: 24px;
        margin-bottom: 0;
    }

    /* Tighter first screen so the longest titles (four-line H1 and lead,
       e.g. industrial-light at 360px) still leave the next section in view.
       Overrides category-page.css (120px 0 50px); the H1 still clears the
       102px header. */
    body.category-page .spot-hero {
        padding: 112px 0 36px;
    }
    body.category-page .spot-hero-subtitle {
        line-height: 1.5;
    }

    /* Single-slide pages: style.css gives the hero a fixed 70vh/60vh height
       with the slide absolutely positioned, so added content could not grow
       it. Let the slide sit in the flow and size the hero to its content,
       with the same spacing as the category hero. The photo and overlay stay
       absolutely positioned over the whole slide. */
    section.hero {
        height: auto;
        min-height: 0;
    }
    section.hero .hero-slider {
        height: auto;
    }
    section.hero .hero-slide:only-child {
        position: relative;
        height: auto;
    }
    section.hero .hero-slide:only-child .hero-content {
        height: auto;
        padding-top: 112px;
        padding-bottom: 36px;
    }
}
