/* 
   Project: thehealths.net 
   Theme: Modern Medical / Encyclopedia
*/

:root {
    /* Color Palette */
    --primary-color: #007BFF;
    /* Medical Blue */
    --primary-dark: #0056b3;
    --accent-color: #00C853;
    /* Success/Health Green */
    --text-dark: #2C3E50;
    --text-light: #6c757d;
    --bg-light: #F8F9FA;
    --bg-white: #FFFFFF;
    --shadow-soft: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 10px 15px rgba(0, 0, 0, 0.08);
    --border-radius: 12px;
    --transition-speed: 0.3s;
    --font-main: 'Inter', sans-serif;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-speed);
}

ul {
    list-style: none;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5em;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.main-header {
    background: var(--bg-white);
    padding: 1rem 0;
    box-shadow: var(--shadow-soft);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo span {
    color: var(--text-dark);
}

.search-bar-wrapper {
    flex-grow: 1;
    max-width: 500px;
    position: relative;
}

.search-bar-wrapper input {
    width: 100%;
    padding: 12px 20px;
    padding-left: 45px;
    border: 1px solid #e1e4e8;
    border-radius: 30px;
    font-size: 0.95rem;
    background: #f1f3f5;
    transition: all var(--transition-speed);
}

.search-bar-wrapper input:focus {
    outline: none;
    background: var(--bg-white);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    pointer-events: none;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    font-weight: 500;
    color: var(--text-dark);
}

.nav-link:hover {
    color: var(--primary-color);
}

.btn-donate {
    background: var(--accent-color);
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    transition: all var(--transition-speed);
}

.btn-donate:hover {
    background: #00a844;
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

/* Hero Section */
.hero-section {
    padding: 4rem 0;
    text-align: center;
    background: linear-gradient(180deg, var(--bg-white) 0%, var(--bg-light) 100%);
}

.hero-content h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
}

/* THAI AI Section */
.thai-section {
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.thai-card {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    display: flex;
    align-items: center;
    gap: 3rem;
    box-shadow: var(--shadow-hover);
    border: 1px solid rgba(0, 123, 255, 0.1);
    background: linear-gradient(135deg, #ffffff 0%, #f0f7ff 100%);
}

.thai-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
}

.thai-logo-placeholder {
    width: 120px;
    height: 120px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
    font-weight: 800;
    box-shadow: 0 0 30px rgba(0, 123, 255, 0.3);
    position: relative;
    z-index: 2;
}

.thai-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--primary-color);
    opacity: 0.2;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.2;
    }

    70% {
        transform: scale(1.5);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 0;
    }
}

.thai-content {
    flex: 2;
}

.thai-tag {
    display: inline-block;
    background: rgba(0, 123, 255, 0.1);
    color: var(--primary-color);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.thai-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.thai-disclaimer {
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-light);
    border-left: 3px solid var(--accent-color);
    padding-left: 1rem;
}

/* Library Section */
.library-section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: var(--primary-color);
    margin: 10px auto 0;
    border-radius: 2px;
}

.library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
}

.category-title {
    font-size: 1.5rem;
    color: var(--text-dark);
}

.info-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    transition: all var(--transition-speed);
    cursor: pointer;
    border: 1px solid transparent;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.info-card h3 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.info-card p {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.card-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-dark);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Experiences specific style */
.experience-card {
    background: #fff;
    border-left: 4px solid var(--primary-color);
}

.quote-icon {
    font-size: 2rem;
    color: #e1e4e8;
    margin-bottom: 0.5rem;
    line-height: 1;
}

/* Footer */
footer {
    background: var(--text-dark);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.footer-content p {
    margin-bottom: 1rem;
    opacity: 0.8;
}

.medical-warning {
    font-size: 0.9rem;
    color: #ffd700;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.copyright {
    font-size: 0.8rem;
    opacity: 0.5;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    margin-top: 1.5rem;
}

/* Responsive & Mobile Menu */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-dark);
    transition: all 0.3s ease;
    border-radius: 5px;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
        order: 2;
        /* Place next to logo */
    }

    .nav-container {
        flex-wrap: wrap;
        /* Allow wrapping for search bar */
        justify-content: space-between;
        padding-bottom: 0.5rem;
    }

    .logo {
        order: 1;
    }

    /* Mobile Search Bar */
    .search-bar-wrapper {
        width: 100%;
        order: 3;
        margin-top: 1rem;
    }

    /* Mobile Nav Drawer */
    .nav-links {
        display: flex;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%;
        /* Below header */
        left: 0;
        background: white;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-in-out, padding 0.3s ease;
        box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
        z-index: 999;
        order: 4;
        align-items: center;
        gap: 0;
    }

    .nav-links.active {
        max-height: 300px;
        /* Expand */
        padding: 1.5rem 0;
        gap: 1.5rem;
    }

    .nav-link {
        font-size: 1.1rem;
        width: 100%;
        text-align: center;
        padding: 0.5rem 0;
    }

    .btn-donate {
        width: 80%;
        text-align: center;
    }

    /* Hamburger Animation */
    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .thai-card {
        flex-direction: column;
        text-align: center;
        padding: 2rem;
    }

    .thai-disclaimer {
        border-left: none;
        border-top: 3px solid var(--accent-color);
        padding-top: 1rem;
        padding-left: 0;
    }
}