/* =========================================================
   DSD Information Page
   ========================================================= */

.dsd-page {
    --dsd-navy: #1A2B4A;
    --dsd-navy-dark: #0F1A30;
    --dsd-orange: #F5A623;
    --dsd-orange-soft: #FFF4DC;
    --dsd-gray: #6B7280;
    --dsd-gray-light: #F5F6F8;
    --dsd-border: #E5E7EB;
    color: #1F2937;
}

.dsd-page h1, .dsd-page h2, .dsd-page h3 {
    font-weight: 700;
}

/* ---------- Section spacing ---------- */
.dsd-section {
    margin-bottom: 3.5rem;
}

/* =========================================================
   1. Hero Banner (single image: text + gradient + man embedded)
   ========================================================= */
.dsd-hero {
    border-radius: 16px;
    overflow: hidden;
    background: #1A2B4A;
}

.dsd-hero-img {
    width: 100%;
    height: auto;
    display: block;
}

/* =========================================================
   2. Intro Paragraph
   ========================================================= */
.dsd-intro {
    text-align: left;
    margin: 3rem 0 1rem;
}

.dsd-intro p {
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.6;
    color: #1F2937;
}

/* =========================================================
   3. Why Section (3 Cards)
   ========================================================= */
.dsd-section-title {
    text-align: left;
    font-size: 1.15rem;
    font-weight: 600 !important;
    margin-bottom: 2rem;
    color: #1F2937;
}

.dsd-feature-card {
    background: #fff;
    border: 1px solid var(--dsd-border);
    border-radius: 16px;
    padding: 2rem 1.75rem;
    height: 100%;
    transition: box-shadow .2s ease, transform .2s ease;
    display: flex;
    flex-direction: column;
}

.dsd-feature-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    transform: translateY(-2px);
}

.dsd-feature-icon {
    width: 56px;
    height: 56px;
    margin-bottom: 1.5rem;
    display: inline-block;
}

.dsd-feature-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.dsd-feature-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: .75rem;
    color: #1F2937;
}

