/* ═══════════════════════════════════════════════════════════
   HOME PAGE — Dedicated Styles
   Clean, professional, advanced layout
   ═══════════════════════════════════════════════════════════ */

/* ── Pre-hero factory image ─────────────────────────────── */


.pre-hero-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    display: block;
}

/* ── Stats Bar ──────────────────────────────────────────── */
.stats-bar {
    background: var(--black);
    padding: 0;
    border-bottom: 1px solid #1a1a1a;
}

.stats-bar-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.stats-bar-item {
    text-align: center;
    padding: 28px 20px;
    border-right: 1px solid #1e1e1e;
    transition: background 0.3s ease;
}

.stats-bar-item:last-child { border-right: none; }

.stats-bar-item:hover { background: rgba(248,122,7,0.06); }

.stats-bar-num {
    display: block;
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--orange);
    line-height: 1;
    margin-bottom: 6px;
}

.stats-bar-label {
    display: block;
    font-size: 0.78rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.5);
}

/* ── Generic section wrapper ────────────────────────────── */
.hw-section {
    padding: 96px 0;
}

/* ── About: Left image / Right content ─────────────────── */
.hw-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 56px;
    align-items: center;
}

.hw-content,
.hw-img {
    min-width: 0; /* prevents grid blow-out from long content */
}

.hw-img {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0,0,0,0.13);
    transition: transform 0.5s cubic-bezier(0.25,0.46,0.45,0.94),
                box-shadow 0.5s ease;
}

.hw-img:hover {
    transform: perspective(900px) rotateY(2deg) rotateX(-1deg) translateY(-6px);
    box-shadow: 0 40px 80px rgba(0,0,0,0.18), 0 0 0 1px rgba(248,122,7,0.12);
}

.hw-img img {
    width: 100%;
    height: 460px;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.hw-img:hover img { transform: scale(1.03); }

.hw-badge {
    position: absolute;
    bottom: -1px;
    left: -1px;
    background: var(--orange);
    color: white;
    padding: 20px 24px;
    border-radius: 0 14px 0 0;
    text-align: center;
}

.hw-badge-num {
    font-family: var(--font-heading);
    font-size: 2.4rem;
    font-weight: 900;
    line-height: 1;
}

.hw-badge-txt {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
    opacity: 0.9;
}

.hw-content h2 {
    margin-bottom: 18px;
    line-height: 1.2;
}

.hw-content p {
    color: var(--text-muted);
    line-height: 1.85;
    margin-bottom: 14px;
    font-size: 0.97rem;
}

.hw-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 24px 0 0;
}

.hw-feat {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

.hw-feat i { color: var(--orange); font-size: 0.95rem; }

/* ── Products grid ──────────────────────────────────────── */
.hp-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.hp-card {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.4s cubic-bezier(0.25,0.46,0.45,0.94),
                box-shadow 0.4s ease,
                border-color 0.3s ease;
    will-change: transform;
}

.hp-card:hover {
    transform: translateY(-8px) perspective(600px) rotateX(1.5deg);
    box-shadow: 0 24px 56px rgba(0,0,0,0.12), 0 0 0 1px rgba(248,122,7,0.10);
    border-color: rgba(248,122,7,0.25);
}

.hp-img {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f4f4f4;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hp-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;  /* default: contain for white-bg PNGs */
    padding: 12px;
    transition: transform 0.5s ease;
    display: block;
}

/* JPG gallery images should cover */
.hp-img img[style*="cover"] {
    object-fit: cover;
    padding: 0;
}

.hp-card:hover .hp-img img { transform: scale(1.06); }

.hp-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    text-align: left;
}

.hp-body h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--black);
    line-height: 1.3;
    transition: color 0.3s;
    min-height: 2.6em; /* allow up to 2 lines, equal across cards */
    display: flex;
    align-items: flex-start;
}

.hp-card:hover .hp-body h3 { color: var(--orange); }

.hp-body p {
    font-size: 0.87rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 16px;
    flex: 1;
}

.hp-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.87rem;
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--orange);
    text-decoration: none;
    transition: gap 0.3s ease;
    margin-top: auto;
}

.hp-link:hover { gap: 10px; }

.hp-link i { font-size: 0.72rem; transition: transform 0.3s; }
.hp-link:hover i { transform: translateX(3px); }

/* ── Why Choose Us ──────────────────────────────────────── */
.why-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.why-card {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 36px 28px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: transform 0.4s cubic-bezier(0.25,0.46,0.45,0.94),
                box-shadow 0.4s ease, background 0.3s;
    text-align: left;
}

.why-card::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--orange), #FA9A3F);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.why-card:hover::before { transform: scaleX(1); }

.why-card:hover {
    transform: translateY(-6px) perspective(600px) rotateX(1deg);
    box-shadow: 0 20px 48px rgba(0,0,0,0.10);
    background: white;
}

