/* =========================================================
   Tradex - About Company
   Premium automotive/export section. All classes prefixed
   with .tradex-about-* to avoid conflicts with WP themes.
   ========================================================= */

.tradex-about-section {
    --tradex-bg: #f5f5f5;
    --tradex-card-radius: 12px;
    --tradex-container-radius: 24px;
    --tradex-dark-1: #1a1a1a;
    --tradex-dark-2: #2a2a2a;
    --tradex-dark-3: #111111;
    --tradex-text-light: #ffffff;
    --tradex-text-muted: #e3e3e3;
    --tradex-text-body: #5e5e5e;
    --tradex-text-hover-title: #111111;
    --tradex-text-hover-desc: #6b6b6b;
    --tradex-accent: #ff3b30;
    --tradex-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --tradex-shadow-soft: none;
    --tradex-shadow-hover: 0 24px 56px -28px rgba(0, 0, 0, 0.35);

    box-sizing: border-box;
    width: 100%;
    padding: 24px 32px;
    font-family: "Montserrat", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--tradex-dark-3);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.tradex-about-section *,
.tradex-about-section *::before,
.tradex-about-section *::after {
    box-sizing: border-box;
}

.tradex-about-inner {
    width: 100%;
    max-width: none;
    height: auto;
    margin: 0 auto;
    background: var(--tradex-bg);
    border-radius: var(--tradex-container-radius);
    padding: 40px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 48px;
    box-shadow: none;
}

/* ---------- HEADER ---------- */
.tradex-about-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 1257px;
}

.tradex-about-badge {
    display: inline-flex;
    align-items: center;
    align-self: center;
    ;
    background: #000;
    color: #fff;
    padding: 11px 18px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.02em;
    line-height: 1;
}

.tradex-about-title {
    margin: 0;
    font-family: "Montserrat", sans-serif;
    width: auto;
    min-height: 0;
    font-size: 36px;
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: 0;
    color: #252525;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35em;
    text-align: center;
}

.tradex-about-title-dark {
    color: #252525;
}

.tradex-about-title-accent {
    color: #ff2b2b;
}

.tradex-about-description {
    margin: 0;
    font-family: "Montserrat", sans-serif;
    color: #3f3f3f;
    font-size: 12px;
    line-height: 1.8;
    font-weight: 500;
    letter-spacing: 0;
    max-width: 1257px;
    text-align: center;
}

/* ---------- GRID ---------- */
.tradex-about-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, 340px);
    gap: 40px;
    width: 100%;
    max-width: 1100px;
    justify-content: center;
}

/* 2-column layout: left = Vehicle Export + Cargo Ship, right = Spare Parts image + Spare Parts text */
.tradex-about-card--a {
    grid-column: 1;
    grid-row: 1;
}

/* Vehicle Export (text) */
.tradex-about-card--d {
    grid-column: 1;
    grid-row: 2;
}

/* Cargo ship image */
.tradex-about-card--f {
    grid-column: 2;
    grid-row: 1;
}

/* Spare parts image */
.tradex-about-card--c {
    grid-column: 2;
    grid-row: 2;
}

/* Spare Parts (text) */

.tradex-about-slide {
    display: contents;
}


/* ---------- CARD BASE ---------- */
.tradex-about-card {
    position: relative;
    border-radius: var(--tradex-card-radius);
    overflow: hidden;
    min-width: 0;
    box-shadow: var(--tradex-shadow-soft);
    transform: translateY(0) scale(1);
    transition:
        transform 0.6s var(--tradex-ease),
        box-shadow 0.6s var(--tradex-ease);
    will-change: transform;
}

.tradex-about-card:hover {
    transform: none;
    box-shadow: none;
}

.tradex-about-card--text:hover {
    transform: translateY(-10px) scale(1.005);
    z-index: 1;
    box-shadow:
        0 36px 96px -24px rgba(0, 0, 0, 0.48),
        0 0 28px rgba(255, 59, 48, 0.14);
}

/* ---------- TEXT CARDS (flip) ---------- */
.tradex-about-card--text {
    background: transparent;
}

.tradex-about-flip {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.65s var(--tradex-ease);
    will-change: transform;
}

.tradex-about-card--text:hover .tradex-about-flip {
    transform: scale(1.02);
}

.tradex-about-flip-face {
    position: absolute;
    inset: 0;
    border-radius: var(--tradex-card-radius);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    display: flex;
    overflow: hidden;
}

.tradex-about-flip-front {
    background:
        radial-gradient(60.77% 107.76% at 49.75% 150.53%, rgba(169, 169, 169, 0.2) 0%, rgba(84, 84, 84, 0.2) 100%),
        #545454;
    -webkit-backdrop-filter: blur(200px);
    backdrop-filter: blur(200px);
    color: var(--tradex-text-light);
    border: 1px solid transparent;
    transition:
        background 0.55s var(--tradex-ease),
        color 0.55s var(--tradex-ease),
        border-color 0.55s var(--tradex-ease),
        box-shadow 0.55s var(--tradex-ease);
}

