/* ==========================================================
   Name108 - Thai Auspicious Names & Analyzer Modern CSS
   Theme: Royal Navy & Regal Gold (หรูหรา มงคล ร่วมสมัย)
   ========================================================== */

:root {
    --primary: #1e3a8a;
    --primary-dark: #0f172a;
    --primary-light: #3b82f6;
    
    --gold: #d97706;
    --gold-light: #fbbf24;
    --gold-accent: #fef3c7;
    --gold-gradient: linear-gradient(135deg, #d97706 0%, #f59e0b 50%, #fbbf24 100%);
    
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --bg-alt: #f1f5f9;
    
    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    
    --border-color: #e2e8f0;
    --border-gold: #fde68a;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-gold: 0 4px 20px -2px rgba(217, 119, 6, 0.25);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-full: 9999px;

    /* Thaksa Badge Colors */
    --color-sri: #059669;
    --bg-sri: #d1fae5;
    --color-dech: #7c3aed;
    --bg-dech: #ede9fe;
    --color-montri: #0284c7;
    --bg-montri: #e0f2fe;
    --color-mula: #0d9488;
    --bg-mula: #ccfbf1;
    --color-ayu: #ea580c;
    --bg-ayu: #ffedd5;
    --color-utsaha: #ca8a04;
    --bg-utsaha: #fef9c3;
    --color-boriwan: #475569;
    --bg-boriwan: #f1f5f9;
    --color-kalakini: #dc2626;
    --bg-kalakini: #fee2e2;
}

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

body {
    font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.65;
    font-size: 16px;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Kanit', sans-serif;
    color: var(--primary-dark);
    font-weight: 600;
    line-height: 1.3;
}

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

a:hover {
    color: var(--gold);
}

ul {
    list-style: none;
}

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

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================
   Header & Navigation
   ========================================================== */
.site-header {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
    backdrop-filter: blur(8px);
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 10px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand-area .brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-icon {
    width: 38px;
    height: 38px;
    background: var(--gold-gradient);
    color: #ffffff;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: var(--shadow-gold);
    flex-shrink: 0;
}

.brand-name {
    font-family: 'Kanit', sans-serif;
    font-size: 21px;
    font-weight: 700;
    color: var(--primary-dark);
    display: block;
    line-height: 1.1;
    letter-spacing: -0.3px;
}

.brand-name strong {
    color: var(--gold);
}

.brand-sub {
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.2px;
    display: block;
    white-space: nowrap;
}

.main-nav {
    display: flex;
    align-items: center;
}

.main-nav .nav-list {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-item {
    position: relative;
}

/* ซ่อนไอคอนบน Desktop เพื่อให้เมนูดูโปร่ง สะอาดตา */
.nav-link .nav-icon {
    display: none;
}

.nav-link {
    font-family: 'Kanit', sans-serif;
    font-size: 15px;
    color: var(--text-main);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 400;
    transition: all 0.18s ease-in-out;
    white-space: nowrap;
}

.nav-link:hover {
    background-color: var(--bg-alt);
    color: var(--primary);
}

.nav-link.active {
    background-color: var(--bg-alt);
    color: var(--primary);
    font-weight: 500;
}

.nav-link.nav-highlight {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    color: #ffffff !important;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

.nav-link.nav-highlight:hover {
    opacity: 0.95;
    transform: translateY(-1px);
}

/* Mobile-only item in main nav */
.nav-item-mobile-cta {
    display: none;
}

/* Dropdown */
.nav-item.dropdown {
    position: relative;
}

.nav-arrow {
    font-size: 10px;
    margin-left: 2px;
    color: var(--text-light);
    transition: transform 0.2s ease, color 0.2s ease;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: #ffffff;
    min-width: 200px;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.12), 0 8px 10px -6px rgba(15, 23, 42, 0.08);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 6px;
    z-index: 1010;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
}

@media (min-width: 993px) {
    .nav-item.dropdown:hover .nav-arrow {
        transform: rotate(180deg);
        color: var(--primary);
    }

    .nav-item.dropdown:hover .dropdown-menu {
        display: block;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateX(-50%) translateY(0);
    }
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    font-size: 14px;
    color: var(--text-main);
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
    white-space: nowrap;
}

.dropdown-item:hover {
    background: var(--bg-alt);
    color: var(--primary);
    transform: translateX(2px);
}

.day-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Header Actions & Quick Search */
.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.quick-search-box {
    position: relative;
    width: 170px;
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.quick-search-box:focus-within {
    width: 230px;
}

.search-form {
    display: flex;
    align-items: center;
    background: var(--bg-alt);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 3px 4px 3px 12px;
    transition: all 0.2s ease;
}

.search-form:focus-within {
    border-color: var(--primary-light);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.search-form input {
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 13.5px;
    width: 100%;
    outline: none;
    color: var(--text-main);
}

.search-form button {
    background: var(--primary);
    color: #ffffff;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.search-form button:hover {
    background: var(--gold);
}

/* Autocomplete Dropdown */
.autocomplete-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    min-width: 260px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    max-height: 360px;
    overflow-y: auto;
    z-index: 1050;
}

.autocomplete-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-main);
    transition: background 0.15s;
}

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

.autocomplete-item:hover {
    background-color: var(--bg-alt);
}

.autocomplete-name {
    font-weight: 600;
    color: var(--primary);
}

.autocomplete-meaning {
    font-size: 12px;
    color: var(--text-muted);
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Primary CTA Button in Header */
.btn-header-cta {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    color: #ffffff !important;
    font-family: 'Kanit', sans-serif;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-full);
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
    transition: all 0.2s ease;
    white-space: nowrap;
    text-decoration: none;
}

.btn-header-cta:hover {
    opacity: 0.95;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.btn-header-cta.active {
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--primary-light);
}

.btn-header-cta i {
    font-size: 13px;
    color: var(--gold-light);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--primary-dark);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: background 0.15s ease;
}

.mobile-menu-btn:hover {
    background-color: var(--bg-alt);
}

/* ==========================================================
   Hero Section (หน้าแรก)
   ========================================================== */
.hero-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 70%, #172554 100%);
    color: #ffffff;
    padding: 60px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at top right, rgba(251, 191, 36, 0.15), transparent 50%),
                radial-gradient(circle at bottom left, rgba(59, 130, 246, 0.15), transparent 50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 860px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid rgba(251, 191, 36, 0.3);
    color: var(--gold-light);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
}

