﻿/* ============================================================
   ForeignTrade.css  —  MIFT / investment.gov.eg redesign
   Brand: Navy #0D1B3E  |  Gold #C9A227  |  White #FFFFFF
   ============================================================ */

:root {
    --navy: #0D1B3E;
    --navy-mid: #152548;
    --navy-light: #1E3260;
    --gold: #C9A227;
    --gold-bright: #E8BC3C;
    --gold-pale: #F7EDD0;
    --white: #FFFFFF;
    --off-white: #F5F6F8;
    --text-dark: #1A1F2E;
    --text-body: #4A5568;
    --text-muted: #8A95A3;
    --border: #E8ECF2;
    --shadow-card: 0 2px 16px rgba(13,27,62,0.07);
    --shadow-hover: 0 12px 40px rgba(13,27,62,0.14);
    --radius: 20px;
    --radius-sm: 12px;
    --container: 1160px;
}

/* ─── Base ─────────────────────────────────────────────── */
a {
    text-decoration: none;
    color: inherit;
}

/* ============================================================
   MAIN LAYOUT
   ============================================================ */
.ft-main {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 32px 80px;
    background: var(--off-white);
}

/* ─── Section Shell ──────────────────────────────────────── */
.ft-section {
    padding: 0;
    border-bottom: 1px solid var(--border);
}

    .ft-section:last-child {
        border-bottom: none;
    }

.ft-section__inner {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 0 32px;
    padding: 34px 0;
}

/* Left numbering track */
.ft-section__label-track {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 8px;
}

.ft-section__label-line {
    width: 1px;
    flex: 1;
    background: linear-gradient(to bottom, var(--gold) 0%, transparent 100%);
    min-height: 40px;
}

.ft-section__label-text {
    font-size: 11px;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 0.1em;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    opacity: 0.5;
    margin-top: 12px;
}

/* Section body */
.ft-section__body {
    min-width: 0;
}

.ft-section__title {
    font-size: clamp(22px, 3.5vw, 30px);
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 36px;
    letter-spacing: -0.01em;
    position: relative;
    padding-bottom: 16px;
}

    .ft-section__title::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 40px;
        height: 2px;
        background: var(--gold);
        border-radius: 2px;
    }

/* ============================================================
   OVERVIEW
   ============================================================ */
.ft-overview__card {
    display: flex;
    gap: 36px;
    background: var(--white);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.55s ease, transform 0.55s ease, box-shadow 0.3s;
}

    .ft-overview__card.is-visible {
        opacity: 1;
        transform: none;
    }

    .ft-overview__card:hover {
        box-shadow: var(--shadow-hover);
    }

.ft-overview__icon-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

.ft-overview__icon-wrap {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    flex-shrink: 0;
    box-shadow: 0 6px 20px rgba(13,27,62,0.18);
}

.ft-overview__icon-line {
    width: 1px;
    flex: 1;
    margin-top: 14px;
    background: linear-gradient(to bottom, var(--gold-pale), transparent);
    min-height: 20px;
}

.ft-overview__text-col {
    flex: 1;
    min-width: 0;
}

.ft-overview__text {
    font-size: 16px;
    line-height: 1.85;
    color: var(--text-body);
    font-weight: 400;
}

/* ============================================================
   TASKS
   ============================================================ */
.ft-tasks__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}

.ft-task {
    background: var(--white);
    border-radius: var(--radius-sm);
    padding: 28px 24px;
    display: flex;
    align-items: flex-start;
    gap: 18px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
    cursor: default;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.3s, border-color 0.3s;
}

    .ft-task:nth-child(1) {
        transition-delay: 0.05s;
    }

    .ft-task:nth-child(2) {
        transition-delay: 0.10s;
    }

    .ft-task:nth-child(3) {
        transition-delay: 0.15s;
    }

    .ft-task:nth-child(4) {
        transition-delay: 0.20s;
    }

    .ft-task:nth-child(5) {
        transition-delay: 0.25s;
    }

    .ft-task.is-visible {
        opacity: 1;
        transform: none;
    }

    .ft-task::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 3px;
        background: linear-gradient(90deg, var(--gold), var(--gold-bright));
        transform: scaleX(0);
        transform-origin: left;
        transition: transform 0.35s ease;
    }

    .ft-task:hover::before {
        transform: scaleX(1);
    }

    .ft-task:hover {
        box-shadow: var(--shadow-hover);
        border-color: rgba(201,162,39,0.25);
    }

