/* Reset and Base Styles */
body {
    font-family: 'Noto Sans Thai', sans-seriff;
    line-height: 1.6;
    color: #333;
    background-color: #FFFFFF;
}

/* Container for consistent width across sections */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Main Content Styles */
.main-content {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* Hero Section */
.hero {
    text-align: center;
    margin-bottom: 4rem;
    padding: 3rem 0;
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    color: white;
    border-radius: 10px;
    margin-top: 2rem;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 300;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.current-date {
    font-size: 1.1rem;
    font-weight: 500;
    background-color: rgba(255,255,255,0.2);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    display: inline-block;
}

/* Company Information Grid */
.company-info {
    margin-bottom: 4rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.info-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.info-card h3 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

/* Services Overview Section */
.services-overview {
    margin-bottom: 4rem;
}

.services-overview h3 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #333;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.service-item {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

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

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.service-item h4 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

/* Team Section */
.team-section {
    margin-bottom: 4rem;
}

.team-section h3 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #333;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.team-member {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.team-member:hover {
    transform: translateY(-5px);
}

/* Placeholder for team member photos */
/* Team Member Photo Styles */
.member-photo {
    width: 8rem;
    height: 8rem;
    border-radius: 50%; /* เปลี่ยนเป็น 50% เพื่อให้เป็นวงกลมสมบูรณ์ */
    margin: 0 auto 20px; /* จัดกึ่งกลางและเพิ่มระยะห่างด้านล่าง */
    overflow: hidden; /* ซ่อนส่วนที่เกินขอบ */
    border: 3px solid #e0e0e0; /* เพิ่มกรอบ */
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); /* เพิ่มเงา */
    
    /* จัดให้อยู่ตรงกลาง */
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* เพิ่ม transition สำหรับ effect */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.member-photo:hover {
    transform: scale(1.05); /* ขยายเมื่อ hover */
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.member-photo img {
    width: 8rem;
    height: 8rem;
    object-fit: cover; /* ให้รูปครอบคลุมพื้นที่ทั้งหมด */
    object-position: center; /* จัดจุดโฟกัสให้อยู่ตรงกลาง */
    border-radius: 50%; /* ทำให้รูปภาพเป็นวงกลม */
}

/* จัดให้ team-member card อยู่ตรงกลาง */
.team-member {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center; /* จัดเนื้อหาทั้งหมดให้อยู่ตรงกลาง */
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    
    /* จัดเนื้อหาภายในให้อยู่ตรงกลาง */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.team-member h4 {
    color: #667eea;
    margin-bottom: 0.5rem;
    font-size: 1.6rem;
}

.team-member p:first-of-type {
    color: #666;
    font-weight: 500;
    margin-bottom: 1rem;
}

/* Statistics Section */
.stats-section {
    margin-bottom: 4rem;
    background: white;
    padding: 3rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.stats-section h3 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #333;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    border-radius: 10px;
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    color: white;
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: scale(1.05);
}

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.1rem;
    opacity: 0.9;
}

.table-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
    max-width: 1200px;
    width: 100%;
}

.table-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    text-align: center;
}

.table-header h1 {
    margin: 0;
    font-size: 2.5rem;
    font-weight: 300;
    letter-spacing: 1px;
}

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 15px;
    text-align: center;
    font-weight: 600;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    position: sticky;
    top: 0;
    z-index: 10;
}

td {
    padding: 20px 15px;
    text-align: center;
    border: none;
    font-weight: 500;
    line-height: 1.6;
    transition: all 0.3s ease;
}

/* AQI Column Styling */
.aqi-column {
    font-size: 18px;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    min-width: 100px;
}

/* Level Column Styling */
.level-column {
    font-size: 16px;
    font-weight: 600;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    min-width: 150px;
}

/* Health Implications Column */
.health-column {
    text-align: left;
    min-width: 300px;
    color: white;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Cautionary Statement Column */
.caution-column {
    text-align: left;
    min-width: 350px;
    color: white;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Row Colors - matching the original */
.good-row {
    background: linear-gradient(135deg, #009966 0%, #20c997 100%);
}

.moderate-row {
    background: linear-gradient(135deg, #FFDE33 0%, #FF9933 100%);
}

.unhealthy-sensitive-row {
    background: linear-gradient(135deg, #FF9933 0%, #CC0033 100%);
}

.unhealthy-row {
    background: linear-gradient(135deg, #CC0033 0%, #660099 100%);
}

.very-unhealthy-row {
    background: linear-gradient(135deg, #660099 0%, #7E0023 100%);
}

.hazardous-row {
    background: linear-gradient(135deg, #7E0023 0%, #7E0023 100%);
}

/* Hover Effects */
tr:hover td {
    transform: scale(1.02);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.table-container {
    animation: slideIn 0.8s ease-out;
}

/* fomular */
.aqi-calculator {
    font-family: 'Kanit', sans-serif;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.formula-box {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 40px;
    margin-bottom: 24px;
    text-align: center; /* จัดให้อยู่ตรงกลาง */
    
    /* เพิ่มการจัดกึ่งกลาง */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.formula-image {
    /* จัดให้อยู่ตรงกลาง */
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    width: 100%;
}

.formula-image img {
    max-width: 30%; /* ปรับขนาดตามต้องการ */
    width: 600px;
    height: auto;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    background: white;
    padding: 20px;
    
    /* จัดให้อยู่ตรงกลาง */
    display: block;
    margin: 0 auto;
    
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.formula-image img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.variables {
    margin-top: 20px;
    max-width: 800px;
    line-height: 1.6;
}

.formula {
    font-size: 1.2em;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 16px;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .info-grid,
    .services-grid,
    .team-grid,
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 0 15px;
    }

    .table-header h1 {
        font-size: 2rem;
    }
    
    th, td {
        padding: 15px 10px;
        font-size: 13px;
    }
    
    .aqi-column {
        font-size: 16px;
    }
    
    .level-column {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 2rem 1rem;
    }
    
    .hero h2 {
        font-size: 1.5rem;
    }
    
    .info-card,
    .service-item,
    .team-member {
        padding: 1.5rem;
    }
    
    .stats-section {
        padding: 2rem 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .table-header h1 {
        font-size: 1.5rem;
    }
    
    th, td {
        padding: 12px 8px;
        font-size: 12px;
    }
    
    .health-column,
    .caution-column {
        min-width: 200px;
    }
}