/* ===================================
   Score22.com - Main Stylesheet
   Vibrant Gradient Sports Theme
   =================================== */

/* === CSS Variables === */
:root {
    --grad-1: #0066ff;
    --grad-2: #7c3aed;
    --grad-3: #ec4899;
    --grad-4: #f97316;
    --grad-5: #06b6d4;

    --primary: #0057e7;
    --primary-dark: #003db3;
    --secondary: #7c3aed;
    --accent: #f97316;
    --accent2: #06b6d4;

    --bg-dark: #0a0e1a;
    --bg-card: #111827;
    --bg-card2: #1a2235;
    --bg-surface: #1e2d42;

    --text-white: #ffffff;
    --text-light: #e2e8f0;
    --text-muted: #94a3b8;
    --text-dark: #0f172a;

    --border: rgba(255,255,255,0.08);
    --border-glow: rgba(0,102,255,0.4);

    --header-h: 80px;
    --nav-h: 52px;
    --topbar-h: 36px;

    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 20px;

    --shadow: 0 4px 24px rgba(0,0,0,0.4);
    --shadow-glow: 0 0 30px rgba(0,102,255,0.3);

    --font-main: 'Kanit', sans-serif;
    --font-body: 'Sarabun', sans-serif;

    --footer-bg: #070b14;

    --trans: all 0.28s cubic-bezier(0.4,0,0.2,1);
}

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: var(--font-body);
    background: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.7;
    overflow-x: hidden;
}

h1,h2,h3,h4,h5,h6 { font-family: var(--font-main); }

a { color: inherit; text-decoration: none; transition: var(--trans); }
img { max-width: 100%; height: auto; }
ul { list-style: none; }

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==============================
   TOP BAR
   ============================== */
.top-bar {
    background: linear-gradient(90deg, var(--grad-1), var(--grad-2), var(--grad-3));
    background-size: 200% 100%;
    animation: shimmer 4s linear infinite;
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    font-family: var(--font-main);
    font-size: 0.78rem;
    font-weight: 500;
    color: #fff;
    position: relative;
    z-index: 100;
}

@keyframes shimmer {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.top-bar-left, .top-bar-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

.top-bar-left span, .top-bar-right span {
    display: flex;
    align-items: center;
    gap: 5px;
    opacity: 0.95;
}

/* ==============================
   HEADER
   ============================== */
.site-header {
    background: linear-gradient(135deg, #060d1f 0%, #0d1b33 40%, #0f1a30 100%);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 99;
    height: var(--header-h);
    display: flex;
    align-items: center;
    box-shadow: 0 2px 30px rgba(0,0,0,0.5);
}

.site-header::before {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--grad-1), var(--grad-2), var(--grad-3), var(--grad-4), var(--grad-5));
    background-size: 300% 100%;
    animation: shimmer 3s linear infinite;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
}

.logo-wrap { flex-shrink: 0; }

.site-logo {
    height: 52px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 12px rgba(0,102,255,0.5));
    transition: var(--trans);
}
.site-logo:hover { filter: drop-shadow(0 0 20px rgba(0,102,255,0.8)) brightness(1.1); transform: scale(1.03); }

.text-logo {
    font-family: var(--font-main);
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(90deg, #fff, var(--grad-5));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-tagline { flex: 1; text-align: center; }
.tagline-main {
    font-family: var(--font-main);
    font-size: 0.9rem;
    font-weight: 600;
    background: linear-gradient(90deg, var(--grad-1), var(--grad-5), var(--grad-3));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.5px;
}
.tagline-sub {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.btn-contact {
    background: linear-gradient(135deg, var(--grad-1), var(--secondary));
    color: #fff;
    padding: 9px 20px;
    border-radius: 50px;
    font-family: var(--font-main);
    font-size: 0.82rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(0,102,255,0.35);
    transition: var(--trans);
}
.btn-contact:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(0,102,255,0.55);
}

/* ==============================
   NAVIGATION
   ============================== */
.site-nav {
    background: linear-gradient(180deg, #0c1a33 0%, #091222 100%);
    border-bottom: 2px solid transparent;
    border-image: linear-gradient(90deg, var(--grad-1), var(--grad-2), var(--grad-3), var(--grad-4), var(--grad-5)) 1;
    position: sticky;
    top: var(--header-h);
    z-index: 98;
    box-shadow: 0 6px 24px rgba(0,0,0,0.4);
}

.site-nav .container {
    display: block;
    padding-top: 6px;
    padding-bottom: 8px;
}

.nav-scroll-wrap { width: 100%; }

/* GRID: 11 cols x 2 rows — !important prevents any override */
.nav-menu {
    display: grid !important;
    grid-template-columns: repeat(11, minmax(0, 1fr)) !important;
    grid-auto-rows: auto !important;
    gap: 4px !important;
    width: 100% !important;
    flex-wrap: unset !important;
}

.nav-link {
    font-family: var(--font-main);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    padding: 7px 4px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: var(--trans);
    border: 1px solid transparent;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 3px;
    line-height: 1.3;
    text-align: center;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    flex: none !important;
}

.nav-link:hover {
    color: #fff;
    background: rgba(0,102,255,0.18);
    border-color: rgba(0,102,255,0.28);
    transform: translateY(-1px);
}

.nav-link.active {
    background: linear-gradient(135deg, var(--grad-1), var(--secondary));
    color: #fff;
    font-weight: 600;
    border-color: transparent;
    box-shadow: 0 2px 12px rgba(0,102,255,0.4);
}

/* Hamburger — hidden on desktop, shown on mobile */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-right: 8px;
    flex-shrink: 0;
}
.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-light);
    border-radius: 2px;
    transition: var(--trans);
}
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==============================
   MAIN CONTENT LAYOUT
   ============================== */
