﻿/* ============================================
   TABLE OF CONTENTS
   ============================================
   1. CSS Variables (Global)
   2. Reset & Base
   3. Page Title Area
   4. Main Container
   5. Statistics Section (Enhanced)
   6. Intro Box
   7. Filter Controls
   8. Section Header
   9. Cards (Agreements)
      - Card Layout & Grid
      - Card Header
      - Card Stats
      - Card Preview
      - Card Details (Expanded)
      - Tags & Detail Items
  10. Responsive Breakpoints
  11. Directional (RTL) Overrides
   ============================================ */

/* 1. CSS Variables (Global)
   ============================================ */
:root {
    --blue-dark: #0D1B3E;
    --blue: #1A2B4A;
    --gold: #C9A227;
    --gold2: #F4D03F;
    --white: #FFFFFF;
    --bg: #f5f6f8;
    --border: #e8eaed;
    --t1: #333;
    --t2: #666;
    --t3: #999;
    --shadow-sm: 0 4px 12px rgba(13,27,62,.08);
    --shadow-md: 0 8px 24px rgba(13,27,62,.12);
    --transition: all 0.25s ease;
    --border-radius-card: 20px;
    --border-radius-stat: 20px;
    --border-radius-button: 60px;
}

/* 2. Reset & Base
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
   
    color: var(--t1);
    line-height: 1.5;
}

 

/* 4. Main Container
   ============================================ */
.main-content {
    background: var(--white);
    border-radius: clamp(20px, 4vw, 30px);
    margin: 0 clamp(16px, 5vw, 60px) clamp(20px, 6vw, 60px);
    padding: clamp(20px, 4vw, 40px);
    box-shadow: var(--shadow-md);
}

.wrap {
    max-width: 1440px;
    margin-inline: auto;
}

/* 5. Statistics Section (Enhanced)
   ============================================ */
.agreements-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.agreements-stat {
    background: var(--white);
    border-radius: var(--border-radius-stat);
    padding: 28px 16px;
    text-align: center;
    border: 1px solid var(--border);
    transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    cursor: default;
}

    /* Decorative gradient line at bottom */
    .agreements-stat::after {
        content: '';
        position: absolute;
        bottom: 0;
        inset-inline-start: 0;
        width: 100%;
        height: 4px;
        background: linear-gradient(90deg, var(--gold), var(--gold2));
        transform: scaleX(0);
        transform-origin: right;
        transition: transform 0.4s ease;
    }

    .agreements-stat:hover {
        transform: translateY(-6px);
        box-shadow: var(--shadow-md);
        border-color: rgba(201,162,39,0.3);
    }

        .agreements-stat:hover::after {
            transform: scaleX(1);
            transform-origin: left;
        }

    /* Icon styling */
    .agreements-stat i {
        width: 64px;
        height: 64px;
        border-radius: 50%;
        background: linear-gradient(135deg, rgba(26,43,74,0.08), rgba(26,43,74,0.12));
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 28px;
        color: var(--blue-dark);
        margin-bottom: 20px;
        transition: all 0.3s ease;
    }

    .agreements-stat:hover i {
        background: var(--blue-dark);
        color: var(--gold);
        transform: scale(1.05);
    }