.dsd-feature-card p {
    font-size: 0.9rem;
    color: var(--dsd-gray);
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.dsd-feature-card .dsd-btn-primary {
    align-self: flex-start;
    margin-top: auto;
}

/* =========================================================
   Primary button (orange pill)
   ========================================================= */
.dsd-page a.dsd-btn-primary,
.dsd-page a.dsd-btn-primary:link,
.dsd-page a.dsd-btn-primary:visited,
.dsd-btn-primary {
    background: #fbb034;
    border: none;
    color: #fff;
    font-weight: 600;
    border-radius: 999px;
    padding: .65rem 1.5rem;
    font-size: 0.95rem;
    transition: background .15s ease, transform .15s ease;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    text-decoration: none;
}

.dsd-page a.dsd-btn-primary:hover,
.dsd-page a.dsd-btn-primary:focus,
.dsd-page a.dsd-btn-primary:active,
.dsd-btn-primary:hover,
.dsd-btn-primary:focus,
.dsd-btn-primary:active {
    background: #f39b0a;
    color: #fff;
    text-decoration: none;
    outline: none;
}

/* =========================================================
   4. HR Helper Section (2 Cards with image)
   Curve technique: convex top-right of white area + 2 radial-gradient fillets
   → smooth transition จาก curve เข้าหาผนัง container
   ========================================================= */
.dsd-helper-card {
    position: relative;
    border-radius: 20px 20px 20px 0px;
    overflow: hidden;
    background: #fff;
    height: 100%;
}

.dsd-helper-card .helper-img {
    width: 100%;
    height: auto;
    display: block;
}

/* Main white text area — bottom-left rectangle with convex top-right corner */
.dsd-helper-card .helper-body {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 65%;
    height: 38%;
    background: #fbfbfb;
    border-top-right-radius: 20px;
    padding: 1.25rem 1.5rem 1.25rem 0rem;
    z-index: 2;
    box-sizing: border-box;
}

/* Top-left fillet — concave curve smoothing top-left edge into container wall */
.dsd-helper-card .helper-body::before {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 0;
    width: 20px;
    height: 20px;
    background-image: radial-gradient(circle at top right, transparent 20px, #fbfbfb 20.5px);
}

/* Bottom-right fillet — concave curve smoothing right edge into container bottom */
.dsd-helper-card .helper-body::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 100%;
    width: 20px;
    height: 20px;
    background-image: radial-gradient(circle at top right, transparent 20px, #fbfbfb 20.5px);
}

.dsd-helper-card .helper-body h3 {
    font-size: clamp(0.85rem, 0.95vw, 1.05rem);
    font-weight: 700;
    margin: 0 0 .5rem;
    line-height: 1.3;
    color: #1F2937;
}

.dsd-helper-card .helper-body p {
    font-size: clamp(0.72rem, 0.78vw, 0.875rem);
    color: var(--dsd-gray);
    line-height: 1.5;
    margin: 0;
}

/* ≤991.98px — card 2-up บีบ → ซ่อน <p> ให้ heading มีที่หายใจ */
@media (max-width: 991.98px) {
    .dsd-helper-card .helper-body p {
        display: none;
    }
    .dsd-helper-card .helper-body h3 {
        margin-bottom: 0;
    }
}

/* <768px — cards stack เป็น col-12 (กว้างเต็ม) → ขยาย body + แสดง <p> */
@media (max-width: 767.98px) {
    .dsd-helper-card .helper-body {
        width: 55%;
        height: 35%;
    }
    .dsd-helper-card .helper-body h3 {
        font-size: 1rem;
        margin-bottom: .4rem;
    }
    .dsd-helper-card .helper-body p {
        display: block;
        font-size: 0.85rem;
    }
}

/* =========================================================
   5. Promo Banner (dark card + timeline)
   ========================================================= */
.dsd-promo {
    background: var(--dsd-gray-light);
    border-radius: 16px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.dsd-promo-card {
    background: linear-gradient(135deg, #1A2B4A 0%, #0F1A30 100%);
    color: #fff;
    border-radius: 16px;
    padding: 2rem 1.75rem;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.dsd-promo-card h3 {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1.5rem;
}

.dsd-promo-card .promo-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    color: var(--dsd-orange);
    font-weight: 300;
    font-size: 0.9rem;
    margin-bottom: .25rem;
}

.dsd-promo-card .promo-badge img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.dsd-promo-card .promo-text {
    font-size: 0.875rem;
    line-height: 1.65;
    color: rgba(255,255,255,0.85);
    margin: 0;
}

.dsd-promo-card .promo-text strong {
    color: #fff;
}

/* Timeline (right side — horizontal layout) */
.dsd-timeline {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 2rem;
    margin-top: 40px;
}

.dsd-timeline::before {
    content: "";
    position: absolute;
    left: -30px;
    right: 35%;
    top: 30px;
    height: 2px;
    background: var(--dsd-orange);
    z-index: 0;
}

.dsd-timeline-item {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
}

.dsd-timeline-icon {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    margin-left: 15%;
}

.dsd-timeline-icon img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    display: block;
}

.dsd-timeline-body p {
    margin: 0;
    font-size: 0.95rem;
    color: #1F2937;
    line-height: 1.6;
}

/* Mobile + tablet portrait (<768px) — Promo banner stacks, timeline needs top margin */
@media (max-width: 767.98px) {
    .dsd-timeline {
        margin-top: 1rem;
    }
    .dsd-timeline::before {
        left: 0px;
    }
}

/* Mobile (<576px) — small phones */
@media (max-width: 575.98px) {
    /* Section spacing */
    .dsd-section { margin-bottom: 2.5rem; }

    /* Section titles */
    .dsd-section-title { font-size: 1.25rem; }
    .dsd-courses-section h2 { font-size: 1.15rem; }

    /* Feature cards */
    .dsd-feature-card { padding: 1.5rem 1.25rem; }
    .dsd-feature-card h3 { font-size: 1rem; }
    .dsd-feature-card p { font-size: 0.875rem; }

    /* Promo card */
    .dsd-promo-card { padding: 1.5rem 1.25rem; }
    .dsd-promo-card h3 { font-size: 1.15rem; }

    /* Timeline — revert เป็น vertical บน mobile + ปรับขนาด icon */
    .dsd-timeline {
        flex-direction: column;
        padding-left: 3.25rem;
        gap: 1.5rem;
    }
    .dsd-timeline::before {
        left: 24px;
        right: auto;
        top: 24px;
        bottom: 24px;
        width: 2px;
        height: auto;
        background: var(--dsd-orange);
    }
    .dsd-timeline-item {
        flex-direction: row;
        align-items: center;
        gap: 1.25rem;
    }
    .dsd-timeline-icon {
        position: absolute;
        left: -3.25rem;
        width: 48px;
        height: 48px;
        margin-left: 0px;
    }
    .dsd-timeline-icon img { width: 48px; height: 48px; }

    /* CTA */
    .dsd-cta-img { min-height: 200px; }
    .dsd-cta-body { padding: 1.5rem; }
    .dsd-cta-body h3 { font-size: 1.05rem; }

    /* Swiper nav — ดึงเข้าหา container + ลดขนาด */
    .dsd-swiper-nav { width: 32px; height: 32px; }
    .dsd-swiper-nav.prev { left: -8px; }
    .dsd-swiper-nav.next { right: -8px; }
}

/* Tablet landscape (768-991px) — col-md-4 cramped, ลด padding ของ card */
@media (min-width: 768px) and (max-width: 991.98px) {
    .dsd-feature-card { padding: 1.5rem 1.25rem; }
    .dsd-feature-card h3 { font-size: 1rem; }
    .dsd-helper-card .helper-body { padding: 1rem 1.25rem 1.25rem; }
}

/* =========================================================
   6. Courses Slider
   ========================================================= */
.dsd-courses-section h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.dsd-course-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--dsd-border);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.dsd-course-thumb {
    background: var(--dsd-orange);
    height: 140px;
    overflow: hidden;
    position: relative;
}

.dsd-course-thumb-placeholder {
    background: #e9ecef;
    height: 140px;
    overflow: hidden;
    position: relative;
    color: #6c757d;
}

.dsd-course-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.dsd-course-body {
    padding: 1rem 1.25rem 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.dsd-course-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    margin-bottom: .5rem;
}

.dsd-course-code {
    color: var(--dsd-orange);
    font-weight: 700;
}

.dsd-course-duration {
    color: var(--dsd-gray);
    font-size: 0.78rem;
}

.dsd-course-duration i {
    margin-right: .25rem;
}

.dsd-course-title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: .5rem;
    color: #1F2937;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dsd-course-desc {
    font-size: 0.78rem;
    color: var(--dsd-gray);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

/* Swiper navigation */
.dsd-courses-section .swiper {
    padding-bottom: 1rem;
}

.dsd-swiper-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .75);
    border: none;
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    color: #fbb034;
    transition: opacity .2s ease, background .2s ease;
    opacity: 0;
    pointer-events: none;
}

