/* ==========================================================================
   PAGE-SPECIFIC STYLES: STUDY & INTERN (study.css)
   ========================================================================== */

/* 1. Partner Logos Section */
.partner-logos-section {
    padding: 60px 10%;
    background-color: var(--bg-light-grey);
    text-align: center;
}

.partner-logos-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 40px;
    margin-top: 30px;
}

.partner-logos-grid img {
    height: 70px;
    width: auto;
    object-fit: contain;
    filter: grayscale(100%) opacity(0.7);
    transition: all 0.3s ease;
}

.partner-logos-grid img:hover {
    transform: scale(1.05);
    filter: grayscale(0%) opacity(1);
}

/* 2. Grid แบบ 2 คอลัมน์ ไม่สมมาตร (Why Choose Thailand) */
.study-feature-grid {
    display: flex;
    gap: 60px;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-top: 50px;
}

.study-feature-side {
    flex: 1;
    min-width: 300px;
}

.study-feature-side h3 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    line-height: 1.4;
}

.study-feature-side p {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 25px;
    line-height: 1.6;
}

.study-feature-side ul {
    padding-left: 20px;
    margin-bottom: 30px;
}

.study-feature-side ul li {
    font-size: 0.95rem;
    color: var(--text-dark);
    margin-bottom: 10px;
    line-height: 1.5;
    list-style-type: disc;
}

/* 3. Partner Universities Cards */
.uni-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.uni-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.uni-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
    border-color: var(--accent-gold);
}

.uni-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.uni-card-content {
    padding: 30px;
    text-align: center;
    flex: 1;
}

.uni-card-content h4 {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 700;
}

.uni-card-content p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.6;
}

/* ==========================================================================
   SPECIFIC COMPONENTS FOR INTERNSHIP PAGE
   ========================================================================== */

/* 1. Grid สำหรับ Icon Cards (Opportunities & What We Provide) */
.intern-icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.intern-icon-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.intern-icon-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-gold);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.intern-icon-card svg {
    width: 32px;
    height: 32px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.intern-icon-card p {
    font-size: 0.95rem;
    color: var(--primary-color);
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
}

/* 2. Timeline (Application Process - 5 ขั้นตอนสำหรับจอคอม) */
.intern-process-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-top: 40px;
    text-align: center;
}

.intern-process-step {
    position: relative;
}

.intern-process-num {
    width: 45px;
    height: 45px;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 auto 20px;
    position: relative;
    z-index: 2;
}

.intern-process-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 22px;
    left: 50%;
    width: 100%;
    height: 2px;
    background-color: var(--border-color);
    z-index: 1;
}

.intern-process-step p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
    font-weight: 500;
}

/* ==========================================================================
   🔥 NEW: STUDY TABS (English Course Section)
   ========================================================================== */
.study-tab-flex {
    display: flex;
    gap: 50px;
    align-items: center;
    background: #ffffff;
    padding: 40px;
    border-radius: 16px;
    border: 1px solid var(--border-color, rgba(11, 19, 32, 0.08));
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);

    /* 🔥 บังคับความสูงขั้นต่ำให้เท่ากันทุกแท็บ ป้องกันกล่องกระตุกยืดหดในจอคอม */
    min-height: 480px;
}

/* ซ่อน Dropdown ในจอคอม */
.mobile-tab-dropdown {
    display: none;
}

.study-tab-flex .text-side {
    flex: 1;
    min-width: 350px;
}

.study-tab-flex .image-side {
    flex: 1;
    min-width: 300px;
}

