/*
 * Siam Partners theme layer - header with centred logo on the brand
 * pattern, and the homepage category cards. Loaded after app.css and
 * frontend_style.css, so it only overrides what it names. Everything is
 * scoped under .sp-* classes (header partial: partials/_menu.blade.php).
 */
:root {
    --sp-ink: #b98d66;          /* menu text, matches the pattern lines */
    --sp-ink-hover: #8f5f3a;
    --sp-pattern: url(../img/pattern/siam-pattern.svg);
    --sp-pattern-size: 720px auto;
}

/* ---------- Header ---------- */

/* Space reserved for the header even when it is fixed on scroll, so short
   pages don't flicker (exact height is set by the script in _menu.blade.php;
   these are the fallbacks). */
.sp-header {
    display: block;
    min-height: 130px;
}

@media (max-width: 991.98px) {
    .sp-header {
        min-height: 76px;
    }
}

.sp-header .header_area {
    background: #fff var(--sp-pattern) center top / var(--sp-pattern-size) repeat;
    box-shadow: none;
}

/* Homepage: the header lets the page pattern show through, so header and
   cards sit on one continuous pattern like the design. */
.sp-is-home .sp-header .header_area {
    background: transparent;
}

/* Sticky state (app.js adds .navbar_fixed after 200px of scrolling). */
.sp-header .header_area.navbar_fixed,
.sp-is-home .sp-header .header_area.navbar_fixed {
    background: #fff var(--sp-pattern) center top / var(--sp-pattern-size) repeat;
    box-shadow: 0 3px 16px rgba(110, 70, 40, .12);
}

.sp-header__row {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    min-height: 130px;
}

.sp-header .navbar_fixed .sp-header__row {
    min-height: 84px;
}

.sp-logo {
    padding: 0 48px;
    text-align: center;
}

.sp-logo img {
    width: 190px;
    max-width: 100%;
    transition: width .3s ease;
}

.sp-header .navbar_fixed .sp-logo img {
    width: 140px;
}

.sp-nav--left {
    justify-self: end;
}

.sp-nav--right {
    justify-self: start;
}

/* Override the old right-aligned menu so each side hugs the logo. */
.sp-header .header_area .main_menu.sp-nav {
    margin: 0;
    text-align: center;
}