.dsd-swiper-nav:hover,
.dsd-swiper-nav:focus {
    background: #1e1e21;
    color: #fbb034;
    outline: none;
}

/* Show nav buttons only when user hovers the slider container (desktop only) */
.desktop .dsd-courses-section .position-relative:hover .dsd-swiper-nav:not(.swiper-button-disabled) {
    opacity: 1;
    pointer-events: auto;
}

.dsd-swiper-nav.prev { left: -20px; }
.dsd-swiper-nav.next { right: -20px; }

.dsd-swiper-nav.swiper-button-disabled {
    display: none;
}

.dsd-courses-footer {
    text-align: right;
    margin-top: 1rem;
}

.dsd-link-orange {
    color: var(--dsd-orange);
    font-weight: 600;
    font-size: 0.9rem;
}

.dsd-link-orange:hover {
    color: #E0941F;
    text-decoration: underline;
}

/* =========================================================
   7. Contact CTA
   ========================================================= */
.dsd-cta {
    background: #fff;
    border: 1px solid var(--dsd-border);
    border-radius: 30px;
    overflow: hidden;
}

.dsd-cta-img {
    width: 100%;
    height: 100%;
    min-height: 280px;
    object-fit: cover;
}

.dsd-cta-body {
    padding: 2rem 2.25rem;
}

.dsd-cta-body h3 {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 1rem;
}

.dsd-cta-quote {
    background: var(--dsd-gray-light);
    border-left: 3px solid var(--dsd-orange);
    padding: .85rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--dsd-gray);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.dsd-cta-contact {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--dsd-gray);
}

.dsd-cta-contact .contact-label {
    font-size: 1.05rem;
    font-weight: 400;
    color: #1F2937;
    margin-bottom: .75rem;
}

.dsd-cta-contact .contact-item {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-top: .5rem;
}

.dsd-cta-contact .contact-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    display: inline-block;
}

/* =========================================================
   Section background decorations (vector-1, vector-2)
   ========================================================= */
.dsd-section-with-deco {
    position: relative;
}

.dsd-section-with-deco > *:not(.dsd-bg-deco) {
    position: relative;
    z-index: 1;
}

.dsd-section-with-deco .dsd-section-title {
    font-weight: 500 !important;
}

.dsd-bg-deco {
    position: absolute;
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
    display: block;
}

.dsd-bg-deco-left {
    left: -60px;
    /* top: 50%; */
    transform: translateY(-25%);
    width: 150px;
    height: auto;
}

.dsd-bg-deco-right {
    right: -60px;
    top: 50%;
    transform: translateY(30%);
    width: 210px;
    height: auto;
}

@media (max-width: 991.98px) {
    .dsd-bg-deco { opacity: 0.35; }
    .dsd-bg-deco-left { left: -80px; width: 90px; }
    .dsd-bg-deco-right { right: -80px; width: 140px; }
}

@media (max-width: 575.98px) {
    .dsd-bg-deco { display: none; }
}
