/* CSS Variables */
:root {
    --tpea-blue: #0A3D91;
    --tpea-red: #E63946;
    --neon-blue: #00f3ff;
    --neon-pink: #ff00ff;
    --neon-purple: #bc13fe;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: 'Sarabun', sans-serif;
    line-height: 1.6;
    color: var(--gray-700);
    background-color: var(--gray-50);
}

/* Hide scrollbar */
::-webkit-scrollbar {
    display: none;
}

html, body {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Utility Classes */
.hidden { display: none; }
.block { display: block; }
.flex { display: flex; }
.grid { display: grid; }
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-50 { z-index: 50; }
.w-full { width: 100%; }
.h-full { height: 100%; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-white { color: white; }
.bg-white { background-color: white; }
.bg-gray-50 { background-color: var(--gray-50); }
.bg-gray-900 { background-color: var(--gray-900); }
.bg-tpea-blue { background-color: var(--tpea-blue); }
.bg-tpea-red { background-color: var(--tpea-red); }
.text-tpea-blue { color: var(--tpea-blue); }
.text-tpea-red { color: var(--tpea-red); }
.text-gray-400 { color: var(--gray-400); }
.text-gray-500 { color: var(--gray-500); }
.text-gray-600 { color: var(--gray-600); }
.text-gray-700 { color: var(--gray-700); }
.rounded-full { border-radius: 9999px; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); }
.overflow-hidden { overflow: hidden; }
.cursor-pointer { cursor: pointer; }
.transition-all { transition: all 0.3s ease; }

/* Typography */
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
.text-6xl { font-size: 3.75rem; }
.font-medium { font-weight: 500; }
.font-bold { font-weight: 700; }
.leading-tight { line-height: 1.25; }

/* Spacing */
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }
.m-2 { margin: 0.5rem; }
.m-4 { margin: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }
.mr-2 { margin-right: 0.5rem; }
.mr-3 { margin-right: 0.75rem; }
.mr-4 { margin-right: 1rem; }
.ml-2 { margin-left: 0.5rem; }
.ml-3 { margin-left: 0.75rem; }
.ml-4 { margin-left: 1rem; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }
.mt-10 { margin-top: 2.5rem; }

/* Grid */
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

/* Flexbox */
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-col { flex-direction: column; }
.space-x-4 > * + * { margin-left: 1rem; }
.space-x-6 > * + * { margin-left: 1.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }

/* Sizing */
.w-4 { width: 1rem; }
.w-5 { width: 1.25rem; }
.w-6 { width: 1.5rem; }
.w-8 { width: 2rem; }
.w-10 { width: 2.5rem; }
.w-12 { width: 3rem; }
.w-16 { width: 4rem; }
.h-4 { height: 1rem; }
.h-5 { height: 1.25rem; }
.h-6 { height: 1.5rem; }
.h-8 { height: 2rem; }
.h-10 { height: 2.5rem; }
.h-12 { height: 3rem; }
.h-16 { height: 4rem; }
.h-32 { height: 8rem; }
.h-40 { height: 10rem; }
.h-48 { height: 12rem; }
.h-56 { height: 14rem; }

/* Header */
.header {
    background: rgba(0, 0, 0, 0.8);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 50;
    transition: all 0.3s ease;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
}

/* Punk Neon Logo Styles */
.logo {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    z-index: 5;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    animation: logoBackgroundPulse 4s infinite;
}

.logo:hover {
    transform: scale(1.05);
}

@keyframes logoBackgroundPulse {
    0%, 100% {
        background: rgba(0, 0, 0, 0);
    }
    50% {
        background: rgba(188, 19, 254, 0.1);
    }
}
@media (max-width: 767px) {
    #join-btn { display: none; }
  }
.logo-icon {
    width: 5rem;
    height: 3rem;
    background: linear-gradient(45deg, var(--neon-blue), var(--neon-purple));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1rem;
    margin-right: 0.75rem;
    position: relative;
    box-shadow: 
        0 0 10px 2px var(--neon-blue),
        0 0 20px 5px rgba(0, 243, 255, 0.5);
    animation: neonPulse 2s infinite alternate;
    text-shadow: 
        0 0 5px #fff,
        0 0 10px #fff,
        0 0 15px var(--neon-blue),
        0 0 20px var(--neon-blue);
}

