/* =============================================================
   ARAFA CNC — HOME PAGE
   Single source of truth: desktop + tablet + mobile.
   Sections: Shared, Hero, Machines, About, Parts, Gallery,
             Clients/Partners, Contact, Tablet, Mobile.
   This file replaces old home.css and home-mobile-fix.css.
============================================================= */

/* =============================================================
   SHARED HOME SECTION HEADERS
============================================================= */
.home-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 30px;
}

.home-section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .7px;
}

.home-section-kicker::before {
    content: "";
    width: 28px;
    height: 3px;
    background: var(--primary);
}

.home-section-head .section-title {
    margin: 5px 0 8px;
}

.home-section-head .section-title strong {
    color: var(--navy);
}

/* =============================================================
   SECTION 01 — HERO
============================================================= */
.home-hero {
    position: relative;
    min-height: 760px;
    overflow: hidden;
    display: flex;
    align-items: center;
    background: #061725;
    color: #fff;
}

.home-hero__slides {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.home-hero__slide {
    position: absolute;
    top: 0;
    bottom: 78px;
    width: 61%;
    background-image: var(--hero-image);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity .8s ease, transform 5.5s linear;
}

.home-hero__slide.is-active {
    opacity: 1;
    transform: scale(1);
}

.home-hero__slide::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}

html[dir="rtl"] .home-hero__slide {
    left: 0;
    right: auto;
}

html[dir="rtl"] .home-hero__slide::after {
    background: linear-gradient(
        to right,
        rgba(6,23,37,0) 0%,
        rgba(6,23,37,0) 50%,
        rgba(6,23,37,.20) 64%,
        rgba(6,23,37,.65) 82%,
        #061725 100%
    );
}

html[dir="ltr"] .home-hero__slide {
    right: 0;
    left: auto;
}

html[dir="ltr"] .home-hero__slide::after {
    background: linear-gradient(
        to left,
        rgba(6,23,37,0) 0%,
        rgba(6,23,37,0) 50%,
        rgba(6,23,37,.20) 64%,
        rgba(6,23,37,.65) 82%,
        #061725 100%
    );
}

.home-hero__overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(to top, rgba(2,16,26,.28), transparent 45%);
    pointer-events: none;
}

.home-hero__inner {
    position: relative;
    z-index: 5;
    padding-top: 92px;
    padding-bottom: 140px;
}

.home-hero__content {
    max-width: 720px;
    transform: translateY(-45px);
}

.home-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: rgba(255,255,255,.90);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 3.5px;
}

.home-hero__eyebrow::before {
    content: "";
    width: 34px;
    height: 3px;
    flex: 0 0 34px;
    background: var(--primary);
}

.home-hero h1 {
    margin: 0 0 18px;
    font-family: "Cairo", sans-serif;
    font-size: clamp(48px, 5.4vw, 78px);
    font-weight: 800;
    line-height: 1;
}

.home-hero h1 > span { font-weight: 700; }
.home-hero h1 strong { color: var(--primary); font-weight: 800; }
html[dir="rtl"] .home-hero h1 { letter-spacing: -1px; line-height: 1.05; }
html[dir="ltr"] .home-hero h1 { letter-spacing: -2px; line-height: .96; }

.home-hero p {
    margin: 0;
    max-width: 610px;
    color: rgba(255,255,255,.82);
    font-family: "Cairo", sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.8;
}

.home-hero__actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 27px;
}

.home-hero__call {
    border: 1px solid rgba(255,255,255,.58);
    color: #fff;
    background: rgba(6,24,37,.35);
}

.home-hero__arrow {
    position: absolute;
    top: 50%;
    z-index: 8;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.35);
    background: rgba(2,16,26,.45);
    color: #fff;
    opacity: 0;
    transition: opacity .2s ease, background .2s ease;
}

.home-hero:hover .home-hero__arrow { opacity: 1; }
.home-hero__arrow:hover { background: var(--primary); }
.home-hero__arrow--prev { inset-inline-start: 18px; }
.home-hero__arrow--next { inset-inline-end: 18px; }

.home-hero__dots {
    position: absolute;
    z-index: 8;
    bottom: 91px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    direction: ltr;
}

