:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --text-dark: #1e293b;
    --text-gray: #64748b;
    --border-color: #e2e8f0;
    --success-color: #22c55e;
    --warning-color: #f59e0b;
    --orange-color: #ea580c;
    --orange-dark: #c2410c;
    --light-bg: #f8fafc;
}

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

body {
    font-family:
        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.content-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Header */
.header {
    background: white;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    color: var(--text-gray);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: color 0.2s;
}

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

.nav-link.btn-cta {
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 600;
}

.nav-link.btn-cta:hover {
    background: var(--primary-dark);
    color: white;
}

.logo {
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.125rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    width: 24px;
    height: 24px;
    background: var(--primary-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 14px;
}

.btn-login {
    color: var(--text-gray);
    text-decoration: none;
    font-weight: 400;
    font-size: 0.875rem;
}

.btn-login:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-dark);
    padding-right: 0.5rem;
}

/* Main Content */
.main-content {
    padding: 3rem 0;
    background: white;
}

.article-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
    background: var(--light-bg);
    border-radius: 12px;
}

.article-header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-dark);
    line-height: 1.2;
}

.article-intro {
    font-size: 1.25rem;
    color: var(--text-gray);
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

/* Quick Answer Box */
.quick-answer {
    background: #f0f9ff;
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0 3rem;
    text-align: center;
}

.quick-answer h2 {
    color: var(--primary-dark);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.quick-answer .main-phrase {
    font-size: 2rem;
    margin: 1rem 0;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e0f2fe;
}

.quick-answer .gender-forms {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
}

.gender-form {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e0f2fe;
}

.gender-form h4 {
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

/* Content Sections */
.content-section {
    margin-bottom: 3rem;
}

.content-section h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.content-section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 2rem 0 1rem;
    color: var(--text-dark);
}

.content-section p {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
    line-height: 1.7;
    color: var(--text-dark);
}

.content-section ul {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.content-section ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.content-section li {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* Thai Text Clickable */
.thai-clickable {
    cursor: pointer;
    transition: all 0.2s;
    padding: 2px 4px;
    border-radius: 3px;
    position: relative;
    display: inline-block;
}

.thai-clickable:hover {
    background-color: #e0f2fe;
    transform: scale(1.05);
}

.thai-clickable:active {
    background-color: #0284c7;
    color: white;
}

.thai-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.pronunciation {
    font-style: italic;
    color: var(--text-gray);
    font-size: 1rem;
}

/* Example Boxes */
.example-box {
    background: #f8fafc;
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 8px 8px 0;
}

.example-box .example-thai {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.example-box .example-pronunciation {
    font-style: italic;
    color: var(--text-gray);
    margin-bottom: 0.5rem;
}

.example-box .example-meaning {
    font-weight: 500;
    color: var(--text-dark);
}

/* Video Wrapper */
.videoWrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    margin: 2rem 0;
}

.videoWrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

/* Thai Reference Table */
.thai-reference-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.thai-reference-table th {
    background: var(--primary-color);
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
}

.thai-reference-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: top;
}

.thai-reference-table tbody tr:hover {
    background-color: #f8fafc;
}

.thai-reference-table .thai-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .thai-reference-table {
        font-size: 0.875rem;
    }

    .thai-reference-table th,
    .thai-reference-table td {
        padding: 0.75rem 0.5rem;
    }

    .thai-reference-table .thai-text {
        font-size: 1.125rem;
    }
}

/* CTA Sections */
.cta-section {
    background: linear-gradient(
        135deg,
        var(--light-bg) 0%,
        #f1f5f9 100%
    );
    padding: 3rem 2rem;
    border-radius: 12px;
    text-align: center;
    margin: 3rem 0;
    border: 1px solid var(--border-color);
}

.cta-section h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
    font-weight: 600;
}

.cta-section p {
    font-size: 1.125rem;
    color: var(--text-gray);
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.btn-cta-large {
    display: inline-block;
    background: var(--success-color);
    color: white;
    padding: 1.125rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1.25rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
}

.btn-cta-large:hover {
    background: #16a34a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
    color: white;
}

/* Author Byline */
.author-byline {
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-gray);
    margin: 1.5rem 0 2rem;
    padding: 1rem;
    background: var(--light-bg);
    border-radius: 6px;
    border-left: 4px solid var(--primary-color);
}

.author-byline a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.author-byline a:hover {
    text-decoration: underline;
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 2rem 0 1rem;
    text-align: center;
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.footer-content a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-content a:hover {
    color: white;
}

.copyright {
    color: #94a3b8;
    font-size: 0.875rem;
}

/* Key Takeaways */
.key-takeaways {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-left: 4px solid var(--primary-color);
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem 0;
}

.key-takeaways h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.key-takeaways ul {
    list-style: none;
    padding: 0;
}

.key-takeaways li {
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
}

.key-takeaways li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

/* Author Box */
.author-box {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin: 3rem 0;
}

.author-profile {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.author-info h3 {
    margin: 0 0 0.5rem 0;
    color: var(--text-dark);
    font-size: 1.5rem;
}

.author-title {
    color: var(--primary-color);
    font-weight: 600;
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
}

.author-bio {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.author-credentials {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: white;
    border-radius: 6px;
    border-left: 3px solid var(--orange-color);
}

.author-social {
    display: flex;
    gap: 1rem;
}

.author-social a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.author-social a:hover {
    background-color: var(--primary-color);
    color: white;
}

@media (max-width: 768px) {
    .author-profile {
        flex-direction: column;
        text-align: center;
    }

    .author-social {
        justify-content: center;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container,
    .content-container {
        padding: 0 1rem;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .article-header h1 {
        font-size: 2.5rem;
    }

    .article-intro {
        font-size: 1.125rem;
    }

    .content-section h2 {
        font-size: 1.75rem;
    }

    .thai-text {
        font-size: 1.25rem;
    }

    .cta-section {
        padding: 2rem 1rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
    }

    .quick-answer .gender-forms {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .article-header h1 {
        font-size: 2rem;
    }

    .content-section h2 {
        font-size: 1.5rem;
    }

    .thai-text {
        font-size: 1.125rem;
    }

    .cta-section h3 {
        font-size: 1.5rem;
    }
}