/* =============================================
   CHAID FEATURED PROJECT SHOWCASE
   Version: 1.0.0

   Headings: Antonio
   Body: Inter
   ============================================= */

.chaid-featured-project {

    --fp-navy: #172A5B;
    --fp-teal: #087F8C;
    --fp-green: #3A7D44;
    --fp-gold: #E9A23B;
    --fp-red: #E52B2F;
    --fp-text: #1D2939;
    --fp-muted: #667085;
    --fp-border: #D9E2E7;
    --fp-light: #F2F7F8;
    --fp-white: #FFFFFF;

    width: 100%;
    max-width: 1440px;
    margin: 0 auto;

    font-family: 'Inter', sans-serif;

    container-type: inline-size;
}

.chaid-featured-project *,
.chaid-featured-project *::before,
.chaid-featured-project *::after {
    box-sizing: border-box;
}


/* =============================================
   SECTION HEADING
   ============================================= */

.chaid-featured-project .chaid-fp-header {
    max-width: 950px;
    margin: 0 auto 34px;
    text-align: center;
}

.chaid-featured-project .chaid-fp-heading {
    margin: 0;
    padding: 0;

    font-family: 'Antonio', sans-serif;
    font-size: clamp(28px, 3.2vw, 40px);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.8px;

    color: var(--fp-white);
}

.chaid-fp-heading-line {
    display: block;

    width: 84px;
    height: 3px;
    margin: 18px auto 0;

    background: linear-gradient(
        90deg,
        #087F8C 0%,
        #087F8C 33.33%,
        #E9A23B 33.33%,
        #E9A23B 66.66%,
        #E52B2F 66.66%,
        #E52B2F 100%
    );

    border-radius: 2px;
}


/* =============================================
   MAIN PROJECT LAYOUT
   ============================================= */

.chaid-fp-layout {
    display: grid;

    grid-template-columns:
        minmax(0, 2.15fr)
        minmax(0, 1fr);

    gap: 20px;
    align-items: stretch;
}

.chaid-fp-layout.chaid-fp-no-stats {
    grid-template-columns: minmax(0, 1fr);
}


/* =============================================
   PROJECT CARD
   ============================================= */

.chaid-fp-card {
    position: relative;

    display: grid;

    grid-template-columns:
        minmax(0, 1.1fr)
        minmax(0, 0.9fr);

    min-width: 0;
    min-height: 350px;

    padding: 9px;

    background: var(--fp-white);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 12px;

    overflow: hidden;

    box-shadow:
        0 12px 32px rgba(0,0,0,0.13);

    transition:
        box-shadow 0.3s ease,
        transform 0.3s ease;
}

.chaid-fp-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;

    min-width: 0;
    padding: 25px 22px;

    color: var(--fp-text);
}


/* =============================================
   PROJECT STATUS
   ============================================= */

.chaid-fp-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    padding: 6px 11px;
    margin-bottom: 14px;

    border-radius: 30px;

    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;

    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.chaid-fp-status-dot {
    width: 7px;
    height: 7px;
    flex-shrink: 0;

    background: currentColor;
    border-radius: 50%;
}

.chaid-fp-status-ongoing {
    color: #276738;
    background: #E6F4EA;
}

.chaid-fp-status-completed {
    color: #172A5B;
    background: #E9EDF5;
}

.chaid-fp-status-upcoming {
    color: #875A08;
    background: #FFF3D8;
}


/* =============================================
   PROJECT LOCATION
   ============================================= */

.chaid-fp-location {
    display: flex;
    align-items: flex-start;
    gap: 6px;

    margin-bottom: 12px;

    color: var(--fp-green);

    font-size: 11px;
    font-weight: 600;
    line-height: 1.5;
}

.chaid-fp-location svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}


/* =============================================
   PROJECT TITLE AND DESCRIPTION
   ============================================= */