.ft-task__num {
    font-size: 13px;
    font-weight: 700;
    color: var(--gold);
    opacity: 0.7;
    flex-shrink: 0;
    letter-spacing: 0.05em;
    padding-top: 2px;
    min-width: 24px;
}

.ft-task__content {
    flex: 1;
    min-width: 0;
}

    .ft-task__content p {
        font-size: 14.5px;
        color: var(--text-body);
        line-height: 1.65;
        font-weight: 500;
    }

.ft-task__arrow {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--off-white);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: background 0.3s, color 0.3s, transform 0.25s;
}

.ft-task:hover .ft-task__arrow {
    background: var(--navy);
    color: var(--gold);
    transform: translateX(3px);
}

/* ============================================================
   DOWNLOADS
   ============================================================ */
.ft-downloads__subtitle {
    font-size: 15px;
    color: var(--text-muted);
    margin-top: -22px;
    margin-bottom: 36px;
    max-width: 520px;
    line-height: 1.6;
}

.ft-dl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.ft-dl-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 32px;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.3s, border-color 0.3s;
    color: var(--text-dark);
}

    .ft-dl-card:nth-child(1) {
        transition-delay: 0.06s;
    }

    .ft-dl-card:nth-child(2) {
        transition-delay: 0.14s;
    }

    .ft-dl-card.is-visible {
        opacity: 1;
        transform: none;
    }

    .ft-dl-card:hover {
        box-shadow: var(--shadow-hover);
        border-color: rgba(201,162,39,0.3);
        transform: translateY(-4px);
    }

.ft-dl-card__bg-number {
    position: absolute;
    bottom: -16px;
    right: 16px;
    font-size: 80px;
    font-weight: 800;
    color: var(--navy);
    opacity: 0.04;
    pointer-events: none;
    letter-spacing: -0.04em;
    line-height: 1;
    user-select: none;
}

.ft-dl-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.ft-dl-card__badge {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, #B91C1C, #DC2626);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 6px 16px rgba(185,28,28,0.25);
}

.ft-dl-card__badge--export {
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
    box-shadow: 0 6px 16px rgba(13,27,62,0.25);
    color: var(--gold);
}

.ft-dl-card__type-pill {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: rgba(185,28,28,0.08);
    color: #B91C1C;
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid rgba(185,28,28,0.15);
}

.ft-dl-card__type-pill--export {
    background: rgba(13,27,62,0.06);
    color: var(--navy);
    border-color: rgba(13,27,62,0.12);
}

.ft-dl-card__body {
    flex: 1;
    margin-bottom: 24px;
}

.ft-dl-card__title {
    font-size: 18px;
    font-weight: 700;
    color: var(--navy);
    line-height: 1.35;
    margin-bottom: 12px;
}

.ft-dl-card__meta-row {
    display: flex;
    align-items: center;
    gap: 18px;
}

.ft-dl-card__meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.ft-dl-card__footer {
    border-top: 1px solid var(--border);
    padding-top: 20px;
}

.ft-dl-card__dl-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--navy);
    letter-spacing: 0.02em;
    transition: color 0.2s, gap 0.2s;
}

.ft-dl-card:hover .ft-dl-card__dl-btn {
    color: var(--gold);
    gap: 12px;
}

/* ============================================================
   RTL SUPPORT - FIXED
   ============================================================ */

/* Section grid: move number track to the LEFT (visually right in RTL) */
body[dir="rtl"] .ft-section__inner {
    grid-template-columns: 1fr 72px;
    direction: rtl;
}

