/* ========================================
   ArthroBio Thai Lab - Clinical Science Theme
   ======================================== */

/* CSS Variables */
:root {
    --color-emerald: #2E7D32;
    --color-emerald-dark: #1B5E20;
    --color-emerald-light: #4CAF50;
    --color-gray: #546E7A;
    --color-gray-light: #78909C;
    --color-gray-bg: #ECEFF1;
    --color-white: #FFFFFF;
    --color-green-bg: #E8F5E9;
    --font-heading: 'Kanit', sans-serif;
    --font-body: 'Prompt', sans-serif;
    --shadow-subtle: 0 2px 8px rgba(84, 110, 122, 0.1);
    --border-radius: 4px;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-gray);
    background: linear-gradient(180deg, var(--color-white) 0%, var(--color-green-bg) 100%);
    min-height: 100vh;
}

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

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.3;
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 32px;
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 500;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background-color: var(--color-emerald);
    color: var(--color-white);
}

.btn-primary:hover {
    background-color: var(--color-emerald-dark);
}

.btn-secondary {
    background-color: var(--color-gray);
    color: var(--color-white);
}

.btn-secondary:hover {
    background-color: var(--color-gray-light);
}

.btn-full {
    width: 100%;
}

/* ========================================
   Header
   ======================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--color-white);
    box-shadow: var(--shadow-subtle);
    z-index: 1000;
    padding: 15px 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.logo-icon {
    font-size: 32px;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    color: var(--color-emerald);
}

.nav {
    display: flex;
    gap: 30px;
}

.nav a {
    font-family: var(--font-heading);
    font-size: 15px;
    color: var(--color-gray);
    font-weight: 500;
}

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

/* ========================================
   Hero Section
   ======================================== */
.hero {
    padding: 140px 0 80px;
    background-color: var(--color-white);
}

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

.hero-title {
    font-size: 48px;
    color: var(--color-emerald);
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 20px;
    color: var(--color-gray-light);
    margin-bottom: 40px;
    line-height: 1.8;
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow-subtle);
}

/* ========================================
   Extracts Section
   ======================================== */
.extracts {
    padding: 100px 0;
    background-color: var(--color-white);
}

.section-title {
    font-size: 36px;
    color: var(--color-emerald);
    text-align: center;
    margin-bottom: 15px;
}

.section-subtitle {
    font-size: 18px;
    color: var(--color-gray-light);
    text-align: center;
    margin-bottom: 60px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.extracts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.extract-card {
    background-color: var(--color-white);
    border: 1px solid var(--color-gray-bg);
    border-radius: 8px;
    padding: 40px 30px;
    transition: var(--transition);
}

.extract-card:hover {
    box-shadow: 0 8px 24px rgba(46, 125, 50, 0.15);
    transform: translateY(-5px);
}

.extract-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.extract-title {
    font-size: 22px;
    color: var(--color-emerald);
    margin-bottom: 15px;
}

.extract-desc {
    font-size: 15px;
    color: var(--color-gray);
    line-height: 1.8;
    margin-bottom: 20px;
}

.extract-features {
    list-style: none;
    padding: 0;
}

.extract-features li {
    font-size: 14px;
    color: var(--color-gray);
    padding: 8px 0;
    border-bottom: 1px solid var(--color-gray-bg);
}

.extract-features li:last-child {
    border-bottom: none;
}

/* ========================================
   Science Section
   ======================================== */
.science {
    padding: 100px 0;
    background-color: var(--color-white);
}

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

.science-content {
    order: 1;
}

.science-image {
    order: 2;
}

.science-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow-subtle);
}

.chart-wrapper {
    background-color: var(--color-gray-bg);
    border-radius: 8px;
    padding: 40px 30px;
    margin: 40px 0;
}

.chart {
    text-align: center;
}

.chart-bars {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    height: 200px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--color-gray);
}

