:root {
    --bg: #3d3d3f;
    --panel: #2f2f31;
    --text: #f2f2f2;
    --muted: #cfcfcf;
    --accent: #e5e5e5;
    --primary: #9c9c9c;
    --primary-hover: #b0b0b0;
    --border-color: #555555;
    --transition-speed: 0.3s;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* Scroll Progress Bar */
.scroll-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: transparent;
    z-index: 9999;
    pointer-events: none;
}

.scroll-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #f9c74f, #e58c07);
    border-radius: 0 2px 2px 0;
    box-shadow: 0 0 10px rgba(229, 140, 7, 0.6);
    transition: width 0.1s ease-out;
}

body {
    margin: 0;
    padding: 0;
    padding-top: 56px;
    min-height: 100vh;
    display: block;
    font-family: "Kanit", "Noto Sans Thai", "Segoe UI", system-ui, sans-serif;
    background: radial-gradient(1200px 800px at 20% 10%, #4a4a4d 0%, var(--bg) 55%);
    color: var(--text);
    overflow-x: hidden;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 72px;
    background: rgba(47, 47, 49, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 999;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
}

.navbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.03),
        rgba(255, 255, 255, 0.1),
        rgba(255, 255, 255, 0.03),
        transparent
    );
    transform: skewX(-20deg);
    pointer-events: none;
    z-index: 1;
}

.navbar:hover::before {
    animation: navbarShine 2.5s ease-in-out infinite;
}

@keyframes navbarShine {
    0% { left: -100%; }
    100% { left: 200%; }
}

.navbar.scrolled {
    height: 56px;
    background: rgba(30, 30, 32, 0.9);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.navbar-title {
    display: flex;
    align-items: center;
    height: 100%;
}

.navbar-title a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    font-size: 20px;
}

.navbar-logo {
    height: 44px;
    width: auto;
    display: block;
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar.scrolled .navbar-logo {
    height: 36px;
}

.nav-drawer-logo {
    height: 36px;
    width: auto;
    display: block;
}

/* Navbar right group (lang + hamburger) */
.navbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Desktop nav links (middle of navbar) */
.navbar-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    justify-content: center;
}

.navbar-nav-link {
    color: #cfcfcf;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
    position: relative;
}

.navbar-nav-link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 14px;
    right: 14px;
    height: 2px;
    background: #e58c07;
    border-radius: 2px;
    transform: scaleX(0);
    transition: transform 0.2s ease;
    transform-origin: center;
}

.navbar-nav-link:hover {
    color: #f2f2f2;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
}

.navbar-nav-link:hover::after {
    transform: scaleX(1);
}

/* Default: desktop shows nav, hides hamburger */
.hamburger-btn {
    display: none;
}

.navbar-nav {
    display: flex;
}

/* Hamburger button */
.hamburger-btn {
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 9px 10px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    align-items: center;
}

.hamburger-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #e58c07;
}

.hamburger-btn span {
    display: block;
    width: 18px;
    height: 2px;
    background: #f2f2f2;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.2s ease;
    transform-origin: center;
}

.hamburger-btn.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger-btn.is-open span:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Overlay backdrop */
.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    z-index: 1099;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.nav-overlay.is-open {
    opacity: 1;
    pointer-events: all;
}

/* Drawer panel */
.nav-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    max-width: 85vw;
    height: 100dvh;
    background: #242426;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 1100;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.4);
}

.nav-drawer.is-open {
    transform: translateX(0);
}

.nav-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.nav-drawer-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    color: #f2f2f2;
}

.nav-drawer-close {
    background: none;
    border: none;
    color: #cfcfcf;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.2s ease, color 0.2s ease;
    line-height: 1;
}

.nav-drawer-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.nav-drawer-links {
    display: flex;
    flex-direction: column;
    padding: 12px;
    gap: 4px;
    flex: 1;
}

.nav-drawer-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    text-decoration: none;
    color: #cfcfcf;
    font-size: 15px;
    font-weight: 500;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    border: 1px solid transparent;
}

.nav-drawer-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.nav-drawer-item:hover {
    background: rgba(229, 140, 7, 0.1);
    color: #e58c07;
    border-color: rgba(229, 140, 7, 0.25);
}


.navbar-title {
    font-size: 18px;
    font-weight: 700;
    color: #f2f2f2;
    text-decoration: none;
    display: flex;
    align-items: center;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    margin-right: 12px;
}