/* Number styling */
.agreements-stat-n {
    font-size: clamp(28px, 6vw, 38px);
    font-weight: 800;
    line-height: 1.2;
    color: var(--blue-dark);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

    .agreements-stat-n sup {
        font-size: 0.5em;
        font-weight: 600;
        color: var(--gold);
        margin-inline-start: 2px;
    }

/* Label styling */
.agreements-stat-l {
    font-size: clamp(13px, 3vw, 15px);
    font-weight: 500;
    color: var(--t2);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* 6. Intro Box
   ============================================ */
.agreements-intro-box {
    background: var(--blue-dark);
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: var(--shadow-sm);
    padding: clamp(24px, 5vw, 40px);
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

    .agreements-intro-box::before {
        content: '';
        position: absolute;
        top: 0;
        inset-inline-start: 0;
        width: 5px;
        height: 100%;
        background: linear-gradient(to bottom, var(--gold), var(--gold2));
        border-radius: 0 24px 24px 0;
    }

.agreements-intro-top {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.agreements-intro-ico {
    width: 52px;
    height: 52px;
    background: rgba(255,255,255,0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: var(--gold);
    flex-shrink: 0;
}

.agreements-intro-body p {
    font-size: clamp(13px, 3vw, 14px);
    color: rgba(255,255,255,0.8);
    line-height: 1.8;
    margin-bottom: 14px;
}

/* 7. Filter Controls
   ============================================ */
.agreements-filter-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    gap: 12px;
    flex-wrap: wrap;
}

.agreements-ftabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-button);
    padding: 4px;
}

.agreements-ftab {
    padding: 8px 16px;
    border-radius: 40px;
    border: none;
    background: transparent;
    font-family: inherit;
    font-weight: 600;
    color: var(--t2);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

    .agreements-ftab.active {
        background: var(--blue-dark);
        color: #fff;
    }

.agreements-sbox {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-button);
    padding: 8px 16px;
    min-width: 200px;
    flex: 1;
}

    .agreements-sbox input {
        border: none;
        outline: none;
        background: transparent;
        width: 100%;
    }

/* 8. Section Header
   ============================================ */
.agreements-sec-head {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.agreements-sec-line {
    width: 5px;
    height: 32px;
    background: linear-gradient(to bottom, var(--gold), var(--gold2));
    border-radius: 4px;
}

.agreements-sec-badge {
    margin-inline-start: auto;
    background: var(--blue-dark);
    color: var(--gold);
    font-size: clamp(11px, 3vw, 12px);
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 30px;
}

/* 9. Cards (Agreements)
   ============================================ */
.agreements-card {
    background: var(--blue-dark);
    border-radius: var(--border-radius-card);
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 24px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
        "header stats"
        "preview preview"
        "details details";
    align-items: start;
}

/* On small screens, stack stats below header */
@media (max-width: 640px) {
    .agreements-card {
        grid-template-columns: 1fr;
        grid-template-areas:
            "header"
            "stats"
            "preview"
            "details";
    }
}

.agreements-card:hover {
    border-color: rgba(201,162,39,0.5);
}

/* Card Header */
.card-header {
    grid-area: header;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 20px 12px;
    flex-wrap: wrap;
}

.card-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--blue), #1e3a5f);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--gold);
    flex-shrink: 0;
}

.card-title {
    flex: 1;
}

    .card-title h3 {
        font-weight: 800;
        color: var(--white);
        margin-bottom: 4px;
        font-size: clamp(18px, 4vw, 20px);
    }

.card-label {
    background: rgba(201,162,39,0.2);
    color: var(--gold2);
    padding: 2px 10px;
    border-radius: 30px;
    display: inline-block;
    font-size: clamp(11px, 3vw, 13px);
}

.card-toggle {
    background: none;
    border: none;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    color: var(--white);
}

    .card-toggle:hover {
        background: rgba(255,255,255,0.1);
    }

    .card-toggle i {
        transition: transform 0.3s;
    }

    .card-toggle[aria-expanded="true"] i {
        transform: rotate(180deg);
    }

/* Card Stats */
.card-stats {
    grid-area: stats;
    display: flex;
    gap: clamp(12px, 3vw, 24px);
    padding: 20px 20px 0 0;
    justify-content: flex-end;
    align-self: center;
}

@media (max-width: 640px) {
    .card-stats {
        justify-content: flex-start;
        padding: 0 20px 12px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
}

.stat {
    text-align: center;
    min-width: 70px;
}

.stat-value {
    font-weight: 800;
    color: var(--gold);
    display: block;
    line-height: 1.2;
    font-size: clamp(18px, 4vw, 20px);
}

.stat-label {
    color: rgba(255,255,255,0.7);
    font-size: clamp(11px, 3vw, 13px);
}

/* Card Preview */
.card-preview {
    grid-area: preview;
    padding: 0 20px 16px;
    color: rgba(255,255,255,0.8);
    line-height: 1.6;
    font-size: clamp(11px, 3vw, 13px);
}

/* Card Details (Expanded) */
.card-details {
    grid-area: details;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    background: var(--white);
    border-top: 1px solid var(--border);
}

    .card-details.open {
        max-height: 800px;
    }

.details-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
    padding: 20px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--t2);
    padding: 8px 12px;
    background: var(--bg);
    border-radius: 12px;
    font-size: clamp(11px, 3vw, 13px);
}

    .detail-item i {
        width: 24px;
        text-align: center;
        color: var(--gold);
    }