.chart-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.chart-bar::before {
    content: '';
    width: 50px;
    height: calc(var(--height));
    background: linear-gradient(180deg, var(--color-emerald-light) 0%, var(--color-emerald) 100%);
    border-radius: 4px 4px 0 0;
    animation: growBar 0.8s ease forwards;
    transform-origin: bottom;
    transform: scaleY(0);
    animation-delay: var(--delay);
}

@keyframes growBar {
    to {
        transform: scaleY(1);
    }
}

.bar-label {
    font-size: 12px;
    color: var(--color-gray);
    font-weight: 500;
}

.bar-value {
    font-size: 14px;
    color: var(--color-emerald);
    font-weight: 600;
    font-family: var(--font-heading);
}

.chart-title {
    font-size: 16px;
    color: var(--color-gray);
    margin-top: 20px;
    font-weight: 500;
}

.science-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background-color: var(--color-green-bg);
    border-radius: 8px;
}

.stat-number {
    display: block;
    font-size: 32px;
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-emerald);
}

.stat-label {
    display: block;
    font-size: 14px;
    color: var(--color-gray-light);
    margin-top: 5px;
}

/* ========================================
   Consult Section
   ======================================== */
.consult {
    padding: 100px 0;
    background-color: var(--color-white);
}

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

.consult-content {
    order: 2;
}

.consult-image {
    order: 1;
}

.consult-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow-subtle);
}

.consult-text {
    font-size: 18px;
    color: var(--color-gray);
    line-height: 1.8;
    margin-bottom: 40px;
}

.consult-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-gray);
}

.form-group input {
    padding: 14px 18px;
    font-family: var(--font-body);
    font-size: 16px;
    border: 1px solid var(--color-gray-bg);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--color-emerald);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

.form-group input::placeholder {
    color: var(--color-gray-light);
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background-color: var(--color-gray);
    color: var(--color-white);
    padding: 60px 0 0;
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--color-gray-light);
}

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

.footer-logo .logo-icon {
    font-size: 28px;
}

.footer-logo .logo-text {
    font-size: 22px;
    color: var(--color-white);
}

.footer-address {
    font-size: 14px;
    line-height: 1.8;
    color: var(--color-gray-light);
}

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

.footer-links a,
.footer-legal a {
    display: block;
    font-size: 14px;
    color: var(--color-gray-light);
    padding: 8px 0;
}

.footer-links a:hover,
.footer-legal a:hover {
    color: var(--color-white);
}

.footer-bottom {
    padding: 20px 0;
    text-align: center;
}

.footer-bottom p {
    font-size: 14px;
    color: var(--color-gray-light);
}

/* ========================================
   Modal
   ======================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(84, 110, 122, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal {
    background-color: var(--color-white);
    border-radius: 8px;
    padding: 50px 40px;
    max-width: 450px;
    width: 90%;
    text-align: center;
    transform: scale(0.9);
    transition: var(--transition);
}

.modal-icon {
    width: 70px;
    height: 70px;
    background-color: var(--color-emerald);
    color: var(--color-white);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 36px;
    margin: 0 auto 25px;
}

.modal-title {
    font-size: 24px;
    color: var(--color-emerald);
    margin-bottom: 15px;
}

.modal-text {
    font-size: 16px;
    color: var(--color-gray);
    line-height: 1.8;
    margin-bottom: 30px;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 992px) {
    .hero-container,
    .science-container,
    .consult-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .science-content {
        order: 2;
    }

    .science-image {
        order: 1;
    }

    .consult-content {
        order: 2;
    }

    .consult-image {
        order: 1;
    }

    .extracts-grid {
        grid-template-columns: 1fr;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 15px;
    }

    .nav {
        gap: 20px;
    }

    .hero {
        padding: 100px 0 60px;
    }

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

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

    .section-title {
        font-size: 28px;
    }

    .science-stats {
        grid-template-columns: 1fr;
    }

    .chart-bars {
        height: 150px;
    }

    .chart-bar::before {
        width: 30px;
    }
}

@media (max-width: 480px) {
    .nav {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

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

    .btn {
        padding: 12px 24px;
        font-size: 14px;
    }

    .modal {
        padding: 30px 20px;
    }
}