body[dir="rtl"] .ft-section__label-track {
    order: 2;
    align-items: flex-end;
}

/* For RTL, the label line should start from the bottom/gold side */
body[dir="rtl"] .ft-section__label-line {
    background: linear-gradient(to top, var(--gold) 0%, transparent 100%);
}

body[dir="rtl"] .ft-section__label-text {
    transform: rotate(0deg);
    writing-mode: horizontal-tb;
    margin-top: 0;
    margin-bottom: 12px;
}

/* Title underline aligns right */
body[dir="rtl"] .ft-section__title {
    text-align: right;
    direction: rtl;
}

    body[dir="rtl"] .ft-section__title::after {
        left: auto;
        right: 0;
    }

/* Overview card: icon on the right, text on the left */
body[dir="rtl"] .ft-overview__card {
    flex-direction: row-reverse;
    text-align: right;
}

body[dir="rtl"] .ft-overview__icon-col {
    order: 2;
    align-items: flex-end;
}

body[dir="rtl"] .ft-overview__icon-line {
    background: linear-gradient(to top, var(--gold-pale), transparent);
    margin-top: 14px;
    margin-bottom: 0;
}

body[dir="rtl"] .ft-overview__text-col {
    order: 1;
    text-align: right;
}

body[dir="rtl"] .ft-overview__text {
    text-align: right;
    direction: rtl;
}

/* Tasks */
body[dir="rtl"] .ft-task {
    flex-direction: row-reverse;
}

    body[dir="rtl"] .ft-task::before {
        transform-origin: right;
    }

body[dir="rtl"] .ft-task__content p {
    text-align: right;
    direction: rtl;
}

body[dir="rtl"] .ft-task:hover .ft-task__arrow {
    transform: translateX(-3px);
}

/* Downloads */
body[dir="rtl"] .ft-downloads__subtitle {
    text-align: right;
    direction: rtl;
}

body[dir="rtl"] .ft-dl-card {
    direction: rtl;
}

body[dir="rtl"] .ft-dl-card__top {
    flex-direction: row-reverse;
}

body[dir="rtl"] .ft-dl-card__body,
body[dir="rtl"] .ft-dl-card__title {
    text-align: right;
}

body[dir="rtl"] .ft-dl-card__meta-row {
    flex-direction: row-reverse;
}

body[dir="rtl"] .ft-dl-card__bg-number {
    right: auto;
    left: 16px;
}

/* ============================================================
   RESPONSIVE RTL SUPPORT
   ============================================================ */
@media (max-width: 900px) {
    body[dir="rtl"] .ft-section__inner {
        grid-template-columns: 1fr 48px;
    }

    body[dir="rtl"] .ft-section__label-track {
        align-items: flex-end;
    }
}

@media (max-width: 700px) {
    body[dir="rtl"] .ft-section__inner {
        grid-template-columns: 1fr;
    }

    body[dir="rtl"] .ft-section__label-track {
        display: none;
    }

    body[dir="rtl"] .ft-overview__card {
        flex-direction: column;
    }

    body[dir="rtl"] .ft-overview__icon-col {
        order: 1;
        align-items: center;
    }

    body[dir="rtl"] .ft-overview__text-col {
        order: 2;
    }

    body[dir="rtl"] .ft-overview__icon-line {
        display: none;
    }
}

@media (max-width: 480px) {
    .ft-section__title {
        font-size: 22px;
    }

    .ft-task {
        padding: 22px 18px;
    }

    .ft-dl-card {
        padding: 20px;
    }
}

html {
    scroll-behavior: smooth;
}
/* ============================================================
   HEADER SPACING & WHITE BACKGROUND
   ============================================================ */

/* Set overall page background to white */
body {
    background: var(--white) !important;
}

/* Add bottom margin to the header to create separation */
.page-title-area {
    margin-bottom: 3rem !important; /* 48px spacing */
}

