/* =========================================
   Two-Row Horizontal Mandate Section
   ========================================= */

.mandate-section {
    --mandate-primary: #063f70;
    --mandate-secondary: #087ba4;
    --mandate-accent: #18a7c8;
    --mandate-light: #eef8fc;
    --mandate-text: #263746;
    --mandate-muted: #647583;

    position: relative;
    padding: 80px 0;
    background:
        radial-gradient(circle at 5% 10%, rgba(24, 167, 200, 0.10), transparent 25%),
        linear-gradient(180deg, #ffffff 0%, #f3f9fc 100%);
    overflow: hidden;
}

.mandate-container {
    width: min(94%, 1480px);
    margin: 0 auto;
}

.mandate-heading {
    max-width: 760px;
    margin: 0 auto 48px;
    text-align: center;
}

.mandate-label {
    display: inline-block;
    margin-bottom: 10px;
    color: var(--mandate-secondary);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: capitalize;
}

.mandate-heading h2 {
    margin: 0 0 12px;
    color: var(--mandate-primary);
    font-family: Arial, Helvetica, sans-serif;
    font-size: clamp(2rem, 3vw, 2.8rem);
    font-weight: 700;
    line-height: 1.2;
}

.mandate-heading p {
    margin: 0;
    color: var(--mandate-muted);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1rem;
    line-height: 1.7;
}

/* Both horizontal mandate lines */
.mandate-rows {
    display: flex;
    flex-direction: column;
    gap: 34px;
}

.mandate-row {
    position: relative;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
    isolation: isolate;
}

/* Horizontal line passing behind the icons */
.mandate-row::before {
    position: absolute;
    top: 42px;
    right: 7%;
    left: 7%;
    z-index: -1;
    height: 3px;
    border-radius: 10px;
    background: linear-gradient(
        90deg,
        rgba(8, 123, 164, 0.15),
        var(--mandate-accent),
        rgba(8, 123, 164, 0.15)
    );
    content: "";
}

/* Individual mandate */
.mandate-card {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 255px;
    padding: 70px 18px 22px;
    flex-direction: column;
    align-items: center;
    border: 1px solid rgba(6, 63, 112, 0.11);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 9px 26px rgba(25, 67, 91, 0.08);
    text-align: center;
    transition:
        transform 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

/* Prevent all text from overlapping adjacent cards */
.mandate-card,
.mandate-card * {
    box-sizing: border-box;
}

.mandate-card h3,
.mandate-card p {
    width: 100%;
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.mandate-icon {
    position: absolute;
    top: 14px;
    left: 50%;
    display: grid;
    width: 56px;
    height: 56px;
    place-items: center;
    border: 5px solid #ffffff;
    border-radius: 50%;
    background: linear-gradient(
        135deg,
        var(--mandate-primary),
        var(--mandate-accent)
    );
    box-shadow: 0 7px 18px rgba(6, 63, 112, 0.24);
    color: #ffffff;
    font-size: 1.25rem;
    transform: translateX(-50%);
    transition: transform 0.3s ease;
}

.mandate-number {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    right: auto;
    color: rgba(6, 63, 112, 0.13);
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1;
    text-align: center;
}

.mandate-card h3 {
    min-height: 46px;
    margin: 15px 0 8px;
    color: var(--mandate-primary);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
}

.mandate-card p {
    margin: 0;
    color: var(--mandate-muted);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.86rem;
    line-height: 1.58;
}

.mandate-card:hover {
    border-color: rgba(24, 167, 200, 0.45);
    box-shadow: 0 15px 34px rgba(6, 63, 112, 0.14);
    transform: translateY(-7px);
}

.mandate-card:hover .mandate-icon {
    transform: translateX(-50%) scale(1.08);
}

/* Large laptops */
@media (max-width: 1250px) {
    .mandate-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .mandate-row::before {
        display: none;
    }
}

/* Tablets */
@media (max-width: 768px) {
    .mandate-section {
        padding: 60px 0;
    }

    .mandate-container {
        width: min(92%, 680px);
    }

    .mandate-heading {
        margin-bottom: 36px;
    }

    .mandate-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .mandate-card {
        min-height: 245px;
    }
}

/* Mobile */
@media (max-width: 520px) {
    .mandate-section {
        padding: 48px 0;
    }

    .mandate-row {
        grid-template-columns: 1fr;
    }

    .mandate-rows {
        gap: 16px;
    }

    .mandate-card {
        min-height: auto;
        padding: 24px 20px 24px 88px;
        align-items: flex-start;
        text-align: left;
    }

    .mandate-icon {
        top: 50%;
        left: 18px;
        width: 52px;
        height: 52px;
        border-width: 4px;
        transform: translateY(-50%);
    }

    .mandate-card:hover .mandate-icon {
        transform: translateY(-50%) scale(1.06);
    }

    .mandate-number {
        top: 10px;
        left: 50%;
        transform: translateX(-50%);
        right: auto;
    }

    .mandate-card h3 {
        min-height: 0;
        margin: 0 34px 6px 0;
        font-size: 1rem;
    }

    .mandate-card p {
        font-size: 0.88rem;
    }
}
