/* Global Resets & Basic Styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Sarabun', sans-serif;
    line-height: 1.7;
    color: #333;
    background-color: #f9fbfd;
    /* Light overall background */
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: #1d3557;
    /* Dark blue for headings */
    margin-top: 1em;
}

p {
    margin-bottom: 1rem;
    color: #555;
}

a {
    text-decoration: none;
    color: #1db954;
    /* Primary green for links */
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    align-items: center;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    
    
}


section {
    padding: 60px 0;
}

.section-tag {
    display: inline-block;
    background-color: #e6f9f0;
    color: #008a3e;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 500;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.section-tag.pink-tag {
    background-color: #fdeaf2;
    /* Light pink for pink tag */
    color: #f54899;
}

.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 1em;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: #1db954;
    color: #fff;
}

.btn-primary:hover {
    background-color: #17a049;
}

.btn-secondary {
    background-color: #e6f9f0;
    color: #1db954;
    border: 1px solid #1db954;
}

.btn-secondary:hover {
    background-color: #d4f7e7;
}

.text-center {
    text-align: center;
}

/* Header */
header {
    background-color: #fff;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

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

}

.logo {
    font-size: 1.5em;
    font-weight: 700;
    color: #005f2a;
}

.nav-links {
    list-style: none;
    display: flex;
}

.nav-links li {
    margin-left: 25px;
}

.nav-links a {
    color: #008a3e;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #1db954;
}

.mobile-nav-toggle {
    display: none;
    /* Hidden on desktop */
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #333;
    cursor: pointer;
}

/* Hero Section */
.hero {
    background-color: #e6f9f0;
    /* Light green background */
    padding: 80px 0;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 40px;
    background-color: #e6f9f0;
    margin: 0 auto;
    padding: 20px 80px;

}


.hero-text {
    flex: 1;
}

.hero-badge {
    display: inline-block;
    background-color: #fff;
    color: #008a3e;
    padding: 8px 18px;
    border-radius: 25px;
    font-size: 0.9em;
    font-weight: 500;
    margin-bottom: 15px;
}

