@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Noto+Sans+Thai:wght@300;400;500;600&display=swap');

:root {
    --bg-color: #ffffff;
    --text-color: #1d1d1f;
    --accent-color: #000000;
    --secondary-text: #86868b;
    --section-bg: #f5f5f7;
    --nav-height: 44px;
    --max-width: 980px;
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', 'Noto Sans Thai', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.5;
    overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 56px;
    line-height: 1.07143;
    font-weight: 600;
}

h2 {
    font-size: 48px;
    line-height: 1.1;
}

p {
    font-size: 17px;
    line-height: 1.47059;
    color: var(--secondary-text);
}

a {
    text-decoration: none;
    color: var(--text-color);
    transition: color var(--transition-speed) ease;
}

a:hover {
    color: var(--secondary-text);
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

nav {
    width: 100%;
    max-width: var(--max-width);
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 600;
    font-size: 14px;
    letter-spacing: -0.01em;
    z-index: 1002;
}

.nav-links {
    display: flex;
    gap: 24px;
    list-style: none;
    align-items: center;
}

.nav-links a {
    font-size: 12px;
    color: var(--text-color);
    opacity: 0.8;
}

.nav-links a:hover {
    opacity: 1;
}

.lang-container {
    display: flex;
    align-items: center;
}

.lang-switch {
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
    background: none;
    border: none;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-color);
}

.lang-switch:hover {
    background: rgba(0, 0, 0, 0.05);
}

.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-color);
    z-index: 1002;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    /* Slightly transparent for premium feel */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-menu.active {
    opacity: 1;
    pointer-events: all;
}

/* When menu is active, hide hamburger and show close button with animation */
.menu-active .hamburger {
    opacity: 0;
    pointer-events: none;
    transform: rotate(90deg);
}

.close-menu {
    position: absolute;
    top: 20px;
    /* Adjusted to match header padding */
    right: 20px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-color);
    z-index: 1003;
    /* Ensure it's above everything */
    opacity: 0;
    transform: rotate(-90deg);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.mobile-menu.active .close-menu {
    opacity: 1;
    transform: rotate(0);
}