.home-hero__dots button {
    width: 7px;
    height: 7px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: rgba(255,255,255,.45);
    transition: .2s ease;
}

.home-hero__dots button.is-active {
    width: 24px;
    background: var(--primary);
}

.home-hero__benefits {
    position: absolute;
    z-index: 7;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(4,24,37,.94);
    border-top: 1px solid rgba(255,255,255,.08);
}

.home-hero__benefit-grid {
    min-height: 78px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-items: center;
}

.home-hero__benefit-grid > div {
    min-height: 50px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding-inline: 26px;
    border-inline-start: 1px solid rgba(255,255,255,.18);
}

.home-hero__benefit-grid > div:first-child { border-inline-start: 0; }
.home-hero__benefit-grid i { color: var(--primary); font-size: 29px; }
.home-hero__benefit-grid strong,
.home-hero__benefit-grid small { display: block; }
.home-hero__benefit-grid small { color: rgba(255,255,255,.62); font-size: 10px; }

/* English arrows */
html[dir="ltr"] .home-hero__arrow i,
html[dir="ltr"] .carousel-arrow i,
html[dir="ltr"] .machine-showcase-card .fa-arrow-left,
html[dir="ltr"] .parts-showcase-card .fa-arrow-left,
html[dir="ltr"] .home-machines-section .fa-arrow-left,
html[dir="ltr"] .home-parts-section .fa-arrow-left,
html[dir="ltr"] .home-hero__actions .fa-arrow-left {
    transform: rotate(180deg);
}

/* =============================================================
   SECTION 02 — FEATURED MACHINES
============================================================= */
.home-machines-section {
    background: linear-gradient(135deg, #fff, #f6f8fa);
}

.auto-carousel { position: relative; }
.auto-carousel__viewport { overflow: hidden; padding: 8px 2px 14px; }
.auto-carousel__track {
    display: flex;
    gap: 18px;
    direction: ltr;
    transition: transform .55s cubic-bezier(.22,.61,.36,1);
    will-change: transform;
}

.machine-showcase-card,
.parts-showcase-card {
    position: relative;
    flex: 0 0 calc((100% - 54px) / 4);
    background: #fff;
    border: 1px solid #e5e8ec;
    border-radius: 11px;
    overflow: hidden;
    box-shadow: 0 12px 28px rgba(9,32,51,.08);
    transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}

html[dir="rtl"] .machine-showcase-card,
html[dir="rtl"] .parts-showcase-card { direction: rtl; }
html[dir="ltr"] .machine-showcase-card,
html[dir="ltr"] .parts-showcase-card { direction: ltr; }

.machine-showcase-card:hover,
.parts-showcase-card:hover {
    transform: translateY(-8px) scale(1.015);
    border-color: var(--primary);
    box-shadow: 0 18px 34px rgba(9,32,51,.14);
}

.machine-showcase-card__media,
.parts-showcase-card__media {
    position: relative;
    display: block;
    height: 220px;
    overflow: hidden;
}

.machine-showcase-card__media img,
.parts-showcase-card__media img {
    transition: transform .45s ease;
}

.machine-showcase-card:hover img,
.parts-showcase-card:hover img { transform: scale(1.06); }

.machine-showcase-card__body,
.parts-showcase-card__body { padding: 16px; }

.machine-showcase-card__body h3,
.parts-showcase-card__body h3 { margin: 0 0 8px; font-size: 17px; }

.machine-showcase-card__body p {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.machine-showcase-card__link,
.parts-showcase-card__body a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--navy);
    font-size: 13px;
    font-weight: 800;
}

.machine-showcase-card:hover .machine-showcase-card__link,
.parts-showcase-card:hover .parts-showcase-card__body a { color: var(--primary); }

.parts-showcase-card__body small {
    display: block;
    margin-bottom: 10px;
    color: #97a2ad;
    font-size: 10px;
}

.card-quick-actions {
    position: absolute;
    top: 14px;
    inset-inline-end: -64px;
    z-index: 4;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transition: all .25s ease;
}