.hero-text h1 {
    font-size: 2.8em;
    font-weight: 800;
    color: #005f2a;
    /* Darker green for main headline */
    line-height: 1.2;
    margin-bottom: 20px;
}
.hero-text h2 {
    font-size: 2.2em;
    font-weight: 800;
    color: #005f2a;

    font-weight: 700;
    margin-bottom: 0.8rem;

    /* Dark blue for headings */
    margin-top: 1em;
    
    /* Darker green for main headline */
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-text p {
    font-size: 1.1em;
    color: #333;
    /* Slightly darker text for readability */
    margin-bottom: 30px;
}

.hero-buttons .btn {
    margin-right: 15px;
}

.hero-stats {
    margin-top: 40px;
    display: flex;
    gap: 30px;
}

.hero-stats div {
    font-size: 0.95em;
    color: #333;
}

.hero-stats strong {
    display: block;
    font-size: 1.8em;
    color: #008a3e;
    font-weight: 700;
}

.hero-visual {
    flex-basis: 40%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-visual img {
    border-radius: 15px;
    display: flex;
    margin: 20px;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0, 138, 62, 0.1);
}

.visual-box {
    background-color: #fff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 138, 62, 0.1);
    text-align: center;
}

.visual-box i.fa-microphone-alt {
    color: #1db954;
    margin-bottom: 20px;
    background-color: #e6f9f0;
    padding: 20px;
    border-radius: 50%;
}

.visual-box h3 {
    font-size: 1.3em;
    color: #1d3557;
}

.visual-box p {
    font-size: 0.9em;
    color: #555;
    margin-bottom: 20px;
}

.visual-box img {
    width: 90%;   
    box-shadow: #495057;
    display: inline-block;
}


.badge-check {
    background-color: #e6f9f0;
    color: #008a3e;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    display: inline-block;
}

.badge-check i {
    margin-right: 5px;
}

/* Open Data Section */
.open-data {
    background-color: #fff;
}

.open-data h2 {
    text-align: center;
    font-size: 2.2em;
    margin-bottom: 15px;
}

.open-data>.container>p {
    /* Direct child p of container in open-data */
    text-align: center;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 40px;
}

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

.card {
    background-color: #f9fbfd;
    padding: 30px;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card i {
    font-size: 2.5em;
    color: #1db954;
    margin-bottom: 15px;
    display: block;
}

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

.card p {
    font-size: 0.9em;
    line-height: 1.6;
}

/* Data Table Info */
.data-table-info {
    background-color: #e6f9f0;
}

.data-table-info h3 {
    font-size: 1.8em;
    text-align: center;
    margin-bottom: 30px;
}

.data-table-info table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    background-color: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

.data-table-info th,
.data-table-info td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
    
}

.data-table-info th {
    background-color: #d4f7e7;
    color: #005f2a;
    font-weight: 600;
}

.data-table-info td {
    font-size: 0.95em;
}

.data-table-info tr:last-child td {
    border-bottom: none;
}

.data-table-info .btn {
    display: block;
    width: fit-content;
    margin: 0 auto;
}



/* HA Standards Section */
.ha-standards {
    background-color: #fff;
}

.ha-standards h2 {
    text-align: center;
    font-size: 2.2em;
    margin-bottom: 15px;
}

.ha-standards>.container>p {
    text-align: center;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 40px;
}

.ha-content {
    display: flex;
    gap: 40px;
}

.ha-levels,
.ha-steps {
    flex: 1;
    background-color: #f9fbfd;
    padding: 30px;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    margin-top: 1em;
}
.ha-steps p{
    font-size: 12px;
}

.ha-levels h4,
.ha-steps h4 {
    font-size: 1.5em;
    margin-bottom: 20px;
    color: #008a3e;
}

.level-item {
    padding: 15px;
    margin-bottom: 15px;
    border-left: 4px solid #ddd;
    transition: all 0.3s ease;
}

.level-item.active,
.level-item:hover {
    border-left-color: #1db954;
    background-color: #e6f9f0;
}

.level-item h5 {
    font-size: 1.1em;
    margin-bottom: 5px;
}

.ha-steps ol {
    list-style: none;
}

.ha-steps li {
    padding: 12px 0 12px 40px;
    border-bottom: 1px dashed #ddd;
    position: relative;
    font-size: 1.05em;
}

.ha-steps ol li :hover {
    background-color: #d4f7e7;
}

.ha-steps li:last-child {
    border-bottom: none;
}

.ha-steps li span {
    position: absolute;
    left: 0;
    top: 10px;
    background-color: #1db954;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9em;
}

/* Featured Hospitals Section */
.featured-hospitals {
    background-color: #e6f9f0;
}

.featured-hospitals h2 {
    text-align: center;
    font-size: 2.2em;
    margin-bottom: 15px;
}

.featured-hospitals>.container>p {
    text-align: center;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 40px;
}

.filter-buttons {
    text-align: center;
    margin-bottom: 40px;
}

.btn-filter {
    background: #fff;
    color: #333;
    border: 1px solid #ccc;
    padding: 10px 20px;
    margin: 0 5px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-filter.active,
.btn-filter:hover {
    background-color: #1db954;
    color: #fff;
    border-color: #1db954;
}

.hospital-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.hospital-card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.07);
    overflow: hidden;
    transition: transform 0.3s ease;
    position: relative;
}

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

.hospital-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.hospital-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: rgba(245, 72, 153, 0.9);
    /* Pink tag */
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8em;
    font-weight: 500;
}

.hospital-rating {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: rgba(255, 193, 7, 0.9);
    /* Yellow for rating */
    color: #fff;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.85em;
    font-weight: 500;
}

.hospital-rating i {
    margin-right: 3px;
}

.hospital-card h3 {
    font-size: 1.3em;
    margin: 15px 20px 5px;
}

.hospital-card p {
    font-size: 0.95em;
    color: #666;
    margin: 0 20px 15px;
}

.hospital-card p i {
    margin-right: 5px;
    color: #1db954;
}

.details-link {
    display: block;
    padding: 15px 20px;
    text-align: center;
    background-color: #f0f8ff;
    color: #1db954;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.details-link:hover {
    background-color: #d4f7e7;
}

.details-link i {
    margin-left: 5px;
}

/* Data Visualization Section */
.data-visualization {
    background-color: #fff;
}

.data-visualization h2 {
    text-align: center;
    font-size: 2.2em;
    margin-bottom: 15px;
}

.data-visualization>.container>p {
    text-align: center;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 40px;
}

.tabs {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #eee;
}

.tab-button {
    background: none;
    border: none;
    padding: 15px 25px;
    font-size: 1.1em;
    font-weight: 500;
    cursor: pointer;
    color: #555;
    position: relative;
    bottom: -2px;
    /* Align with border */
}