.chaid-featured-project .chaid-fp-title {
    margin: 0 0 14px;
    padding: 0;

    font-family: 'Antonio', sans-serif;
    font-size: clamp(22px, 2vw, 28px);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.4px;

    color: var(--fp-navy);

    overflow-wrap: anywhere;
}

.chaid-featured-project .chaid-fp-title a {
    color: inherit;
    text-decoration: none;

    transition: color 0.25s ease;
}

.chaid-featured-project .chaid-fp-title a:hover {
    color: var(--fp-teal);
}

.chaid-featured-project .chaid-fp-description {
    margin: 0 0 20px;
    padding: 0;

    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.8;

    color: var(--fp-text);
}


/* =============================================
   FUNDING PARTNER INFORMATION
   ============================================= */

.chaid-fp-funding {
    display: flex;
    align-items: flex-start;
    gap: 10px;

    width: 100%;
    padding: 13px 0;
    margin-bottom: 20px;

    border-top: 1px solid var(--fp-border);
    border-bottom: 1px solid var(--fp-border);
}

.chaid-fp-funding-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 34px;
    height: 34px;
    flex-shrink: 0;

    color: var(--fp-teal);
    background: var(--fp-light);
    border-radius: 6px;
}

.chaid-fp-funding-icon svg {
    width: 21px;
    height: 21px;
}

.chaid-fp-funding-label {
    display: block;
    margin-bottom: 3px;

    font-size: 10px;
    font-weight: 600;
    line-height: 1.4;

    text-transform: uppercase;
    letter-spacing: 0.8px;

    color: var(--fp-muted);
}

.chaid-fp-funding strong {
    display: block;

    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;

    color: var(--fp-navy);
}

.chaid-fp-programme {
    display: block;
    margin-top: 3px;

    font-size: 11px;
    line-height: 1.5;

    color: var(--fp-muted);
}


/* =============================================
   EXPLORE PROJECT BUTTON
   ============================================= */

.chaid-fp-actions {
    margin-top: auto;
    width: 100%;
}

.chaid-featured-project .chaid-fp-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    min-height: 46px;
    padding: 13px 20px;

    background: var(--fp-teal);
    border: 1px solid var(--fp-teal);
    border-radius: 4px;

    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;

    color: var(--fp-white);
    text-decoration: none;

    transition:
        background 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

.chaid-fp-button svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;

    transition: transform 0.3s ease;
}

.chaid-featured-project .chaid-fp-button:hover {
    background: var(--fp-navy);
    border-color: var(--fp-navy);
    color: var(--fp-white);

    box-shadow: 0 6px 18px rgba(23,42,91,0.15);
}

.chaid-fp-button:hover svg {
    transform: translateX(4px);
}


/* =============================================
   PROJECT FEATURED IMAGE
   ============================================= */

.chaid-fp-image {
    position: relative;

    display: block;

    min-width: 0;
    min-height: 300px;

    background: var(--fp-light);
    border-radius: 8px;

    overflow: hidden;
    isolation: isolate;
}

.chaid-featured-project .chaid-fp-photo {
    position: absolute;
    inset: 0;

    display: block;

    width: 100%;
    height: 100%;
    max-width: none;

    object-fit: cover;
    object-position: center;

    border-radius: 0;

    transition: transform 0.65s ease;
}

.chaid-fp-image::after {
    content: "";

    position: absolute;
    inset: 0;

    background: linear-gradient(
        180deg,
        transparent 60%,
        rgba(23,42,91,0.18) 100%
    );

    pointer-events: none;
}

.chaid-fp-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;

    position: absolute;
    inset: 0;

    background: linear-gradient(
        135deg,
        #F2F7F8,
        #D9E2E7
    );

    color: var(--fp-teal);

    font-size: 13px;
    font-weight: 600;
}

.chaid-fp-placeholder svg {
    width: 48px;
    height: 48px;
    opacity: 0.7;
}


/* =============================================
   PROJECT STATISTICS PANEL
   ============================================= */