.lang-switcher {
    position: relative;
    z-index: 999;
    font-family: 'Kanit', sans-serif;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.05);
    color: #f2f2f2;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px 14px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    line-height: 1;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #e58c07;
}

.lang-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    flex-direction: column;
    gap: 4px;
    background: #2f2f31;
    border: 1px solid #555;
    border-radius: 8px;
    padding: 6px;
    margin-top: 8px;
    min-width: 160px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.lang-option {
    background: none;
    color: #f2f2f2;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    text-align: left;
    width: 100%;
}

.lang-option:hover {
    background: #444;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 0;
}

.text-bg-shape {
    width: 100%;
    margin-top: -55px;
    margin-left: 0;
    margin-right: 0;
    min-height: 500px;
    background-image: url('Images/PEDALL.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background: linear-gradient(rgba(19, 19, 19, 0.1), rgba(28, 28, 28, 0.708)), url('Images/PEDALL.png');
    background-size: cover;
    background-position: center;
    color: #F1F1F1;
    padding: 40px 10%;
    margin-bottom: 50px;
    border-radius: 0px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.soustitre {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
}

.sousnom {
    font-size: clamp(26px, 3.5vw, 36px);
    font-weight: 700;
}

.ligne-top {
    height: 2px;
    width: 45%;
    background: var(--accent);
    opacity: 0.6;
}

.ligne {
    height: 2px;
    width: 100%;
    background: var(--accent);
    opacity: 0.6;
}

.description {
    font-size: 18px;
    line-height: 1.7;
    color: var(--muted);
    margin: 0 0 32px;
}

.merchandises {
    display: flex;
    flex: auto;
    justify-content: center;
    align-items: left;
    margin-left: 0px;
    padding: 25px 10px;
    gap: 105px;
}

.merchant {
    flex: 0 0;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 45px;
    white-space: normal;
}

.merch-description {
    flex: 0 0;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 22px;
    color: #cfcfcf;
}

.btn {
    background: #e58c07;
    color: white;
    margin-top: 15px;
    padding: 12px 28px;
    border-radius: 6px;
    display: inline-block;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.merch-image {
    flex: 0 0 300px;
    display: flex;
    justify-content: center;
    width: 200px;
    height: auto;
    border-radius: 8px;
}

/* Member */

.members {
    width: min(1100px, 92vw);
    margin: 0 auto;
    padding: 40px 0;
}

.text-wrap {
    position: relative;
    text-align: center;
}

.text-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 84px;
    font-weight: 800;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.2);
    white-space: nowrap;
    z-index: 0;
    pointer-events: none;
}

.member-title {
    font-size: clamp(24px, 5vw, 36px);
    font-weight: 800;
    color: var(--text);
    position: relative;
    z-index: 1;
    margin: 0;
}

.members-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
}

.member-card {
    width: 280px;
    flex-shrink: 0;
    background: var(--panel);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    transition: transform var(--transition-speed), border-color var(--transition-speed), box-shadow var(--transition-speed);
}

.member-card:hover {
    transform: translateY(-5px);
    border-color: #e58c07;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}

.member-card img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    border: 3px solid #444;
    transition: border-color var(--transition-speed);
}

.member-card:hover img {
    border-color: #e58c07;
}

.member-name {
    font-size: 18px;
    font-weight: 700;
    color: #f2f2f2;
}

.member-role {
    font-size: 14px;
    color: var(--muted);
    font-weight: 500;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.member-role::before {
    content: "";
    width: 6px;
    height: 6px;
    background-color: var(--role-color, var(--primary));
    border-radius: 50%;
    display: inline-block;
}

.member-desc {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 8px;
}

.member-social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: var(--muted);
    transition: color var(--transition-speed), transform var(--transition-speed);
    text-decoration: none;
}

.member-social:hover {
    color: white;
    transform: scale(1.15);
}

.member-social svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.social-link {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: auto;
}

/* Partners Section */
.partners {
    width: min(1100px, 92vw);
    margin: 0 auto;
    padding: 60px 0 50px;
}

.partners-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    justify-content: center;
    align-items: stretch;
    padding: 36px 0;
}

.partner-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 28px 24px 22px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
        background 0.4s ease,
        border-color 0.4s ease,
        box-shadow 0.4s ease;
    cursor: pointer;
    width: 210px;
    flex: 0 0 auto;
    text-decoration: none;
}