.tradex-about-card--accent .tradex-about-flip-front {
    background:
        radial-gradient(60.77% 107.76% at 49.75% 150.53%, rgba(129, 129, 129, 0.2) 0%, rgba(195, 195, 195, 0.00002) 100%),
        #111111;
    -webkit-backdrop-filter: blur(200px);
    backdrop-filter: blur(200px);
}

.tradex-about-card--text:hover .tradex-about-flip-front {
    background:
        radial-gradient(130% 130% at 0% 0%, rgba(255, 59, 48, 0.16), transparent 46%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.28)),
        #151515;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.04),
        0 20px 60px rgba(0, 0, 0, 0.24),
        0 0 28px rgba(255, 59, 48, 0.10);
}

.tradex-about-flip-back {
    transform: rotateY(180deg);
    background:
        radial-gradient(120% 120% at 0% 0%, rgba(0, 0, 0, 0.02), transparent 58%),
        #ffffff;
    color: var(--tradex-text-hover-title);
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.7),
        0 0 30px rgba(255, 255, 255, 0.22);
}

.tradex-about-flip-back .tradex-about-card-body {
    padding: 40px;
    gap: 24px;
    justify-content: flex-start;
}

.tradex-about-card-grid-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
    background-size: 24px 24px;
    mask-image: linear-gradient(180deg, transparent 0%, transparent 36%, #000 72%, #000 100%);
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, transparent 36%, #000 72%, #000 100%);
    opacity: 0.72;
    transition: opacity 0.45s var(--tradex-ease);
}

.tradex-about-card--text:hover .tradex-about-card-grid-overlay {
    opacity: 0.28;
}

.tradex-about-card-body {
    position: relative;
    z-index: 1;
    padding: clamp(34px, 7.5%, 44px);
    display: flex;
    flex-direction: column;
    gap: 24px;
    justify-content: flex-start;
    width: 100%;
}

.tradex-about-card-title {
    margin: 0;
    font-family: "Montserrat", sans-serif;
    font-size: 24px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0;
    color: #ffffff;
    transition: color 0.45s var(--tradex-ease);
}

.tradex-about-card-title--red {
    color: #F00000;
    font-size: 24px;
    line-height: 1.08;
}

.tradex-about-card--c .tradex-about-card-title {
    max-width: 100%;
    line-height: 1.08;
}

.tradex-about-card-desc {
    margin: 0;
    font-family: "Montserrat", sans-serif;
    font-size: 14px;
    line-height: 1.6;
    font-weight: 400;
    letter-spacing: 0;
    color: #E3E3E3;
    max-width: 100%;
    transition: color 0.45s var(--tradex-ease);
}

.tradex-about-card--text:hover .tradex-about-flip-front .tradex-about-card-title {
    color: #F00000;
}

.tradex-about-card--text:hover .tradex-about-flip-front .tradex-about-card-title--red {
    color: #F00000;
}

.tradex-about-card--text:hover .tradex-about-flip-front .tradex-about-card-desc {
    color: #f1f1f1;
}



.tradex-about-flip-back .tradex-about-card-desc {
    color: #6a6a6a;
}

.tradex-about-flip-back .tradex-about-card-title {
    color: #333333;
}

.tradex-about-flip-back .tradex-about-card-title--red {
    color: #F00000;
}

/* ---------- IMAGE CARDS ---------- */
.tradex-about-card--image {
    background: #0d0d0d;
    border-radius: 24px;
}

.tradex-about-card--image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.001);
    transition: transform 0.8s var(--tradex-ease), filter 0.6s var(--tradex-ease);
}

.tradex-about-image-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.25) 100%);
    opacity: 0.85;
    transition: opacity 0.6s var(--tradex-ease);
}

.tradex-about-card--image:hover img {
    transform: scale(1.06);
    filter: saturate(1.05) contrast(1.03);
}

.tradex-about-card--image:hover .tradex-about-image-overlay {
    opacity: 1;
    background:
        radial-gradient(80% 60% at 50% 100%, rgba(255, 59, 48, 0.18), transparent 70%),
        linear-gradient(180deg, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.35) 100%);
}

/* ---------- REVEAL ANIMATION ---------- */
[data-tradex-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition:
        opacity 0.9s var(--tradex-ease),
        transform 0.9s var(--tradex-ease);
}

[data-tradex-reveal].tradex-is-visible {
    opacity: 1;
    transform: translateY(0);
}