.chaid-fp-statistics {
    display: flex;
    flex-direction: column;

    min-width: 0;
    padding: 24px 22px;

    background: var(--fp-white);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.3);

    box-shadow:
        0 12px 32px rgba(0,0,0,0.13);
}

.chaid-featured-project .chaid-fp-stats-heading {
    margin: 0 0 10px;
    padding: 0 0 16px;

    border-bottom: 2px solid var(--fp-light);

    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.5;
    letter-spacing: 1.4px;

    text-transform: uppercase;

    color: var(--fp-green);
}

.chaid-fp-stats-list {
    display: flex;
    flex-direction: column;

    flex: 1;
}


/* =============================================
   INDIVIDUAL STATISTIC
   ============================================= */

.chaid-fp-stat {
    position: relative;

    display: flex;
    align-items: center;
    gap: 15px;

    flex: 1;

    padding: 18px 0;

    border-bottom: 1px solid var(--fp-border);
}

.chaid-fp-stat:last-child {
    border-bottom: 0;
    padding-bottom: 5px;
}

.chaid-fp-stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 50px;
    height: 50px;
    flex-shrink: 0;

    border-radius: 50%;

    transition:
        transform 0.3s ease,
        background 0.3s ease,
        color 0.3s ease;
}

.chaid-fp-stat-icon svg {
    width: 26px;
    height: 26px;
}

.chaid-fp-accent-0 {
    background: #FFF3DF;
    color: #B97716;
}

.chaid-fp-accent-1 {
    background: #E9EDF5;
    color: #172A5B;
}

.chaid-fp-accent-2 {
    background: #E4F3F4;
    color: #087F8C;
}

.chaid-fp-accent-3 {
    background: #E8F3E9;
    color: #3A7D44;
}

.chaid-fp-stat-content {
    display: flex;
    flex-direction: column;
    gap: 5px;

    min-width: 0;
}

.chaid-featured-project .chaid-fp-stat-value {
    display: block;

    font-family: 'Antonio', sans-serif;
    font-size: clamp(27px, 2.5vw, 36px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.5px;

    color: var(--fp-navy);

    overflow-wrap: anywhere;
}

.chaid-featured-project .chaid-fp-stat-label {
    display: block;

    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;

    color: var(--fp-text);
}


/* =============================================
   PROFESSIONAL HOVER EFFECTS
   ============================================= */

@media (hover: hover) and (pointer: fine) {

    .chaid-fp-card:hover {
        transform: translateY(-3px);

        box-shadow:
            0 18px 42px rgba(0,0,0,0.2);
    }

    .chaid-fp-card:hover .chaid-fp-photo {
        transform: scale(1.045);
    }

    .chaid-fp-stat:hover .chaid-fp-stat-icon {
        transform: translateY(-3px);

        background: var(--fp-navy);
        color: var(--fp-white);
    }
}


/* =============================================
   KEYBOARD ACCESSIBILITY
   ============================================= */

.chaid-featured-project a:focus-visible {
    outline: 3px solid var(--fp-gold);
    outline-offset: 4px;
}

.chaid-fp-image:focus-visible {
    outline-offset: -4px !important;
}


/* =============================================
   EMPTY STATE
   ============================================= */

.chaid-fp-empty {
    padding: 24px;

    background: rgba(255,255,255,0.08);
    border: 1px dashed rgba(255,255,255,0.3);
    border-radius: 8px;

    color: #FFFFFF;
    text-align: center;

    font-family: 'Inter', sans-serif;
    font-size: 14px;
}


/* =============================================
   TABLET RESPONSIVE DESIGN
   ============================================= */

@media (max-width: 1024px) {

    .chaid-fp-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }

    .chaid-fp-card {
        grid-template-columns:
            minmax(0, 1.1fr)
            minmax(0, 0.9fr);
    }

    .chaid-fp-stats-list {
        display: grid;

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 12px;
    }

    .chaid-fp-stat,
    .chaid-fp-stat:last-child {
        padding: 16px;

        background: var(--fp-light);
        border: 1px solid var(--fp-border);
        border-radius: 8px;
    }

    .chaid-fp-statistics {
        padding: 22px;
    }
}