.study-tab-flex h3 {
    font-size: 1.8rem;
    color: var(--primary-color, #0B1320);
    margin-bottom: 15px;
    line-height: 1.3;
}

.study-tab-flex p.desc {
    font-size: 1.05rem;
    color: var(--text-muted, #5A6472);
    margin-bottom: 25px;
    line-height: 1.7;
}

.study-tab-flex ul {
    padding-left: 20px;
    margin-bottom: 0;
}

.study-tab-flex ul li {
    font-size: 0.95rem;
    color: var(--text-dark, #333333);
    margin-bottom: 12px;
    line-height: 1.6;
}

.study-tab-flex ul li strong {
    color: var(--primary-color, #0B1320);
}

/* Animations สำหรับเวลาสลับแท็บ */
.sub-tab-content {
    display: none;
    animation: fadeInTab 0.4s ease forwards;
}

.sub-tab-content.active {
    display: block;
}

@keyframes fadeInTab {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   🔥 Overview Grid Cards (3 ช่อง)
   ========================================================================== */
.eng-overview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.eng-overview-card {
    background-color: #F8FAFC;
    border-radius: 12px;
    padding: 25px 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.eng-overview-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
    background-color: #F1F5F9;
}

.eng-overview-card svg {
    width: 32px;
    height: 32px;
    color: var(--primary-color, #0B1320);
    margin-bottom: 15px;
}

.eng-overview-card span {
    font-size: 0.95rem;
    color: var(--primary-color, #0B1320);
    font-weight: 600;
    line-height: 1.4;
}

/* ==========================================================================
   🔥 Unified Tab List Style (Improve English & IELTS)
   ========================================================================== */
/* สำหรับ IELTS (เรียงแนวตั้ง) */
.eng-list-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 30px;
}

/* สำหรับ Improve Your English (เรียง 2 คอลัมน์) */
.eng-skills-list-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px 30px;
    margin-bottom: 30px;
}

/* ดีไซน์ไอคอนและข้อความ (ใช้ร่วมกันเพื่อให้เข้าธีมเป๊ะๆ) */
.skill-item,
.eng-list-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.skill-item svg,
.eng-list-item svg {
    width: 22px;
    height: 22px;
    color: var(--accent-gold, #C49765) !important;
    /* 🔥 เปลี่ยนเป็นสีทองตาม Canva */
    flex-shrink: 0;
    margin-top: 2px;
}

.skill-item span,
.eng-list-item span {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--primary-color, #0B1320);
    /* สีตัวหนังสือให้ตรงกัน */
    line-height: 1.5;
}

.eng-list-item .sub-text {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ==========================================================================
   🔥 How Expatique Helps (Steps)
   ========================================================================== */
.eng-step-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.eng-step-item {
    display: flex;
    align-items: center;
    gap: 20px;
}

.eng-step-item .step-num {
    width: 45px;
    height: 45px;
    background-color: var(--accent-gold, #C49765) !important;
    /* วงกลมสีทอง */
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.eng-step-item .step-text h4 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary-color, #0B1320);
    margin: 0 0 5px 0;
}

.eng-step-item .step-text p {
    font-size: 0.95rem;
    color: var(--text-muted, #5A6472);
    margin: 0;
    line-height: 1.4;
}

/* ==========================================================================
   🔥 STUDY & INTERN MOBILE MASTER FIX (ยุบรวมกฎมือถือไว้ที่เดียว สวยเป๊ะไม่ล้นจอ)
   ========================================================================== */
@media (max-width: 768px) {

    /* --- 1. 🔥 ป้องกันหน้าจอล้นแนวนอน 100% --- */
    body,
    html,
    main {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* --- 2. หน้าจอหลัก และ SAFE AREA (เว้นบน 100px พ้น Navbar + ซ้ายขวา 24px) --- */
    main,
    section,
    .partner-logos-section,
    .hero-with-bg,
    [class*="-section"],
    [id*="section"] {
        padding-top: 100px !important;
        padding-bottom: 50px !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        min-height: auto !important;
        height: auto !important;
        box-sizing: border-box !important;
    }

    /* กล่องข้อความและ Grid ภายใน เว้น Safe Area 24px ซ้าย-ขวาเสมอ */
    .woxa-container,
    .study-feature-grid,
    .uni-cards-grid,
    .intern-icon-grid,
    .intern-process-grid,
    .partner-logos-grid {
        padding-left: 24px !important;
        padding-right: 24px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* --- 3. แก้ไข GRID มหาวิทยาลัย และ WHY CHOOSE THAILAND --- */
    .study-feature-grid {
        flex-direction: column !important;
        gap: 30px !important;
    }

    .study-feature-side {
        width: 100% !important;
        min-width: 100% !important;
    }

    .uni-cards-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .uni-card {
        width: 100% !important;
    }

    .uni-card img {
        height: 180px !important;
    }

    .uni-card-content {
        padding: 24px 20px !important;
    }

    /* --- 4. 🔥 แก้ไข INTERN ICON GRID --- */
    .intern-icon-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    .intern-icon-card {
        padding: 20px 12px !important;
        min-width: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .intern-icon-card svg {
        width: 28px !important;
        height: 28px !important;
        margin-bottom: 10px !important;
    }

    .intern-icon-card p {
        font-size: 0.85rem !important;
        line-height: 1.3 !important;
    }

    /* --- 5. 🔥 อัปเกรด 5 ขั้นตอนการสมัคร ให้เป็นไทม์ไลน์แนวตั้งอ่านง่าย --- */
    .intern-process-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
    }

    .intern-process-step {
        display: flex !important;
        align-items: flex-start !important;
        gap: 16px !important;
        text-align: left !important;
        width: 100% !important;
        background: #ffffff !important;
        padding: 18px 20px !important;
        border: 1px solid var(--border-color, rgba(11, 19, 32, 0.08)) !important;
        border-radius: 12px !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02) !important;
        box-sizing: border-box !important;
    }

    .intern-process-step:not(:last-child)::after {
        display: none !important;
    }

    .intern-process-num {
        margin: 0 !important;
        flex-shrink: 0 !important;
        width: 38px !important;
        height: 38px !important;
        font-size: 0.95rem !important;
        background-color: var(--accent-gold, #C49765) !important;
    }

    .intern-process-step p {
        font-size: 0.92rem !important;
        line-height: 1.5 !important;
        margin: 0 !important;
        padding-top: 6px !important;
    }

    /* --- 6. โลโก้พาร์ทเนอร์ และปุ่ม CTA --- */
    .partner-logos-grid {
        gap: 25px !important;
    }

    .partner-logos-grid img {
        height: 40px !important;
    }

    .btn,
    .btn-primary,
    .btn-outline,
    [class*="btn-"] {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        margin: 20px auto 10px auto !important;
        width: fit-content !important;
        min-width: 220px !important;
        max-width: 90% !important;
    }

    /* =========================================
       🔥 มือถือ: Custom Dropdown Premium UI - อัปเกรดไร้รอยต่อ 100%
       ========================================= */
    .desktop-tabs {
        display: none !important;
    }

    .mobile-tab-dropdown {
        display: block !important;
        position: relative !important;
        margin-bottom: 30px !important;
        width: 100% !important;
        z-index: 50 !important;
        padding: 0 !important;
        /* 🔥 ลบ Padding ตัวปัญหาออก เพื่อให้ปุ่มกับเมนูกว้างเท่ากันเป๊ะ */
    }

    /* กล่องปุ่มกด Dropdown */
    .custom-dropdown-trigger {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        padding: 16px 20px !important;
        font-size: 1.05rem !important;
        font-weight: 700 !important;
        color: var(--primary-color, #0B1320) !important;
        background-color: #ffffff !important;
        border: 2px solid var(--primary-color, #0B1320) !important;
        border-radius: 12px !important;
        margin-bottom: 0 !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04) !important;
        position: relative !important;
        z-index: 51 !important;
        /* 🔥 ให้อยู่ชั้นบนสุดเสมอ */
    }

    .custom-dropdown-trigger span {
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        font-size: 0.95rem !important;
        margin-right: 10px !important;
        display: block !important;
        width: 100% !important;
        text-align: left !important;
    }

    /* 🔥 สไตล์ตอนเปิด Dropdown (เทคนิคซ่อนรอยต่อ) */
    .custom-dropdown-trigger.open {
        border-color: var(--accent-gold, #C49765) !important;
        color: var(--accent-gold, #C49765) !important;
        border-bottom-left-radius: 0 !important;
        border-bottom-right-radius: 0 !important;
        border-bottom-color: #ffffff !important;
        /* 🔥 ใช้เส้นสีขาวทับรอยต่อด้านล่าง */
        box-shadow: none !important;
        /* ปิดเงาตอนเปิด เพื่อความเนียน */
    }

    .custom-dropdown-trigger .dropdown-icon {
        width: 20px !important;
        height: 20px !important;
        transition: transform 0.3s ease !important;
    }

    .custom-dropdown-trigger.open .dropdown-icon {
        transform: rotate(180deg) !important;
    }

    /* กล่องรายการเมนูย่อย */
    .custom-dropdown-menu {
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        /* 🔥 เริ่มที่ขอบซ้ายเป๊ะๆ */
        width: 100% !important;
        /* 🔥 กว้าง 100% พอดีปุ่มเป๊ะๆ */
        margin-top: -2px !important;
        /* 🔥 ดึงขึ้นมาซ่อนใต้เส้นสีขาวของปุ่ม 2px */
        background-color: #ffffff !important;
        border: 2px solid var(--accent-gold, #C49765) !important;
        border-top: none !important;
        border-bottom-left-radius: 12px !important;
        border-bottom-right-radius: 12px !important;
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1) !important;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
        z-index: 50 !important;
    }

    .custom-dropdown-trigger.open+.custom-dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .custom-dropdown-option {
        padding: 15px 20px !important;
        font-size: 0.95rem !important;
        font-weight: 500 !important;
        color: var(--text-muted, #5A6472) !important;
        cursor: pointer !important;
        transition: background 0.2s, color 0.2s !important;
        border-bottom: 1px solid var(--border-color, rgba(11, 19, 32, 0.05)) !important;
    }

    .custom-dropdown-option:last-child {
        border-bottom: none !important;
    }

    .custom-dropdown-option:hover,
    .custom-dropdown-option.selected {
        background-color: rgba(196, 151, 101, 0.08) !important;
        color: var(--primary-color, #0B1320) !important;
        font-weight: 700 !important;
    }
}