.partner-item::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 21px;
    padding: 1.5px;
    background: linear-gradient(135deg, transparent 40%, rgba(229, 140, 7, 0.3) 60%, rgba(249, 199, 79, 0.2) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.partner-item:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(229, 140, 7, 0.25);
    box-shadow: 0 12px 40px rgba(229, 140, 7, 0.1),
        0 4px 16px rgba(0, 0, 0, 0.3);
}

.partner-item:hover::before {
    opacity: 1;
}

.partner-logo {
    width: 96px;
    height: 96px;
    border-radius: 20px;
    object-fit: cover;
    background: var(--panel);
    border: 2px solid rgba(255, 255, 255, 0.1);
    padding: 4px;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
        border-color 0.4s ease,
        box-shadow 0.4s ease,
        filter 0.4s ease;
    filter: saturate(0.85);
}

.partner-item:hover .partner-logo {
    transform: scale(1.08);
    border-color: rgba(229, 140, 7, 0.4);
    box-shadow: 0 6px 20px rgba(229, 140, 7, 0.15);
    filter: saturate(1.1);
}

.partner-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted);
    text-align: center;
    line-height: 1.4;
    transition: color 0.3s ease;
    white-space: normal;
    max-width: 160px;
    word-break: break-word;
}

.partner-item:hover .partner-name {
    color: #f9c74f;
}

/* Partner card scroll-triggered stagger reveal */
@keyframes partnerReveal {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.92);
        filter: blur(6px);
    }

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

.partners-grid .partner-item {
    opacity: 0;
    transform: translateY(40px) scale(0.92);
    filter: blur(6px);
}

.partners-grid .partner-item.partner-visible {
    animation: partnerReveal 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.partners-grid .partner-item:nth-child(1).partner-visible {
    animation-delay: 0.05s;
}

.partners-grid .partner-item:nth-child(2).partner-visible {
    animation-delay: 0.13s;
}

.partners-grid .partner-item:nth-child(3).partner-visible {
    animation-delay: 0.21s;
}

.partners-grid .partner-item:nth-child(4).partner-visible {
    animation-delay: 0.29s;
}

.partners-grid .partner-item:nth-child(5).partner-visible {
    animation-delay: 0.37s;
}

.partners-grid .partner-item:nth-child(6).partner-visible {
    animation-delay: 0.45s;
}

/* Subtle floating idle animation */
@keyframes partnerFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

.partner-item.partner-visible {
    animation: partnerReveal 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards,
        partnerFloat 4s ease-in-out infinite;
    animation-delay: var(--reveal-delay, 0s), 1.2s;
}

/* Offset float timing per card for organic feel */
.partner-item:nth-child(1) {
    --float-offset: 0s;
}

.partner-item:nth-child(2) {
    --float-offset: 0.6s;
}

.partner-item:nth-child(3) {
    --float-offset: 1.2s;
}

.partner-item:nth-child(4) {
    --float-offset: 1.8s;
}

.partner-item:nth-child(5) {
    --float-offset: 2.4s;
}

.partner-item.partner-float {
    animation: partnerFloat 4s ease-in-out infinite;
    animation-delay: var(--float-offset, 0s);
}

/* Shine sweep on logo hover */
.partner-logo {
    position: relative;
    overflow: hidden;
}

.partner-logo::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 40%;
    height: 200%;
    background: linear-gradient(105deg,
            transparent 30%,
            rgba(255, 255, 255, 0.15) 45%,
            rgba(255, 255, 255, 0.25) 50%,
            rgba(255, 255, 255, 0.15) 55%,
            transparent 70%);
    transform: skewX(-20deg);
    transition: none;
    pointer-events: none;
}

.partner-item:hover .partner-logo::after {
    animation: logoShine 0.7s ease forwards;
}

@keyframes logoShine {
    from {
        left: -60%;
    }

    to {
        left: 130%;
    }
}

/* Glowing border pulse on hover */
@keyframes borderGlow {

    0%,
    100% {
        box-shadow: 0 12px 40px rgba(229, 140, 7, 0.1),
            0 4px 16px rgba(0, 0, 0, 0.3),
            0 0 0 0 rgba(249, 199, 79, 0);
    }

    50% {
        box-shadow: 0 12px 40px rgba(229, 140, 7, 0.15),
            0 4px 16px rgba(0, 0, 0, 0.3),
            0 0 18px 2px rgba(249, 199, 79, 0.12);
    }
}

.partner-item:hover {
    animation: borderGlow 2s ease-in-out infinite;
}