.hero-title {
    font-size: 38px;
    color: #ffffff;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.hero-title span {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 18px;
    color: #cbd5e1;
    margin-bottom: 36px;
    line-height: 1.6;
}

/* Big Search Bar */
.big-search-box {
    background: #ffffff;
    padding: 8px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    max-width: 680px;
    width: 100%;
    box-sizing: border-box;
    margin: 0 auto 24px;
}

.big-search-box .search-icon {
    color: #94a3b8;
    margin-left: 14px;
    font-size: 16px;
    flex-shrink: 0;
}

.big-search-box input {
    flex: 1;
    min-width: 0; /* สำคัญ: ป้องกัน Input กินพื้นที่ขั้นต่ำจนดันปุ่มหลุดขอบบนมือถือ */
    border: none;
    padding: 12px 18px;
    font-size: 16px;
    font-family: inherit;
    outline: none;
    border-radius: var(--radius-full);
    color: var(--text-main);
    background: transparent;
}

.big-search-box button {
    flex-shrink: 0;
    white-space: nowrap;
    background: var(--gold-gradient);
    color: #ffffff;
    border: none;
    font-family: 'Kanit', sans-serif;
    font-size: 16px;
    font-weight: 500;
    padding: 12px 28px;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity 0.2s, transform 0.15s;
}

.big-search-box button:hover {
    opacity: 0.95;
}

.hero-quick-tags {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 14px;
    color: #94a3b8;
}

.hero-quick-tags a {
    color: #f1f5f9;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 13px;
}

.hero-quick-tags a:hover {
    background: rgba(251, 191, 36, 0.2);
    color: var(--gold-light);
    border-color: var(--gold-light);
}

/* ==========================================================
   AEO Direct Answer Box (กล่องคำตอบตรงสำหรับ AI และ SEO)
   ========================================================== */
.direct-answer-box {
    background: #ffffff;
    border-left: 5px solid var(--gold);
    border-radius: var(--radius-md);
    padding: 22px 26px;
    box-shadow: var(--shadow-md);
    margin-bottom: 30px;
    position: relative;
    border-top: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.direct-answer-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.direct-answer-badge {
    background: var(--gold-accent);
    color: var(--gold);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: 'Kanit', sans-serif;
}

.direct-answer-text {
    font-size: 17px;
    line-height: 1.7;
    color: #1e293b;
}

.direct-answer-text strong {
    color: var(--primary);
    font-weight: 600;
}

.thaksa-char {
    display: inline-block;
    min-width: 14px;
    text-align: center;
    vertical-align: baseline;
    font-style: normal;
    line-height: 1.2;
}

/* ==========================================================
   Cards & Section Layouts
   ========================================================== */
.section {
    padding: 50px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 36px;
}

.section-tag {
    font-family: 'Kanit', sans-serif;
    color: var(--gold);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 6px;
}

.section-title {
    font-size: 28px;
    color: var(--primary-dark);
    margin-bottom: 10px;
}

.section-subtitle {
    font-size: 16px;
    color: var(--text-muted);
    max-width: 640px;
    margin: 0 auto;
}

/* Grid Layouts */
.names-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.name-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    content-visibility: auto;
    contain-intrinsic-size: 0 140px;
}

.name-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-gold);
}

.lazy-card-animate {
    animation: lazyFadeInUp 0.35s ease forwards;
}

@keyframes lazyFadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Lazy Load Controls */
.lazy-load-sentinel {
    height: 10px;
    margin: 20px 0;
    pointer-events: none;
    visibility: hidden;
}

.lazy-load-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px;
    font-family: 'Kanit', sans-serif;
    font-size: 15px;
    color: var(--primary);
    background: #ffffff;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    margin: 20px 0;
}

