/* ===== CSS Variables ===== */
:root {
    --primary: #4361ee;
    --primary-dark: #3a0ca3;
    --secondary: #f72585;
    --accent: #4cc9f0;
    --bg-dark: #0f0f1a;
    --bg-light: #f8f9ff;
    --text-dark: #1a1a2e;
    --text-light: #6c757d;
    --white: #ffffff;
    --card-shadow: 0 10px 40px rgba(0,0,0,0.1);
    --card-shadow-hover: 0 20px 60px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
    --border-radius: 16px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', 'Noto Sans Thai', sans-serif;
    color: var(--text-dark);
    line-height: 1.7;
    overflow-x: hidden;
}

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

a {
    text-decoration: none;
    color: inherit;
}

ul { list-style: none; }

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

/* ===== Navbar ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(15, 15, 26, 0.95);
    backdrop-filter: blur(20px);
    padding: 0;
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 8px 0;
    box-shadow: 0 4px 30px rgba(0,0,0,0.3);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.nav-logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-logo i {
    color: var(--secondary);
    font-size: 1.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 8px;
}

.nav-menu a {
    color: rgba(255,255,255,0.8);
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
    transition: var(--transition);
    font-size: 0.95rem;
}

.nav-menu a:hover {
    color: var(--white);
    background: rgba(255,255,255,0.1);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 5px;
}

.nav-toggle span {
    width: 28px;
    height: 3px;
    background: var(--white);
    border-radius: 3px;
    transition: var(--transition);
}

/* ===== Hero ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f0f1a 0%, #1a1a3e 50%, #0f0f1a 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(67, 97, 238, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 70% 50%, rgba(247, 37, 133, 0.1) 0%, transparent 50%);
    animation: floatBg 20s ease-in-out infinite;
}

@keyframes floatBg {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-5%, 5%) rotate(5deg); }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%234361ee' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--white);
    padding: 0 24px;
    max-width: 800px;
}

.hero-title {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--white) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: 3px;
}

.hero-desc {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.7);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    box-shadow: 0 4px 20px rgba(67, 97, 238, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(67, 97, 238, 0.6);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255,255,255,0.3);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--accent);
    transform: translateY(-3px);
}

.btn-small {
    padding: 10px 24px;
    font-size: 0.9rem;
}

.btn-small.btn-primary {
    background: var(--primary);
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
}

/* ===== Sections ===== */
.section {
    padding: 100px 0;
}

.section.bg-light {
    background: var(--bg-light);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 16px;
    color: var(--text-dark);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 2px;
    margin: 16px auto 0;
}

.section-desc {
    text-align: center;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto 60px;
    font-size: 1.05rem;
}

/* ===== Goals Grid ===== */
.goals-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.goal-card {
    background: var(--white);
    padding: 40px 28px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.goal-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--card-shadow-hover);
}

.goal-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.5rem;
    color: var(--white);
}

.goal-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.goal-card p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* ===== Pillars Grid ===== */
.pillars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 24px;
}

.pillar-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 40px 32px;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.pillar-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--card-shadow-hover);
}

.pillar-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.pillar-number {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 12px;
}

.pillar-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
    color: var(--primary);
}

.pillar-card h3 {
    font-size: 1.3rem;
    margin-bottom: 4px;
}

.pillar-thai {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.pillar-card > p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.pillar-card ul {
    padding-left: 18px;
}

.pillar-card li {
    color: var(--text-light);
    font-size: 0.85rem;
    padding: 3px 0;
}

/* ===== Tools Preview ===== */
.tools-preview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.calc-preview-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 48px 32px;
    text-align: center;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.calc-preview-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--card-shadow-hover);
}

.calc-preview-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    color: var(--white);
}

.calc-preview-card h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.calc-preview-card p {
    color: var(--text-light);
    margin-bottom: 20px;
    font-size: 0.9rem;
}

/* ===== Careers ===== */
.careers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.career-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 40px 32px;
    text-align: center;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.career-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--card-shadow-hover);
}