/* Make the main content area white instead of off-white */
.ft-main {
    background: var(--white) !important;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .page-title-area {
        margin-bottom: 2rem !important; /* 32px on tablets */
    }
}

@media (max-width: 480px) {
    .page-title-area {
        margin-bottom: 1.5rem !important; /* 24px on mobile */
    }
}

/* ============================================================
   ForeignTrade.css  —  MIFT / investment.gov.eg redesign
   Brand: Navy #0D1B3E  |  Gold #C9A227  |  White #FFFFFF
   ============================================================ */

/* ... (keep your existing :root, base, main layout, overview, tasks, downloads styles) ... */

/* ============================================================
   RTL SUPPORT (Full)
   ============================================================ */

/* 1️⃣ Section grid: label track moves to the right side */
body[dir="rtl"] .ft-section__inner {
    grid-template-columns: 1fr 72px;
    direction: rtl;
}

/* 2️⃣ Label track alignment and order */
body[dir="rtl"] .ft-section__label-track {
    order: 2;
    align-items: flex-end;
}

/* 3️⃣ Vertical line gradient: from top (gold) to bottom (transparent) */
body[dir="rtl"] .ft-section__label-line {
    background: linear-gradient(to bottom, var(--gold) 0%, transparent 100%);
}

/* 4️⃣ Number label: becomes horizontal (not rotated) and sits at the bottom */
body[dir="rtl"] .ft-section__label-text {
    transform: rotate(0deg);
    writing-mode: horizontal-tb;
    margin-top: 0;
    margin-bottom: 12px;
}

/* 5️⃣ Section title underline on the right */
body[dir="rtl"] .ft-section__title {
    text-align: right;
    direction: rtl;
}

    body[dir="rtl"] .ft-section__title::after {
        left: auto;
        right: 0;
    }

/* 6️⃣ Overview card – icon on right, text left */
body[dir="rtl"] .ft-overview__card {
    flex-direction: row-reverse;
    text-align: right;
}

body[dir="rtl"] .ft-overview__icon-col {
    order: 2;
    align-items: flex-end;
}

body[dir="rtl"] .ft-overview__icon-line {
    background: linear-gradient(to top, var(--gold-pale), transparent);
}

body[dir="rtl"] .ft-overview__text-col {
    order: 1;
    text-align: right;
}

/* 7️⃣ Task cards – reverse layout, arrow moves left on hover */
body[dir="rtl"] .ft-task {
    flex-direction: row-reverse;
}

    body[dir="rtl"] .ft-task::before {
        transform-origin: right;
    }

body[dir="rtl"] .ft-task__content p {
    text-align: right;
    direction: rtl;
}

body[dir="rtl"] .ft-task:hover .ft-task__arrow {
    transform: translateX(-3px);
}

/* 8️⃣ Download cards – full RTL mirroring */
body[dir="rtl"] .ft-downloads__subtitle {
    text-align: right;
    direction: rtl;
}

body[dir="rtl"] .ft-dl-card {
    direction: rtl;
    text-align: right;
}

body[dir="rtl"] .ft-dl-card__top {
    flex-direction: row-reverse;
}

body[dir="rtl"] .ft-dl-card__body,
body[dir="rtl"] .ft-dl-card__title {
    text-align: right;
}

body[dir="rtl"] .ft-dl-card__meta-row {
    flex-direction: row-reverse;
}

body[dir="rtl"] .ft-dl-card__bg-number {
    right: auto;
    left: 16px;
}

/* 9️⃣ Responsive RTL adjustments */
@media (max-width: 900px) {
    body[dir="rtl"] .ft-section__inner {
        grid-template-columns: 1fr 48px;
    }
}

@media (max-width: 700px) {
    body[dir="rtl"] .ft-section__inner {
        grid-template-columns: 1fr;
    }

    body[dir="rtl"] .ft-section__label-track {
        display: none;
    }

    body[dir="rtl"] .ft-overview__card {
        flex-direction: column;
    }
}