.site-main {
    padding: 30px 0 50px;
    min-height: 60vh;
}

/* Page Hero Banner */
.page-hero {
    background: linear-gradient(135deg, #0a1628 0%, #111f3a 50%, #0a1628 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 30px 40px;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(ellipse at 30% 50%, rgba(0,102,255,0.12), transparent 60%),
                radial-gradient(ellipse at 80% 20%, rgba(124,58,237,0.10), transparent 50%);
    pointer-events: none;
}

.page-hero h1 {
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 800;
    background: linear-gradient(90deg, #fff 0%, var(--grad-5) 50%, var(--grad-1) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
    position: relative;
}

.page-hero p {
    font-size: 0.9rem;
    color: var(--text-muted);
    position: relative;
    max-width: 700px;
}

.page-hero .hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
    position: relative;
}

.badge {
    background: rgba(0,102,255,0.15);
    border: 1px solid rgba(0,102,255,0.3);
    color: var(--grad-5);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-family: var(--font-main);
    font-weight: 500;
}

/* Score Widget Container */
.score-widget-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 28px;
    box-shadow: var(--shadow);
}

.widget-header {
    background: linear-gradient(90deg, var(--grad-1), var(--secondary));
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.widget-title {
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.live-badge {
    background: #ef4444;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 50px;
    animation: pulse 1.5s infinite;
    font-family: var(--font-main);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.score-iframe-container {
    width: 100%;
    min-height: 600px;
    background: var(--bg-card2);
}

.score-iframe-container iframe {
    width: 100%;
    border: none;
    display: block;
}

/* Sports Grid (for homepage sport links) */
.sports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 30px;
}

.sport-card {
    background: linear-gradient(135deg, var(--bg-card), var(--bg-card2));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 14px;
    text-align: center;
    transition: var(--trans);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    text-decoration: none;
}

.sport-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-glow);
    box-shadow: var(--shadow-glow);
    background: linear-gradient(135deg, rgba(0,102,255,0.15), var(--bg-card2));
}

.sport-card .icon { font-size: 1.8rem; }
.sport-card .name {
    font-family: var(--font-main);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-light);
}

/* ==============================
   ARTICLE / SEO CONTENT
   ============================== */
.content-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 36px;
    margin-bottom: 24px;
}

.content-section h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid transparent;
    border-image: linear-gradient(90deg, var(--grad-1), var(--grad-2)) 1;
    display: inline-block;
}

.content-section h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--grad-5);
    margin: 18px 0 8px;
}

.content-section p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.8;
    margin-bottom: 12px;
}

.content-section ul li {
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 4px 0 4px 20px;
    position: relative;
}

.content-section ul li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--grad-1);
}

/* ==============================
   FAQ SECTION
   ============================== */
.faq-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 36px;
    margin-bottom: 24px;
}

.faq-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.faq-title::before {
    content: '❓';
    font-size: 1.1rem;
}

.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 10px;
    overflow: hidden;
    transition: var(--trans);
}

.faq-item:hover { border-color: rgba(0,102,255,0.3); }

.faq-question {
    width: 100%;
    background: var(--bg-card2);
    border: none;
    padding: 16px 20px;
    text-align: left;
    color: var(--text-light);
    font-family: var(--font-main);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    transition: var(--trans);
}

.faq-question:hover { background: rgba(0,102,255,0.1); color: #fff; }
.faq-question.open { color: var(--grad-5); background: rgba(6,182,212,0.08); }

.faq-arrow {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}
.faq-question.open .faq-arrow { transform: rotate(180deg); }

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.faq-answer-inner {
    padding: 0 20px 16px;
    color: var(--text-muted);
    font-size: 0.87rem;
    line-height: 1.8;
    background: rgba(0,0,0,0.2);
}

/* ==============================
   RELATED SPORTS SECTION
   ============================== */
.related-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 24px;
}

.related-title {
    font-family: var(--font-main);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 16px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
}