.tab-button.active {
    color: #1db954;
    border-bottom: 2px solid #1db954;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.chart-container {
    margin-bottom: 40px;
    padding: 20px;
    background-color: #f9fbfd;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.chart-container h4 {
    text-align: center;
    font-size: 1.2em;
    margin-bottom: 20px;
}

.chart-container img {
    /* Placeholder styling */
    display: block;
    margin: 0 auto;
    border: 1px dashed #ccc;
}

.chart-container table thead{
    color:#008a3e;
    font-size: 16px;
    
}

.charts-row {
    display: flex;
    gap: 30px;
}

.pie-chart-container,
.line-chart-container {
    flex: 1;
}

/* Table   */

table {
    border: 1px solid #ccc;
    border-collapse: collapse;
    margin: 0;
    padding: 0;
    width: 100%;
    table-layout: fixed;
}

table caption {
    font-size: 1.5em;
    margin: .5em 0 .75em;
}

table tr {
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    padding: .35em;
    font-size: 15px;
}

table th,
table td {
    padding: .625em;
    text-align: center;
    font-size: 15px;
    
}

table th {
    font-size: 1em;
    letter-spacing: .1em;
    text-transform: uppercase;
    font-size: 16px;
}

tbody tr:hover {

    background-color: #1db954;
    
}

@media screen and (max-width: 600px) {
    table {
        border: 0;
    }

    table caption {
        font-size: 1.3em;
    }

    table thead {
        border: none;
        clip: rect(0 0 0 0);
        height: 1px;
        margin: -1px;
        overflow: hidden;
        padding: 0;
        position: absolute;
        width: 1px;
        background-color: #34495e;
    }

    table tr {
        border-bottom: 3px solid #ddd;
        display: block;
        margin-bottom: .625em;
    }

    table td {
        border-bottom: 1px solid #ddd;
        display: block;
        font-size: .8em;
        text-align: right;
    }

    table td::before {
        /*
                    * aria-label has no advantage, it won't be read inside a table
                    content: attr(aria-label);
         */
        content: attr(data-label);
        float: left;
        font-weight: bold;
        text-transform: uppercase;
    }

    table td:last-child {
        border-bottom: 0;
    }
}

/* Footer */
footer {
    background-color: #1d3557;
    /* Dark blue footer */
    color: #adb5bd;
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: #fff;
    font-size: 1.2em;
    margin-bottom: 20px;
}

.footer-col p {
    font-size: 0.9em;
    line-height: 1.8;
    color: #ced4da;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li a {
    color: #ced4da;
    font-size: 0.95em;
    display: block;
    padding: 5px 0;
    transition: color 0.3s ease;
}

.footer-col ul li a:hover {
    color: #1db954;
}

.social-icons a {
    color: #ced4da;
    font-size: 1.3em;
    margin-right: 15px;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: #1db954;
}

.newsletter-form {
    display: flex;
    margin-top: 15px;
}

.newsletter-form input[type="email"] {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #495057;
    border-radius: 5px 0 0 5px;
    background-color: #2c3e50;
    color: #fff;
    font-family: 'Sarabun', sans-serif;
}

.newsletter-form .btn-submit {
    background-color: #1db954;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    font-family: 'Sarabun', sans-serif;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #34495e;
    font-size: 0.9em;
}

.footer-bottom p {
    margin-bottom: 5px;
    color: #adb5bd;
}


/* Responsive Design */
@media (max-width: 992px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 2.4em;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-visual {
        margin-top: 40px;
        flex-basis: auto;
        width: 80%;
    }

    .ha-content {
        flex-direction: column;
    }

    .charts-row {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* Hidden by default on mobile */
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 65px;
        /* Adjust based on header height */
        left: 0;
        background-color: #fff;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        padding: 10px 0;
    }

    .nav-links.active {
        display: flex;
        /* Show when active */
    }

    .nav-links li {
        margin: 10px 20px;
        text-align: center;
    }

    .mobile-nav-toggle {
        display: block;
    }

    .hero-text h1 {
        font-size: 2em;
    }

    .hero-stats {
        flex-direction: column;
        gap: 15px;
    }

    .hero-stats strong {
        font-size: 1.5em;
    }

    .cards-grid {
        grid-template-columns: 1fr;
        /* Stack cards on mobile */
    }

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

    

    .footer-grid {
        grid-template-columns: 1fr;
        /* Stack footer columns */
        text-align: center;
    }

    .social-icons,
    .newsletter-form {
        justify-content: center;
    }
}