.card-quick-actions button {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid #e4e8ec;
    background: #fff;
    color: var(--navy);
    box-shadow: 0 8px 18px rgba(9,32,51,.12);
}

.card-quick-actions button:last-child {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

.machine-showcase-card:hover .card-quick-actions,
.parts-showcase-card:hover .card-quick-actions {
    inset-inline-end: 12px;
    opacity: 1;
}

.card-quick-actions button.is-active {
    border-color: var(--primary);
    background: #fff3ed;
    color: var(--primary);
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    z-index: 8;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid #dbe1e6;
    background: #fff;
    color: var(--navy);
    box-shadow: 0 8px 20px rgba(9,32,51,.12);
    transform: translateY(-50%);
}

.carousel-arrow--prev { inset-inline-start: -18px; }
.carousel-arrow--next { inset-inline-end: -18px; }
.carousel-arrow:hover { border-color: var(--primary); background: var(--primary); color: #fff; }

/* =============================================================
   SECTION 03 — ABOUT
============================================================= */
.home-about__grid {
    display: flex;
    align-items: center;
    gap: 42px;
}

.home-about__grid > * {
    flex: 1 1 0;
    min-width: 0;
}

.home-about__content {
    order: 2;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.home-about__content .section-title { margin-bottom: 6px; }
.home-about__content p { margin: 0; color: var(--text); line-height: 1.9; }

.home-about__visual {
    order: 1;
    overflow: hidden;
    border-radius: 28px;
    background: #dfe5ea;
    box-shadow: 0 18px 38px rgba(9,32,51,.10);
}

.home-about__visual img {
    display: block;
    width: 100%;
    height: 520px;
    object-fit: cover;
    object-position: center;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 28px;
}

.stat {
    padding: 30px 18px;
    text-align: center;
    background: #f0f3f6;
    border-radius: 18px;
}

.stat strong {
    display: block;
    margin-bottom: 8px;
    color: var(--primary);
    font-size: 32px;
}

.stat span { color: var(--navy); font-size: 12px; }

/* =============================================================
   SECTION 04 — SPARE PARTS
============================================================= */
.parts-dark {
    background: linear-gradient(135deg, #061725, #0b273a);
    color: #fff;
}

.home-parts-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 28px;
    align-items: center;
}

.home-parts-copy h2 {
    margin: 7px 0 14px;
    font-size: 42px;
    line-height: .95;
}

.home-parts-copy h2 strong { color: var(--primary); }
.home-parts-copy p { color: rgba(255,255,255,.65); font-size: 13px; line-height: 1.8; }
.parts-carousel { padding-bottom: 42px; }
.parts-carousel .auto-carousel__viewport { padding-block: 10px; }

.carousel-dots {
    position: absolute;
    bottom: 0;
    left: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    direction: ltr;
    transform: translateX(-50%);
}

.carousel-dots button {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 20px;
    background: rgba(255,255,255,.45);
    transition: .25s ease;
}

.carousel-dots button.is-active {
    width: 30px;
    background: var(--primary);
}

/* =============================================================
   SECTION 05 — PHOTO GALLERY
   Generous spacing, even crops and consistent rounded corners.
============================================================= */
.home-gallery-section .container { min-width: 0; }

.gallery-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) repeat(2, minmax(0, .9fr));
    grid-auto-rows: 170px;
    column-gap: 18px;
    row-gap: 18px;
    align-items: stretch;
}

.gallery-item {
    display: block;
    position: relative;
    min-width: 0;
    min-height: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border: 1px solid #e7ebef;
    border-radius: 14px;
    background: #eef2f5;
}

.gallery-item:first-child { grid-row: span 2; }

.gallery-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform .35s ease;
}

@media (hover: hover) {
    .gallery-item:hover img { transform: scale(1.045); }
}

/* =============================================================
   SECTION 06 — CLIENTS + PARTNERS
============================================================= */
.clients-partners-section {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 80% 20%, rgba(29,72,100,.38), transparent 36%),
        linear-gradient(135deg, #041520 0%, #071d2d 48%, #09283b 100%);
    color: #fff;
}

.clients-partners-section::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(120deg, transparent 0%, transparent 45%, rgba(255,92,0,.035) 45.2%, transparent 45.5%);
}