.lazy-load-end {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 18px;
    font-family: 'Kanit', sans-serif;
    font-size: 14px;
    color: #065f46;
    background: #d1fae5;
    border: 1px solid #a7f3d0;
    border-radius: var(--radius-md);
    margin: 24px 0;
}

.btn-load-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 380px;
    margin: 20px auto;
    padding: 14px 28px;
    background: #ffffff;
    border: 2px solid var(--primary);
    color: var(--primary);
    font-family: 'Kanit', sans-serif;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: var(--shadow-sm);
}

.btn-load-more:hover {
    background: var(--primary);
    color: #ffffff;
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.alphabet-progress-box {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.alphabet-progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.alphabet-progress-info {
    font-size: 14px;
    color: var(--text-muted);
}

.alphabet-progress-info strong {
    color: var(--primary-dark);
}

.alphabet-search-wrapper {
    position: relative;
    max-width: 320px;
    width: 100%;
}

.alphabet-search-wrapper i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 14px;
    pointer-events: none;
}

.alphabet-search-input {
    width: 100%;
    padding: 8px 14px 8px 36px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 14px;
    font-family: 'Kanit', sans-serif;
    outline: none;
    transition: all 0.2s;
    background: #f8fafc;
}

.alphabet-search-input:focus {
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.alphabet-progress-track {
    background: #e2e8f0;
    height: 8px;
    border-radius: 9999px;
    overflow: hidden;
}

.alphabet-progress-bar {
    background: var(--gold-gradient);
    height: 100%;
    border-radius: 9999px;
    transition: width 0.4s ease;
}

.seo-pagination-fallback {
    margin-top: 36px;
    padding: 24px 20px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.seo-pagination-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 14px;
    font-family: 'Kanit', sans-serif;
}

.seo-pagination-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.seo-pagination-list li a,
.seo-pagination-list li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    font-size: 14px;
    font-family: 'Kanit', sans-serif;
    font-weight: 500;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: #ffffff;
    color: var(--text-main);
    text-decoration: none;
    transition: all 0.2s ease;
}

.seo-pagination-list li a:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #f8fafc;
}

.seo-pagination-list li a.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    font-weight: 600;
}

.seo-pagination-list li.disabled span {
    color: #94a3b8;
    background: transparent;
    border: none;
}

.name-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.name-card-title {
    font-size: 22px;
    color: var(--primary-dark);
    font-family: 'Kanit', sans-serif;
    font-weight: 600;
}

.name-card-sub {
    font-size: 12px;
    color: var(--text-muted);
    display: block;
    margin-top: 2px;
    font-family: 'Kanit', sans-serif;
}

.name-card:hover .name-card-title {
    color: var(--gold);
}

.numerology-badge {
    background: var(--bg-alt);
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
}

.name-card-meaning {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 16px;
    flex: 1;
    line-height: 1.5;
}

.name-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid #f1f5f9;
    padding-top: 12px;
    font-size: 12px;
    color: var(--text-light);
}

