/* ============================================
   AllInLotto - Main Stylesheet
   ============================================ */

:root {
    --primary: #1a237e;
    --primary-light: #3949ab;
    --primary-dark: #0d1642;
    --accent: #ffd600;
    --accent-dark: #c7a500;
    --success: #2e7d32;
    --danger: #c62828;
    --bg: #f5f5f5;
    --bg-white: #ffffff;
    --bg-dark: #1a1a2e;
    --text: #212121;
    --text-light: #616161;
    --text-muted: #9e9e9e;
    --border: #e0e0e0;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 4px 24px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-xs: 4px;
    --font: 'Noto Sans Thai', sans-serif;
    --max-w: 1200px;
    --header-h: 64px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 16px; }

a { color: var(--primary-light); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary); }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4, h5, h6 { line-height: 1.3; color: var(--text); }
h1 { font-size: 2rem; font-weight: 700; margin-bottom: 16px; }
h2 { font-size: 1.5rem; font-weight: 600; margin: 32px 0 12px; }
h3 { font-size: 1.2rem; font-weight: 600; margin: 24px 0 8px; }
p { margin-bottom: 16px; }

/* Top Bar */
.top-bar { background: var(--primary-dark); color: rgba(255,255,255,0.8); font-size: 13px; padding: 6px 0; }
.top-bar-inner { display: flex; justify-content: space-between; }

/* Header */
.site-header {
    background: var(--bg-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: box-shadow 0.3s;
}
.site-header.scrolled { box-shadow: var(--shadow-lg); }
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
}
.logo { display: flex; align-items: center; gap: 8px; font-size: 1.4rem; color: var(--primary); }
.logo-icon { font-size: 1.6rem; }
.logo-text { font-weight: 300; color: var(--text); }
.logo-text strong { font-weight: 700; color: var(--primary); }

/* Navigation */
.main-nav ul { display: flex; list-style: none; gap: 4px; }
.main-nav a {
    display: block;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}
.main-nav a:hover, .main-nav a.active {
    background: var(--primary);
    color: #fff;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.menu-toggle span { width: 24px; height: 2px; background: var(--text); transition: 0.3s; }
.menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
    color: #fff;
    padding: 60px 0;
    text-align: center;
}
.hero h1 { font-size: 2.4rem; margin-bottom: 12px; color: #fff; }
.hero .subtitle { font-size: 1.1rem; opacity: 0.9; margin-bottom: 24px; }
.hero .cta-group { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
}
.btn-primary { background: var(--accent); color: var(--primary-dark); }
.btn-primary:hover { background: var(--accent-dark); color: var(--primary-dark); transform: translateY(-1px); }
.btn-outline { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,0.5); }
.btn-outline:hover { background: rgba(255,255,255,0.1); color: #fff; border-color: #fff; }

/* Sections */
.section { padding: 48px 0; }
.section-title {
    text-align: center;
    margin-bottom: 32px;
}
.section-title h2 { font-size: 1.8rem; }
.section-title p { color: var(--text-light); max-width: 600px; margin: 8px auto 0; }

/* Cards Grid */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.card {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-body { padding: 20px; }
.card-body h3 { margin: 0 0 8px; }
.card-body h3 a { color: var(--text); }
.card-body h3 a:hover { color: var(--primary); }
.card-body p { color: var(--text-light); font-size: 14px; margin-bottom: 12px; }
.card-tag {
    display: inline-block;
    font-size: 12px;
    padding: 3px 10px;
    background: #e8eaf6;
    color: var(--primary);
    border-radius: 20px;
    font-weight: 500;
}

/* Lottery Type Cards */
.lottery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.lottery-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 24px 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.2s;
    border-top: 4px solid var(--primary);
}
.lottery-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.lottery-card .icon { font-size: 2.5rem; margin-bottom: 12px; }
.lottery-card h3 { font-size: 1.1rem; margin-bottom: 6px; }
.lottery-card p { font-size: 13px; color: var(--text-light); margin-bottom: 12px; }

/* Check Lottery Box */
.check-box {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 32px;
    max-width: 600px;
    margin: -40px auto 40px;
    position: relative;
    z-index: 10;
}
.check-box h2 { text-align: center; margin-bottom: 16px; }
.check-input-group { display: flex; gap: 12px; }
.check-input-group input {
    flex: 1;
    padding: 14px 20px;
    font-size: 1.2rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    text-align: center;
    letter-spacing: 4px;
    outline: none;
    transition: border-color 0.2s;
}
.check-input-group input:focus { border-color: var(--primary); }
.check-input-group button { white-space: nowrap; }

/* Results Table */
.result-table { width: 100%; border-collapse: collapse; margin: 20px 0; }
.result-table th {
    background: var(--primary);
    color: #fff;
    padding: 12px 16px;
    font-weight: 500;
    text-align: center;
    font-size: 14px;
}
.result-table td {
    padding: 12px 16px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    font-size: 15px;
}
.result-table tr:hover { background: #f5f5f5; }
.result-number { font-size: 1.4rem; font-weight: 700; color: var(--primary); letter-spacing: 2px; }

/* Payout Table */
.payout-table { width: 100%; border-collapse: collapse; }
.payout-table th { background: var(--primary); color: #fff; padding: 10px 14px; font-size: 14px; font-weight: 500; }
.payout-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); }
.payout-table tr:nth-child(even) { background: #fafafa; }
.payout-highlight { font-weight: 700; color: var(--danger); font-size: 1.1rem; }

/* Content Page */
.content-page { padding: 32px 0 48px; }
.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 32px;
}
.content-main {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
}
.content-main h1 { font-size: 1.8rem; }
.content-main h2 { border-bottom: 2px solid var(--accent); padding-bottom: 8px; }

/* Sidebar */
.sidebar {}
.sidebar-widget {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}
.sidebar-widget h3 {
    font-size: 1rem;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--accent);
}
.sidebar-widget ul { list-style: none; }
.sidebar-widget li { padding: 8px 0; border-bottom: 1px solid var(--border); }
.sidebar-widget li:last-child { border-bottom: none; }
.sidebar-widget a { color: var(--text); font-size: 14px; }
.sidebar-widget a:hover { color: var(--primary); }

