/*@import 'tailwindcss';*/
@import url('https://cdn.tailwindcss.com');
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Thai:wght@100;200;300;400;500;600;700&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');

:root {
    --primary-color: #4f0bb7;
    --secondary-color: #6c3fc7;
    --accent-color: #fd9a57;
    --background-color: #f0eff6;
    --text-color: #001a49;
    --font-family: 'IBM Plex Sans Thai', sans-serif;
}
body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
}
.hero-purple {
    background: linear-gradient(135deg, #4f0bb7, #6c3fc7);
}

.custom-button {
    background-color: #fd9a57;
}
.progress-bar-bg {
    background-color: #5e1e99;
}
.progress-bar-fill {
    background-color: #fcc85c;
}
/* Custom curved shape for the purple section */

/* Animation Styles for Slider */

/* Animation Styles for Slider */
.slide {
    opacity: 0;
    transition: opacity 0.2s ease-out;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
}

.slide.active {
    opacity: 1;
    display: block;
    z-index: 10;
}

/* Slide animations */
.slide-in-right {
    animation: slideInRight 0.5s forwards;
}

.slide-in-left {
    animation: slideInLeft 0.5s forwards;
}

.slide-out-right {
    animation: slideOutRight 0.5s forwards;
}

.slide-out-left {
    animation: slideOutLeft 0.5s forwards;
}

/* Keyframes for slide animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes slideOutLeft {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(-100%);
        opacity: 0;
    }
}

/* Custom button animation */
.custom-button {
    background: linear-gradient(90deg, #ff6b6b, #ff8e53);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.custom-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

.custom-button:active {
    transform: translateY(0);
}

.custom-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: 0.5s;
}

.custom-button:hover::after {
    left: 100%;
}

/* Bullet animation */
.bullet {
    position: relative;
    transition: all 0.3s ease;
}

.bullet::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 9999px;
    opacity: 0;
}

.bullet.animate-pulse::after {
    animation: bulletPulse 0.5s ease-out;
}

@keyframes bulletPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(250, 204, 21, 0.7);
        opacity: 1;
    }
    70% {
        transform: scale(1.5);
        box-shadow: 0 0 0 10px rgba(250, 204, 21, 0);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(250, 204, 21, 0);
        opacity: 0;
    }
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.card {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 10;
    cursor: pointer;
    color: #553c9a;
}
.nav-button.prev {
    left: 0.5rem;
}
.nav-button.next {
    right: 0.5rem;
}
.card-date {
    font-size: 0.875rem;
    color: #718096;
}
.card-button {
    background-color: #6b61a0;
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 40px;
    font-size: 1.25rem;
    font-weight: 600;
    height: 57px;
}
.card-button:hover {
    background-color: #fada54;
}
.language-switcher {
    position: relative;
    display: inline-block;
}

.selector-btn {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 9999px;
    background-color: transparent;
    border: 1px solid #ccc;
    cursor: pointer;
}

.selector-btn img {
    width: 20px;
    height: 14px;
    margin-right: 8px;
    border-radius: 2px;
}

.selector-btn span {
    margin-right: 6px;
    font-weight: bold;
    color: #fff;
}

.selector-btn .arrow {
    font-size: 10px;
    color: #fff;
}

.dropdown {
    position: absolute;
    top: 110%;
    left: 0;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    overflow: hidden;
    display: none;
    min-width: 100%;
    z-index: 999;
}

.dropdown .option {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
}

.dropdown .option:hover {
    background-color: #f0f0f0;
}

.dropdown .option img {
    width: 20px;
    height: 14px;
    margin-right: 8px;
    border-radius: 2px;
}
.language-selector {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 30px 20px;
    background: white;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.lang-option:hover {
    opacity: 0.7;
}

.flag {
    width: 24px;
    height: 16px;
    border-radius: 2px;
    background: linear-gradient(
        to bottom,
        #ed1c24 0%,
        #ed1c24 33%,
        #fff 33%,
        #fff 66%,
        #ed1c24 66%
    );
}

.flag.en {
    background: linear-gradient(
            135deg,
            #012169 0%,
            #012169 50%,
            #fff 50%,
            #fff 100%
        ),
        linear-gradient(45deg, #fff 0%, #fff 50%, #c8102e 50%, #c8102e 100%);
}

.lang-text {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}
.lang-option.active .lang-text {
    color: #ffd700;
    font-weight: 600;
}
/* แผงที่ย่อ/ขยาย (ทุกการ์ด) */
.xpen-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.xpen-panel.open {
    max-height: 3000px;
} /* เพดานสูงพอให้กางครบ */

/* Desktop (>= xl): เปิดคงที่ + ซ่อนปุ่ม */
@media (min-width: 1280px) {
    .xpen-panel {
        max-height: none !important;
        overflow: visible;
    }
    .xpen-toggle {
        display: none !important;
    }
}
.xpen-gone {
    display: none !important;
}
/* ===== Overlay เต็มการ์ด เฉพาะมือถือ (< xl) ===== */
@media (max-width: 1279px) {
    /* ให้ article เป็นตำแหน่งอ้างอิง */
    #logistics-section article {
        position: relative;
    }

    /* ยกเลิกการเป็น containing block ของ wrapper รูป
       เพื่อให้ปุ่ม overlay ยึดกับ article แทน (จะขยายได้เต็มใบ) */
    #logistics-section .relative.overflow-hidden {
        position: static !important;
    }

    /* ปุ่ม overlay: ยึดขอบซ้าย-ขวา-ล่างของ "การ์ด" ให้เต็มใบ */
    #logistics-section .xpen-toggle {
        position: absolute !important;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 30;
        width: 100%;
        height: 50%;
        /* โค้งตามมุมล่างของการ์ด */
        border-bottom-left-radius: 40px;
        border-bottom-right-radius: 40px;
    }
}

/* เดสก์ท็อป: คงพฤติกรรม/เลย์เอาต์เดิม */
@media (min-width: 1280px) {
    #logistics-section .xpen-toggle {
        position: static;
    }
}