.logo-showcase {
    position: relative;
    z-index: 2;
    padding: 64px 0 55px;
    overflow: hidden;
}

.logo-showcase--clients { border-bottom: 1px solid rgba(255,255,255,.09); }

.logo-showcase__head {
    max-width: 700px;
    margin: 0 auto 38px;
    padding-inline: 20px;
    text-align: center;
}

.logo-showcase__kicker {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 9px;
    color: rgba(255,255,255,.68);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 4px;
}

.logo-showcase__kicker::before,
.logo-showcase__kicker::after {
    content: "";
    width: 32px;
    height: 2px;
    background: var(--primary);
}

.logo-showcase__head h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(38px, 4vw, 58px);
    font-weight: 800;
    line-height: 1.08;
}

.logo-showcase__head p {
    max-width: 620px;
    margin: 13px auto 0;
    color: rgba(255,255,255,.62);
    font-size: 15px;
    line-height: 1.8;
}

.logo-showcase__head::after {
    content: "";
    display: block;
    width: 56px;
    height: 3px;
    margin: 18px auto 0;
    border-radius: 20px;
    background: var(--primary);
}

.logo-marquee,
.logo-marquee__track,
.logo-marquee__group { direction: ltr !important; }

.logo-marquee {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 10px 0 18px;
}

.logo-marquee::before,
.logo-marquee::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 6;
    width: 130px;
    pointer-events: none;
}

.logo-marquee::before {
    left: 0;
    background: linear-gradient(to right, #061b2a 0%, rgba(6,27,42,.82) 30%, transparent 100%);
}

.logo-marquee::after {
    right: 0;
    background: linear-gradient(to left, #061b2a 0%, rgba(6,27,42,.82) 30%, transparent 100%);
}

.logo-marquee__track {
    display: flex;
    width: max-content;
    gap: 20px;
    will-change: transform;
    animation-duration: var(--marquee-duration, 30s);
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

.logo-marquee__group {
    display: flex;
    flex-shrink: 0;
    gap: 20px;
}

.brand-logo-card {
    position: relative;
    width: 225px;
    height: 165px;
    flex: 0 0 225px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 25px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(0,0,0,.13);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.brand-logo-card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.brand-logo-card:hover {
    z-index: 10;
    transform: translateY(-6px) scale(1.025);
    border-color: rgba(255,92,0,.55);
    box-shadow: 0 18px 38px rgba(0,0,0,.22), 0 0 22px rgba(255,92,0,.08);
}

.logo-marquee--clients .logo-marquee__track { animation-name: marqueeClients; }
.logo-marquee--partners .logo-marquee__track { animation-name: marqueePartners; }

@keyframes marqueeClients {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(calc(-1 * var(--marquee-distance)), 0, 0); }
}

@keyframes marqueePartners {
    from { transform: translate3d(calc(-1 * var(--marquee-distance)), 0, 0); }
    to { transform: translate3d(0, 0, 0); }
}

.logo-marquee:hover .logo-marquee__track,
.logo-marquee:focus-within .logo-marquee__track { animation-play-state: paused; }

/* =============================================================
   SECTION 07 — CONTACT FORM
   Compact centered layout; two columns on desktop
============================================================= */
.home-contact-section {
    padding: 50px 0;
    background: #fff;
}

.home-contact-section .home-contact {
    display: block;
    width: calc(100% - 40px);
    max-width: 1050px;
    margin-inline: auto;
}

.home-contact-section .home-contact__form {
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 28px 32px;
    background: #fff;
    border: 1px solid #e5eaf0;
    border-radius: 14px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, .035);
}

.home-contact-section .home-contact__form > h2 {
    margin: 0 0 22px;
    font-size: 25px;
    font-weight: 800;
    color: #0d2444;
}

.home-contact-section .home-contact__fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 20px;
    row-gap: 15px;
}

.home-contact-section .home-contact__fields .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    margin: 0;
}

.home-contact-section .home-contact__fields label {
    text-align: start;
    font-size: 13px;
    font-weight: 600;
    color: #34465c;
}