.sp-header .header_area .main_menu.sp-nav > nav > ul {
    display: flex;
    align-items: center;
    gap: 8px 56px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sp-header .header_area .main_menu.sp-nav > nav > ul > li > a,
.sp-header .header_area .main_menu.sp-nav .categories_menu {
    display: inline-block;
    max-width: 170px;
    padding: 24px 0;
    color: var(--sp-ink);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: .18em;
    text-transform: uppercase;
    text-align: center;
    white-space: normal;
}

.sp-header .header_area.navbar_fixed .main_menu.sp-nav > nav > ul > li > a {
    padding: 14px 0;
}

.sp-header .header_area .main_menu.sp-nav > nav > ul > li > a:hover,
.sp-header .header_area .main_menu.sp-nav .categories_menu:hover {
    color: var(--sp-ink-hover);
}

/* Submenus keep the old dropdown styling; just left-align their text. */
.sp-header .main_menu.sp-nav .submenu a,
.sp-header .main_menu.sp-nav .mega_menu a {
    letter-spacing: normal;
    text-transform: none;
}

/* Language, search and account icons, top right. */
.sp-utils {
    position: absolute;
    top: 12px;
    right: 0;
    display: flex;
    align-items: center;
    gap: 14px;
    z-index: 5;
}

.sp-header .navbar_fixed .sp-utils {
    top: 50%;
    transform: translateY(-50%);
}

.sp-icon-btn,
.sp-signin {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 0;
    padding: 4px;
    color: var(--sp-ink);
    font-size: 13px;
    letter-spacing: .08em;
    text-transform: uppercase;
    cursor: pointer;
}

.sp-icon-btn i,
.sp-signin i {
    font-size: 17px;
}

.sp-icon-btn:hover,
.sp-signin:hover {
    color: var(--sp-ink-hover);
}

.sp-search {
    position: relative;
    display: flex;
    align-items: center;
}

.sp-search__form {
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    overflow: hidden;
    transition: width .25s ease;
}

.sp-search.is-open .sp-search__form {
    width: 240px;
}

.sp-search__form input {
    width: 240px;
    height: 36px;
    padding: 0 14px;
    border: 1px solid #e4cfba;
    border-radius: 18px;
    background: #fff;
    font-size: 14px;
}

.sp-lang .nice-select {
    height: 32px;
    line-height: 30px;
    border-color: #e4cfba;
    color: var(--sp-ink);
    font-size: 13px;
}

/* Account menu: undo the old header's offsets (left: -35px / -10px and a
   15px margin on the avatar), which pushed it toward the middle on phones. */
.sp-utils .header__right,
.sp-utils .profile_info {
    position: relative;
    left: 0 !important;
    margin: 0;
    padding: 0;
}

.sp-utils .profile_info .studentProfileThumb {
    width: 34px;
    height: 34px;
    margin-right: 0;
}

.sp-utils .profile_info .profile_info_iner {
    top: 46px;
    right: 0;
    left: auto;
}

.sp-utils .profile_info.active .profile_info_iner {
    transform: translateY(0) !important;
}

/* Point the dropdown's arrow at the centre of the 34px avatar. */
.sp-utils .profile_info .profile_info_iner:after {
    right: 9px;
}

/* ---------- Phones and tablets ---------- */
@media (max-width: 991.98px) {
    .sp-header__row {
        grid-template-columns: 1fr;
        min-height: 76px;
    }

    .sp-logo {
        padding: 0;
        text-align: left;
    }

    .sp-logo img,
    .sp-header .navbar_fixed .sp-logo img {
        width: 130px;
    }

    /* Icons sit right beside the mobile menu button (☰), as one group in the
       top-right corner. */
    /* +14px lines the icons up with the menu button, which slicknav draws a
       little below the row's centre. */
    .sp-utils,
    .sp-header .navbar_fixed .sp-utils {
        top: calc(50% + 14px);
        right: 32px;
        transform: translateY(-50%);
        gap: 10px;
    }

    /* Account dropdown lines up with the right edge of the screen, under the
       menu button, instead of floating mid-screen. */
    .sp-utils .profile_info .profile_info_iner {
        top: 44px;
        right: -26px;
        width: 210px;
    }

    .sp-utils .profile_info .profile_info_iner:after {
        left: auto;
        right: 35px;
    }

    .sp-signin span,
    .sp-lang {
        display: none;
    }

    .sp-search.is-open .sp-search__form,
    .sp-search__form input {
        width: 180px;
    }
}

/* ---------- Homepage ---------- */

.sp-is-home {
    background: #fff var(--sp-pattern) center top / var(--sp-pattern-size) repeat;
}

.sp-is-home .category_area {
    background: transparent;
    padding-top: 16px;
    padding-bottom: 80px;
}

.sp-cat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px;
}

.sp-cat-card {
    display: block;
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 14px 32px rgba(110, 70, 40, .18);
    transition: transform .25s ease, box-shadow .25s ease;
}

.sp-cat-card img {
    display: block;
    width: 100%;
    height: auto;
}

.sp-cat-card:hover,
.sp-cat-card:focus-visible {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(110, 70, 40, .26);
}

