/* =========================================================
   MAHFOOZ ACADEMY
   CAMPUS FACILITIES SECTION
========================================================= */

.campus-facilities-section {
    width: 100%;
    padding: 90px 20px;
    background: #f8f9fb;
    box-sizing: border-box;
    overflow: hidden;
}


/* =========================================================
   SECTION HEADER
========================================================= */

.campus-facilities-header {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto 75px;
    text-align: center;
}

.campus-facilities-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 14px 28px;

    background: #800020;
    color: #ffffff;

    border-radius: 30px;

    font-size: 15px;
    font-weight: 700;
    line-height: 1;

    margin-bottom: 25px;

    white-space: nowrap;
}

.campus-facilities-header h2 {
    margin: 0 0 24px;

    color: #222222;

    font-size: 54px;
    line-height: 1.15;
    font-weight: 800;

    letter-spacing: -1px;
}

.campus-facilities-header p {
    max-width: 950px;
    margin: 0 auto;

    color: #5d6268;

    font-size: 18px;
    line-height: 1.8;
    font-weight: 400;
}


/* =========================================================
   FACILITY ROW
========================================================= */

.facility-row {
    width: 100%;
    max-width: 1200px;

    margin: 0 auto 85px;

    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr);

    align-items: center;

    gap: 75px;

    box-sizing: border-box;
}

.facility-row:last-child {
    margin-bottom: 0;
}


/* =========================================================
   ALTERNATING DESKTOP LAYOUT

   01 IMAGE LEFT
   02 IMAGE RIGHT
   03 IMAGE LEFT
   04 IMAGE RIGHT
   05 IMAGE LEFT
   06 IMAGE RIGHT
========================================================= */


/* 01 COMPUTER LAB - IMAGE LEFT */

.facility-row:nth-child(2) {
    direction: ltr;
}

.facility-row:nth-child(2) .facility-content {
    direction: ltr;
}


/* 02 SMART CLASSROOM - IMAGE RIGHT */

.facility-row:nth-child(3) {
    direction: rtl;
}

.facility-row:nth-child(3) .facility-content {
    direction: ltr;
}


/* 03 SCIENCE LAB - IMAGE LEFT */

.facility-row:nth-child(4) {
    direction: ltr;
}

.facility-row:nth-child(4) .facility-content {
    direction: ltr;
}


/* 04 SPORTS GROUND - IMAGE RIGHT */

.facility-row:nth-child(5) {
    direction: rtl;
}

.facility-row:nth-child(5) .facility-content {
    direction: ltr;
}


/* 05 CCTV SECURITY - IMAGE LEFT */

.facility-row:nth-child(6) {
    direction: ltr;
}

.facility-row:nth-child(6) .facility-content {
    direction: ltr;
}


/* 06 KIDS CLASSROOM - IMAGE RIGHT */

.facility-row:nth-child(7) {
    direction: rtl;
}

.facility-row:nth-child(7) .facility-content {
    direction: ltr;
}


/* =========================================================
   FACILITY IMAGE
========================================================= */

.facility-image {
    width: 100%;
    height: 370px;

    overflow: hidden;

    background: #ffffff;

    border-radius: 22px 22px 40px 40px;

    box-shadow:
        0 18px 45px rgba(0, 0, 0, 0.12);

    box-sizing: border-box;
}

.facility-image img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
    object-position: center;

    border-radius: inherit;

    transition: transform 0.6s ease;
}

.facility-image:hover img {
    transform: scale(1.04);
}


/* =========================================================
   FACILITY CONTENT
========================================================= */

.facility-content {
    width: 100%;
    min-width: 0;

    box-sizing: border-box;
}


/* =========================================================
   NUMBER
========================================================= */

.facility-number {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    width: 48px;
    height: 48px;

    margin-bottom: 18px;

    background: #800020;
    color: #ffffff;

    border-radius: 50%;

    font-size: 14px;
    font-weight: 800;

    line-height: 1;
}


/* =========================================================
   FACILITY TITLE
========================================================= */

.facility-content h3 {
    margin: 0 0 18px;

    color: #222222;

    font-size: 38px;
    line-height: 1.2;

    font-weight: 800;
}

.facility-content h3::after {
    content: "";

    display: block;

    width: 55px;
    height: 4px;

    margin-top: 13px;

    background: #800020;

    border-radius: 20px;
}


/* =========================================================
   DESCRIPTION
========================================================= */

.facility-content > p {
    width: 100%;
    max-width: 540px;

    margin: 0 0 24px;

    color: #5d6268;

    font-size: 16px;
    line-height: 1.8;

    font-weight: 400;
}


/* =========================================================
   FACILITY POINTS
========================================================= */

.facility-points {
    display: flex;

    flex-wrap: wrap;

    gap: 10px;
}

