/* =========================================================
   HOME LANDING REDESIGN V1
   Single official layout layer for the requested sections.
   ========================================================= */

.home-page .home-section {
    padding-top: 24px !important;
    padding-bottom: 24px !important;
}

.home-page .home-section + .home-section {
    margin-top: 0 !important;
}

.home-courses-section {
    padding-top: 18px !important;
    padding-bottom: 18px !important;
}

.home-course-grade-group {
    width: min(1180px, calc(100% - 28px));
    margin: 0 auto 26px;
}

.home-course-grade-group:last-child {
    margin-bottom: 0;
}

.home-course-grade-title {
    margin: 0 0 14px;
    color: #1f4d3a;
    font-family: Cairo, sans-serif;
    font-size: clamp(20px, 2.2vw, 27px);
    line-height: 1.3;
    font-weight: 950;
    text-align: center;
}

.home-course-grade-title span {
    display: inline-block;
    margin-left: 5px;
}

.home-course-slider-shell {
    position: relative;
    padding-inline: 48px;
}

.home-course-slider {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding: 6px 2px 12px;
}

.home-course-slider::-webkit-scrollbar {
    display: none;
}

.home-course-card {
    flex: 0 0 calc((100% - 32px) / 3);
    width: calc((100% - 32px) / 3);
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(31, 77, 58, .10);
    border-radius: 20px;
    box-shadow: 0 14px 34px rgba(31, 77, 58, .08);
    scroll-snap-align: start;
}

.home-course-cover {
    position: relative;
    height: 174px;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.home-course-price {
    position: absolute;
    top: 12px;
    right: 12px;
}

.home-course-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 18px;
    text-align: right;
}

.home-course-grade {
    color: #8a6a2a;
    font-size: 12px;
    line-height: 1.4;
    font-weight: 900;
}

.home-course-body h3 {
    margin: 5px 0 8px;
    color: #173d2d;
    font-size: 17px;
    line-height: 1.55;
    font-weight: 950;
}

.home-course-body p {
    flex: 1;
    margin: 0 0 14px;
    color: #68726d;
    font-size: 13px;
    line-height: 1.75;
}

.home-course-teacher {
    margin-top: auto;
    padding: 11px 0;
    border-top: 1px solid rgba(31, 77, 58, .08);
    color: #52605a;
    font-size: 12px;
    line-height: 1.5;
    font-weight: 850;
}

.home-course-action-btn {
    width: 100%;
    min-height: 43px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #173d2d, #285f47);
    color: #fff;
    font-family: Cairo, sans-serif;
    font-size: 13px;
    font-weight: 950;
    cursor: pointer;
}

.home-course-slider-btn {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid rgba(31, 77, 58, .20);
    border-radius: 50%;
    background: rgba(255, 255, 255, .96);
    color: #1f4d3a;
    box-shadow: 0 10px 24px rgba(31, 77, 58, .16);
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    cursor: pointer;
}

.home-course-slider-btn svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.home-course-slider-prev {
    left: 0;
}

.home-course-slider-next {
    right: 0;
}

.home-book-store-section {
    padding-top: 12px !important;
}