@media (max-width: 991.98px) {
    .sp-cat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .sp-cat-card {
        border-radius: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sp-cat-card,
    .sp-logo img,
    .sp-search__form {
        transition: none;
    }
}

/* ---------- Category landing pages ---------- */
/* Colours come from the category's homepage card (ThumbnailPalette), set
   inline as --cl-bg / --cl-accent on .cl-page--themed. Without a palette
   the page keeps its default look. */

.cl-page--themed {
    background: var(--cl-bg);
    padding-top: 40px;
    padding-bottom: 60px;
}

/* Sections bring their own white/grey backgrounds; let the page colour run
   through them. Cards inside (courses, testimonials) stay white. */
.cl-page--themed .course_area,
.cl-page--themed .blog_area,
.cl-page--themed .instractors_wrapper,
.cl-page--themed .brand_area,
.cl-page--themed .testmonial_area,
.cl-page--themed .category_custom_section {
    background: transparent !important;
}

.cl-page--themed .section__title h1,
.cl-page--themed .section__title h3,
.cl-page--themed .section__title2 h3,
.cl-page--themed .category_custom_section h3 {
    color: var(--cl-accent);
}

.cl-page--themed .theme_btn {
    background: var(--cl-accent);
    border-color: var(--cl-accent);
    color: #fff;
}

.cl-page--themed .theme_btn:hover {
    background: transparent;
    color: var(--cl-accent);
}

/* ---------- Blog list (/blogs) ---------- */
/* Same 18px corner radius and soft brown shadow as the homepage cards. */

.sp-blog {
    padding-top: 60px;
    padding-bottom: 80px;
    background: #fbf8f4;
}

.sp-blog-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
}

.sp-blog-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(110, 70, 40, .10);
    transition: transform .25s ease, box-shadow .25s ease;
}

.sp-blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(110, 70, 40, .16);
}

.sp-blog-card__media {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 18px 18px 0 0;
}

.sp-blog-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.sp-blog-card:hover .sp-blog-card__media img {
    transform: scale(1.04);
}

.sp-blog-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    padding: 20px 22px 22px;
}

.sp-blog-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    color: #8a7d72;
    font-size: 13px;
}

.sp-blog-chip {
    padding: 3px 10px;
    border-radius: 999px;
    background: #f4ebe2;
    color: var(--sp-ink-hover);
    font-size: 12px;
    font-weight: 500;
}

