/* Specialised Treatment Section Styles */

.specialised-treatment-section {
    height: 951px;
    background: #EFF9F9;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 45px;
    box-sizing: border-box;
}

.specialised-treatment-container {
    max-width: 1440px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* Section Title */
.specialised-treatment-title {
    font-family: 'Cal Sans';
    font-style: normal;
    font-weight: 400;
    ;
    font-size: 40px;
    line-height: 120%;
    text-align: center;
    margin: 0;
    max-width: 800px;
}

.specialised-treatment-title .color-black {
    color: #000000;
}

.specialised-treatment-title .color-primary {
    color: #E62D5B;
}

/* Section Description */
.specialised-treatment-description {
    font-family: 'Inter', Arial, sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 18px;
    line-height: 150%;
    text-align: center;
    color: #000000;
    margin: 0;
    max-width: 800px;
}

/* Treatment Cards Grid */
.treatment-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    width: 100%;
    max-width: 1350px;
    justify-items: center;
}

/* Center the last row with 2 cards using better approach */
.treatment-card:nth-child(13) {
    grid-column: 2;
}

.treatment-card:nth-child(14) {
    grid-column: 3;
}

/* Individual Treatment Card */
.treatment-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
    gap: 16px;
    width: 100%;
    height: 160px;
    background: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.treatment-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    border: 1px solid var(--primary-color);
}

/* Treatment Card Icon */
.treatment-card-icon {
    width: 29px;
    height: 29px;
    flex-shrink: 0;
    object-fit: contain;
}

/* Treatment Card Content */
.treatment-card-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    width: 100%;
}

/* Treatment Card Title */
.treatment-card-title {
    font-family: 'Cal Sans';
    font-style: normal;
    font-weight: 700;
    /* Bold weight */
    font-size: 18px;
    line-height: 150%;
    color: #000000;
    margin: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Treatment Card Description */
.treatment-card-description {
    font-family: 'Inter', Arial, sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    line-height: 150%;
    color: #000000;
    margin: 0;
    flex: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Responsive Design */

/* Tablet - 3 columns */
@media (max-width: 1200px) {
    .specialised-treatment-section {
        height: auto;
        min-height: 951px;
        padding: 45px 24px;
    }

    .treatment-cards-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
        max-width: 1000px;
        justify-content: center;
        justify-items: center;
    }

    .treatment-card {
        width: 100%;
        max-width: 308px;
    }
}

/* Mobile - Less than 768px width */
@media (max-width: 768px) {
    .specialised-treatment-section {
        padding: 32px 25px;
        height: auto;
        min-height: 600px;
    }

    .specialised-treatment-container {
        gap: 20px;
        align-items: center;
    }

    /* Mobile Title Style */
    .specialised-treatment-title {
        width: 392px;
        height: 76px;
        font-family: 'Cal Sans';
        font-style: normal;
        font-weight: 400;
        font-size: 32px;
        line-height: 120%;
        text-align: center;
        max-width: 392px;
    }

    /* Mobile Description Style */
    .specialised-treatment-description {
        width: 392px;
        height: 48px;
        font-style: normal;
        font-weight: 400;
        font-size: 16px;
        line-height: 150%;
        color: #000000;
        text-align: center;
        max-width: 392px;
    }

    /* Mobile Cards Grid - One card per row, center aligned */
    .specialised-treatment-section .treatment-cards-grid {
        grid-template-columns: 1fr !important;
        grid-template-rows: auto !important;
        max-width: 100% !important;
        justify-items: center !important;
        align-items: center !important;
        display: grid !important;
        width: 100% !important;
    }

    .specialised-treatment-section .treatment-card {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        min-height: 142px !important;
        margin: 0 auto !important;
        display: flex !important;
        flex-direction: column !important;
        grid-column: 1 !important;
    }

    /* Force single column by targeting specific children */
    .specialised-treatment-section .treatment-card:nth-child(1) {
        grid-column: 1 !important;
        grid-row: 1 !important;
    }

    .specialised-treatment-section .treatment-card:nth-child(2) {
        grid-column: 1 !important;
        grid-row: 2 !important;
    }

    .specialised-treatment-section .treatment-card:nth-child(3) {
        grid-column: 1 !important;
        grid-row: 3 !important;
    }

    .specialised-treatment-section .treatment-card:nth-child(4) {
        grid-column: 1 !important;
        grid-row: 4 !important;
    }

    .specialised-treatment-section .treatment-card:nth-child(5) {
        grid-column: 1 !important;
        grid-row: 5 !important;
    }

    .specialised-treatment-section .treatment-card:nth-child(6) {
        grid-column: 1 !important;
        grid-row: 6 !important;
    }

    .specialised-treatment-section .treatment-card:nth-child(7) {
        grid-column: 1 !important;
        grid-row: 7 !important;
    }

    .specialised-treatment-section .treatment-card:nth-child(8) {
        grid-column: 1 !important;
        grid-row: 8 !important;
    }

    .specialised-treatment-section .treatment-card:nth-child(9) {
        grid-column: 1 !important;
        grid-row: 9 !important;
    }

    .specialised-treatment-section .treatment-card:nth-child(10) {
        grid-column: 1 !important;
        grid-row: 10 !important;
    }

    .specialised-treatment-section .treatment-card:nth-child(11) {
        grid-column: 1 !important;
        grid-row: 11 !important;
    }

    .specialised-treatment-section .treatment-card:nth-child(12) {
        grid-column: 1 !important;
        grid-row: 12 !important;
    }

    .specialised-treatment-section .treatment-card:nth-child(13) {
        grid-column: 1 !important;
        grid-row: 13 !important;
    }

    .specialised-treatment-section .treatment-card:nth-child(14) {
        grid-column: 1 !important;
        grid-row: 14 !important;
    }

    /* Override desktop nth-child rules for centering last row */
    .specialised-treatment-section .treatment-card:nth-child(13) {
        grid-column: 1 !important;
        grid-row: 13 !important;
    }

    .specialised-treatment-section .treatment-card:nth-child(14) {
        grid-column: 1 !important;
        grid-row: 14 !important;
    }
}

/* Extra small mobile devices */
@media (max-width: 440px) {
    .specialised-treatment-section {
        padding: 24px 25px;
        min-height: 500px;
    }

    .specialised-treatment-title {
        max-width: 100%;
        width: 100%;
        font-size: 32px;
        height: auto;
    }

    .specialised-treatment-description {
        max-width: 100%;
        width: 100%;
        font-size: 16px;
        height: auto;
    }

    .treatment-cards-grid {
        grid-template-columns: 1fr !important;
        gap: 16px;
        width: 100%;
    }

    .treatment-card {
        width: 100% !important;
        max-width: 100%;
        margin: 0;
    }
}