.career-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
    color: var(--primary);
}

.career-card h3 {
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.career-thai {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.career-card p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* ===== Articles ===== */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.article-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--card-shadow-hover);
}

.article-img {
    height: 200px;
    width: 100%;
}

.article-content {
    padding: 24px;
}

.article-tag {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.article-content h3 {
    font-size: 1.15rem;
    margin-bottom: 10px;
}

.article-content p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.article-content a {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.9rem;
    transition: var(--transition);
}

.article-content a:hover {
    color: var(--secondary);
}

/* ===== Footer ===== */
.footer {
    background: var(--bg-dark);
    color: rgba(255,255,255,0.8);
    padding: 60px 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.footer-brand i {
    color: var(--secondary);
}

.footer-brand p {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.5);
}

.footer-links h4, .footer-social h4 {
    color: var(--white);
    margin-bottom: 16px;
    font-size: 1.1rem;
}

.footer-links a {
    display: block;
    color: rgba(255,255,255,0.6);
    padding: 4px 0;
    transition: var(--transition);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--accent);
    padding-left: 6px;
}

.social-icons {
    display: flex;
    gap: 12px;
}

.social-icons a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-icons a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding: 20px 0;
    color: rgba(255,255,255,0.4);
    font-size: 0.85rem;
}

/* ===== Scroll to top ===== */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.4);
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    transform: translateY(-3px);
}

/* ===== Hero scroll indicator ===== */
.hero-scroll {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.5);
    font-size: 1.5rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

/* ===== Tool Sections ===== */
.tool-section { margin-bottom: 20px; }
.calc-wrapper { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.calc-box { background: var(--white); border-radius: var(--border-radius); padding: 32px; box-shadow: var(--card-shadow); }
.calc-box h3 { font-size: 1.3rem; margin-bottom: 20px; color: var(--primary); }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 0.9rem; color: var(--text-dark); }
.form-group input, .form-group select { width: 100%; padding: 12px 16px; border: 2px solid #e9ecef; border-radius: 10px; font-size: 1rem; font-family: inherit; transition: var(--transition); }
.form-group input:focus, .form-group select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1); }
.result-box { margin-top: 24px; padding: 24px; background: linear-gradient(135deg, #f8f9ff, #edf2ff); border-radius: 12px; text-align: center; }
.result-value { font-size: 2.5rem; font-weight: 900; color: var(--primary); }
.result-label { color: var(--text-light); font-size: 0.9rem; margin-top: 4px; }
.zone-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid #eee; }
.zone-item:last-child { border-bottom: none; }
.zone-item span { color: var(--text-light); }
.zone-item strong { color: var(--primary); }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .hero-title { font-size: 3rem; }
    .goals-grid { grid-template-columns: repeat(2, 1fr); }
    .tools-preview { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
    .footer-content { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: rgba(15, 15, 26, 0.98);
        flex-direction: column;
        padding: 20px 24px;
        gap: 4px;
    }
    .nav-menu.active { display: flex; }
    .nav-menu a { padding: 12px 16px; display: block; border-radius: 8px; }
    .nav-toggle { display: flex; }
    .hero-title { font-size: 2.2rem; }
    .hero-subtitle { font-size: 1.1rem; }
    .hero-desc { font-size: 1rem; }
    .section-title { font-size: 2rem; }
    .goals-grid { grid-template-columns: 1fr; }
    .pillars-grid { grid-template-columns: 1fr; }
    .careers-grid { grid-template-columns: 1fr; }
    .articles-grid { grid-template-columns: 1fr; }
    .footer-content { grid-template-columns: 1fr; }
    .hero-buttons { flex-direction: column; align-items: center; }
    .hero-buttons .btn { width: 100%; max-width: 250px; justify-content: center; }
    .calc-wrapper { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 1.8rem; }
    .section { padding: 60px 0; }
    .section-title { font-size: 1.6rem; }
}