.home-contact-section .home-contact__fields input.form-control,
.home-contact-section .home-contact__fields textarea.form-control {
    display: block;
    width: 100%;
    padding: 10px 13px;
    border: 1px solid #dce3eb;
    border-radius: 7px;
    background: #fafbfc;
    box-sizing: border-box;
    font: inherit;
    font-size: 13px;
}

.home-contact-section .home-contact__fields input.form-control {
    height: 44px;
}

.home-contact-section .form-group--full {
    grid-column: 1 / -1;
}

.home-contact-section .home-contact__fields textarea.form-control {
    min-height: 90px;
    height: 90px;
    resize: vertical;
}

.home-contact-section .form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 92, 0, .10);
}

.home-contact-section .home-contact__submit {
    display: block;
    width: max-content;
    min-height: 43px;
    margin: 20px 0 0 auto;
    padding: 10px 30px;
    border: 1px solid var(--primary);
    border-radius: 7px;
    background: var(--primary);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

.home-contact-section .home-contact__submit:hover {
    filter: brightness(.92);
}

html[dir="ltr"] .home-contact-section .home-contact__submit {
    margin: 20px auto 0 0;
}

/* =============================================================
   TABLET
============================================================= */
@media (max-width: 1000px) {
    .machine-showcase-card,
    .parts-showcase-card { flex-basis: calc((100% - 18px) / 2); }

    .home-parts-layout { grid-template-columns: minmax(0, 1fr); }

    /* Stack About content first, image second without flex shrinking. */
    .home-about__grid { flex-direction: column; align-items: stretch; }
    .home-about__grid > * { flex: 0 0 auto; width: 100%; min-width: 0; }
    .home-about__content { order: 1; }
    .home-about__visual { order: 2; }
    .home-about__visual img { height: 420px; }

    .home-parts-copy { max-width: 600px; }

    /* Photo gallery: keep photos apart on tablets. */
    .gallery-grid { column-gap: 16px; row-gap: 16px; }

    .home-hero {
        min-height: 690px;
        align-items: center;
    }

    .home-hero__slide { width: 68%; }
    .home-hero__content { max-width: 600px; }
    .home-hero__benefit-grid { grid-template-columns: repeat(2, 1fr); padding: 10px 0; }
    .home-hero__benefit-grid > div:nth-child(3) { border-inline-start: 0; }
}

/* =============================================================
   MOBILE
============================================================= */
@media (max-width: 650px) {
    /* Prevent carousels / long text from widening the mobile viewport. */
    .site-main { width: 100%; min-width: 0; overflow-x: clip; }
    .site-main .container { min-width: 0; }
    .auto-carousel, .auto-carousel__viewport,
    .home-parts-layout, .parts-carousel { max-width: 100%; min-width: 0; }

    /* Hero becomes a true mobile cover instead of a split desktop layout. */
    .home-hero {
        min-height: 660px;
        display: flex;
        align-items: flex-start;
        padding: 0;
    }

    .home-hero__slide {
        top: 0;
        right: 0 !important;
        bottom: 150px;
        left: 0 !important;
        width: 100%;
        background-size: cover;
        background-position: center;
        transform: none;
    }

    .home-hero__slide::after,
    html[dir="rtl"] .home-hero__slide::after,
    html[dir="ltr"] .home-hero__slide::after {
        background: linear-gradient(
            to bottom,
            rgba(6,23,37,.30) 0%,
            rgba(6,23,37,.58) 35%,
            rgba(6,23,37,.92) 67%,
            #061725 100%
        );
    }

    .home-hero__overlay {
        background: linear-gradient(to bottom, rgba(2,16,26,.08), rgba(2,16,26,.18) 35%, rgba(2,16,26,.50));
    }

    .home-hero__inner {
        width: 100%;
        padding-top: 225px;
        padding-bottom: 170px;
    }

    .home-hero__content {
        width: 100%;
        max-width: 100%;
        transform: none;
    }

    .home-hero__eyebrow {
        overflow-wrap: anywhere;
        max-width: 100%;
        margin-bottom: 14px;
        font-size: 9px;
        letter-spacing: 1.7px;
        line-height: 1.6;
        white-space: normal;
    }

    .home-hero h1 {
        margin-bottom: 14px;
        font-size: clamp(34px, 10vw, 46px);
        line-height: 1.08;
        letter-spacing: -.6px !important;
    }

    .home-hero p {
        max-width: 100%;
        font-size: 14px;
        line-height: 1.75;
    }

    .home-hero__actions {
        gap: 9px;
        margin-top: 20px;
    }

    .home-hero__actions .btn {
        min-height: 44px;
        padding-inline: 12px;
        font-size: 12px;
    }

    .home-hero__arrow { display: none; }

    .home-hero__dots {
        bottom: 145px;
        max-width: calc(100% - 32px);
        overflow: hidden;
    }

    .home-hero__benefits {
        min-height: 136px;
    }

    .home-hero__benefit-grid {
        min-height: 136px;
        grid-template-columns: repeat(2, 1fr);
        padding: 6px 0;
    }

    .home-hero__benefit-grid > div {
        min-height: 60px;
        gap: 9px;
        padding: 8px 10px;
        border-inline-start: 0;
        border-bottom: 1px solid rgba(255,255,255,.08);
    }

    .home-hero__benefit-grid > div:nth-last-child(-n+2) { border-bottom: 0; }
    .home-hero__benefit-grid i { font-size: 21px; }
    .home-hero__benefit-grid strong { font-size: 12px; }
    .home-hero__benefit-grid small { font-size: 9px; }

    /* Section heading */
    .home-section-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 16px;
        margin-bottom: 22px;
    }

    .home-section-head .btn { width: auto; }

    /* Carousels */
    .auto-carousel { padding-inline: 0; }
    .auto-carousel__viewport { padding: 6px 0 14px; }
    .auto-carousel__track { gap: 12px; }

    .machine-showcase-card,
    .parts-showcase-card {
        flex: 0 0 100%;
        border-radius: 14px;
    }

    .machine-showcase-card__media,
    .parts-showcase-card__media { height: 230px; }

    .machine-showcase-card__body,
    .parts-showcase-card__body { padding: 15px; }

    .carousel-arrow {
        top: 44%;
        width: 36px;
        height: 36px;
    }

    .carousel-arrow--prev { inset-inline-start: 6px; }
    .carousel-arrow--next { inset-inline-end: 6px; }

    /* Always expose quick actions on touch devices. */
    .card-quick-actions {
        inset-inline-end: 10px;
        opacity: 1;
    }

    .card-quick-actions button {
        width: 38px;
        height: 38px;
    }

    /* About */
    /* SECTION 03 — ABOUT: text, stats, then full-width image. */
    .home-about__grid {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 24px;
    }

    .home-about__grid > * {
        flex: 0 0 auto;
        width: 100%;
        min-width: 0;
    }

    .home-about__content { order: 1; }

    .home-about__visual {
        order: 2;
        display: block;
        width: 100%;
        height: auto;
        min-height: 0;
        overflow: hidden;
        border-radius: 18px;
    }

    .home-about__visual img {
        display: block;
        width: 100%;
        height: auto;
        min-height: 0;
        aspect-ratio: 4 / 3;
        object-fit: cover;
        object-position: center;
    }

    .stats-row {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        margin-top: 18px;
    }

    .stat {
        padding: 16px 6px;
        border-radius: 12px;
    }

    .stat strong { margin-bottom: 4px; font-size: 23px; }
    .stat span { font-size: 10px; }

    /* Spare parts */
    .home-parts-layout {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }

    .home-parts-copy { max-width: 100%; }
    .home-parts-copy h2 { font-size: 34px; line-height: 1; }
    .parts-carousel { width: 100%; min-width: 0; padding-bottom: 38px; }

    /* SECTION 05 — GALLERY: breathing room between every photo. */
    .home-gallery-section .container {
        width: 100%;
        max-width: 100%;
        padding-inline: clamp(18px, 5vw, 22px);
        box-sizing: border-box;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: auto;
        column-gap: 14px;
        row-gap: 16px;
    }

    .gallery-item {
        height: auto;
        aspect-ratio: 4 / 3;
        border-radius: 12px;
    }

    .gallery-item:first-child {
        grid-row: auto;
        grid-column: 1 / -1;
        height: auto;
        aspect-ratio: 16 / 10;
    }

    /* Clients / partners */
    .logo-showcase { padding: 44px 0 38px; }
    .logo-showcase__head { margin-bottom: 25px; padding-inline: 16px; }
    .logo-showcase__head h2 { font-size: 32px; }
    .logo-showcase__head p { font-size: 13px; line-height: 1.7; }
    .logo-showcase__kicker { font-size: 9px; letter-spacing: 2px; }
    .logo-marquee::before,
    .logo-marquee::after { width: 32px; }
    .logo-marquee__track,
    .logo-marquee__group { gap: 12px; }

    .brand-logo-card {
        width: 150px;
        height: 108px;
        flex-basis: 150px;
        padding: 15px;
        border-radius: 12px;
    }

    /* Contact */
    .home-contact-section { padding: 35px 0; }
    .home-contact-section .home-contact { width: calc(100% - 28px); }
    .home-contact-section .home-contact__form { padding: 22px 18px; }
    .home-contact-section .home-contact__fields {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }
    .home-contact-section .form-group--full { grid-column: 1; }
    .home-contact-section .home-contact__submit { width: 100%; }
}