@keyframes neonPulse {
    0% {
        box-shadow: 
            0 0 10px 2px var(--neon-blue),
            0 0 20px 5px rgba(0, 243, 255, 0.5);
    }
    100% {
        box-shadow: 
            0 0 15px 3px var(--neon-purple),
            0 0 30px 8px rgba(188, 19, 254, 0.7);
    }
}

.logo-icon::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--neon-pink), var(--neon-blue));
    z-index: -1;
    opacity: 0.7;
    filter: blur(10px);
    animation: glowRotate 3s linear infinite;
}

@keyframes glowRotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.logo-text h1 {
    color: white;
    font-weight: bold;
    font-size: 1.25rem;
    line-height: 1.25;
    margin: 0;
    padding-left: 1rem;
    text-shadow: 
        0 0 5px #fff,
        0 0 10px var(--neon-blue),
        0 0 15px var(--neon-blue),
        0 0 20px var(--neon-blue);
    animation: textFlicker 4s infinite alternate;
}

.logo-text p {
    color: var(--neon-pink);
    font-size: 0.875rem;
    margin: 0;
    text-shadow: 
        0 0 5px var(--neon-pink),
        0 0 10px var(--neon-pink);
    animation: textPulse 2s infinite alternate;
}

@keyframes textFlicker {
    0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
        text-shadow: 
            0 0 5px #fff,
            0 0 10px var(--neon-blue),
            0 0 15px var(--neon-blue),
            0 0 20px var(--neon-blue);
    }
    20%, 24%, 55% {
        text-shadow: none;
    }
}

@keyframes textPulse {
    0% {
        opacity: 0.7;
    }
    100% {
        opacity: 1;
    }
}

/* Navigation */
.nav {
    display: none;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    color: white;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

.nav-link:hover {
    color: var(--neon-blue);
    transform: scale(1.05);
    text-shadow: 
        0 0 5px var(--neon-blue),
        0 0 10px var(--neon-blue);
}

.nav-link.active {
    color: var(--neon-blue);
    text-shadow: 
        0 0 5px var(--neon-blue),
        0 0 10px var(--neon-blue);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--neon-blue);
    box-shadow: 0 0 5px var(--neon-blue);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: inherit;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(45deg, var(--neon-purple), var(--neon-pink));
    color: white;
    box-shadow: 
        0 0 10px rgba(188, 19, 254, 0.5),
        0 0 20px rgba(188, 19, 254, 0.3);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 
        0 0 15px rgba(188, 19, 254, 0.7),
        0 0 30px rgba(188, 19, 254, 0.5);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid var(--neon-blue);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
    text-shadow: 0 0 5px var(--neon-blue);
}

.btn-secondary:hover {
    background-color: rgba(0, 243, 255, 0.2);
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.7);
}

.btn-blue {
    background: linear-gradient(45deg, var(--tpea-blue), var(--neon-blue));
    color: white;
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
}

.btn-blue:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.7);
}

/* Mobile Menu */
.mobile-menu-btn {
    display: block;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    transition: transform 0.3s ease;
}

.mobile-menu-btn:hover {
    transform: scale(1.1);
    color: var(--neon-blue);
}

.mobile-menu {
    display: none;
    margin-top: 1rem;
    padding-bottom: 1rem;
    background: rgba(0, 0, 0, 0.9);
    border-radius: 0.5rem;
    box-shadow: 
        0 0 10px rgba(0, 243, 255, 0.3),
        0 0 20px rgba(0, 243, 255, 0.2);
    border: 1px solid rgba(0, 243, 255, 0.2);
}