.sp-blog-card__title {
    margin: 0;
    color: #2b2420;
    font-size: 19px;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sp-blog-card a:hover .sp-blog-card__title {
    color: var(--sp-ink-hover);
}

.sp-blog-card__excerpt {
    margin: 0;
    color: #6b625b;
    font-size: 15px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sp-blog-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 8px;
    font-size: 13px;
}

.sp-blog-card__author {
    color: #8a7d72;
}

.sp-blog-card__more {
    color: var(--sp-ink-hover);
    font-weight: 600;
    white-space: nowrap;
}

/* Newest post on page 1: full width, image beside the text on desktop. */
.sp-blog-card--featured {
    grid-column: 1 / -1;
    flex-direction: row;
}

.sp-blog-card--featured .sp-blog-card__media {
    flex: 0 0 55%;
    aspect-ratio: auto;
    min-height: 320px;
    border-radius: 18px 0 0 18px;
}

.sp-blog-card--featured .sp-blog-card__body {
    justify-content: center;
    padding: 32px;
}

.sp-blog-card--featured .sp-blog-card__title {
    font-size: 26px;
    -webkit-line-clamp: 3;
}

.sp-blog-card--featured .sp-blog-card__excerpt {
    -webkit-line-clamp: 4;
}

.sp-blog-card--featured .sp-blog-card__foot {
    margin-top: 8px;
}

.sp-blog-pagination {
    margin-top: 40px;
}

/* Sidebar: each box becomes a rounded white card; sticks while scrolling. */
.sp-blog-sidebar {
    position: sticky;
    top: 110px;
}

.sp-blog-sidebar .blog_sidebar_wrap {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sp-blog-sidebar .blog_sidebar_wrap > form,
.sp-blog-sidebar .blog_sidebar_box,
.sp-blog-sidebar .blog_sidebar_box.p-0 {
    margin: 0 !important;
    padding: 22px !important;
    background: #fff;
    border: 0 !important;
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(110, 70, 40, .08);
}

.sp-blog-sidebar .theme_search_field4 {
    margin-bottom: 0 !important;
}

.sp-blog-sidebar .theme_search_field4 .form-control {
    border-radius: 999px;
}

@media (max-width: 991.98px) {
    .sp-blog {
        padding-top: 32px;
    }

    .sp-blog-sidebar {
        position: static;
        margin-top: 48px;
    }

    .sp-blog-card--featured {
        flex-direction: column;
    }

    .sp-blog-card--featured .sp-blog-card__media {
        flex: none;
        aspect-ratio: 16 / 10;
        min-height: 0;
        border-radius: 18px 18px 0 0;
    }

    .sp-blog-card--featured .sp-blog-card__body {
        padding: 20px 22px 22px;
    }

    .sp-blog-card--featured .sp-blog-card__title {
        font-size: 21px;
    }
}

@media (max-width: 575.98px) {
    .sp-blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .sp-blog-card,
    .sp-blog-card__media {
        border-radius: 14px;
    }

    .sp-blog-card__media {
        border-radius: 14px 14px 0 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sp-blog-card,
    .sp-blog-card__media img {
        transition: none;
    }
}

/* ---------- Contact page (/contact-us) ---------- */

.sp-contact {
    padding-top: 60px;
    padding-bottom: 70px;
    background: #fbf8f4;
}

.sp-contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 28px;
    max-width: 1080px;
    margin: 0 auto;
}

.sp-contact h2 {
    margin: 0 0 12px;
    font-size: 26px;
    font-weight: 600;
    line-height: 1.3;
}

/* Left: warm brown panel with quick-chat buttons and contact details. */
.sp-contact-info {
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: 36px 32px;
    border-radius: 18px;
    background: linear-gradient(160deg, #a2714a 0%, #7a4b2c 100%);
    color: #fff;
    box-shadow: 0 14px 32px rgba(110, 70, 40, .22);
}

.sp-contact-info h2 {
    color: #fff;
    margin-bottom: 0;
}

.sp-contact-info__lead {
    margin: 0;
    color: rgba(255, 255, 255, .85);
    font-size: 15px;
    line-height: 1.6;
}

.sp-contact-quick {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sp-contact-quick__btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 18px;
    border-radius: 12px;
    background: #fff;
    color: #3b2a1f;
    font-size: 15px;
    font-weight: 600;
    transition: transform .2s ease, box-shadow .2s ease;
}

.sp-contact-quick__btn i {
    font-size: 22px;
}

.sp-contact-quick__btn--wa i {
    color: #25d366;
}

.sp-contact-quick__btn--ms i {
    color: #0084ff;
}

.sp-contact-quick__btn:hover {
    color: #3b2a1f;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, .15);
}

.sp-contact-lines {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 0;
    padding: 18px 0 0;
    border-top: 1px solid rgba(255, 255, 255, .25);
    list-style: none;
}

.sp-contact-lines li {
    display: flex;
    gap: 12px;
    font-size: 15px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.sp-contact-lines i {
    margin-top: 3px;
    font-size: 17px;
    opacity: .85;
}

.sp-contact-social {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
}

.sp-contact-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .16);
    color: #fff;
}

.sp-contact-social a:hover {
    background: rgba(255, 255, 255, .3);
    color: #fff;
}

/* Right: white form card. */
.sp-contact-form {
    padding: 36px 32px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(110, 70, 40, .10);
}

.sp-contact-form h2 {
    color: #2b2420;
    margin-bottom: 22px;
}

.sp-contact-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 20px;
}

.sp-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.sp-field--full {
    grid-column: 1 / -1;
}

.sp-contact-form .primary_label {
    margin: 0;
    color: #5c524b;
    font-size: 14px;
    font-weight: 500;
}

.sp-contact-form .primary_input,
.sp-contact-form .primary_textarea {
    width: 100%;
    margin: 0 !important;
    padding: 12px 16px;
    border: 1px solid #e6dbd0;
    border-radius: 12px;
    background: #fdfbf9;
    color: #2b2420;
    font-size: 15px;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.sp-contact-form .primary_input {
    height: 48px;
}

.sp-contact-form .primary_textarea {
    min-height: 150px;
    resize: vertical;
}

.sp-contact-form .primary_input:focus,
.sp-contact-form .primary_textarea:focus {
    outline: none;
    border-color: #b98d66;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(185, 141, 102, .18);
}

.sp-field .text-danger:empty {
    display: none;
}

.sp-contact-captcha {
    margin-top: 18px;
}

.sp-contact-form .alert-msg:not(:empty) {
    margin-top: 16px;
}

.sp-contact-submit {
    width: 100%;
    margin-top: 22px;
    height: 50px;
    border-radius: 12px !important;
    font-size: 16px;
}

/* Map below, as a rounded card. */
.sp-contact-map {
    padding-bottom: 70px;
    background: #fbf8f4;
}

.sp-contact-map .row > [class*="col-"] {
    flex: 0 0 100%;
    max-width: 1080px;
}

.sp-contact-map #contact-map {
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(110, 70, 40, .10);
}

@media (max-width: 991.98px) {
    .sp-contact {
        padding-top: 32px;
    }

    .sp-contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .sp-contact-info,
    .sp-contact-form {
        padding: 26px 20px;
        border-radius: 14px;
    }

    .sp-contact-fields {
        grid-template-columns: 1fr;
    }
}

/* ---------- Make a Payment (/make-payment) ---------- */
/* The packages are a Stripe Pricing Table iframe (styled in the Stripe
   Dashboard); this only frames it. Plain cream background like the blog and
   contact pages - the pattern behind text made it hard to read. */

.sp-pay {
    padding-top: 56px;
    padding-bottom: 80px;
    background: #fbf8f4;
}

.sp-pay .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    max-width: 1140px;
}