/* Responsive partners */
@media (max-width: 600px) {
    .partners-grid {
        gap: 16px;
    }

    .partner-item {
        width: 140px;
        padding: 20px 16px 18px;
    }

    .partner-logo {
        width: 64px;
        height: 64px;
    }

    .partner-name {
        font-size: 0.72rem;
    }
}

/* Foot */

.foot {
    background: linear-gradient(180deg, #2a2a2c 0%, #151515 100%);
    display: flex;
    color: #888;
    text-align: center;
    flex-direction: column;
    line-height: 1.7;
    width: 100%;
    position: relative;
    padding: 30px 4% 20px;
    align-items: center;
    gap: 16px;
    overflow: hidden;
}

.foot::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.02),
        rgba(255, 255, 255, 0.06),
        rgba(255, 255, 255, 0.02),
        transparent
    );
    transform: skewX(-20deg);
    pointer-events: none;
    z-index: 1;
}

.foot:hover::after {
    animation: footShine 2.5s ease-in-out infinite;
}

@keyframes footShine {
    0% { left: -100%; }
    100% { left: 200%; }
}

.foot::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(229, 140, 7, 0.4) 20%, rgba(249, 199, 79, 0.5) 50%, rgba(229, 140, 7, 0.4) 80%, transparent);
}

.socialmedia {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.titlelink {
    font-size: clamp(18px, 4vw, 24px);
    text-align: center;
    font-weight: 600;
    color: #eee;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    color: #eee;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition-speed);
    cursor: pointer;
}

.contact-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.14);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.3);
}

.socialbuttons {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    color: #EEEEEE;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all var(--transition-speed);
}

.socialbuttons:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.2);
}

.socialbuttons svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition-speed);
}

.social-icon:hover {
    transform: scale(1.08);
}

.social-icon img {
    width: 40px;
    height: auto;
}

.foot-links-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1100px;
    margin: 20px auto 10px auto;
    flex-wrap: wrap;
    gap: 24px;
}

.foot-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 24px;
}

.foot-nav a {
    color: #cfcfcf;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color var(--transition-speed), text-shadow var(--transition-speed);
    position: relative;
}

.foot-nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: #e58c07;
    border-radius: 2px;
    transform: scaleX(0);
    transition: transform 0.2s ease;
    transform-origin: center;
}

.foot-nav a:hover {
    color: #f2f2f2;
}

.foot-nav a:hover::after {
    transform: scaleX(1);
}

.foot-contact {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.foot-contact-desc {
    color: #cfcfcf;
    font-size: 14px;
    font-weight: 400;
}

.foot-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

.foot-bottom::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08) 15%, rgba(255, 255, 255, 0.08) 85%, transparent);
    font-size: 13px;
    color: #777;
    gap: 16px;
}

.foot-disclaimer {
    text-align: left;
}

.foot-copyright {
    text-align: right;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .foot-bottom {
        flex-direction: column-reverse;
        text-align: center;
        gap: 8px;
    }

    .foot-disclaimer,
    .foot-copyright {
        text-align: center;
        white-space: normal;
    }
    
    .foot-links-section {
        flex-direction: column;
        justify-content: center;
        gap: 32px;
    }
    .foot-nav {
        justify-content: center;
    }
    .foot-contact {
        justify-content: center;
        text-align: center;
    }
}

/* Flag Icons */
.flag-icon {
    width: 20px;
    height: auto;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    vertical-align: middle;
    display: inline-block;
}

/* Merchandise */
.merch-list {
    width: min(1100px, 92vw);
    margin: 0 auto;
    padding: 40px 0;
}

.merch-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 24px;
}

.merch-card {
    background: #2f2f31;
    border: 1px solid #555;
    border-radius: 12px;
    padding: 24px;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    text-align: left;
    gap: 14px 16px;
    text-decoration: none;
}

.merch-card img {
    grid-row: span 2;
    width: 280px;
    height: 280px;
    border-radius: 14%;
    object-fit: cover;
    object-position: center top;
}

.merch-name {
    font-size: 44px;
    font-weight: 700;
    color: #f2f2f2;
    margin-bottom: 15px;
}

.merch-desc {
    font-size: 20px;
    color: #cfcfcf;
    line-height: 1.6;
    margin-top: 15px;
}