.mobile-menu.show {
    display: block;
    animation: slideDown 0.3s ease-out;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-nav-link {
    color: white;
    font-weight: 500;
    text-decoration: none;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    width: 100%;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: var(--neon-blue);
    background-color: rgba(0, 243, 255, 0.1);
    text-shadow: 0 0 5px var(--neon-blue);
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;        /* เปลี่ยนจาก 37.5rem เป็น 100vh */
    min-height: 100vh;    /* เพิ่ม min-height เพื่อให้แน่ใจว่าเต็มหน้าจอ */
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(to right, var(--tpea-blue), rgba(10, 61, 145, 0.8));
    z-index: 10;
    animation: overlayPulse 8s ease-in-out infinite;
}

.hero-bg {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 95%;
    animation: backgroundFloat 12s ease-in-out infinite;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: float 3s ease-in-out infinite;
    
}
@keyframes imageSway {
    0% {
        transform: translateX(0px) translateY(0px) rotate(0deg);
    }
    25% {
        transform: translateX(-8px) translateY(-3px) rotate(-0.5deg);
    }
    50% {
        transform: translateX(0px) translateY(-5px) rotate(0deg);
    }
    75% {
        transform: translateX(8px) translateY(-3px) rotate(0.5deg);
    }
    100% {
        transform: translateX(0px) translateY(0px) rotate(0deg);
    }
}

.hero-content {
    position: relative;
    z-index: 20;
    height: 100%;
    display: flex;
    align-items: center;
}

.hero-text {
    max-width: 64rem;
    color: white;
}
@keyframes slideIn {
    0% {
      opacity: 0;
      transform: translateX(-100px);
    }
    100% {
      opacity: 1;
      transform: translateX(0);
    }
  }
.hero-title {
    font-size: 2.25rem;
    font-weight: bold;
    margin-bottom: 1rem;
    line-height: 1.25;
    transition: transform 0.3s ease;
}

.hero-subtitle {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    transition: transform 0.3s ease;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hero-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4rem;
    background: white;
    clip-path: polygon(0 100%, 100% 0, 100% 100%, 0% 100%);
    animation: wave 1s ease-out;
}

/* Stats Section */
.stats {
    padding: 3rem 0;
    background: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.stat-item:hover {
    background-color: var(--gray-50);
}

.stat-number {
    color: var(--tpea-blue);
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    transition: transform 0.3s ease;
}

.stat-item:hover .stat-number {
    transform: scale(1.1);
}

.stat-label {
    color: var(--gray-600);
    font-size: 0.875rem;
}

/* About Section */
.about {
    padding: 4rem 0;
    background-color: var(--gray-50);
}

.about-header {
    text-align: center;
    margin-bottom: 3rem;
}

.about-title {
    font-size: 1.875rem;
    font-weight: bold;
    color: var(--tpea-blue);
    margin-bottom: 1rem;
}

.about-description {
    color: var(--gray-600);
    max-width: 48rem;
    margin: 0 auto;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1.5rem;
}

.about-card {
    background: white;
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    transform: translateY(0);
}

.about-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateY(-0.5rem) scale(1.05);
}

.about-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.about-icon.blue {
    background-color: rgba(10, 61, 145, 0.1);
    color: var(--tpea-blue);
}

.about-icon.red {
    background-color: rgba(230, 57, 70, 0.1);
    color: var(--tpea-red);
}

.about-card-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--tpea-blue);
    margin-bottom: 0.75rem;
}

.about-card-desc {
    color: var(--gray-600);
}

/* Events Section */
.events {
    padding: 4rem 0;
    background: white;
}

.events-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    flex-direction: column;
    gap: 1rem;
}

.events-title {
    font-size: 1.875rem;
    font-weight: bold;
    color: var(--tpea-blue);
}

.events-link {
    color: var(--tpea-red);
    font-weight: 500;
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: color 0.3s ease;
}

.events-link:hover {
    color: #dc2626;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1.5rem;
}

.event-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.event-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateY(-0.5rem) scale(1.05);
}

.event-image {
    height: 12rem;
    position: relative;
    overflow: hidden;
}

.event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.event-card:hover .event-image img {
    transform: scale(1.1);
}

.event-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    animation: pulse 2s infinite;
}

.event-badge.red {
    background-color: var(--tpea-red);
}

.event-badge.blue {
    background-color: var(--tpea-blue);
}

.event-content {
    padding: 1.5rem;
}

.event-meta {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 0.75rem;
}

.event-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--tpea-blue);
    margin-bottom: 0.5rem;
     
}

.event-desc {
    color: var(--gray-600);
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.event-location {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 1rem;
}

.event-button {
    width: 100%;
    background-color: var(--tpea-blue);
    color: white;
    text-align: center;
    padding: 0.75rem;
    border-radius: 9999px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

 

  
.event-button:hover {
    background-color: #1e40af;
    transform: scale(1.05);
}

/* Teams Section */
.teams {
    padding: 4rem 0;
    background-color: var(--gray-50);
}

.teams-header {
    text-align: center;
    margin-bottom: 3rem;
}

.teams-title {
    font-size: 1.875rem;
    font-weight: bold;
    color: var(--tpea-blue);
    margin-bottom: 1rem;
}

.teams-description {
    color: var(--gray-600);
    max-width: 48rem;
    margin: 0 auto;
}

.teams-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1.5rem;
}

.team-card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.team-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateY(-0.5rem) scale(1.05);
}