[data-tradex-reveal].tradex-is-visible.tradex-about-card--text:hover {
    transform: translateY(-10px);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
    .tradex-about-inner {
        padding: 36px;
    }

    .tradex-about-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, 220px);
        grid-auto-rows: 220px;
        gap: 32px;
    }

    .tradex-about-card--a {
        grid-column: 1;
        grid-row: 1;
    }

    .tradex-about-card--d {
        grid-column: 1;
        grid-row: 2;
    }

    .tradex-about-card--f {
        grid-column: 2;
        grid-row: 1;
    }

    .tradex-about-card--c {
        grid-column: 2;
        grid-row: 2;
    }
}

@media (min-width: 641px) and (max-width: 1180px),
(min-width: 1024px) and (max-width: 1366px) and (pointer: coarse) {
    .tradex-about-card-body {
        padding: 15px;
        gap: 5px;
    }

    .tradex-about-card-desc {
        font-size: 11px;
    }
}

@media (max-width: 640px) {
    .tradex-about-section {
        padding: 24px 12px;
    }

    .tradex-about-inner {
        height: auto;
        min-height: 0;
        padding: 24px;
        background: var(--tradex-bg);
        border-radius: 24px;
        gap: 24px;
    }

    .tradex-about-title {
        width: auto;
        min-height: 0;
        font-size: 34px;
    }

    .tradex-about-description {
        font-size: 14px;
    }

    /* Mobile slider: 2 swipeable slides, each slide is a real wrapper
       containing the same vertical pair as a desktop column. */
    .tradex-about-grid {
        display: flex !important;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: stretch;
        justify-content: flex-start !important;
        gap: 16px;
        width: 100%;
        max-width: 100%;
        padding: 0;
        margin: 0;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        scroll-padding-left: 0;
        scrollbar-width: none;
        -ms-overflow-style: none;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
    }

    .tradex-about-grid::-webkit-scrollbar {
        display: none;
        width: 0;
        height: 0;
    }

    .tradex-about-slide {
        display: grid;
        flex: 0 0 100%;
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        grid-template-columns: 1fr;
        grid-template-rows: 212px 212px;
        gap: 16px;
        scroll-snap-align: start;
        scroll-snap-stop: always;
    }

    .tradex-about-slide>.tradex-about-card {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        height: 212px;
        grid-column: 1 !important;
        grid-row: auto !important;
    }

    .tradex-about-card-body {
        padding: 15px;
        gap: 5px;
    }

    .tradex-about-card-title {
        font-size: 22px;
    }

    .tradex-about-card-desc {
        font-size: 11px;
    }

    /* Soften animations on mobile */
    .tradex-about-card:hover {
        transform: none;
    }

    .tradex-about-card--text:hover {
        box-shadow: none;
    }

    .tradex-about-card--text:hover .tradex-about-flip {
        transform: none;
    }

    .tradex-about-card--text:hover .tradex-about-flip-front {
        background:
            radial-gradient(60.77% 107.76% at 49.75% 150.53%, rgba(169, 169, 169, 0.2) 0%, rgba(84, 84, 84, 0.2) 100%),
            #545454;
        color: var(--tradex-text-light);
        border: 0;
        box-shadow: none;
    }

    .tradex-about-card--text:hover .tradex-about-card-grid-overlay {
        opacity: 0.72;
    }

    .tradex-about-card--text:hover .tradex-about-flip-front .tradex-about-card-title {
        color: #ffffff;
    }

    .tradex-about-card--text:hover .tradex-about-flip-front .tradex-about-card-title--red {
        color: #F00000;
    }

    .tradex-about-card--text:hover .tradex-about-flip-front .tradex-about-card-desc {
        color: #E3E3E3;
    }

    [data-tradex-reveal].tradex-is-visible.tradex-about-card--text:hover {
        transform: none;
    }
}

@media (max-width: 640px) {
    .tradex-about-dots {
        display: flex;
        justify-content: center;
        gap: 10px;
        margin-top: 18px;
    }

    .tradex-about-dot {
        width: 8px;
        height: 8px;
        padding: 0;
        border: 0;
        border-radius: 50%;
        background: rgba(0, 0, 0, 0.18);
        cursor: pointer;
        transition: background 0.25s ease, transform 0.25s ease, width 0.25s ease;
    }

    .tradex-about-dot.is-active {
        background: #e30613;
        width: 22px;
        border-radius: 6px;
    }

    /* Reveal animation hides off-screen slides on mobile (IntersectionObserver
       cannot see cards positioned horizontally outside the viewport). Force
       all slider cards to be visible. */
    .tradex-about-grid [data-tradex-reveal] {
        opacity: 1 !important;
        transform: none !important;
    }
}

@media (min-width: 641px) {
    .tradex-about-dots {
        display: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {

    .tradex-about-card,
    .tradex-about-flip,
    .tradex-about-card--image img,
    [data-tradex-reveal] {
        transition: none !important;
        transform: none !important;
    }

    [data-tradex-reveal] {
        opacity: 1;
    }
}