@media (max-width: 390px) {
    .home-hero { min-height: 675px; }
    .home-hero__inner { padding-top: 205px; }
    .home-hero__eyebrow { font-size: 8px; letter-spacing: 1.15px; }
    .home-hero h1 { font-size: 32px; }
    .home-hero p { font-size: 13px; }
    .stats-row { gap: 6px; }
    .stat strong { font-size: 20px; }
    /* Keep two photo columns on narrow phones, with proper gaps. */
    .gallery-grid { column-gap: 12px; row-gap: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    .home-hero__slide,
    .auto-carousel__track,
    .logo-marquee__track,
    .machine-showcase-card,
    .parts-showcase-card,
    .gallery-item img {
        transition: none !important;
    }

    .logo-marquee__track {
        animation-play-state: paused !important;
    }
}




/* =============================================================
   SECTION 07 — HOME CONTACT
   CONTACT FORM + CONTACT INFORMATION
   ARAFA CNC
============================================================= */

/* =========================
   01 — SECTION LAYOUT
========================= */

.home-contact-section {
  padding: 65px 0;
  background: #f5f7fa;
}

.home-contact-section .home-contact {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  align-items: stretch;
  gap: 24px;

  width: calc(100% - 40px);
  max-width: 1320px;
  margin-inline: auto;
}

/* =========================
   02 — CONTACT FORM
========================= */

.home-contact-section .home-contact__form {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 38px;

  background: #fff;
  border: 1px solid #dfe6ee;
  border-radius: 16px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .035);
}