/* FAQ Section */
.faq-item { margin-bottom: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    font-weight: 600;
    background: #fafafa;
}
.faq-question::after { content: '+'; font-size: 1.2rem; color: var(--primary); }
.faq-item.open .faq-question::after { content: '−'; }
.faq-answer { padding: 0 20px; max-height: 0; overflow: hidden; transition: all 0.3s; }
.faq-item.open .faq-answer { padding: 16px 20px; max-height: 500px; }

/* Breadcrumb */
.breadcrumb-nav { padding: 12px 0; }
.breadcrumb { display: flex; flex-wrap: wrap; list-style: none; font-size: 13px; color: var(--text-muted); }
.breadcrumb-item + .breadcrumb-item::before { content: '/'; margin: 0 8px; color: var(--text-muted); }
.breadcrumb-item a { color: var(--text-light); }
.breadcrumb-item.active { color: var(--text); }

/* Blog listing */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.blog-card-img { height: 200px; background: linear-gradient(135deg, var(--primary), var(--primary-light)); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 3rem; }

/* Footer */
.site-footer { background: var(--bg-dark); color: rgba(255,255,255,0.8); padding: 48px 0 24px; margin-top: 48px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; }
.footer-col h3 { font-size: 1rem; color: #fff; margin-bottom: 16px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: rgba(255,255,255,0.7); font-size: 14px; }
.footer-col a:hover { color: var(--accent); }
.footer-col p { font-size: 14px; line-height: 1.6; }
.social-links { display: flex; gap: 10px; margin-top: 16px; }
.social-links a {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    transition: background 0.2s;
}
.social-links a:hover { background: var(--accent); color: var(--primary-dark); }
.footer-bottom { margin-top: 32px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.1); text-align: center; font-size: 13px; }

/* Stats bar */
.stats-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; padding: 24px 0; }
.stat-item { text-align: center; padding: 20px; background: var(--bg-white); border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.stat-number { font-size: 1.8rem; font-weight: 700; color: var(--primary); }
.stat-label { font-size: 13px; color: var(--text-light); margin-top: 4px; }

/* Responsive */
@media (max-width: 768px) {
    .menu-toggle { display: flex; }
    .main-nav {
        display: none;
        position: absolute;
        top: var(--header-h);
        left: 0; right: 0;
        background: var(--bg-white);
        box-shadow: var(--shadow-lg);
        padding: 16px;
    }
    .main-nav.open { display: block; }
    .main-nav ul { flex-direction: column; gap: 2px; }
    .hero h1 { font-size: 1.6rem; }
    .content-wrapper { grid-template-columns: 1fr; }
    .check-input-group { flex-direction: column; }
    .top-bar-inner { font-size: 11px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    h1 { font-size: 1.5rem; }
}