.mobile-nav-links {
    list-style: none;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 32px;
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.mobile-menu.active .mobile-nav-links {
    transform: translateY(0);
}

.mobile-nav-links a {
    font-size: 24px;
    font-weight: 500;
    color: var(--text-color);
    text-decoration: none;
    transition: opacity 0.2s;
}

.mobile-nav-links a:hover {
    opacity: 0.6;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 120px 20px 60px;
    position: relative;
    overflow: hidden;
}

.hero-content {
    z-index: 2;
    max-width: 700px;
    animation: fadeUp 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    opacity: 0;
    transform: translateY(20px);
}

.hero h1 {
    margin-bottom: 16px;
}

.hero p {
    font-size: 21px;
    line-height: 1.381;
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto 32px;
}

.cta-button {
    display: inline-block;
    background: var(--accent-color);
    color: white;
    padding: 12px 24px;
    border-radius: 980px;
    font-size: 14px;
    font-weight: 500;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.cta-button:hover {
    transform: scale(1.02);
    color: white;
    opacity: 0.9;
}

.hero-image-container {
    margin-top: 60px;
    width: 100%;
    max-width: 1000px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    animation: fadeUp 1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.2s forwards;
    opacity: 0;
    transform: translateY(40px);
}

.hero-image-container img {
    width: 100%;
    height: auto;
    display: block;
}

/* Sections General */
section {
    padding: 120px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section-content {
    width: 100%;
    max-width: var(--max-width);
}

.section-title {
    font-size: 40px;
    margin-bottom: 60px;
    text-align: center;
}

/* Philosophy / About */
.philosophy {
    background-color: var(--section-bg);
}

.philosophy-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.philosophy-grid {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.philosophy-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.philosophy-item h3 {
    font-size: 24px;
    margin-bottom: 12px;
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.service-card {
    background: white;
    padding: 40px;
    border-radius: 18px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-card h3 {
    font-size: 21px;
    margin-bottom: 10px;
}

/* Articles */
.articles {
    background-color: var(--section-bg);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.article-card {
    background: white;
    border-radius: 18px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.article-image {
    height: 200px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-card:hover .article-image img {
    transform: scale(1.05);
}

.article-content {
    padding: 24px;
}

.article-date {
    font-size: 12px;
    color: var(--secondary-text);
    display: block;
    margin-bottom: 8px;
}

.article-content h3 {
    font-size: 20px;
    margin-bottom: 8px;
    line-height: 1.3;
}

.read-more {
    display: inline-block;
    margin-top: 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--accent-color);
}

/* Contact */
.contact-container {
    max-width: 600px;
    margin: 0 auto;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

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

.form-group label {
    font-size: 14px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid #d2d2d7;
    font-family: inherit;
    font-size: 16px;
    transition: border-color 0.2s;
    background: #fbfbfd;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background: white;
}

.submit-btn {
    background: var(--accent-color);
    color: white;
    padding: 14px;
    border-radius: 12px;
    border: none;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
}

.submit-btn:hover {
    opacity: 0.9;
}

/* Footer */
footer {
    background-color: white;
    padding: 60px 20px;
    font-size: 12px;
    color: var(--secondary-text);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Animations */
@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Utility Classes for Responsive Visibility */
.mobile-only {
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: block !important;
    }

    h1 {
        font-size: 40px;
    }

    h2 {
        font-size: 32px;
    }

    .hamburger {
        display: block;
    }

    .philosophy-layout {
        grid-template-columns: 1fr;
    }

    .philosophy-image {
        order: -1;
    }
}

/* Article Page Styles */
.article-page header {
    /* Keep fixed position for consistency */
    background: rgba(255, 255, 255, 0.95);
    /* Slightly more opaque for reading */
}

header.article-header {
    position: static;
    height: auto;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    display: block;
    border-bottom: none;
    max-width: 800px;
    margin: 0 auto;
    padding: 120px 20px 40px;
    text-align: center;
}

.article-hero-image {
    width: 100%;
    height: 400px;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.article-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-meta {
    font-size: 14px;
    color: var(--secondary-text);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.article-header h1 {
    font-size: 48px;
    margin-bottom: 16px;
    line-height: 1.1;
}

.article-header .subtitle {
    font-size: 24px;
    color: var(--secondary-text);
    font-weight: 300;
}

.article-content {
    max-width: 680px;
    /* Optimal reading width */
    margin: 0 auto;
    padding: 0 20px 80px;
    font-size: 18px;
    line-height: 1.8;
}

.article-content p {
    margin-bottom: 24px;
    color: var(--text-color);
    /* Darker text for reading */
    font-size: 18px;
}

.article-content .lead {
    font-size: 22px;
    font-weight: 500;
    margin-bottom: 40px;
}

.article-content h2 {
    font-size: 32px;
    margin-top: 60px;
    margin-bottom: 24px;
}

blockquote {
    border-left: 4px solid var(--accent-color);
    padding-left: 24px;
    margin: 40px 0;
    font-style: italic;
    font-size: 24px;
    color: var(--text-color);
}

blockquote cite {
    display: block;
    margin-top: 12px;
    font-size: 16px;
    color: var(--secondary-text);
    font-style: normal;
}

.article-image-block {
    margin: 60px 0;
}

.article-image-block img {
    width: 100%;
    border-radius: 12px;
    display: block;
}

.article-image-block .caption {
    display: block;
    text-align: center;
    font-size: 14px;
    color: var(--secondary-text);
    margin-top: 12px;
}

.article-footer {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 20px 120px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 40px;
}

.back-link {
    font-weight: 500;
    font-size: 16px;
}

@media (max-width: 768px) {
    .article-header h1 {
        font-size: 36px;
    }

    .article-hero-image {
        height: 250px;
    }
}