.team-image {
    height: 12rem;
    position: relative;
    overflow: hidden;
}

.team-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.team-card:hover .team-image img {
    transform: scale(1.1);
}

.team-content {
    padding: 1.5rem;
}

.team-name {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--tpea-blue);
    margin-bottom: 0.5rem;
}

.team-desc {
    color: var(--gray-600);
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.team-members {
    display: flex;
    align-items: center;
}

.members-list {
    display: flex;
    margin-left: -0.5rem;
}

.member-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    border: 2px solid white;
    margin-left: -0.5rem;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.member-avatar:hover {
    transform: scale(1.1);
}

.member-avatar.blue {
    background-color: var(--tpea-blue);
    color: white;
}

.member-avatar.red {
    background-color: var(--tpea-red);
    color: white;
}

.member-avatar.gray {
    background-color: var(--gray-200);
    color: var(--gray-600);
}

/* News Section */
.news {
    padding: 4rem 0;
    background: white;
}

.news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    flex-direction: column;
    gap: 1rem;
}

.news-title {
    font-size: 1.875rem;
    font-weight: bold;
    color: var(--tpea-blue);
}

.news-link {
    color: var(--tpea-red);
    font-weight: 500;
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: color 0.3s ease;
}

.news-link:hover {
    color: #dc2626;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1.5rem;
}

.news-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    height: 500px;
}

.news-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateY(-0.5rem) scale(1.05);
}

.news-image {
    height: 12rem;
    position: relative;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .news-image img {
    transform: scale(1.1);
}

.news-content {
    padding: 1.5rem;
}

.news-meta {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 0.75rem;
}

.news-category {
    background-color: rgba(10, 61, 145, 0.1);
    color: var(--tpea-blue);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
}

.news-title-text {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--tpea-blue);
    margin-bottom: 0.5rem;
    
}

.news-desc {
    color: var(--gray-600);
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    
}

.news-read-more {
    color: var(--tpea-red);
    font-weight: 500;
    text-decoration: none;
}

.news-read-more:hover {
    text-decoration: underline;
}

/* Sponsors Section */
.sponsors {
    padding: 4rem 0;
    background-color: var(--gray-50);
}

.sponsors-header {
    text-align: center;
    margin-bottom: 3rem;
}

.sponsors-title {
    font-size: 1.875rem;
    font-weight: bold;
    color: var(--tpea-blue);
    margin-bottom: 1rem;
}

.sponsors-description {
    color: var(--gray-600);
    max-width: 48rem;
    margin: 0 auto;
}

/* Sponsors Section - Updated with Center Alignment */
.sponsors-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
    align-items: center;
    justify-content: center;
    max-width: 800px; /* จำกัดความกว้างสูงสุด */
    margin: 0 auto; /* จัดให้อยู่กึ่งกลาง */
}

/* Responsive Design for Sponsors */
@media (min-width: 640px) {
    .sponsors-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        max-width: 900px;
    }
}

@media (min-width: 768px) {
    .sponsors-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 1.5rem;
        max-width: 1200px;
    }
    
    .sponsor-item {
        padding: 1.5rem 1rem;
        min-height: 100px;
    }
    
    .sponsor-icon {
        width: 2.5rem;
        height: 2.5rem;
    }
    
    .sponsor-name {
        font-size: 0.875rem;
    }
}

@media (min-width: 1024px) {
    .sponsors-grid {
        gap: 2rem;
        max-width: 1400px;
    }
}

@media (max-width: 639px) {
    .sponsors-grid {
        max-width: 600px;
    }
    
    .sponsor-item {
        padding: 1.5rem 1rem;
        min-height: 100px;
    }
    
    .sponsor-icon {
        width: 2.5rem;
        height: 2.5rem;
    }
    
    .sponsor-name {
        font-size: 0.875rem;
    }
}

.sponsor-item {
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: grayscale(100%);
    transition: all 0.3s ease;
}