.merch-bg {
    width: 100%;
    margin-top: -55px;
    margin-left: 0;
    margin-right: 0;
    min-height: 500px;
    background-color: transparent;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    color: #F1F1F1;
    padding: 40px 10%;
    margin-bottom: 50px;
    border-radius: 0px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* ===== WORKS SECTION ===== */
.works {
    width: min(1100px, 92vw);
    margin: 0 auto;
    padding: 60px 0 40px;
}

.works-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 32px;
}

.work-card {
    background: var(--panel);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-decoration: none;
    color: var(--text);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    position: relative;
    overflow: hidden;
}

/* Horizontal full-width card variant */
.work-card--horizontal {
    flex-direction: row;
    align-items: flex-start;
    gap: 28px;
    padding: 28px 32px;
}

.work-logo {
    width: 125px;
    height: 125px;
    border-radius: 18px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    align-self: center;
}

.work-card-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

.work-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(156, 156, 156, 0.04) 0%, transparent 60%);
    pointer-events: none;
    border-radius: 16px;
}

.work-card:hover {
    transform: translateY(-4px);
    border-color: #e58c07;
    box-shadow: 0 16px 40px rgba(229, 140, 7, 0.2);
}

.work-card-header {
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

.work-icon {
    font-size: 42px;
    margin-bottom: 5px;
    line-height: 1;
}

.work-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.work-type {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary-hover);
    background: rgba(156, 156, 156, 0.15);
    border: 1px solid rgba(156, 156, 156, 0.25);
    border-radius: 6px;
    padding: 2px 8px;
    width: fit-content;
}

.work-author {
    font-size: 13px;
    color: var(--muted);
    opacity: 0.7;
}

.work-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 8px 0;
}

.work-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    color: var(--text);
    letter-spacing: -0.01em;
}

/* ===== WORK STATS (download counter) ===== */
.work-stats {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 8px;
    padding: 6px 12px;
}

.work-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.work-stat-content {
    display: flex;
    align-items: center;
    gap: 6px;
}

.work-stat-content svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: #e58c07;
    opacity: 0.85;
    animation: iconBlink 1.5s ease-in-out infinite;
}

@keyframes iconBlink {

    0%,
    100% {
        opacity: 0.85;
        transform: scale(1);
    }

    50% {
        opacity: 0.3;
        transform: scale(0.95);
    }
}

.work-stat-progress {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 2px;
}

.work-stat-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #e58c07, #f9c74f);
    border-radius: 2px;
    transition: width 2s cubic-bezier(0.1, 0.7, 0.1, 1);
}

.work-stat.animated .work-stat-progress-bar {
    width: 100%;
}

.work-stat-value {
    font-size: 16px;
    font-weight: 700;
    background: linear-gradient(135deg, #f2f2f2 0%, #b0b0b0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.01em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.work-stat-label {
    font-size: 11px;
    color: var(--muted);
    opacity: 0.6;
    font-weight: 400;
}

/* Count-up running flash */
@keyframes statPulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }

    100% {
        opacity: 1;
    }
}

.work-stat-value.counting {
    animation: statPulse 0.4s ease-in-out infinite;
}

.work-desc {
    font-size: 15px;
    color: var(--muted);
    line-height: 1.65;
    margin: 0;
    flex: 1;
}

.work-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.work-tag {
    font-size: 12px;
    color: var(--primary-hover);
    background: rgba(100, 100, 110, 0.25);
    border: 1px solid rgba(100, 100, 110, 0.4);
    border-radius: 20px;
    padding: 3px 12px;
    font-weight: 400;
}

.work-footer {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 4px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    width: 100%;
}

.work-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #e58c07;
    color: #1a1a1a;
    font-weight: 700;
    font-size: 14px;
    padding: 10px 20px;
    border-radius: 10px;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    width: fit-content;
}

.work-btn-primary svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.work-btn-primary:hover {
    background: #f9a825;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(229, 140, 7, 0.4);
}