.home-contact__form-head {
  margin-bottom: 28px;
}

.home-contact__form-head h2 {
  margin: 0 0 10px;
  color: #061f35;
  font-size: clamp(24px, 2.5vw, 32px);
  line-height: 1.4;
  font-weight: 800;
}

.home-contact__form-head p {
  margin: 0;
  color: #7a8ba0;
  font-size: 14px;
  line-height: 1.8;
}

.home-contact-section .home-contact__fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 22px;
  row-gap: 20px;
}

.home-contact-section .home-contact__fields label {
  color: #102e46;
  font-size: 14px;
  font-weight: 700;
}

.home-contact-section .home-contact__fields input.form-control {
  height: 50px;
}

.home-contact-section .home-contact__fields textarea.form-control {
  min-height: 125px;
  height: 125px;
}

.home-contact-section .home-contact__fields input.form-control,
.home-contact-section .home-contact__fields textarea.form-control {
  background: #f8fafc;
  border: 1px solid #dce3eb;
  border-radius: 7px;
  font-size: 14px;
}

.home-contact-section .form-control:focus {
  border-color: #ff5a12;
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 90, 18, .10);
}

.home-contact-section .home-contact__submit {
  min-height: 50px;
  margin-top: 22px;
  padding: 12px 32px;
  background: #ff5a12;
  border-color: #ff5a12;
  font-size: 14px;
}