.related-link {
    background: var(--bg-card2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-family: var(--font-main);
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
    text-align: center;
    transition: var(--trans);
    display: block;
}

.related-link:hover {
    background: linear-gradient(135deg, var(--grad-1), var(--secondary));
    color: #fff;
    border-color: transparent;
    transform: translateY(-2px);
}

/* ==============================
   CONTACT PAGE
   ============================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.contact-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
}

.contact-card h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 20px;
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.contact-info-item:last-child { border-bottom: none; }

.contact-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--grad-1), var(--secondary));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
    flex-shrink: 0;
}

.contact-text h4 {
    font-family: var(--font-main);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 3px;
}

.contact-text a, .contact-text p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.contact-text a:hover { color: var(--grad-5); }

/* ==============================
   FOOTER
   ============================== */
.site-footer {
    background: var(--footer-bg);
    border-top: 1px solid var(--border);
    margin-top: 20px;
    position: relative;
}

.footer-wave {
    line-height: 0;
    overflow: hidden;
    height: 40px;
    margin-top: -1px;
}

.footer-wave svg {
    display: block;
    width: 100%;
    height: 40px;
}

.footer-main { padding: 48px 0 36px; }

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 36px;
}

.footer-col {}

.footer-logo img {
    height: 45px;
    width: auto;
    object-fit: contain;
    margin-bottom: 14px;
    filter: brightness(0.9);
}

.footer-text-logo {
    font-family: var(--font-main);
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    display: block;
    margin-bottom: 14px;
}

.footer-about {
    font-size: 0.83rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 16px;
}

.footer-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.footer-keywords span {
    background: rgba(0,102,255,0.12);
    border: 1px solid rgba(0,102,255,0.2);
    color: var(--grad-5);
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 0.72rem;
    font-family: var(--font-main);
}

.footer-title {
    font-family: var(--font-main);
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-links { display: flex; flex-direction: column; gap: 8px; }

.footer-links li a {
    font-size: 0.83rem;
    color: var(--text-muted);
    transition: var(--trans);
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-links li a:hover { color: var(--grad-5); transform: translateX(4px); }

.footer-contact p {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.83rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.footer-contact a:hover { color: var(--grad-5); }

.footer-seo-links { margin-top: 18px; }

.footer-seo-links h4 {
    font-family: var(--font-main);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.seo-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.seo-tags a {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 3px 9px;
    border-radius: 4px;
    font-size: 0.72rem;
    transition: var(--trans);
}

.seo-tags a:hover {
    background: rgba(0,102,255,0.15);
    color: var(--grad-5);
    border-color: rgba(0,102,255,0.3);
}

.footer-bottom {
    background: rgba(0,0,0,0.3);
    border-top: 1px solid var(--border);
    padding: 16px 0;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.footer-disclaimer {
    font-size: 0.72rem !important;
    color: rgba(148,163,184,0.6) !important;
    margin-top: 4px;
}

/* ==============================
   BREADCRUMB
   ============================== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    font-family: var(--font-main);
}

.breadcrumb a:hover { color: var(--grad-5); }
.breadcrumb .sep { opacity: 0.4; }
.breadcrumb .current { color: var(--text-light); }

/* ==============================
   BACK TO TOP
   ============================== */
.back-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--grad-1), var(--secondary));
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0,102,255,0.5);
    transition: var(--trans);
    z-index: 999;
    opacity: 0;
    transform: translateY(20px);
}

.back-top.show { opacity: 1; transform: translateY(0); }
.back-top:hover { transform: translateY(-4px) scale(1.08); box-shadow: 0 8px 28px rgba(0,102,255,0.65); }

/* ==============================
   RESPONSIVE
   ============================== */
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
    .contact-grid { grid-template-columns: 1fr; }
    /* Tablet: 8 cols x 3 rows */
    .nav-menu { grid-template-columns: repeat(8, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
    :root {
        --header-h: 65px;
        --topbar-h: 30px;
    }

    .top-bar-right { display: none; }
    .header-tagline { display: none; }
    .site-header { position: sticky; top: 0; }

    .nav-toggle { display: flex; }
    .site-nav { position: relative; }
    .site-nav .container { display: flex; align-items: flex-start; }

    .nav-scroll-wrap { display: none; padding-bottom: 8px; }
    .nav-scroll-wrap.open { display: block; }

    /* Mobile: 4 cols x 6 rows */
    .nav-menu {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 5px;
        padding-top: 8px;
    }
    .nav-link {
        font-size: 0.76rem;
        padding: 8px 4px;
        white-space: normal;
        line-height: 1.4;
    }

    .page-hero { padding: 20px; }
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .content-section, .faq-section { padding: 20px; }
    .sports-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 480px) {
    .sports-grid { grid-template-columns: repeat(2, 1fr); }
    .related-grid { grid-template-columns: repeat(2, 1fr); }
    .page-hero h1 { font-size: 1.2rem; }
    .nav-menu { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .nav-link { font-size: 0.72rem; padding: 7px 4px; }
}