.home-honor-grade-columns {
    width: min(1380px, calc(100% - 28px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    direction: rtl;
}

.home-honor-column {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.home-honor-column > h3 {
    margin: 0;
    padding: 11px 8px;
    border-radius: 14px;
    background: linear-gradient(135deg, #173d2d, #285f47);
    color: #fff;
    text-align: center;
    font-size: 16px;
    line-height: 1.35;
    font-weight: 950;
    box-shadow: 0 10px 22px rgba(31, 77, 58, .12);
}

.home-honor-column-list {
    display: grid;
    gap: 10px;
}

.home-honor-student-card {
    position: relative;
    min-width: 0;
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 38px 10px 12px;
    overflow: hidden;
    border: 1px solid rgba(31, 77, 58, .09);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(31, 77, 58, .06);
}

.home-honor-rank {
    position: absolute;
    top: 8px;
    left: 50%;
    min-width: 58px;
    height: 27px;
    padding: 0 9px;
    border-radius: 999px;
    background: #c79634;
    color: #fff;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 12px;
    font-weight: 950;
}

.home-honor-avatar,
.home-honor-avatar img,
.home-honor-avatar > span {
    width: 56px;
    height: 56px;
    border-radius: 50%;
}

.home-honor-avatar img {
    display: block;
    object-fit: cover;
    border: 2px solid #ead7aa;
}

.home-honor-avatar > span {
    display: grid;
    place-items: center;
    background: #173d2d;
    color: #fff;
    font-size: 22px;
    font-weight: 950;
}

.home-honor-student-info {
    min-width: 0;
}

.home-honor-student-info h3 {
    margin: 0 0 3px;
    color: #173d2d;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 950;
}

.home-honor-student-info p {
    margin: 0 0 7px;
    color: #77817d;
    font-size: 10px;
    line-height: 1.4;
}

.home-honor-student-info > div {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.home-honor-student-info strong,
.home-honor-student-info small {
    padding: 5px 7px;
    border-radius: 999px;
    font-size: 9px;
    line-height: 1;
    font-weight: 950;
}

.home-honor-student-info strong {
    background: #fbf3df;
    color: #a56f18;
}

.home-honor-student-info small {
    background: #173d2d;
    color: #fff;
}

.home-honor-empty {
    padding: 20px 8px;
    border: 1px dashed #dfd3bd;
    border-radius: 15px;
    background: #fff;
    color: #888;
    text-align: center;
    font-size: 11px;
    font-weight: 850;
}

.home-testimonials-heading {
    margin-bottom: 18px !important;
}

.home-testimonials-heading > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 22px;
    border-radius: 999px;
    background: rgba(199, 150, 52, .11);
    color: #9a6c20;
    font-size: clamp(18px, 2.2vw, 24px);
    line-height: 1.45;
    font-weight: 950;
}

.home-testimonials-grid.compact-testimonials {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.compact-testimonial-card {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.compact-testimonial-card > p {
    flex: 1;
}

.compact-testimonial-meta {
    position: relative;
    min-height: 38px;
    padding-left: 92px;
    display: flex;
    align-items: center;
}

.compact-testimonial-name {
    color: #b17a20 !important;
    font-weight: 950 !important;
}

.compact-testimonial-role {
    position: absolute;
    left: 0;
    top: 50%;
    min-width: 78px;
    transform: translateY(-50%);
    text-align: center;
}

.home-single-line-heading {
    margin-bottom: 16px !important;
}

.home-single-line-heading > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 8px 24px;
    border-radius: 999px;
    background: rgba(199, 150, 52, .11);
    color: #9a6c20;
    font-size: clamp(18px, 2.5vw, 25px);
    line-height: 1.3;
    font-weight: 950;
}

.home-banner-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-steps {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.home-step-card {
    min-width: 0;
    min-height: 150px;
    padding: 18px 13px;
    border: 1px solid rgba(31, 77, 58, .10);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(31, 77, 58, .07);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
}

.home-step-card strong {
    margin: 0;
}

.home-step-card span {
    color: #68726d;
    font-size: 12px;
    line-height: 1.7;
}

.home-parent-inline {
    margin-top: 18px;
    padding: 20px 22px;
    border: 1px solid rgba(31, 77, 58, .10);
    border-radius: 20px;
    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, .98),
            rgba(251, 247, 237, .98)
        );
    box-shadow:
        0 12px 28px rgba(31, 77, 58, .06);
    display: grid;
    grid-template-columns:
        minmax(270px, .9fr)
        minmax(0, 1.7fr);
    gap: 18px;
    align-items: center;
}

.home-parent-inline-heading {
    text-align: right;
}

.home-parent-inline-heading > span {
    color: #b17a20;
    font-size: 12px;
    font-weight: 900;
}

.home-parent-inline-heading h2 {
    margin: 5px 0 0;
    color: #173d2d;
    font-size: 24px;
    line-height: 1.45;
    font-weight: 950;
}

.home-parent-inline-tags {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.home-parent-inline-tags span {
    min-width: 0;
    padding: 8px 7px;
    border: 1px solid rgba(31, 77, 58, .10);
    border-radius: 999px;
    background: #fffaf0;
    color: #5e625f;
    text-align: center;
    font-size: 11px;
    line-height: 1.4;
    font-weight: 850;
}

.home-parent-box {
    align-items: center;
}

.home-parent-content {
    min-width: 0;
}

.home-parent-login-btn {
    flex: 0 0 auto;
}

.home-contact-grid {
    align-items: stretch;
}

.home-contact-card {
    text-align: center;
}

.home-contact-details {
    display: grid;
    gap: 10px;
    margin-bottom: 22px;
}

.home-contact-details p {
    margin: 0;
    display: grid;
    gap: 2px;
}

.home-contact-details strong {
    color: #173d2d;
    font-size: 15px;
}

.home-contact-details span {
    color: #68726d;
    font-size: 14px;
}

.home-contact-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.home-contact-socials a {
    min-width: 145px;
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--contact-button-color);
    color: #fff;
    text-decoration: none;
    display: inline-flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 950;
    box-shadow: 0 10px 22px rgba(0, 0, 0, .10);
}

.home-contact-socials a > span {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
}

.home-message-form-enhanced {
    position: relative;
    overflow: hidden;
    padding: 24px !important;
    border: 1px solid rgba(31, 77, 58, .10);
    border-radius: 24px !important;
    background:
        radial-gradient(
            circle at top left,
            rgba(212, 169, 90, .16),
            transparent 38%
        ),
        linear-gradient(180deg, #fff, #fffdf7);
    box-shadow: 0 18px 46px rgba(31, 77, 58, .10);
}

.home-message-form-head {
    margin-bottom: 4px;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    text-align: right;
}

.home-message-form-head > span {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: linear-gradient(135deg, #173d2d, #285f47);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 22px;
}

.home-message-form-head strong,
.home-message-form-head small {
    display: block;
}

.home-message-form-head strong {
    color: #173d2d;
    font-size: 20px;
    font-weight: 950;
}

.home-message-form-head small {
    margin-top: 3px;
    color: #7b8580;
    font-size: 12px;
    line-height: 1.6;
}

.home-message-form-enhanced label {
    display: grid;
    gap: 6px;
    text-align: right;
}

.home-message-form-enhanced label > span {
    color: #173d2d;
    font-size: 13px;
    font-weight: 900;
}

.home-message-form-enhanced input,
.home-message-form-enhanced textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid rgba(31, 77, 58, .13);
    border-radius: 13px;
    background: rgba(255, 255, 255, .94);
    font-family: Cairo, sans-serif;
}

.home-message-form-enhanced textarea {
    min-height: 120px;
    resize: vertical;
}

.home-contact-submit {
    width: 100%;
    min-height: 44px;
    margin-top: 1px;
    padding: 9px 16px !important;
    border: 0 !important;
    border-radius: 14px !important;
    background:
        linear-gradient(
            135deg,
            #c89534,
            #e2b85e
        ) !important;
    color: #173d2d !important;
    font-family: Cairo, sans-serif;
    font-size: 15px !important;
    line-height: 1.3;
    font-weight: 950 !important;
    box-shadow:
        0 12px 26px rgba(184, 137, 58, .25) !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition:
        transform .18s ease,
        box-shadow .18s ease,
        filter .18s ease;
}

.home-contact-submit:hover {
    transform: translateY(-1px);
    filter: brightness(1.03);
    box-shadow:
        0 15px 30px rgba(184, 137, 58, .30) !important;
}

.home-contact-submit:active {
    transform: translateY(0);
}

.home-message-form-enhanced {
    display: grid;
    gap: 9px;
    padding: 18px 20px !important;
}

.home-message-form-enhanced input,
.home-message-form-enhanced textarea {
    min-height: 44px;
    padding: 10px 13px !important;
    color: #173d2d;
    font-size: 14px;
    line-height: 1.6;
    outline: none;
    transition:
        border-color .18s ease,
        box-shadow .18s ease,
        background .18s ease;
}

.home-message-form-enhanced textarea {
    min-height: 88px;
    max-height: 130px;
}

.home-message-form-enhanced input:focus,
.home-message-form-enhanced textarea:focus {
    border-color: rgba(184, 137, 58, .65);
    background: #fff;
    box-shadow:
        0 0 0 4px rgba(212, 169, 90, .13);
}

@media (max-width: 1100px) {
    .home-steps {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .home-course-card {
        flex-basis: calc((100% - 16px) / 2);
        width: calc((100% - 16px) / 2);
        min-width: 0;
    }

    .home-honor-grade-columns {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-testimonials-grid.compact-testimonials {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .home-page .home-section {
        padding-top: 18px !important;
        padding-bottom: 18px !important;
    }

    .home-course-grade-group {
        margin-bottom: 18px;
    }

    .home-section-heading {
        margin-bottom: 14px !important;
        padding-inline: 8px !important;
    }

    .home-section-heading h2 {
        font-size: 22px !important;
        line-height: 1.45 !important;
    }

    .home-section-heading > span {
        font-size: 11px !important;
    }

    .home-about .home-inline-links {
        width: 100% !important;
        display: grid !important;
        grid-template-columns:
            repeat(3, minmax(0, 1fr)) !important;
        gap: 4px !important;
        overflow: visible !important;
    }

    .home-about .home-inline-links a {
        width: 100% !important;
        min-width: 0 !important;
        min-height: 34px !important;
        margin: 0 !important;
        padding: 6px 2px !important;
        overflow: hidden !important;
        border-radius: 999px !important;
        font-size: 9px !important;
        line-height: 1.15 !important;
        white-space: nowrap !important;
        text-overflow: ellipsis !important;
        transform: none !important;
        box-sizing: border-box !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-shadow:
            0 8px 18px rgba(31, 77, 58, .12) !important;
    }

    .home-course-grade-title {
        margin-bottom: 10px;
        padding-inline: 8px;
        font-size: 16px;
        white-space: nowrap;
    }

    .home-course-slider-shell {
        width: calc(100% - 10px);
        margin-inline: auto;
        padding-inline: 34px;
    }

    .home-course-slider {
        gap: 10px;
    }

    .home-course-card {
        flex-basis: min(88vw, 340px);
        width: min(88vw, 340px);
        min-width: min(88vw, 340px);
    }

    .home-course-cover {
        width: 100%;
        height: auto;
        min-height: 0;
        aspect-ratio: 16 / 9;
        background-size: cover;
        background-position: center;
    }

    .home-course-body {
        padding: 14px 13px;
    }

    .home-course-body p {
        margin-bottom: 10px;
        overflow: hidden;
        color: #68726d;
        font-size: 10px;
        line-height: 1.4;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .home-course-slider-btn {
        width: 31px;
        height: 31px;
        border-width: 1px;
        box-shadow: 0 7px 18px rgba(31, 77, 58, .16);
    }

    .home-course-slider-btn svg {
        width: 16px;
        height: 16px;
    }

    .home-course-slider-prev {
        left: 0;
    }

    .home-course-slider-next {
        right: 0;
    }

    .home-book-store-section {
        padding-top: 4px !important;
    }

    .home-honor-grade-columns {
        width: calc(100% - 12px);
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .home-honor-column {
        gap: 7px;
    }

    .home-honor-column > h3 {
        padding: 8px 3px;
        border-radius: 11px;
        font-size: 11px;
        line-height: 1.3;
    }

    .home-honor-column-list {
        gap: 7px;
    }

    .home-honor-student-card {
        grid-template-columns:
            36px minmax(0, 1fr);
        gap: 5px;
        padding: 31px 6px 8px;
        border-radius: 12px;
    }

    .home-honor-avatar,
    .home-honor-avatar img,
    .home-honor-avatar > span {
        width: 34px;
        height: 34px;
    }

    .home-honor-avatar > span {
        font-size: 14px;
    }

    .home-honor-rank {
        top: 6px;
        min-width: 42px;
        height: 22px;
        padding: 0 5px;
        font-size: 9px;
    }

    .home-honor-student-info h3 {
        margin-bottom: 2px;
        overflow: hidden;
        font-size: 9px;
        line-height: 1.25;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .home-honor-student-info p {
        margin-bottom: 4px;
        overflow: hidden;
        font-size: 7px;
        line-height: 1.25;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .home-honor-student-info > div {
        gap: 3px;
    }

    .home-honor-student-info strong,
    .home-honor-student-info small {
        padding: 3px 4px;
        font-size: 6.5px;
    }

    .home-testimonials-heading h2 {
        font-size: 20px !important;
        line-height: 1.7 !important;
    }

    .home-testimonials-heading h2 span {
        display: inline;
        font-size: .78em;
    }

    .home-testimonials-grid.compact-testimonials {
        grid-template-columns: 1fr;
    }

    .compact-testimonial-meta {
        padding-left: 82px;
    }

    .compact-testimonial-role {
        min-width: 72px;
        font-size: 10px !important;
    }

    .home-feature-grid,
    .home-banner-grid,
    .home-steps {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 7px !important;
    }

    .home-feature-card {
        min-width: 0 !important;
        min-height: 138px !important;
        padding: 11px 6px !important;
        border-radius: 14px !important;
        text-align: center !important;
    }

    .home-feature-icon {
        width: 30px !important;
        height: 30px !important;
        margin: 0 auto 7px !important;
        font-size: 13px !important;
    }

    .home-feature-card h3 {
        margin-bottom: 5px !important;
        font-size: 10.5px !important;
        line-height: 1.45 !important;
    }

    .home-feature-card p {
        margin: 0 !important;
        font-size: 8px !important;
        line-height: 1.5 !important;
    }

    .home-banner-card {
        min-width: 0 !important;
        padding: 11px 7px !important;
        border-radius: 14px !important;
    }

    .home-banner-card h3 {
        margin-bottom: 5px !important;
        font-size: 11px !important;
        line-height: 1.45 !important;
    }

    .home-banner-card p {
        margin-bottom: 7px !important;
        font-size: 8.5px !important;
        line-height: 1.5 !important;
    }

    .home-banner-card a {
        width: 100% !important;
        min-width: 0 !important;
        padding: 7px 2px !important;
        font-size: 8px !important;
        white-space: normal !important;
    }

    .home-step-card {
        min-width: 0 !important;
        min-height: 116px !important;
        padding: 10px 5px !important;
        border: 1px solid rgba(31, 77, 58, .10) !important;
        border-radius: 14px !important;
        background: #fff !important;
        box-shadow: 0 8px 20px rgba(31, 77, 58, .06) !important;
        text-align: center !important;
    }

    .home-step-card strong {
        width: 30px !important;
        height: 30px !important;
        margin: 0 auto 7px !important;
        font-size: 13px !important;
    }

    .home-step-card span {
        font-size: 8.5px !important;
        line-height: 1.55 !important;
    }

    .home-parent-inline {
        margin-top: 12px;
        padding: 15px 10px;
        grid-template-columns: 1fr;
        gap: 10px;
        text-align: center;
    }

    .home-parent-inline-heading {
        text-align: center;
    }

    .home-parent-inline-heading h2 {
        font-size: 18px;
        line-height: 1.45;
    }

    .home-parent-inline-tags {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
        gap: 5px;
    }

    .home-parent-inline-tags span {
        padding: 6px 2px;
        font-size: 7.5px;
        line-height: 1.3;
    }

    .home-parent-box {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 14px !important;
        padding: 22px 16px !important;
        text-align: center !important;
    }

    .home-parent-content h2 {
        margin: 7px 0 12px !important;
        font-size: 22px !important;
        line-height: 1.55 !important;
    }

    .home-parent-content .home-tags {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 6px !important;
    }

    .home-parent-content .home-tags span {
        min-width: 0 !important;
        padding: 7px 3px !important;
        font-size: 9px !important;
        line-height: 1.4 !important;
    }

    .home-parent-login-btn {
        width: 100% !important;
        min-height: 44px !important;
    }

    .home-contact-grid {
        gap: 14px !important;
    }

    .home-contact-socials {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .home-contact-socials a {
        min-width: 0;
        padding: 9px 5px;
        font-size: 10px;
    }

    .home-message-form-enhanced {
        padding: 17px 13px !important;
        border-radius: 19px !important;
    }

    .home-message-form-head {
        grid-template-columns: 40px minmax(0, 1fr);
        gap: 9px;
    }

    .home-message-form-head > span {
        width: 40px;
        height: 40px;
        border-radius: 13px;
        font-size: 18px;
    }

    .home-message-form-head strong {
        font-size: 17px;
    }

    .home-message-form-head small {
        font-size: 10px;
    }
}