.gender-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.gender-tag.female { color: #ec4899; }
.gender-tag.male { color: #3b82f6; }
.gender-tag.unisex { color: #10b981; }

/* Day Buttons Grid */
.days-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    margin-bottom: 30px;
}

.day-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 12px;
    text-align: center;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.day-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.day-icon-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #ffffff;
}

.day-card-name {
    font-family: 'Kanit', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: var(--primary-dark);
}

/* ==========================================================
   Name Detail Page (หน้ารายละเอียดชื่อเดี่ยว - AEO Hub)
   ========================================================== */
.name-detail-header {
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 36px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
}

.breadcrumb-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.breadcrumb-nav a {
    color: var(--text-muted);
}

.breadcrumb-nav a:hover {
    color: var(--primary);
}

.breadcrumb-separator {
    color: #cbd5e1;
}

.name-main-title-box {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.name-large-title {
    font-size: 40px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 6px;
}

.name-meta-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 500;
}

.tag-pill.gold {
    background: var(--gold-accent);
    color: var(--gold);
    border: 1px solid var(--border-gold);
}

.tag-pill.blue {
    background: #e0f2fe;
    color: #0284c7;
}

.tag-pill.purple {
    background: #ede9fe;
    color: #7c3aed;
}

.tag-pill.cyan {
    background: #ecfeff;
    color: #0891b2;
}

.tag-pill.indigo {
    background: #e0e7ff;
    color: #4338ca;
}

.tag-pill.green {
    background: #d1fae5;
    color: #065f46;
}

/* Name Pronunciation & English Box */
.name-pronunciation-box {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    background: var(--bg-alt);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: var(--radius-md);
    margin: 10px 0 16px;
    font-family: 'Kanit', sans-serif;
}

.pronounce-item {
    font-size: 15px;
    color: var(--primary-dark);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.pronounce-item strong {
    color: var(--primary);
}

.pronounce-divider {
    color: #cbd5e1;
    font-size: 14px;
}

.btn-copy-name {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 3px 10px;
    font-size: 12px;
    color: var(--text-main);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: 'Kanit', sans-serif;
    transition: all 0.2s ease;
}

.btn-copy-name:hover {
    background: var(--bg-alt);
    border-color: var(--primary-light);
    color: var(--primary);
}

/* Character Numerology Breakdown Table */
.numerology-breakdown-card {
    background: #ffffff;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-sm);
}

.char-chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.char-chip {
    background: var(--bg-alt);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 16px;
    text-align: center;
    min-width: 60px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.char-chip-letter {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-dark);
    display: block;
    line-height: 1.2;
}

.char-chip-val {
    font-size: 13px;
    color: var(--gold);
    font-weight: 600;
    display: block;
    margin-top: 2px;
}

/* Numerology Equation Box */
.numerology-equation-box {
    background: var(--bg-alt);
    border: 1px solid var(--border-color);
    padding: 14px 18px;
    border-radius: var(--radius-md);
    font-family: 'Kanit', sans-serif;
    color: var(--primary-dark);
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.numerology-equation-box .equation-label {
    font-size: 15px;
    font-weight: 600;
    color: var(--primary-dark);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.numerology-equation-box .equation-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    font-size: 15px;
    line-height: 1.6;
}

.equation-term {
    display: inline-flex;
    align-items: baseline;
    white-space: nowrap;
    background: #ffffff;
    border: 1px solid var(--border-color);
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 500;
}

.equation-term .term-char {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-dark);
}

.equation-term .term-val {
    font-size: 13px;
    color: var(--gold);
    font-weight: 600;
    margin-left: 2px;
}

.equation-op {
    color: #94a3b8;
    font-weight: 600;
    font-size: 15px;
    user-select: none;
}

.equation-result {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--gold-accent);
    color: var(--gold);
    border: 1px solid var(--border-gold);
    font-size: 18px;
    font-weight: 700;
    padding: 2px 12px;
    border-radius: 6px;
    line-height: 1.4;
}

/* Thaksa Badge Styles */
.badge-kalakini { background: var(--bg-kalakini); color: var(--color-kalakini); border: 1px solid #fca5a5; }
.badge-sri { background: var(--bg-sri); color: var(--color-sri); border: 1px solid #6ee7b7; }
.badge-dech { background: var(--bg-dech); color: var(--color-dech); border: 1px solid #c4b5fd; }
.badge-montri { background: var(--bg-montri); color: var(--color-montri); border: 1px solid #7dd3fc; }
.badge-mula { background: var(--bg-mula); color: var(--color-mula); border: 1px solid #5eead4; }
.badge-ayu { background: var(--bg-ayu); color: var(--color-ayu); border: 1px solid #fdba74; }
.badge-utsaha { background: var(--bg-utsaha); color: var(--color-utsaha); border: 1px solid #fde047; }
.badge-boriwan { background: var(--bg-boriwan); color: var(--color-boriwan); border: 1px solid #cbd5e1; }

.thaksa-matrix-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    font-size: 14px;
}

.thaksa-matrix-table th,
.thaksa-matrix-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.thaksa-matrix-table th {
    background: var(--bg-alt);
    font-family: 'Kanit', sans-serif;
    color: var(--primary-dark);
    font-weight: 600;
}

.thaksa-matrix-table tr:hover {
    background-color: #f8fafc;
}

/* Name Meaning Details Grid & Sidebar */
.name-content-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 32px;
    align-items: start;
}

.content-left {
    min-width: 0;
}

.content-right {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

@media (min-width: 993px) {
    .content-right {
        position: sticky;
        top: 85px;
    }
}

.sidebar-widget {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    box-sizing: border-box;
}

.sidebar-analyzer-widget {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border: 1.5px solid rgba(217, 119, 6, 0.25);
    box-shadow: 0 4px 20px -4px rgba(217, 119, 6, 0.08);
}

.sidebar-widget-header {
    margin-bottom: 16px;
}

.sidebar-widget-title {
    font-size: 18px;
    color: var(--primary-dark);
    margin: 0 0 6px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Kanit', sans-serif;
    font-weight: 600;
}

.sidebar-widget-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

.sidebar-analyzer-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-input-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-input-group .form-control {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 14px;
    font-size: 14.5px;
}

.sidebar-analyzer-widget .btn-analyze {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    font-size: 15px;
    font-weight: 500;
    padding: 11px 20px;
    box-shadow: var(--shadow-gold);
}

.related-names-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.related-name-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 14px;
    background: var(--bg-alt);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
    box-sizing: border-box;
}

.related-name-card:hover {
    background: #ffffff;
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.related-name-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.related-name-heading {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.related-name-th {
    font-family: 'Kanit', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--primary);
}

.related-name-en {
    font-size: 12px;
    color: var(--text-muted);
    margin-left: 4px;
}

.related-name-meaning {
    font-size: 12.5px;
    color: #475569;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.numerology-dimension-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}


/* ==========================================================
   Name Analyzer Tool UI (โปรแกรมวิเคราะห์ชื่อ)
   ========================================================== */
.hero-analyzer-wrapper {
    margin-top: -30px;
    position: relative;
    z-index: 20;
}

.analyzer-header-intro {
    text-align: center;
    margin-bottom: 24px;
}

.analyzer-header-title {
    font-family: 'Kanit', sans-serif;
    font-size: clamp(20px, 3.5vw, 26px);
    color: var(--primary-dark);
    margin-top: 4px;
    line-height: 1.3;
}

.analyzer-header-sub {
    font-size: 14px;
    color: var(--text-muted);
}

.analyzer-box {
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    margin-bottom: 40px;
    transition: all 0.3s ease;
}

.analyzer-form {
    text-align: center;
}

.analyzer-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
    text-align: left;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-family: 'Kanit', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: var(--primary-dark);
}

.form-control {
    font-family: inherit;
    font-size: 15px;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #ffffff;
    color: var(--text-main);
    outline: none;
    transition: all 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.form-control:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.btn-analyze {
    background: var(--gold-gradient);
    color: #ffffff;
    border: none;
    font-family: 'Kanit', sans-serif;
    font-size: 17px;
    font-weight: 600;
    padding: 13px 36px;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: auto;
    min-width: 260px;
    max-width: 380px;
    margin: 0 auto;
    box-shadow: var(--shadow-gold);
    transition: all 0.2s;
}

.btn-analyze:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(217, 119, 6, 0.35);
}

/* ==========================================================
   Analysis Report Card Component Classes
   ========================================================== */
.analysis-report {
    display: none;
    background: #ffffff;
    border-radius: var(--radius-lg);
    border: 2px solid var(--border-gold);
    padding: 28px;
    box-shadow: var(--shadow-lg);
    margin-top: 28px;
    text-align: left;
    box-sizing: border-box;
    width: 100%;
    animation: reportFadeIn 0.35s ease forwards;
}

@keyframes reportFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.report-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 18px;
    border-bottom: 2px solid var(--bg-alt);
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.report-header-info {
    flex: 1 1 260px;
    min-width: 0;
}

.report-title {
    font-family: 'Kanit', sans-serif;
    font-size: clamp(22px, 4vw, 30px);
    font-weight: 700;
    color: var(--primary-dark);
    line-height: 1.25;
    margin: 6px 0 8px;
    word-break: break-word;
}

.report-pronunciation-box {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    background: rgba(248, 250, 252, 0.95);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 13.5px;
    margin: 6px 0;
    max-width: 100%;
}

.pronounce-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.pronounce-item.pronounce-th {
    color: #0284c7;
}

.pronounce-item.pronounce-en {
    color: #7c3aed;
}

.pronounce-divider {
    color: #cbd5e1;
}

.report-birth-day {
    font-size: 13.5px;
    color: #64748b;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.report-header-grade {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex-shrink: 0;
}

.grade-badge-circle {
    width: 68px;
    height: 68px;
    min-width: 68px;
    min-height: 68px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: 'Kanit', sans-serif;
    font-weight: 700;
    color: #ffffff;
    box-shadow: var(--shadow-md);
}

.grade-badge-circle .grade-text {
    font-size: 24px;
    line-height: 1;
}

.grade-label {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    display: block;
    margin-top: 4px;
}

.grade-a-plus { background: linear-gradient(135deg, #059669 0%, #10b981 100%); }
.grade-a { background: linear-gradient(135deg, #0284c7 0%, #38bdf8 100%); }
.grade-b { background: linear-gradient(135deg, #d97706 0%, #fbbf24 100%); }
.grade-c { background: linear-gradient(135deg, #ea580c 0%, #f97316 100%); }
.grade-d { background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%); }

/* Alerts */
.report-alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.6;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.report-alert-danger {
    background: #fee2e2;
    border-left: 4px solid #ef4444;
    color: #991b1b;
}

.report-alert-success {
    background: #d1fae5;
    border-left: 4px solid #10b981;
    color: #065f46;
}

/* Stat Grid (Numerology + Ayatana) */
.report-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin-bottom: 20px;
}

.report-stat-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    min-width: 0;
    box-sizing: border-box;
}

.report-stat-category {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 6px;
}

.report-stat-category.category-gold { color: #d97706; }
.report-stat-category.category-blue { color: #0284c7; }

.report-stat-num-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
    margin: 6px 0;
}

.report-stat-number {
    font-size: clamp(28px, 5vw, 36px);
    font-weight: 700;
    line-height: 1;
    font-family: 'Kanit', sans-serif;
}

.report-stat-number.text-navy { color: #1e3a8a; }
.report-stat-number.text-blue { color: #0284c7; }

.report-stat-title {
    font-family: 'Kanit', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 6px;
    line-height: 1.4;
}

.report-stat-desc {
    font-size: 13.5px;
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}

/* Etymology Box */
.report-etymology-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    box-sizing: border-box;
}

.report-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 8px;
}

.report-section-title {
    font-family: 'Kanit', sans-serif;
    font-size: 17px;
    font-weight: 600;
    color: #1e3a8a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.report-etymology-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.report-etymology-part-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-sizing: border-box;
}

.report-part-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.part-morpheme {
    font-size: 18px;
    font-weight: 700;
    color: #1e3a8a;
    font-family: 'Kanit', sans-serif;
}

.part-type {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 9999px;
    background: #eff6ff;
    color: #1d4ed8;
    white-space: nowrap;
}

.part-pali {
    font-size: 12px;
    color: #64748b;
    font-style: italic;
    margin-top: 2px;
}

.part-meaning {
    font-size: 13px;
    color: #334155;
    margin-top: 2px;
    line-height: 1.4;
}

.report-energy-container {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 14px;
    box-sizing: border-box;
}

.report-energy-title {
    font-family: 'Kanit', sans-serif;
    font-size: 13.5px;
    color: #475569;
    margin-bottom: 10px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 6px;
}

.report-energy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px 16px;
}

.report-energy-bar-item {
    margin-bottom: 6px;
}

.report-energy-bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 4px;
}

.report-energy-bar-bg {
    background: #e2e8f0;
    height: 7px;
    border-radius: 4px;
    overflow: hidden;
}

.report-energy-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
}

.report-etymology-synthesis {
    font-size: 13.5px;
    color: #475569;
    line-height: 1.6;
    background: #fffbeb;
    padding: 12px 14px;
    border-radius: 8px;
    border-left: 4px solid #f59e0b;
}

/* Thaksa Letters Section */
.report-thaksa-box {
    margin-bottom: 20px;
}

.report-astrology-recommendation {
    font-size: 13.5px;
    color: #475569;
    background: #f8fafc;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    line-height: 1.6;
    margin-top: 12px;
}

/* Surname Section */
.report-surname-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    box-sizing: border-box;
}

.report-surname-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
}

.report-surname-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 16px;
    box-sizing: border-box;
}

/* Report Footer Actions */
.report-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid #e2e8f0;
    flex-wrap: wrap;
    gap: 12px;
}

.btn-report-print {
    background: #1e3a8a;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Kanit', sans-serif;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-report-print:hover {
    background: #1e40af;
    transform: translateY(-1px);
}

.btn-report-explore {
    font-size: 14px;
    color: #0284c7;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    transition: color 0.2s;
}

.btn-report-explore:hover {
    color: #0369a1;
}

/* Educational Astrology Section */
.analyzer-education-box {
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 32px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    margin-top: 36px;
    box-sizing: border-box;
}

.analyzer-education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

/* ==========================================================
   FAQ Accordion (AEO Support)
   ========================================================== */
.faq-section {
    background: var(--bg-alt);
    border-radius: var(--radius-lg);
    padding: 36px;
    margin-bottom: 40px;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.faq-item {
    background: #ffffff;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.faq-question {
    padding: 16px 20px;
    font-family: 'Kanit', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
}

.faq-icon {
    font-size: 13px;
    transition: transform 0.2s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    display: none;
    padding: 0 20px 18px;
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.7;
    border-top: 1px solid #f8fafc;
}

.faq-item.active .faq-answer {
    display: block;
}

/* ==========================================================
   Footer
   ========================================================== */
.site-footer {
    background: #0f172a;
    color: #94a3b8;
    padding-top: 60px;
    border-top: 3px solid var(--gold);
}

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

.footer-top .footer-container {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.2fr 1fr;
    gap: 40px;
    margin-bottom: 50px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.footer-brand .brand-name {
    color: #ffffff;
}

.footer-desc {
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.social-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #1e293b;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s;
}

.social-btn.fb:hover { background: #1877f2; color: #ffffff; }
.social-btn.line:hover { background: #06c755; color: #ffffff; }
.social-btn.x:hover { background: #000000; color: #ffffff; }

.footer-heading {
    font-size: 16px;
    color: #ffffff;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 14px;
}

.footer-links-grid a, .footer-links a {
    color: #94a3b8;
    transition: color 0.2s;
}

.footer-links-grid a:hover, .footer-links a:hover {
    color: var(--gold-light);
}

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

.num-tag {
    background: #1e293b;
    color: #cbd5e1;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    border: 1px solid #334155;
}

.num-tag:hover {
    background: var(--gold);
    color: #ffffff;
    border-color: var(--gold);
}

.footer-alphabets {
    background: #090e1a;
    padding: 16px 0;
    border-top: 1px solid #1e293b;
    border-bottom: 1px solid #1e293b;
}

.footer-alphabets .footer-container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.alphabet-label {
    font-size: 13px;
    color: #cbd5e1;
    font-weight: 500;
}

.alphabet-links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.alpha-link {
    color: #94a3b8;
    padding: 2px 6px;
    font-size: 13px;
    border-radius: 4px;
}

.alpha-link:hover {
    background: #1e293b;
    color: var(--gold-light);
}

.footer-bottom {
    padding: 20px 0;
    font-size: 13px;
    color: #64748b;
}

.bottom-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.bottom-links {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bottom-links a {
    color: #64748b;
}

.bottom-links a:hover {
    color: #cbd5e1;
}

/* ==========================================================
   Responsive Breakpoints
   ========================================================== */
@media (max-width: 1200px) {
    .header-container {
        padding: 10px 16px;
        gap: 12px;
    }

    .main-nav .nav-list {
        gap: 2px;
    }

    .nav-link {
        padding: 7px 10px;
        font-size: 14.5px;
    }

    .quick-search-box {
        width: 150px;
    }

    .quick-search-box:focus-within {
        width: 190px;
    }

    .btn-header-cta {
        padding: 6px 12px;
        font-size: 13.5px;
    }
}

@media (max-width: 992px) {
    .header-container {
        padding: 10px 16px;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #ffffff;
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow-lg);
        padding: 16px 20px;
        z-index: 1000;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }

    .main-nav.show {
        display: block;
        animation: navSlideDown 0.2s ease forwards;
    }

    @keyframes navSlideDown {
        from {
            opacity: 0;
            transform: translateY(-8px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .main-nav .nav-list {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }

    /* ใน Mobile Drawer ให้แสดงไอคอนเพื่อให้สัมผัสสะดวก */
    .nav-link .nav-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 22px;
        color: var(--primary);
        font-size: 14px;
    }

    .nav-link {
        padding: 10px 14px;
        font-size: 15px;
        border-radius: var(--radius-sm);
        display: flex;
        justify-content: flex-start;
        gap: 10px;
    }

    .nav-item-mobile-cta {
        display: block;
        margin-top: 8px;
        padding-top: 8px;
        border-top: 1px solid var(--border-color);
    }

    .nav-item-mobile-cta .nav-link.nav-highlight {
        background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
        color: #ffffff !important;
        font-weight: 500;
        justify-content: center;
        padding: 10px 16px;
    }

    .nav-item-mobile-cta .nav-icon {
        color: var(--gold-light);
    }

    /* Mobile Dropdown */
    .nav-link .nav-arrow {
        margin-left: auto;
    }

    .nav-item.dropdown .dropdown-menu,
    .nav-item.dropdown:hover .dropdown-menu {
        display: none;
        position: static;
        top: auto;
        left: auto;
        right: auto;
        transform: none !important;
        box-shadow: none;
        border: 1px solid var(--border-color);
        border-radius: var(--radius-sm);
        background: var(--bg-alt);
        margin: 6px 0 8px 12px;
        padding: 6px;
        min-width: 0;
        width: auto;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .nav-item.dropdown.open-mobile .dropdown-menu,
    .nav-item.dropdown.open-mobile:hover .dropdown-menu {
        display: block;
        transform: none !important;
    }

    .nav-item.dropdown.open-mobile .nav-arrow {
        transform: rotate(180deg);
    }

    .nav-item.dropdown .dropdown-item {
        padding: 9px 12px;
        font-size: 14.5px;
        color: var(--text-main);
    }

    .nav-item.dropdown .dropdown-item:hover,
    .nav-item.dropdown .dropdown-item:active {
        background: #ffffff;
        color: var(--primary);
        transform: none;
    }

    .btn-header-cta {
        display: none; /* ในจอเล็ก CTA จะเข้าไปอยู่ใน Mobile Drawer แทน */
    }

    .mobile-menu-btn {
        display: block;
    }

    .quick-search-box {
        width: 160px;
    }

    .quick-search-box:focus-within {
        width: 180px;
    }

    .footer-top .footer-container {
        grid-template-columns: 1fr 1fr;
    }
    
    .hero-title {
        font-size: 30px;
    }

    .name-content-grid {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .content-right {
        margin-top: 40px;
        padding-top: 36px;
        border-top: 2px dashed #e2e8f0;
        gap: 28px;
    }

    .sidebar-input-group {
        flex-direction: row;
        gap: 10px;
    }

    .sidebar-input-group .form-control {
        flex: 1;
        min-width: 0;
    }

    .sidebar-analyzer-widget .btn-analyze {
        width: auto;
        min-width: 150px;
        flex-shrink: 0;
        white-space: nowrap;
    }

    .related-names-list {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 14px;
    }
}

@media (max-width: 768px) {
    .quick-search-box {
        display: none; /* บนมือถือซ่อน Quick Search ใน Navbar เพื่อให้ Logo เด่นชัด */
    }

    .brand-sub {
        display: none;
    }

    .footer-top .footer-container {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 26px;
    }

    .hero-subtitle {
        font-size: 15px;
    }

    .name-large-title {
        font-size: 30px;
    }

    .name-detail-header {
        padding: 20px 16px;
    }

    .numerology-breakdown-card {
        padding: 18px 16px;
    }

    .sidebar-widget {
        padding: 20px 16px;
    }

    .content-right {
        margin-top: 32px;
        padding-top: 28px;
        gap: 20px;
    }

    .numerology-dimension-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    /* ปรับขนาดกล่องค้นหาบนมือถือให้พอดี ไม่ให้ปุ่มหลุดขอบ */
    .big-search-box {
        padding: 5px;
        margin-bottom: 20px;
    }

    .big-search-box .search-icon {
        margin-left: 10px;
        font-size: 14px;
    }

    .big-search-box input {
        padding: 9px 10px;
        font-size: 14.5px;
    }

    .big-search-box button {
        padding: 10px 18px;
        font-size: 14.5px;
        gap: 6px;
    }

    .btn-analyze {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        font-size: 16px;
        padding: 12px 20px;
    }

    /* ปรับขนาดและระยะของกล่องวิเคราะห์ชื่อบนมือถือ (แก้ปัญหาพื้นที่แคบ) */
    .analyzer-box {
        padding: 22px 16px;
        border-radius: 16px;
        margin-bottom: 28px;
    }

    .analyzer-form-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .analysis-report {
        padding: 20px 14px;
        border-radius: 14px;
        margin-top: 22px;
    }

    .report-header {
        gap: 14px;
        padding-bottom: 16px;
        margin-bottom: 16px;
    }

    .report-stats-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .report-stat-card {
        padding: 16px 14px;
    }

    .report-etymology-box {
        padding: 16px 14px;
    }

    .report-etymology-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .report-energy-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .report-surname-box {
        padding: 16px 14px;
    }

    .report-surname-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .char-chips-container {
        gap: 6px;
        margin: 12px 0;
    }

    .char-chip {
        padding: 8px 10px;
        min-width: 46px;
        flex: 1 1 46px;
        max-width: 72px;
    }

    .char-chip-letter {
        font-size: 18px;
    }

    .char-chip-val {
        font-size: 11px;
    }

    .report-footer {
        flex-direction: column-reverse;
        gap: 12px;
        text-align: center;
    }

    .btn-report-print {
        width: 100%;
        padding: 12px 20px;
    }

    .btn-report-explore {
        width: 100%;
        justify-content: center;
        padding: 6px;
    }

    .hero-analyzer-wrapper {
        margin-top: -20px;
    }

    .analyzer-header-intro {
        margin-bottom: 18px;
    }

    .analyzer-header-sub {
        font-size: 13px;
    }

    .analyzer-education-box {
        padding: 20px 16px;
        margin-top: 24px;
        border-radius: 14px;
    }

    .analyzer-education-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

@media (max-width: 576px) {
    .sidebar-input-group {
        flex-direction: column;
    }

    .sidebar-analyzer-widget .btn-analyze {
        width: 100%;
    }

    .related-names-list {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .sidebar-widget {
        padding: 18px 14px;
    }

    .report-title {
        font-size: 22px;
    }

    .report-pronunciation-box {
        width: 100%;
        justify-content: flex-start;
        font-size: 13px;
        padding: 6px 10px;
        gap: 6px 10px;
    }

    .grade-badge-circle {
        width: 62px;
        height: 62px;
        min-width: 62px;
        min-height: 62px;
    }

    .grade-badge-circle .grade-text {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .name-large-title {
        font-size: 24px;
    }

    .big-search-box {
        padding: 4px;
    }

    .big-search-box .search-icon {
        margin-left: 8px;
        font-size: 13px;
    }

    .big-search-box input {
        padding: 8px 6px;
        font-size: 13.5px;
    }

    .big-search-box button {
        padding: 9px 14px;
        font-size: 13.5px;
        gap: 5px;
    }

    .hero-analyzer-wrapper {
        margin-top: -14px;
    }

    .analyzer-box {
        padding: 16px 12px;
        border-radius: 12px;
    }

    .analyzer-education-box {
        padding: 16px 12px;
        margin-top: 20px;
        border-radius: 12px;
    }

    .analysis-report {
        padding: 14px 10px;
        border-radius: 10px;
        margin-top: 14px;
    }

    .report-title {
        font-size: 20px;
    }

    .report-pronunciation-box {
        font-size: 12px;
        padding: 6px 8px;
        gap: 4px 8px;
    }

    .report-alert {
        padding: 10px 12px;
        font-size: 13px;
    }

    .report-stat-card {
        padding: 12px 10px;
    }

    .report-stat-number {
        font-size: 28px;
    }

    .report-etymology-box {
        padding: 12px 10px;
    }

    .report-energy-container {
        padding: 12px 10px;
    }

    .report-surname-box {
        padding: 12px 10px;
    }

    .report-surname-item {
        padding: 12px 10px;
    }

    .grade-badge-circle {
        width: 56px;
        height: 56px;
        min-width: 56px;
        min-height: 56px;
    }

    .grade-badge-circle .grade-text {
        font-size: 20px;
    }

    .char-chip {
        padding: 6px 8px;
        min-width: 38px;
        flex: 1 1 38px;
        max-width: 60px;
    }

    .char-chip-letter {
        font-size: 16px;
    }

    .char-chip-val {
        font-size: 10px;
    }
}

@media (max-width: 360px) {
    .big-search-box button {
        padding: 8px 10px;
        font-size: 12.5px;
        gap: 4px;
    }

    .analyzer-box {
        padding: 14px 8px;
    }

    .analysis-report {
        padding: 12px 8px;
    }

    .char-chip {
        padding: 5px 6px;
        min-width: 34px;
        flex: 1 1 34px;
    }
}