.sponsor-item:hover {
    filter: grayscale(0%);
    transform: scale(1.1);
}

.sponsor-text {
    font-size: 1.125rem;
    color: var(--gray-400);
    font-weight: bold;
    transition: color 0.3s ease;
}

.sponsor-item:hover .sponsor-text {
    color: var(--tpea-blue);
}

/* Join Section */
.join {
    padding: 5rem 0;
    background-color: var(--tpea-blue);
    position: relative;
    overflow: hidden;
}

.join-bg {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

.join-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.join-content {
    position: relative;
    z-index: 10;
    max-width: 64rem;
    margin: 0 auto;
    text-align: center;
}

.join-title {
    font-size: 2.25rem;
    font-weight: bold;
    color: white;
    margin-bottom: 1.5rem;
}

.join-subtitle {
    color: #bfdbfe;
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

.join-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.join-card {
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    padding: 1.5rem;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
}

.join-card:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.join-icon {
    width: 4rem;
    height: 4rem;
    background-color: rgba(230, 57, 70, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.join-card-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: white;
    margin-bottom: 0.5rem;
}

.join-card-desc {
    color: #bfdbfe;
}

.join-button {
    background-color: var(--tpea-red);
    color: white;
    font-weight: 500;
    padding: 1rem 2rem;
    border-radius: 9999px;
    transition: all 0.3s ease;
    font-size: 1.125rem;
    border: none;
    cursor: pointer;
    font-family: inherit;
    animation: pulse 2s infinite;
}

.join-button:hover {
    background-color: #dc2626;
    transform: scale(1.05);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Contact Section */
.contact {
    padding: 4rem 0;
    background: white;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 2rem;
}

.contact-info {
    /* Styles for contact info */
}

.contact-title {
    font-size: 1.875rem;
    font-weight: bold;
    color: var(--tpea-blue);
    margin-bottom: 1.5rem;
}

.contact-description {
    color: var(--gray-600);
    margin-bottom: 2rem;
}

.contact-items {
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    padding: 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.contact-item:hover {
    background-color: var(--gray-50);
}

.contact-icon {
    width: 2.5rem;
    height: 2.5rem;
    background-color: rgba(10, 61, 145, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    margin-top: 0.25rem;
    flex-shrink: 0;
}

.contact-icon svg {
    color: var(--tpea-blue);
    width: 1.25rem;
    height: 1.25rem;
}

.contact-item-title {
    font-weight: 500;
    color: var(--gray-800);
    margin-bottom: 0.25rem;
}

.contact-item-content {
    color: var(--gray-600);
    white-space: pre-line;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 2.5rem;
    height: 2.5rem;
    background-color: var(--tpea-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.social-link:hover {
    background-color: #1e40af;
    transform: scale(1.1);
}

/* Contact Form */
.contact-form {
    background-color: var(--gray-50);
    padding: 2rem;
    border-radius: 0.75rem;
}

.form-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--tpea-blue);
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    color: var(--gray-700);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.5rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: 0.5rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--tpea-blue);
    box-shadow: 0 0 0 2px rgba(10, 61, 145, 0.2);
}

.form-textarea {
    width: 100%;
    padding: 0.5rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: 0.5rem;
    height: 8rem;
    resize: none;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-textarea:focus {
    outline: none;
    border-color: var(--tpea-blue);
    box-shadow: 0 0 0 2px rgba(10, 61, 145, 0.2);
}

.form-submit {
    width: 100%;
    background-color: var(--tpea-blue);
    color: white;
    font-weight: 500;
    padding: 0.75rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.form-submit:hover {
    background-color: #1e40af;
    transform: scale(1.05);
}

/* Footer */
.footer {
    background-color: var(--gray-900);
    color: white;
    padding: 3rem 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 3rem;
}

.footer-brand {
    margin-bottom: 1.5rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    cursor: pointer;
}

.footer-logo-icon {
    width: 2.5rem;
    height: 2.5rem;
    background: linear-gradient(45deg, var(--neon-blue), var(--neon-purple));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.875rem;
    margin-right: 0.5rem;
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
}

.footer-logo-text h3 {
    color: white;
    font-weight: bold;
    font-size: 1.125rem;
    line-height: 1.25;
    margin: 0;
    text-shadow: 0 0 5px var(--neon-blue);
}

.footer-logo-text p {
    color: var(--neon-pink);
    font-size: 0.75rem;
    margin: 0;
}

.footer-description {
    color: var(--gray-400);
    margin-bottom: 1.5rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social-link {
    color: var(--gray-400);
    transition: all 0.3s ease;
    background: none;
    border: none;
    cursor: pointer;
}

.footer-social-link:hover {
    color: white;
    transform: scale(1.1);
}

.footer-section-title {
    font-size: 1.125rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-link {
    color: var(--gray-400);
    text-decoration: none;
    transition: color 0.3s ease;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    padding: 0;
}

.footer-link:hover {
    color: white;
}

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.footer-contact-icon {
    color: var(--tpea-red);
    margin-right: 0.75rem;
    margin-top: 0.25rem;
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

.footer-contact-text {
    color: var(--gray-400);
    font-size: 0.875rem;
}

.footer-bottom {
    border-top: 1px solid var(--gray-800);
    margin-top: 3rem;
    padding-top: 2rem;
    text-align: center;
    color: var(--gray-500);
    font-size: 0.875rem;
}

/* Scroll to Top Button */
.scroll-top {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background: linear-gradient(45deg, var(--neon-blue), var(--neon-purple));
    color: white;
    padding: 0.75rem;
    border-radius: 50%;
    box-shadow: 
        0 0 10px rgba(0, 243, 255, 0.5),
        0 0 20px rgba(0, 243, 255, 0.3);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    z-index: 50;
    opacity: 0;
    visibility: hidden;
}

.scroll-top.show {
    opacity: 1;
    visibility: visible;
    animation: bounceIn 0.8s ease-out;
}

.scroll-top:hover {
    transform: scale(1.1);
    box-shadow: 
        0 0 15px rgba(0, 243, 255, 0.7),
        0 0 30px rgba(0, 243, 255, 0.5);
}

/* Animations */
@keyframes slideDown {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeInUp {
    0% {
        transform: translateY(30px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeInDown {
    0% {
        transform: translateY(-30px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes wave {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

.animate-fade-in-down {
    animation: fadeInDown 0.8s ease-out;
}

.animate-bounce-in {
    animation: bounceIn 0.8s ease-out;
}

/* Responsive Design */
@media (min-width: 640px) {
    .hero-buttons {
        flex-direction: row;
    }
    
    .events-header,
    .news-header {
        flex-direction: row;
        gap: 0;
    }
    
    .form-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 768px) {
    .nav {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: none;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 2rem;
    }
    
    .about-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 2rem;
    }
    
    .events-grid,
    .news-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 2rem;
    }
    
    .teams-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 2rem;
    }
    
    .sponsors-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 2rem;
    }
    
    .join-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    
    .contact-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 3rem;
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 2rem;
    }
    
    .hero-title {
        font-size: 3.75rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .about-title,
    .events-title,
    .teams-title,
    .news-title,
    .sponsors-title {
        font-size: 2.25rem;
    }
    
    .join-title {
        font-size: 3rem;
    }
    
    .contact-title {
        font-size: 2.25rem;
    }
    
    .stat-number {
        font-size: 2.25rem;
    }
    
    .sponsor-text {
        font-size: 3.75rem;
    }
}

@media (min-width: 1024px) {
    .events-grid,
    .news-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    
    .teams-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    
    .footer-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .hero {
        height: 31.25rem;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .logo-icon {
        width: 2.5rem;
        height: 2.5rem;
    }
    
    .logo-text h1 {
        font-size: 1rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    .about-title,
    .events-title,
    .teams-title,
    .news-title,
    .sponsors-title {
        font-size: 1.5rem;
    }
    
    .join-title {
        font-size: 1.5rem;
    }
    
    .contact-title {
        font-size: 1.5rem;
    }
    
    .sponsor-text {
        font-size: 1.125rem;
    }
    
    .event-image,
    .team-image,
    .news-image {
        height: 10rem;
    }
    
    .member-avatar {
        width: 1.5rem;
        height: 1.5rem;
    }
}
/* Sponsors Section - Updated */
.sponsors {
    padding: 4rem 0;
    background-color: var(--gray-50);
}

.sponsors-header {
    text-align: center;
    margin-bottom: 3rem;
}

.sponsors-title {
    font-size: 1.875rem;
    font-weight: bold;
    color: var(--tpea-blue);
    margin-bottom: 1rem;
}

.sponsors-description {
    color: var(--gray-600);
    max-width: 48rem;
    margin: 0 auto;
}

.sponsors-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
    align-items: center;
    justify-content: center;  /* จัดให้ grid อยู่กึ่งกลาง */
    max-width: 800px;         /* จำกัดความกว้าง */
    margin: 0 auto;           /* จัดให้อยู่กึ่งกลางของ container */
}

.sponsor-item {
    padding: 2rem 1rem;
    
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
   
    transition: all 0.3s ease;
    min-height: 320px;
   
}

.sponsor-item:hover {
    filter: grayscale(0%);
    transform: scale(1.05);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.sponsor-icon {
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--gray-100);
    border-radius: 50%;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
}

.sponsor-icon i {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--gray-500);
    transition: color 0.3s ease;
}

.sponsor-item:hover .sponsor-icon {
    
    filter: none !important;
}

.sponsor-item:hover .sponsor-icon i {
    color: white;
}

.sponsor-name {
    font-size: 1rem;
    color: var(--gray-600);
    font-weight: 600;
    text-align: center;
    transition: color 0.3s ease;
}

.sponsor-item:hover .sponsor-name {
    color: var(--tpea-blue);
}

/* Alternative styles for image logos */
.sponsor-logo {
    width: 100%;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sponsor-logo img {
    filter: none !important;
    opacity: 1 !important;
    max-width: 120px;
    max-height: 60px;
    object-fit: contain;
    transition: all 0.3s ease;
   
}

.sponsor-item:hover .sponsor-logo img {
    transform: scale(1.7);
}

/* Responsive Design for Sponsors */
@media (min-width: 640px) {
    .sponsors-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 768px) {
    .sponsors-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1.5rem;
    }
    
    .sponsor-item {
        padding: 1.5rem 1rem;
        min-height: 100px;
    }
    
    .sponsor-icon {
        width: 2.5rem;
        height: 2.5rem;
    }
    
    .sponsor-name {
        font-size: 0.875rem;
    }
}

@media (min-width: 1024px) {
    .sponsors-grid {
        gap: 2rem;
    }
}

@media (max-width: 639px) {
    .sponsor-item {
        padding: 1.5rem 1rem;
        min-height: 100px;
    }
    
    .sponsor-icon {
        width: 2.5rem;
        height: 2.5rem;
    }
    
    .sponsor-name {
        font-size: 0.875rem;
    }
}

.glass-panel {
    background: rgba(255, 255, 255, 0.1);          /* พื้นหลังโปร่งแสง */
    border-radius: 12px;                           /* ขอบโค้ง */
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);     /* เงาเบา ๆ เพื่อยกเลเยอร์ */
    backdrop-filter: blur(10px);                   /* เบลอพื้นหลัง (core effect) */
    -webkit-backdrop-filter: blur(10px);           /* รองรับ Safari */
    border: 1px solid rgba(255, 255, 255, 0.2);    /* ขอบโปร่งแสง */
    color: white;                                  /* ใช้สีอักษรให้คอนทราสต์ */
    padding: 10px;
    max-width: 100%;
    margin: 10px auto;
  }

 
  
  .scroll-top {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background: linear-gradient(45deg, var(--neon-blue), var(--neon-purple));
    color: white;
    padding: 0.75rem;
    border-radius: 50%;
    box-shadow: 
        0 0 10px rgba(0, 243, 255, 0.5),
        0 0 20px rgba(0, 243, 255, 0.3);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    z-index: 50;
    opacity: 0;
    visibility: hidden;
}

.scroll-top.show {
    opacity: 1;
    visibility: visible;
    animation: bounceIn 0.8s ease-out;
}

.scroll-top:hover {
    transform: scale(1.1);
    box-shadow: 
        0 0 15px rgba(0, 243, 255, 0.7),
        0 0 30px rgba(0, 243, 255, 0.5);
}
  /* รองรับ Dark Mode */
  @media (prefers-color-scheme: dark) {
    .scroll-top {
      background: #111827;
      color: #fff;
    }
    .scroll-top:hover {
      background: #1e293b;
    }
  }
  
  /* ซ่อนไว้ในมือถือ */
@media (max-width: 639.98px) {
    .btn-desktop-only {
      display: none;
    }
  }
  