.home-contact-section .home-contact__submit:hover {
  background: #e94c0d;
  border-color: #e94c0d;
}


/* =========================
   03 — CONTACT INFO CARD
========================= */

.home-contact__info {
  min-width: 0;
  padding: 34px 24px;

  background: #09293b;
  color: #fff;

  border-radius: 16px;

  display: flex;
  flex-direction: column;
}

/* =========================
   04 — INFO HEADER
========================= */

.home-contact__info-head {
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, .15);
}

.home-contact__eyebrow {
  display: block;
  margin-bottom: 14px;

  color: #ff5a12;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .8px;
}

.home-contact__info-head h2 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 25px;
  line-height: 1.4;
  font-weight: 800;
}

.home-contact__info-head p {
  margin: 0;
  color: #d1dce5;
  font-size: 13px;
  line-height: 1.8;
}

/* =========================
   05 — CONTACT ITEMS
========================= */

.home-contact__info-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.home-contact__info-item {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  min-width: 0;
}

.home-contact__info-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(255, 255, 255, .09);
  color: #ff5a12;

  border-radius: 10px;
  font-size: 17px;
}

.home-contact__info-content {
  display: flex;
  flex-direction: column;
  gap: 5px;

  min-width: 0;
  flex: 1;
}

.home-contact__info-content > span {
  color: #d2dfeb;
  font-size: 12px;
  font-weight: 600;
}

.home-contact__info-content a,
.home-contact__info-content p {
  margin: 0;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.8;

  text-decoration: none;
  overflow-wrap: anywhere;
}

.home-contact__info-content a {
  align-self: flex-start;
}

.home-contact__info-content a:hover {
  color: #ff8a4f;
}

/* =========================
   06 — GOOGLE MAP
========================= */

.home-contact__map {
  margin-top: auto;
  padding-top: 32px;
}

.home-contact__map h3 {
  margin: 0 0 16px;

  color: #fff;
  font-size: 18px;
  font-weight: 800;
}

.home-contact__map-frame {
  width: 100%;
  height: 205px;

  border-radius: 12px;
  overflow: hidden;

  background: #fff;
}

.home-contact__map-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.home-contact__map-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  margin-top: 15px;

  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.home-contact__map-link i {
  color: #ff5a12;
}

.home-contact__map-link:hover {
  color: #ff8a4f;
}


/* =============================================================
   07 — RESPONSIVE / TABLET
============================================================= */

@media (max-width: 1000px) {

  .home-contact-section .home-contact {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  /* Form first, contact details below */
  .home-contact-section .home-contact__form {
    order: 1;
    padding: 28px;
  }

  .home-contact-section .home-contact__info {
    order: 2;
  }

  .home-contact__map {
    margin-top: 0;
  }

  .home-contact-section .home-contact__fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* =============================================================
   08 — RESPONSIVE / MOBILE
============================================================= */

@media (max-width: 640px) {

  .home-contact-section {
    padding: 35px 0;
  }

  .home-contact-section .home-contact {
    width: calc(100% - 28px);
    gap: 18px;
  }

  .home-contact-section .home-contact__form {
    padding: 24px 18px;
    border-radius: 13px;
  }

  .home-contact__form-head {
    margin-bottom: 22px;
  }

  .home-contact__form-head h2 {
    font-size: 25px;
  }

  .home-contact-section .home-contact__fields {
    grid-template-columns: minmax(0, 1fr);
    gap: 15px;
  }

  .home-contact-section .form-group--full {
    grid-column: 1;
  }

  .home-contact-section .home-contact__submit {
    width: 100%;
    margin-top: 20px;
  }

  .home-contact-section .home-contact__info {
    padding: 28px 20px;
    border-radius: 13px;
  }

  .home-contact__info-head h2 {
    font-size: 23px;
  }

  .home-contact__info-list {
    gap: 22px;
  }

  .home-contact__info-content a,
  .home-contact__info-content p {
    font-size: 13px;
  }

  .home-contact__map-frame {
    height: 220px;
  }
}

/* =========================
   END — HOME CONTACT
========================= */
