/* ============================================================
   EXPORT PAGES – COMMON STYLES
   Used by: stainless-steel-pipes-middle-east, aluminium-pipes-middle-east
   Load AFTER css/style.css (and global-exports.css if still needed):
   <link rel="stylesheet" href="css/pages/export-pages.css">

   Isolation rules (so it never overlaps style.css):
   - every class is prefixed  .x-
   - every variable is prefixed  --x-   (style.css owns --green, --blue, --dark, --light, --white, --shadow)
   - no bare element selectors, no global * or :root overrides of existing names
   ============================================================ */

/* ===== TOKENS ===== */
:root {
    --x-green: #27AE60;
    --x-blue: #005B96;
    --x-dark: #0a2540;
    --x-light: #f4f6f9;
    --x-hex: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
    --x-cut: polygon(0 0, calc(100% - 30px) 0, 100% 30px, 100% 100%, 30px 100%, 0 calc(100% - 30px));
    --x-metal: linear-gradient(135deg, #0a2540, #005B96 55%, #0c6aa8);
}

/* ===== LAYOUT BASICS ===== */
.x-page { overflow-x: hidden; }
.x-wrap { max-width: 1200px; margin: auto; padding: 0 20px; }
.x-sec { padding: 96px 0; position: relative; }

.x-tag {
    display: inline-block;
    color: var(--x-green);
    font: 700 .8rem Montserrat, sans-serif;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    margin-bottom: 10px;
}
.x-tag::before {
    content: "";
    display: inline-block;
    width: 14px;
    height: 16px;
    background: var(--x-green);
    clip-path: var(--x-hex);
    margin-right: 10px;
    vertical-align: -2px;
}

.x-h2 {
    font: 800 2.3rem/1.2 Montserrat, sans-serif;
    color: var(--x-dark);
    margin-bottom: 40px;
    max-width: 760px;
}
.x-dark .x-h2 { color: #fff; }

/* scroll reveal (uses `translate` so it never fights the tilt `transform`) */
.x-r {
    opacity: 0;
    translate: 0 44px;
    transition: opacity .8s cubic-bezier(.2, .8, .2, 1), translate .8s cubic-bezier(.2, .8, .2, 1);
    transition-delay: calc(var(--i, 0) * 90ms);
}
.x-r.in { opacity: 1; translate: 0 0; }

.x-page [data-tilt],
.x-hero [data-tilt] {
    transition: transform .25s ease-out;
    transform-style: preserve-3d;
    will-change: transform;
}

.x-grid {
    background-image:
        linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
    background-size: 44px 44px;
}

/* ===== HERO ===== */
.x-hero {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    color: #fff;
    overflow: hidden;
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
    background: var(--x-dark);
}
.x-slide {
    position: absolute;
    inset: -40px 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.4s;
    will-change: transform;
}
.x-slide.on { opacity: 1; }
.x-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(120deg, rgba(10, 37, 64, .93), rgba(0, 91, 150, .72) 60%, rgba(10, 37, 64, .88));
}
.x-hero .x-grid {
    position: absolute;
    inset: 0;
    z-index: 1;
    -webkit-mask-image: linear-gradient(90deg, #000, transparent 80%);
    mask-image: linear-gradient(90deg, #000, transparent 80%);
}
.x-hx {
    position: absolute;
    z-index: 1;
    background: linear-gradient(135deg, rgba(39, 174, 96, .55), rgba(0, 91, 150, .1));
    clip-path: var(--x-hex);
    animation: x-float 9s ease-in-out infinite;
}
.x-hx.a { width: 140px; height: 160px; right: 8%; top: 14%; }
.x-hx.b { width: 80px; height: 92px; right: 22%; bottom: 22%; animation-delay: -3s; }
.x-hx.c { width: 200px; height: 230px; right: -40px; bottom: 6%; opacity: .5; animation-delay: -6s; }
@keyframes x-float { 50% { transform: translateY(-26px) rotate(12deg); } }

.x-hero-in { position: relative; z-index: 2; padding: 90px 20px 110px; width: 100%; }
.x-hero .x-banner-title {
    font: 900 3.2rem/1.1 Montserrat, sans-serif;
    margin-bottom: 18px;
    color: #fff;
}
.x-hero .x-banner-title span { color: #4be08a; }
.x-hero p { max-width: 620px; color: rgba(255, 255, 255, .88); margin-bottom: 26px; }

.x-crumb {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    padding: 9px 20px;
    border-radius: 50px;
    font-size: .85rem;
    background: rgba(255, 255, 255, .1);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, .2);
}
.x-crumb a { color: #fff; text-decoration: none; }

.x-dots {
    position: absolute;
    z-index: 3;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}
.x-dots button {
    width: 16px;
    height: 18px;
    border: 0;
    background: rgba(255, 255, 255, .4);
    clip-path: var(--x-hex);
    cursor: pointer;
    transition: .3s;
}
.x-dots button.on { background: var(--x-green); transform: scale(1.4); }

/* ===== INTRO ===== */
.x-intro {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 60px;
    align-items: center;
}
.x-intro p { color: #555; margin-bottom: 16px; }
.x-anchor {
    color: var(--x-blue);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1.5px solid var(--x-green);
}
.x-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 24px; }
.x-facts div {
    font-size: .88rem;
    color: #333;
    padding: 10px 14px 10px 38px;
    position: relative;
    background: var(--x-light);
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
}
.x-facts i { position: absolute; left: 13px; top: 13px; color: var(--x-green); }

.x-hexwrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1.1;
    max-width: 520px;
    margin: auto;
}
.x-hexwrap::before,
.x-hexwrap::after {
    content: "";
    position: absolute;
    inset: 0;
    clip-path: var(--x-hex);
    transition: .5s;
}
.x-hexwrap::before { background: var(--x-metal); transform: translate(22px, 22px); }
.x-hexwrap::after { background: var(--x-green); transform: translate(11px, 11px); opacity: .9; }
.x-hexwrap:hover::before { transform: translate(32px, 32px); }
.x-hexwrap:hover::after { transform: translate(16px, 16px); }
.x-hexwrap img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    clip-path: var(--x-hex);
    z-index: 2;
    transition: transform .7s;
}
.x-hexwrap:hover img { transform: scale(1.06); }

.x-badge {
    position: absolute;
    z-index: 3;
    left: -10px;
    bottom: 12%;
    padding: 14px 20px;
    background: rgba(255, 255, 255, .75);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid #fff;
    box-shadow: 0 14px 40px rgba(0, 40, 70, .2);
    font: 800 1.5rem Montserrat, sans-serif;
    color: var(--x-blue);
    clip-path: var(--x-cut);
}
.x-badge small { display: block; font: 500 .7rem Poppins, sans-serif; color: #555; }

/* ===== BENTO ===== */
.x-metrics { background: var(--x-light); }
.x-bento {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(150px, auto);
    gap: 16px;
    perspective: 1100px;
}
.x-tile {
    position: relative;
    padding: 26px;
    background: #fff;
    clip-path: var(--x-cut);
    overflow: hidden;
    box-shadow: inset 0 0 0 1px #e1e8ef;
}
.x-tile::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), rgba(39, 174, 96, .2), transparent 70%);
    opacity: 0;
    transition: .3s;
}
.x-tile:hover::before { opacity: 1; }
.x-tile h3 {
    font: 700 .78rem Montserrat, sans-serif;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--x-blue);
    margin-bottom: 10px;
    position: relative;
}
.x-tile p { font-size: .92rem; color: #444; margin: 0; position: relative; }
.x-tile.big {
    grid-column: span 2;
    grid-row: span 2;
    background: var(--x-metal);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.x-tile.big h3 { color: #8ff0b6; }
.x-tile.big p { color: #e6f1f8; }
.x-tile.big .n { font: 900 5rem/1 Montserrat, sans-serif; position: relative; }
.x-tile.w2 { grid-column: span 2; }
.x-tile i.bg { position: absolute; right: 16px; bottom: 8px; font-size: 3.4rem; color: rgba(0, 91, 150, .07); }

/* ===== COVERFLOW ===== */
.x-cf { position: relative; height: 400px; perspective: 1300px; }
.x-card {
    position: absolute;
    left: 50%;
    top: 0;
    width: min(493px, 87%);
    height: 360px;
    margin-left: calc(min(493px, 87%) / -2); /* fixed: now matches width so the card is truly centred */
    padding: 34px 30px;
    background: linear-gradient(160deg, #fff, #e9f0f6);
    clip-path: var(--x-cut);
    box-shadow: inset 0 0 0 1px #d5e0ea;
    transition: transform .7s cubic-bezier(.2, .8, .2, 1), opacity .5s, filter .5s;
    cursor: pointer;
}
.x-card h3 { font: 800 1.7rem Montserrat, sans-serif; color: var(--x-dark); margin: 16px 0 14px; }
.x-card p { font-size: .92rem; color: #555; line-height: 1.7; }
.x-pent {
    display: inline-block;
    padding: 20px 22px 24px;
    background: var(--x-blue);
    color: #fff;
    font: 700 .75rem Montserrat, sans-serif;
    clip-path: polygon(50% 0, 100% 38%, 82% 100%, 18% 100%, 0 38%);
    text-align: center;
}
.x-cfnav { display: flex; gap: 12px; justify-content: center; margin-top: 10px; }
.x-cfnav button {
    width: 48px;
    height: 54px;
    border: 0;
    background: var(--x-blue);
    color: #fff;
    clip-path: var(--x-hex);
    cursor: pointer;
    transition: .3s;
}
.x-cfnav button:hover { background: var(--x-green); transform: scale(1.12); }

/* ===== EXPANDABLE PANELS ===== */
.x-types { background: var(--x-light); }
.x-pan { display: flex; gap: 14px; height: 480px; }
.x-p {
    flex: 1;
    position: relative;
    overflow: hidden;
    background-size: cover;
    transition: flex .7s cubic-bezier(.2, .8, .2, 1);
    outline-offset: 4px;
    cursor: pointer;
}
.x-p:nth-child(1) { background-position: left; clip-path: polygon(0 0, 100% 0, calc(100% - 44px) 100%, 0 100%); }
.x-p:nth-child(2) { background-position: right; clip-path: polygon(44px 0, 100% 0, 100% 100%, 0 100%); }
.x-p::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 37, 64, .92), rgba(10, 37, 64, .15) 70%);
}
.x-p:hover,
.x-p:focus { flex: 2.4; }
.x-p div { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 44px; color: #fff; }
.x-p h3 { font: 800 1.3rem Montserrat, sans-serif; margin-bottom: 8px; }
.x-p p { font-size: .9rem; color: #e0ecf4; margin: 0; }
.x-p.w::after,
.x-p.s::after { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px; }
.x-p.w::after { background: var(--x-green); }
.x-p.s::after { background: #4aa8e0; }

/* ===== STANDARDS ===== */
.x-std { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.x-std > div { padding: 40px; position: relative; }
.x-std > div:first-child {
    background: var(--x-metal);
    color: #fff;
    clip-path: var(--x-cut);
    z-index: 1;
    margin-right: -30px;
}
.x-std > div:last-child {
    background: #fff;
    margin-top: 50px;
    clip-path: var(--x-cut);
    box-shadow: inset 0 0 0 2px var(--x-green);
    padding-left: 70px;
}
.x-std h4 { font: 800 1.2rem Montserrat, sans-serif; margin-bottom: 12px; }
.x-std p { font-size: .93rem; margin: 0; line-height: 1.8; }
.x-std > div:last-child p { color: #555; }
.x-std > div:last-child h4 { color: var(--x-blue); }

/* ===== TABLES ===== */
.x-tw {
    overflow-x: auto;
    background: rgba(255, 255, 255, .8);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 50px rgba(0, 60, 100, .1);
    clip-path: var(--x-cut);
}
.x-t { width: 100%; border-collapse: collapse; min-width: 640px; }
.x-t th {
    background: var(--x-metal);
    color: #fff;
    font: 700 .88rem Montserrat, sans-serif;
    padding: 16px 22px;
    text-align: left;
}
.x-t td {
    padding: 14px 22px;
    border-bottom: 1px solid #e4ebf1;
    font-size: .9rem;
    color: #444;
    vertical-align: top;
    transition: background .3s;
}
.x-t td:first-child { font-weight: 600; color: var(--x-dark); }
.x-t tr:hover td { background: rgba(39, 174, 96, .07); }
.x-note { margin-top: 22px; font-size: .93rem; color: #555; }

/* ===== APPLICATIONS ===== */
.x-apps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; position: relative; }
.x-apps svg { position: absolute; left: 0; top: 60px; width: 100%; height: 30px; z-index: 0; }
.x-apps path {
    stroke: var(--x-green);
    stroke-width: 2;
    fill: none;
    stroke-dasharray: 8 8;
    animation: x-dash 14s linear infinite;
}
@keyframes x-dash { to { stroke-dashoffset: -400; } }
.x-app { position: relative; z-index: 1; text-align: center; }
.x-app:nth-child(3) { margin-top: 36px; } /* 3rd child because the svg is child #1 */
.x-hi {
    width: 110px;
    height: 126px;
    margin: 0 auto 20px;
    background: var(--x-metal);
    clip-path: var(--x-hex);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
    transition: .5s;
}
.x-app:hover .x-hi { background: var(--x-green); transform: rotateY(180deg) scale(1.08); }
.x-app:hover .x-hi i { transform: rotateY(180deg); }
.x-app h4 { font: 700 1.05rem Montserrat, sans-serif; color: var(--x-dark); margin-bottom: 8px; }
.x-app p { font-size: .9rem; color: #555; }

/* ===== TESTING (DARK) ===== */
.x-dark {
    background: linear-gradient(135deg, #071a30, #0a3d62 60%, #005B96);
    color: #fff;
    overflow: hidden;
}
.x-dark .x-grid { position: absolute; inset: 0; opacity: .7; }
.x-test { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; position: relative; }
.x-tc { position: relative; overflow: hidden; padding: 2px; clip-path: var(--x-cut); }
.x-tc::before {
    content: "";
    position: absolute;
    inset: -100%;
    background: conic-gradient(from 0deg, transparent 70%, var(--x-green), transparent);
    animation: x-spin 6s linear infinite;
}
@keyframes x-spin { to { transform: rotate(360deg); } }
.x-tc div {
    position: relative;
    background: rgba(7, 26, 48, .9);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    padding: 28px;
    height: 100%;
    clip-path: var(--x-cut);
}
.x-tc h4 {
    font: 700 1.02rem Montserrat, sans-serif;
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 10px;
}
.x-tc h4 i { color: var(--x-green); }
.x-tc p { font-size: .9rem; color: #cfe0ee; margin: 0; }

/* ===== DRAG RAIL (PACKAGING) ===== */
.x-rail {
    display: flex;
    gap: 22px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 10px 0 30px;
    cursor: grab;
    scrollbar-color: var(--x-green) #e4ebf1;
}
.x-rail.drag { cursor: grabbing; scroll-snap-type: none; }
.x-pk {
    flex: 0 0 310px;
    scroll-snap-align: start;
    padding: 34px 28px;
    background: linear-gradient(160deg, #fff, #eaf1f7);
    clip-path: var(--x-cut);
    box-shadow: inset 0 0 0 1px #d8e2eb;
    transition: transform .4s;
    user-select: none;
}
.x-pk:hover { transform: translateY(-10px); }
.x-pk .x-hi { width: 64px; height: 73px; margin: 0 0 20px; font-size: 1.3rem; }
.x-pk:hover .x-hi { transform: none; background: var(--x-green); }
.x-pk h4 { font: 700 1.05rem Montserrat, sans-serif; color: var(--x-dark); margin-bottom: 8px; }
.x-pk p { font-size: .88rem; color: #555; margin: 0; }

/* ===== FAQ ===== */
.x-faq { max-width: 820px; margin: auto; }
.x-faq details {
    margin-bottom: 12px;
    background: #fff;
    clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%);
    box-shadow: inset 0 0 0 1px #dde6ee;
    transition: .3s;
}
.x-faq details[open] { background: var(--x-light); box-shadow: inset 4px 0 0 var(--x-green); }
.x-faq summary {
    list-style: none;
    cursor: pointer;
    padding: 18px 24px;
    font: 700 1rem Montserrat, sans-serif;
    color: var(--x-dark);
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
}
.x-faq summary::-webkit-details-marker { display: none; }
.x-faq summary i { color: var(--x-blue); transition: transform .3s; }
.x-faq details[open] summary i { transform: rotate(180deg); }
.x-faq details p { padding: 0 24px 20px; margin: 0; color: #555; font-size: .94rem; }

/* ===== FINAL CTA ===== */
.x-cta {
    position: relative;
    padding: 90px 30px;
    text-align: center;
    color: #fff;
    background: var(--x-metal);
    clip-path: polygon(0 0, calc(100% - 60px) 0, 100% 60px, 100% 100%, 60px 100%, 0 calc(100% - 60px));
    overflow: hidden;
}
.x-cta .x-h2 { color: #fff; margin: 10px 0 14px; max-width: none; position: relative; }
.x-cta p { max-width: 560px; margin: 0 auto 26px; color: rgba(255, 255, 255, .85); position: relative; }
.x-cta .hx {
    position: absolute;
    clip-path: var(--x-hex);
    background: rgba(255, 255, 255, .07);
    animation: x-float 10s ease-in-out infinite;
}
.x-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; position: relative; }
.x-cta [data-mag] { transition: transform .25s ease-out; }

/* ===== FOCUS (scoped – no longer global) ===== */
.x-hero :focus-visible,
.x-page :focus-visible {
    outline: 3px solid var(--x-green);
    outline-offset: 3px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .x-intro,
    .x-std,
    .x-test { grid-template-columns: 1fr; }
    .x-bento { grid-template-columns: repeat(2, 1fr); }
    .x-std > div:first-child { margin-right: 0; }
    .x-std > div:last-child { margin-top: -20px; padding-left: 40px; }
    .x-apps { grid-template-columns: 1fr; }
    .x-apps svg { display: none; }
    .x-app:nth-child(3) { margin-top: 0; }
}

@media (max-width: 768px) {
    .x-sec { padding: 66px 0; }
    .x-hero .x-banner-title { font-size: 2.1rem; }
    .x-h2 { font-size: 1.65rem; }
    .x-pan { flex-direction: column; height: auto; }
    .x-p { min-height: 230px; }
    .x-p:hover,
    .x-p:focus { flex: 1; }
    .x-p:nth-child(n) { clip-path: none; }
    .x-facts { grid-template-columns: 1fr; }
    .x-bento { grid-template-columns: 1fr; }
    .x-tile.big,
    .x-tile.w2 { grid-column: auto; grid-row: auto; }
    .x-cf { height: 420px; }
    .x-badge { left: 0; }
}

/* ===== REDUCED MOTION (scoped – no longer a global * rule) ===== */
@media (prefers-reduced-motion: reduce) {
    .x-hero *, .x-hero::before,
    .x-page *, .x-page *::before, .x-page *::after {
        animation: none !important;
        transition: none !important;
    }
    .x-r { opacity: 1; translate: none; }
}
/*==============mobile==============*/
@media (max-width: 768px) {
    .x-sec { padding: 66px 0; }
    .x-hero .x-banner-title { font-size: 2.1rem; }
    .x-h2 { font-size: 1.65rem; }

    .x-pan {
        display: grid;
        grid-template-columns: 1fr;
        gap: 16px;
        height: auto;
        flex-direction: unset;
    }

    .x-p {
        min-height: 260px;
        flex: none;
        width: 100%;
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        clip-path: none;
        border-radius: 18px;
        overflow: hidden;
    }

    .x-p:nth-child(1),
    .x-p:nth-child(2) {
        clip-path: none;
        background-position: center;
    }

    .x-p:hover,
    .x-p:focus {
        flex: none;
        transform: none;
    }

    .x-p div {
        padding: 18px 20px 22px;
    }

    .x-p h3 {
        font-size: 1.05rem;
    }

    .x-p p {
        font-size: .82rem;
        line-height: 1.5;
    }

    .x-facts { grid-template-columns: 1fr; }
    .x-bento { grid-template-columns: 1fr; }
    .x-tile.big,
    .x-tile.w2 { grid-column: auto; grid-row: auto; }
    .x-cf { height: 420px; }
    .x-badge { left: 0; }
}