.why-icon {
    width: 52px;
    height: 52px;
    background: rgba(248,122,7,0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    transition: background 0.3s, transform 0.3s;
}

.why-icon i { font-size: 1.3rem; color: var(--orange); }
.why-card:hover .why-icon { background: var(--orange); transform: scale(1.08); }
.why-card:hover .why-icon i { color: white; }

.why-num {
    position: absolute;
    top: 20px;
    right: 22px;
    font-family: var(--font-heading);
    font-size: 3.2rem;
    font-weight: 900;
    color: rgba(0,0,0,0.04);
    line-height: 1;
}

.why-card h3 { font-size: 1.05rem; margin-bottom: 10px; }
.why-card p { font-size: 0.9rem; color: var(--text-light); line-height: 1.65; margin: 0; }

/* ── Industries ─────────────────────────────────────────── */
.ind-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.ind-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 28px 20px;
    text-align: center;
    transition: transform 0.4s cubic-bezier(0.25,0.46,0.45,0.94),
                border-color 0.3s, background 0.3s, box-shadow 0.4s;
}

.ind-card:hover {
    transform: translateY(-6px) perspective(600px) rotateX(1.5deg);
    border-color: var(--orange);
    background: rgba(248,122,7,0.08);
    box-shadow: 0 16px 40px rgba(248,122,7,0.15);
}

.ind-card i {
    font-size: 2rem;
    color: var(--orange);
    margin-bottom: 14px;
    display: block;
    transition: transform 0.4s ease;
}

.ind-card:hover i { transform: scale(1.15) rotateY(10deg); }
.ind-card h4 { color: white; font-size: 0.92rem; font-weight: 600; }

/* ── Gallery Preview ─────────────────────────────────────── */
.gp-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: 240px 240px;
    gap: 12px;
}

.gp-large {
    grid-column: span 2;
    grid-row: span 2;
}

.gp-item {
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.gp-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.25,0.46,0.45,0.94);
}

.gp-item:hover img { transform: scale(1.08); }

.gp-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.35));
    opacity: 0;
    transition: opacity 0.4s;
}

.gp-item:hover::after { opacity: 1; }

/* ── UAE Coverage ────────────────────────────────────────── */
.uae-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    max-width: 1000px;
    margin: 0 auto;
}

.uae-item {
    background: white;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    padding: 22px 18px;
    text-align: center;
    transition: transform 0.35s cubic-bezier(0.25,0.46,0.45,0.94),
                box-shadow 0.35s ease, border-color 0.3s;
}

.uae-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(248,122,7,0.12);
    border-color: var(--orange);
}

.uae-item i {
    color: var(--orange);
    font-size: 1.3rem;
    margin-bottom: 10px;
    display: block;
}

.uae-item h4 { font-size: 0.97rem; margin-bottom: 5px; color: var(--black); }
.uae-item p { font-size: 0.8rem; color: var(--text-light); margin: 0; line-height: 1.4; }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */

/* ── Hero: force proper fullscreen single-slide view ── */
.hero {
    position: relative !important;
    height: 100vh !important;
    min-height: 620px !important;
    max-height: 1000px !important;
    overflow: hidden !important;
    display: block !important;
}

/* All slides must be absolutely positioned — never stacked vertically */
.hero-slide {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    opacity: 0 !important;
    transform: translateX(100%) !important;
    transition: opacity 0.9s cubic-bezier(0.77,0,0.175,1),
                transform 0.9s cubic-bezier(0.77,0,0.175,1) !important;
    will-change: transform, opacity;
    pointer-events: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.hero-slide.active {
    opacity: 1 !important;
    transform: translateX(0) !important;
    pointer-events: auto !important;
    z-index: 2 !important;
}

.hero-slide.slide-out {
    opacity: 0 !important;
    transform: translateX(-80px) !important;
    z-index: 1 !important;
    pointer-events: none !important;
}

.hero-slide.slide-from-left {
    transform: translateX(-100%) !important;
}

/* ── UAE location cards — clickable ── */
a.uae-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    display: block;
    position: relative;
}

a.uae-link:hover {
    border-color: var(--orange);
    transform: translateY(-5px);
    box-shadow: 0 14px 36px rgba(248,122,7,0.18);
}

a.uae-link:hover i.fa-map-marker-alt { transform: scale(1.2) rotate(-5deg); }

.uae-cta {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--orange);
    letter-spacing: 0.5px;
    margin-top: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

a.uae-link:hover .uae-cta { opacity: 1; }

a.uae-link .fa-map-marker-alt { transition: transform 0.3s ease; }

/* ── Hero Slide 1 — override max-width for tighter text ── */
.hero-slide.active .hero-text[style] h1 { text-align: left; }

/* =============================================================
   RESPONSIVE OVERRIDES — Loaded after responsive.css
   These restore proper mobile/tablet behavior for home.css grids
   ============================================================= */

/* ── Large desktop ── */
@media (max-width: 1200px) {
    .hw-grid { gap: 44px; }
    .uae-grid { max-width: 100%; }
}