.details-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 20px 20px;
}

.tag {
    background: rgba(13,27,62,0.08);
    color: var(--blue-dark);
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: clamp(11px, 3vw, 13px);
}

/* 10. Responsive Breakpoints
   ============================================ */
@media (max-width: 1024px) {
    .agreements-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .agreements-filter-row {
        flex-direction: column;
        align-items: stretch;
    }

    .agreements-ftabs {
        justify-content: center;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .agreements-sbox {
        width: 100%;
    }

    .agreements-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .agreements-ftab {
        padding: 6px 12px;
        white-space: normal;
    }
}

/* 11. Directional (RTL) Overrides
   ============================================ */
[dir="rtl"] .card-stats {
    padding: 20px 0 0 20px;
}

[dir="rtl"] .agreements-sbox input {
    text-align: right;
}

[dir="ltr"] .agreements-sbox input {
    text-align: left;
}

/* Additional RTL adjustments for intro box and cards if needed */
[dir="rtl"] .agreements-intro-box::before {
    inset-inline-start: auto;
    inset-inline-end: 0;
    border-radius: 24px 0 0 24px;
}

[dir="rtl"] .agreements-sec-line {
    margin-inline-end: 0;
}

/* ===== Overrides for Trade Agreements Cards ===== */
.agreements-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    transition: var(--transition);
    overflow: hidden;
}

    .agreements-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
        border-color: var(--moif-gold);
    }

.card-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    flex-wrap: wrap;
    background: var(--bg);
    border-bottom: 1px solid var(--border-light);
}

.card-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--moif-blue-dark), var(--moif-blue));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--moif-gold-bright);
    flex-shrink: 0;
}

.card-title h3 {
    font-size: 16px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 4px;
}

.card-label {
    background: var(--gold-50);
    color: var(--moif-gold);
    font-size: 11px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 30px;
    display: inline-block;
}

.card-stats {
    display: flex;
    gap: 20px;
    margin-left: auto;
    align-items: center;
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 20px;
    font-weight: 800;
    color: var(--moif-blue-dark);
    display: block;
    line-height: 1.2;
}

.stat-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-toggle {
    background: none;
    border: none;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    color: var(--text-muted);
}

    .card-toggle:hover {
        background: var(--border-light);
    }

    .card-toggle i {
        transition: transform 0.3s;
    }

    .card-toggle[aria-expanded="true"] i {
        transform: rotate(180deg);
    }

.card-preview {
    padding: 20px;
    font-size: 13px;
    color: var(--text-body);
    line-height: 1.7;
    border-bottom: 1px solid var(--border-light);
}

.card-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    background: var(--white);
}

    .card-details.open {
        max-height: 800px;
    }

.details-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
    padding: 20px;
    background: var(--bg);
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
    padding: 6px 12px;
    background: var(--white);
    border-radius: 8px;
    border: 1px solid var(--border-light);
}

    .detail-item i {
        width: 24px;
        text-align: center;
        color: var(--moif-gold);
    }

 

 