/* =============================================
   MOBILE RESPONSIVE DESIGN
   ============================================= */

@media (max-width: 767px) {

    .chaid-featured-project .chaid-fp-header {
        margin-bottom: 24px;
    }

    .chaid-featured-project .chaid-fp-heading {
        font-size: 28px;
        line-height: 1.25;
        letter-spacing: -0.4px;
    }

    .chaid-fp-layout {
        gap: 16px;
    }

    .chaid-fp-card {
        grid-template-columns: minmax(0, 1fr);

        padding: 7px;
        border-radius: 10px;
    }

    .chaid-fp-image {
        grid-row: 1;

        min-height: 0;
        aspect-ratio: 16 / 10;

        border-radius: 6px;
    }

    .chaid-fp-content {
        padding: 22px 17px;
    }

    .chaid-featured-project .chaid-fp-title {
        font-size: 25px;
    }

    .chaid-featured-project .chaid-fp-description {
        font-size: 14px;
        line-height: 1.75;
    }

    .chaid-featured-project .chaid-fp-button {
        width: 100%;
    }

    .chaid-fp-statistics {
        padding: 18px;
        border-radius: 10px;
    }

    .chaid-fp-stats-list {
        gap: 10px;
    }

    .chaid-fp-stat,
    .chaid-fp-stat:last-child {
        flex-direction: column;
        align-items: center;

        gap: 10px;
        padding: 18px 10px;

        text-align: center;
    }

    .chaid-fp-stat-content {
        align-items: center;
    }

    .chaid-fp-stat-icon {
        width: 44px;
        height: 44px;
    }

    .chaid-fp-stat-icon svg {
        width: 23px;
        height: 23px;
    }

    .chaid-featured-project .chaid-fp-stat-value {
        font-size: 29px;
    }

    .chaid-featured-project .chaid-fp-stat-label {
        font-size: 11px;
    }
}


/* =============================================
   NARROW MOBILE DEVICES
   ============================================= */

@media (max-width: 360px) {

    .chaid-fp-content {
        padding: 18px 12px;
    }

    .chaid-fp-statistics {
        padding: 13px;
    }

    .chaid-fp-stat,
    .chaid-fp-stat:last-child {
        padding: 15px 6px;
    }

    .chaid-featured-project .chaid-fp-stat-value {
        font-size: 25px;
    }
}


/* =============================================
   ELEMENTOR CONTAINER RESPONSIVENESS

   Responds to the shortcode's actual width,
   not just the browser window.
   ============================================= */

@container (max-width: 900px) {

    .chaid-fp-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .chaid-fp-stats-list {
        display: grid;

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 12px;
    }

    .chaid-fp-stat,
    .chaid-fp-stat:last-child {
        padding: 16px;

        background: var(--fp-light);
        border: 1px solid var(--fp-border);
        border-radius: 8px;
    }
}

@container (max-width: 580px) {

    .chaid-fp-card {
        grid-template-columns: minmax(0, 1fr);
    }

    .chaid-fp-image {
        grid-row: 1;

        min-height: 0;
        aspect-ratio: 16 / 10;
    }

    .chaid-fp-stat,
    .chaid-fp-stat:last-child {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .chaid-fp-stat-content {
        align-items: center;
    }
}


/* =============================================
   REDUCED MOTION ACCESSIBILITY
   ============================================= */

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

    .chaid-featured-project *,
    .chaid-featured-project *::before,
    .chaid-featured-project *::after {
        transition: none !important;
        animation: none !important;
    }

    .chaid-fp-card:hover,
    .chaid-fp-card:hover .chaid-fp-photo,
    .chaid-fp-stat:hover .chaid-fp-stat-icon,
    .chaid-fp-button:hover svg {
        transform: none !important;
    }
}