/* ── Tablet landscape (1024px and below) ── */
@media (max-width: 1024px) {
    .hw-section { padding: 72px 0; }
    .hw-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .hw-img img { height: 380px; }
    .hp-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
    .why-grid { grid-template-columns: repeat(2, 1fr); }
    .ind-grid { grid-template-columns: repeat(3, 1fr); }
    .uae-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; }
    .gp-grid { grid-template-rows: 200px 200px; }
}

/* ── Tablet portrait (900px and below) ── */
@media (max-width: 900px) {
    .hp-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
    .uae-grid { grid-template-columns: repeat(3, 1fr); }
    .hw-img img { height: 340px; }
    .stats-bar-grid { grid-template-columns: repeat(4, 1fr); }
    .stats-bar-num { font-size: 1.9rem; }
}

/* ── Mobile (768px and below) ── */
@media (max-width: 768px) {
    .hw-section { padding: 52px 0 !important; }

    /* About */
    .hw-grid {
        grid-template-columns: 1fr !important;
        gap: 32px !important;
    }
    .hw-img { position: static !important; }
    .hw-img img { height: 260px !important; width: 100% !important; object-fit: cover !important; }
    .hw-badge {
        position: static !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 12px !important;
        padding: 12px 18px !important;
        border-radius: 8px !important;
        margin-top: 14px !important;
    }
    .hw-badge-num { font-size: 1.8rem !important; }
    .hw-badge-txt { font-size: 0.7rem !important; margin-top: 0 !important; text-align: left !important; }
    .hw-features { grid-template-columns: 1fr !important; gap: 10px !important; }
    .hw-content h2 { font-size: clamp(1.5rem, 5.5vw, 2rem) !important; line-height: 1.2 !important; }

    /* Products grid */
    .hp-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 14px !important; }
    .hp-img { height: 170px !important; }
    .hp-body { padding: 14px !important; }
    .hp-body h3 { font-size: 0.92rem !important; min-height: 2.5em !important; }
    .hp-body p { font-size: 0.82rem !important; margin-bottom: 12px !important; }
    .hp-link { font-size: 0.82rem !important; }

    /* Why Choose */
    .why-grid { grid-template-columns: 1fr !important; gap: 14px !important; }
    .why-card { padding: 24px 20px !important; }
    .why-num { font-size: 2.4rem !important; }

    /* Industries */
    .ind-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; }
    .ind-card { padding: 22px 14px !important; }
    .ind-card i { font-size: 1.7rem !important; }
    .ind-card h4 { font-size: 0.85rem !important; }

    /* Gallery preview */
    .gp-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        grid-template-rows: auto !important;
        gap: 10px !important;
    }
    .gp-large { grid-column: span 2 !important; height: 200px !important; }
    .gp-item { height: 140px !important; }

    /* UAE coverage */
    .uae-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
    .uae-item { padding: 18px 14px !important; }
    .uae-item h4 { font-size: 0.92rem !important; }
    .uae-item p { font-size: 0.75rem !important; }

    /* Stats bar */
    .stats-bar-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .stats-bar-item {
        padding: 18px 10px !important;
        border-right: none !important;
        border-bottom: 1px solid #1e1e1e !important;
    }
    .stats-bar-item:nth-child(odd) { border-right: 1px solid #1e1e1e !important; }
    .stats-bar-num { font-size: 1.6rem !important; }
    .stats-bar-label { font-size: 0.7rem !important; letter-spacing: 1.2px !important; }
}

/* ── Small phones (480px and below) ── */
@media (max-width: 480px) {
    .hw-section { padding: 42px 0 !important; }

    /* Products grid → 1 column for clarity */
    .hp-grid { grid-template-columns: 1fr !important; gap: 14px !important; }
    .hp-img { height: 200px !important; }
    .hp-body h3 { min-height: 0 !important; font-size: 0.98rem !important; }
    .hp-body p { font-size: 0.86rem !important; }

    /* About */
    .hw-img img { height: 220px !important; }
    .hw-content h2 { font-size: 1.45rem !important; }

    /* UAE coverage stays 2 columns for compactness */
    .uae-grid { gap: 10px !important; }
    .uae-item { padding: 16px 12px !important; }
    .uae-item h4 { font-size: 0.88rem !important; }
    .uae-item p { font-size: 0.72rem !important; }
    .uae-item i { font-size: 1.15rem !important; }

    /* Gallery */
    .gp-large { height: 170px !important; }
    .gp-item { height: 125px !important; }

    /* Industries → could go to 1 col on very small? keep 2 for compactness */
    .ind-card { padding: 18px 10px !important; }
    .ind-card i { font-size: 1.4rem !important; }
    .ind-card h4 { font-size: 0.78rem !important; }

    /* Stats */
    .stats-bar-num { font-size: 1.4rem !important; }
    .stats-bar-label { font-size: 0.62rem !important; }
}

/* ── Very small phones (360px and below) ── */
@media (max-width: 360px) {
    .hw-content h2 { font-size: 1.35rem !important; }
    .hp-img { height: 180px !important; }
    .stats-bar-num { font-size: 1.25rem !important; }
}