.work-secondary-links {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.work-also-label {
    font-size: 13px;
    color: var(--muted);
    opacity: 0.65;
}

.work-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: var(--primary-hover);
    background: rgba(100, 100, 110, 0.2);
    border: 1px solid rgba(100, 100, 110, 0.35);
    border-radius: 8px;
    padding: 5px 12px;
    text-decoration: none;
    font-weight: 500;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.work-btn-secondary:hover {
    border-color: rgba(200, 200, 200, 0.5);
    background: rgba(100, 100, 110, 0.35);
}

/* MCPEDL green button variant */
.work-btn-mcpedl {
    color: #d4f7b0;
    background: rgba(45, 115, 10, 0.25);
    border-color: rgba(45, 115, 10, 0.5);
}

.work-btn-mcpedl:hover {
    color: #f0ffd6;
    background: rgba(55, 140, 15, 0.55);
    border-color: rgba(70, 180, 20, 0.9);
}

/* GitHub button variant */
.work-btn-github {
    color: #c8d1da;
    background: rgba(110, 118, 130, 0.25);
    border-color: rgba(110, 118, 130, 0.5);
}

.work-btn-github:hover {
    color: #ffffff;
    background: rgba(130, 140, 155, 0.5);
    border-color: rgba(180, 190, 205, 0.8);
}

.work-btn-secondary svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* MEDIA QUERIES FOR TABLET & MOBILE */
@media (max-width: 768px) {
    body {
        padding-top: 64px;
    }

    /* Mobile: swap to hamburger */
    .hamburger-btn {
        display: flex;
    }

    .navbar-nav {
        display: none;
    }

    .work-card--horizontal {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        padding: 24px 20px;
        gap: 16px;
    }

    .work-logo {
        width: 100px;
        height: 100px;
    }

    .work-card-body {
        align-items: flex-start;
        width: 100%;
        /* ทำให้ footer border ยาวเต็มการ์ด */
    }

    .work-card-body .work-card-header {
        justify-content: flex-start;
        /* ชิดซ้าย */
    }

    .work-title-row {
        justify-content: flex-start;
    }

    .work-tags {
        justify-content: flex-start;
        /* tags ชิดซ้าย */
    }

    .work-desc {
        text-align: left;
    }

    .work-footer {
        align-items: center;
        width: 100%;
        justify-content: center;
        flex-direction: column;
        gap: 12px;
    }

    .work-btn-primary {
        font-size: 16px;
        justify-content: center;
    }

    .work-secondary-links {
        justify-content: center;
        flex-wrap: wrap;
    }

    .work-also-label {
        width: 100%;
        text-align: center;
    }

    .work-icon {
        font-size: 32px;
    }


    .navbar {
        height: 64px;
        padding: 0 16px;
    }

    .navbar.scrolled {
        height: 52px;
    }

    .navbar-title {
        font-size: 16px;
    }

    .lang-btn {
        padding: 6px 12px;
        font-size: 13px;
        height: 40px;
    }

    .lang-menu {
        min-width: 140px;
    }

    .text-bg-shape {
        padding: 60px 20px;
        min-height: auto;
        text-align: center;
        align-items: center;
        margin-top: -64px;
    }

    .text-bg-shape h1 {
        font-size: 32px !important;
    }

    .ligne-top {
        margin: 0 auto;
    }

    .merchandises {
        flex-direction: column;
        text-align: center;
        gap: 30px;
        padding: 30px 20px;
    }

    .merch-image {
        flex: 0 0 auto;
        width: 100%;
        max-width: 200px;
        margin: 0 auto;
    }

    .merch-image img {
        max-width: 100%;
    }

    .merchant {
        font-size: 32px;
    }

    .text-bg {
        font-size: 48px;
    }

    .members-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 16px;
    }
}

@media (min-width: 601px) and (max-width: 768px) {
    .work-footer {
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
        justify-content: center;
    }

    .work-btn-primary {
        font-size: 14px;
    }

    .work-secondary-links {
        flex-direction: row;
        align-items: center;
    }

    .work-also-label {
        width: auto;
        text-align: left;
    }

    .work-icon {
        font-size: 34px;
    }
}

@media (max-width: 480px) {
    .navbar-title {
        font-size: 14px;
    }

    .members-grid {
        grid-template-columns: 1fr;
    }

    .social-link {
        gap: 10px;
    }

    .lang-btn span {
        display: none;
        /* Hide 'Languages' text on very small screens, keep icon/flag */
    }

    .work-icon {
        font-size: 28px;
    }
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

.navbar-title span {
    display: inline-block;
}

@media (max-width: 280px) {
    .navbar {
        padding: 0 8px;
    }

    .navbar-title span {
        display: none;
        /* Hide text, keep ONLY the duck 🦆 on extremely tiny screens */
    }

    .navbar-title {
        margin-right: 4px;
        flex-shrink: 1;
    }

    .lang-btn {
        padding: 4px 6px;
        font-size: 12px;
    }
}

/* ANIMATIONS */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.fade-in-load {
    animation: fadeInUp 0.8s ease-out forwards;
}