/* MaMo Academy Page Text Justification and Styling */

/* Academy Intro Section - Center alignment */
.academy-intro {
    padding: 20px 0;
    text-align: center;
}

.academy-intro .sub {
    color: #1fa97f;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 10px;
}

.academy-title {
    font-size: 42px;
    font-weight: 700;
    color: #0b3c3f;
    margin: 10px 0 20px;
    line-height: 1.2;
    text-align: center;
}

/* Academy Intro Section - Center text */
.academy-intro p {
    text-align: center;
    text-justify: auto;
    line-height: 1.8;
    color: #666;
    font-size: 16px;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    word-spacing: 0.05em;
    overflow-wrap: break-word;
    word-wrap: break-word;
    margin-top: 15px;
}

/* Section Description - Center text */
.section-description {
    text-align: center;
    line-height: 1.8;
    color: #666;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    word-spacing: 0.05em;
}

/* Course Card Descriptions - Justify text */
.course-card p {
    text-align: justify;
    text-justify: inter-word;
    line-height: 1.7;
    color: #666;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    word-spacing: 0.05em;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* Desktop View - Large screens (1200px and above) */
@media screen and (min-width: 1200px) {
    .academy-intro {
        padding: 25px 0;
    }
    
    .academy-title {
        font-size: 44px;
        margin: 12px 0 22px;
    }
    
    .academy-intro p {
        font-size: 17px;
        line-height: 1.85;
        max-width: 100%;
    }
    
    .section-description {
        font-size: 17px;
        line-height: 1.85;
    }
    
    .course-card p {
        font-size: 15px;
        line-height: 1.75;
    }
}

/* Desktop View - Medium screens (992px to 1199px) */
@media screen and (min-width: 992px) and (max-width: 1199px) {
    .academy-intro {
        padding: 22px 0;
    }
    
    .academy-title {
        font-size: 40px;
        margin: 10px 0 20px;
    }
    
    .academy-intro p {
        font-size: 16px;
        line-height: 1.8;
    }
    
    .section-description {
        font-size: 16px;
        line-height: 1.8;
    }
    
    .course-card p {
        font-size: 14px;
        line-height: 1.7;
    }
}

/* Tablet View - Landscape (768px to 991px) */
@media screen and (min-width: 768px) and (max-width: 991px) {
    .academy-intro {
        padding: 20px 0;
        margin-bottom: 30px;
    }
    
    .academy-title {
        font-size: 36px;
        margin: 10px 0 18px;
    }
    
    .academy-intro .sub {
        font-size: 15px;
    }
    
    .academy-intro p {
        font-size: 15px;
        line-height: 1.75;
        text-align: justify;
    }
    
    .section-description {
        font-size: 15px;
        line-height: 1.75;
        text-align: center;
    }
    
    .course-card p {
        font-size: 13px;
        line-height: 1.65;
    }
}

/* Tablet View - Portrait (481px to 767px) */
@media screen and (min-width: 481px) and (max-width: 767px) {
    .academy-intro {
        padding: 18px 0;
        margin-bottom: 25px;
    }
    
    .academy-title {
        font-size: 32px;
        margin: 10px 0 16px;
    }
    
    .academy-intro .sub {
        font-size: 14px;
    }
    
    .academy-intro p {
        font-size: 15px;
        line-height: 1.7;
        text-align: justify;
    }
    
    .section-description {
        font-size: 15px;
        line-height: 1.7;
        text-align: center;
        padding: 0 10px;
    }
    
    .course-card p {
        font-size: 13px;
        line-height: 1.6;
    }
}

/* Mobile View - Large (376px to 480px) */
@media screen and (min-width: 376px) and (max-width: 480px) {
    .academy-intro {
        padding: 15px 0;
        margin-bottom: 20px;
    }
    
    .academy-title {
        font-size: 28px;
        margin: 8px 0 14px;
    }
    
    .academy-intro .sub {
        font-size: 13px;
    }
    
    .academy-intro p {
        font-size: 14px;
        line-height: 1.65;
        text-align: justify;
    }
    
    .section-description {
        font-size: 14px;
        line-height: 1.65;
        text-align: center;
        padding: 0 10px;
    }
    
    .course-card p {
        font-size: 13px;
        line-height: 1.6;
    }
}

/* Mobile View - Small (up to 375px) */
@media screen and (max-width: 375px) {
    .academy-intro {
        padding: 15px 0;
        margin-bottom: 20px;
    }
    
    .academy-title {
        font-size: 26px;
        margin: 8px 0 12px;
    }
    
    .academy-intro .sub {
        font-size: 13px;
    }
    
    .academy-intro p {
        font-size: 13px;
        line-height: 1.6;
        text-align: justify;
    }
    
    .section-description {
        font-size: 13px;
        line-height: 1.6;
        text-align: center;
        padding: 0 10px;
    }
    
    .course-card p {
        font-size: 12px;
        line-height: 1.55;
    }
}

/* Extra Small Mobile (up to 320px) */
@media screen and (max-width: 320px) {
    .academy-intro {
        padding: 12px 0;
        margin-bottom: 18px;
    }
    
    .academy-title {
        font-size: 24px;
        margin: 6px 0 10px;
    }
    
    .academy-intro .sub {
        font-size: 12px;
    }
    
    .academy-intro p {
        font-size: 12px;
        line-height: 1.55;
    }
    
    .section-description {
        font-size: 12px;
        line-height: 1.55;
    }
    
    .course-card p {
        font-size: 11px;
        line-height: 1.5;
    }
}

/* Improve spacing and readability */
.academy-intro {
    padding: 20px 0;
}

.academy-title {
    margin-bottom: 20px;
}

/* Better text rendering */
.academy-intro p,
.section-description,
.course-card p {
    hyphens: auto;
    letter-spacing: 0.01em;
}

/* Ensure proper alignment on all devices */
@media screen and (max-width: 991px) {
    .academy-intro {
        text-align: center;
        margin-bottom: 30px;
    }
    
    .academy-title {
        text-align: center;
    }
    
    .academy-intro .sub {
        text-align: center;
    }
}

/* Feature cards heading alignment */
.academy-feature-card h4 {
    text-align: center;
    line-height: 1.4;
}

/* Ensure grid layout is proper */
.outsourcing-values-area .row {
    align-items: stretch;
}

/* Better spacing for the intro column */
@media screen and (min-width: 992px) {
    .academy-intro {
        padding-right: 30px;
        text-align: center;
    }
    
    .academy-title {
        text-align: center;
    }
    
    .academy-intro .sub {
        text-align: center;
    }
}

/* Academy Feature Cards - Modern Gradient Design */
.academy-feature-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 35px 25px;
    border-radius: 20px;
    border: 2px solid transparent;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.academy-feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(31, 169, 127, 0.05) 0%, rgba(11, 60, 63, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.academy-feature-card:hover::before {
    opacity: 1;
}

.academy-feature-card:hover {
    transform: translateY(-8px);
    border-color: #1fa97f;
    box-shadow: 0 15px 40px rgba(31, 169, 127, 0.2);
}

.academy-feature-card .icon-circle {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, #1fa97f 0%, #0b3c3f 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    transition: all 0.4s ease;
    position: relative;
    z-index: 1;
    box-shadow: 0 8px 20px rgba(31, 169, 127, 0.3);
}

.academy-feature-card:hover .icon-circle {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 12px 30px rgba(31, 169, 127, 0.4);
}

.academy-feature-card .icon-circle i {
    font-size: 36px;
    color: #ffffff;
    transition: transform 0.3s ease;
}

.academy-feature-card:hover .icon-circle i {
    transform: scale(1.1);
}

.academy-feature-card h4 {
    font-size: 18px;
    font-weight: 600;
    color: #0b3c3f;
    margin: 0;
    text-align: center;
    line-height: 1.5;
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

.academy-feature-card:hover h4 {
    color: #1fa97f;
}

/* Responsive adjustments for feature cards */
@media screen and (max-width: 991px) {
    .academy-feature-card {
        padding: 30px 20px;
    }
    
    .academy-feature-card .icon-circle {
        width: 80px;
        height: 80px;
        margin-bottom: 22px;
    }
    
    .academy-feature-card .icon-circle i {
        font-size: 32px;
    }
    
    .academy-feature-card h4 {
        font-size: 17px;
    }
}

@media screen and (max-width: 767px) {
    .academy-feature-card {
        padding: 28px 18px;
    }
    
    .academy-feature-card .icon-circle {
        width: 75px;
        height: 75px;
        margin-bottom: 20px;
    }
    
    .academy-feature-card .icon-circle i {
        font-size: 30px;
    }
    
    .academy-feature-card h4 {
        font-size: 16px;
    }
}

@media screen and (max-width: 480px) {
    .academy-feature-card {
        padding: 25px 15px;
    }
    
    .academy-feature-card .icon-circle {
        width: 70px;
        height: 70px;
        margin-bottom: 18px;
    }
    
    .academy-feature-card .icon-circle i {
        font-size: 28px;
    }
    
    .academy-feature-card h4 {
        font-size: 15px;
    }
}

/* Ensure proper grid alignment */
.outsourcing-values-area .col-md-4,
.outsourcing-values-area .col-sm-6 {
    display: flex;
}

/* Center align the intro section on all devices */
.academy-intro .sub {
    display: block;
    text-align: center;
    margin-bottom: 10px;
}

.academy-intro h2 {
    text-align: center;
}

.academy-intro p {
    text-align: center;
    margin: 0 auto;
    max-width: 100%;
}


/* Section background enhancement */
.outsourcing-values-area.bg-F5F5F5 {
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%) !important;
    position: relative;
}

.outsourcing-values-area.bg-F5F5F5::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1fa97f 0%, #0b3c3f 50%, #1fa97f 100%);
}

/* Enhanced intro section styling */
.academy-intro {
    position: relative;
    padding: 30px 25px;
    background: linear-gradient(135deg, rgba(31, 169, 127, 0.05) 0%, rgba(11, 60, 63, 0.05) 100%);
    border-radius: 20px;
    border-left: 4px solid #1fa97f;
}

.academy-intro .sub {
    font-size: 16px;
    font-weight: 600;
    color: #1fa97f;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 12px;
}

.academy-intro .academy-title {
    font-size: 42px;
    font-weight: 700;
    background: linear-gradient(135deg, #0b3c3f 0%, #1fa97f 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 18px;
}

.academy-intro p {
    font-size: 16px;
    line-height: 1.7;
    color: #4b5563;
}

/* Responsive intro section */
@media screen and (max-width: 991px) {
    .academy-intro {
        padding: 25px 20px;
        margin-bottom: 35px;
    }
    
    .academy-intro .academy-title {
        font-size: 36px;
    }
}

@media screen and (max-width: 767px) {
    .academy-intro {
        padding: 22px 18px;
    }
    
    .academy-intro .sub {
        font-size: 14px;
        letter-spacing: 1.5px;
    }
    
    .academy-intro .academy-title {
        font-size: 32px;
    }
    
    .academy-intro p {
        font-size: 15px;
    }
}

@media screen and (max-width: 480px) {
    .academy-intro {
        padding: 20px 15px;
    }
    
    .academy-intro .academy-title {
        font-size: 28px;
    }
    
    .academy-intro p {
        font-size: 14px;
    }
}

/* Add spacing between cards */
.outsourcing-values-area .row.g-4 {
    row-gap: 25px !important;
}

@media screen and (max-width: 767px) {
    .outsourcing-values-area .row.g-4 {
        row-gap: 20px !important;
    }
}