.sp-pay-head {
    max-width: 640px;
    text-align: center;
}

.sp-pay-head h1 {
    margin: 0 0 10px;
    color: #2b2420;
    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
}

.sp-pay-head p {
    margin: 0;
    color: #6b625b;
    font-size: 17px;
    line-height: 1.6;
}

.sp-pay-steps {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 28px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sp-pay-steps li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #4a3f37;
    font-size: 15px;
    font-weight: 500;
}

.sp-pay-steps__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--sp-ink-hover);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}

.sp-pay-card {
    width: 100%;
    padding: 28px 20px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 14px 32px rgba(110, 70, 40, .14);
}

.sp-pay-trust {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 28px;
    margin: 0;
    padding: 0;
    list-style: none;
    color: #6b625b;
    font-size: 14px;
}

.sp-pay-trust li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sp-pay-trust i {
    color: var(--sp-ink-hover);
    font-size: 16px;
}

.sp-pay-help {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px 28px;
    width: 100%;
    max-width: 860px;
    padding: 26px 30px;
    border-radius: 18px;
    background: linear-gradient(160deg, #a2714a 0%, #7a4b2c 100%);
    color: #fff;
}

.sp-pay-help h2 {
    margin: 0 0 4px;
    color: #fff;
    font-size: 20px;
    font-weight: 600;
}

.sp-pay-help p {
    margin: 0;
    color: rgba(255, 255, 255, .85);
    font-size: 15px;
}

.sp-pay-help__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.sp-pay-help__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 18px;
    border-radius: 12px;
    background: #fff;
    color: #3b2a1f;
    font-size: 15px;
    font-weight: 600;
}

.sp-pay-help__btn:hover {
    color: #3b2a1f;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .15);
}

.sp-pay-help__btn .fa-whatsapp {
    color: #25d366;
    font-size: 19px;
}

.sp-pay-help__btn .fa-facebook-messenger {
    color: #0084ff;
    font-size: 19px;
}

@media (max-width: 575.98px) {
    .sp-pay {
        padding-top: 32px;
    }

    .sp-pay-head h1 {
        font-size: 28px;
    }

    .sp-pay-card {
        padding: 18px 8px;
        border-radius: 14px;
    }

    .sp-pay-help {
        padding: 22px 20px;
        border-radius: 14px;
    }
}