.facility-points span {
    display: inline-flex;

    align-items: center;

    padding: 9px 14px;

    background: #ffffff;

    color: #333333;

    border-left: 3px solid #800020;

    border-radius: 0 9px 9px 0;

    font-size: 13px;
    font-weight: 600;

    line-height: 1.3;

    white-space: nowrap;

    box-shadow:
        0 4px 14px rgba(0, 0, 0, 0.05);

    transition: all 0.3s ease;
}

.facility-points span:hover {
    background: #fff7f8;
    transform: translateY(-2px);
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1000px) {

    .campus-facilities-section {
        padding: 70px 20px;
    }

    .campus-facilities-header {
        margin-bottom: 60px;
    }

    .campus-facilities-header h2 {
        font-size: 45px;
    }

    .campus-facilities-header p {
        font-size: 16px;
    }

    .facility-row {
        gap: 45px;
        margin-bottom: 65px;
    }

    .facility-image {
        height: 320px;
        border-radius: 20px 20px 35px 35px;
    }

    .facility-content h3 {
        font-size: 32px;
    }

    .facility-content > p {
        font-size: 15px;
        line-height: 1.75;
    }

    .facility-points {
        gap: 8px;
    }

    .facility-points span {
        font-size: 12px;
        padding: 8px 11px;
    }
}


/* =========================================================
   SMALL TABLET
========================================================= */

@media (max-width: 850px) {

    .facility-row {
        gap: 30px;
    }

    .facility-image {
        height: 300px;
    }

    .facility-content h3 {
        font-size: 29px;
    }

    .facility-content > p {
        font-size: 14px;
    }

    .facility-number {
        width: 43px;
        height: 43px;
    }
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 700px) {

    .campus-facilities-section {
        padding: 55px 16px;
    }


    /* HEADER */

    .campus-facilities-header {
        margin-bottom: 45px;
    }

    .campus-facilities-badge {
        padding: 10px 18px;

        font-size: 12px;

        margin-bottom: 17px;
    }

    .campus-facilities-header h2 {
        font-size: 34px;
        line-height: 1.2;

        margin-bottom: 17px;
    }

    .campus-facilities-header p {
        font-size: 14px;
        line-height: 1.7;
    }


    /* =====================================================
       ALL FACILITY ROWS
       MOBILE = IMAGE TOP + CONTENT BOTTOM
    ===================================================== */

    .facility-row,
    .facility-row:nth-child(2),
    .facility-row:nth-child(3),
    .facility-row:nth-child(4),
    .facility-row:nth-child(5),
    .facility-row:nth-child(6),
    .facility-row:nth-child(7) {

        width: 100%;

        display: flex;

        flex-direction: column;

        align-items: stretch;

        gap: 25px;

        margin-bottom: 55px;

        direction: ltr !important;
    }


    /* IMAGE ALWAYS TOP */

    .facility-image {
        width: 100%;
        height: 250px;

        order: 1;

        border-radius: 16px 16px 30px 30px;
    }


    /* CONTENT ALWAYS BELOW */

    .facility-content,
    .facility-row:nth-child(2) .facility-content,
    .facility-row:nth-child(3) .facility-content,
    .facility-row:nth-child(4) .facility-content,
    .facility-row:nth-child(5) .facility-content,
    .facility-row:nth-child(6) .facility-content,
    .facility-row:nth-child(7) .facility-content {

        width: 100%;

        order: 2;

        direction: ltr;

        text-align: left;
    }


    /* NUMBER */

    .facility-number {
        width: 40px;
        height: 40px;

        font-size: 12px;

        margin-bottom: 13px;
    }


    /* TITLE */

    .facility-content h3 {
        font-size: 27px;

        line-height: 1.25;

        margin-bottom: 15px;
    }

    .facility-content h3::after {
        width: 45px;
        height: 3px;

        margin-top: 10px;
    }


    /* DESCRIPTION */

    .facility-content > p {
        max-width: 100%;

        font-size: 13.5px;

        line-height: 1.7;

        margin-bottom: 19px;
    }


    /* POINTS */

    .facility-points {
        gap: 8px;
    }

    .facility-points span {
        padding: 8px 11px;

        font-size: 11px;
    }
}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 400px) {

    .campus-facilities-section {
        padding: 45px 14px;
    }

    .campus-facilities-header h2 {
        font-size: 30px;
    }

    .campus-facilities-header p {
        font-size: 13px;
    }

    .facility-row,
    .facility-row:nth-child(2),
    .facility-row:nth-child(3),
    .facility-row:nth-child(4),
    .facility-row:nth-child(5),
    .facility-row:nth-child(6),
    .facility-row:nth-child(7) {
        gap: 22px;
        margin-bottom: 48px;
    }

    .facility-image {
        height: 220px;

        border-radius: 14px 14px 27px 27px;
    }

    .facility-content h3 {
        font-size: 25px;
    }

    .facility-content > p {
        font-size: 13px;
        line-height: 1.65;
    }

    .facility-points span {
        font-size: 10.5px;
    }
}
.facility-number {
    display: none !important;
}