@import url('https://fonts.googleapis.com/css2?family=Bai+Jamjuree:ital,wght@0,200;0,300;0,400;0,500;0,600;0,700;1,200;1,300;1,400;1,500;1,600;1,700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Kanit:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Kanit", sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
}

@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* Header Styles */
.gov-header {
    background-color: #1a5276;
    color: white;
    padding: 0.5rem 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 50px;
    margin-right: 1rem;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-text h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.logo-text span {
    font-size: 0.9rem;
    opacity: 0.8;
}

.header-nav {
    display: flex;
    align-items: center;
}

.header-nav a {
    color: white;
    text-decoration: none;
    margin-left: 1.5rem;
    font-size: 0.95rem;
    transition: opacity 0.3s;
}

.header-nav a:hover {
    opacity: 0.8;
}

.login-btn {
    background-color: #f39c12;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: 500;
}

/* Main Navigation */
.main-nav {
    background-color: #2980b9;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

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

.main-nav li {
    position: relative;
}

.main-nav a {
    color: white;
    text-decoration: none;
    display: block;
    padding: 1rem;
    font-size: 0.95rem;
    transition: background-color 0.3s;
}

.main-nav a:hover {
    background-color: #3498db;
}

.main-nav .active {
    background-color: #3498db;
    font-weight: 500;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('/images/background.avif') center/cover;
    color: white;
    padding: 4rem 1rem;
    text-align: center;
}

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

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 2rem;
}

.search-box {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
}

.search-box button {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    background-color: #f39c12;
    color: white;
    border: none;
    padding: 0 1.5rem;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

/* Data Categories */
.categories {
    padding: 3rem 1rem;
    background-color: white;
}

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

.section-title {
    text-align: center;
    margin-bottom: 2rem;
}

.section-title h2 {
    font-size: 2rem;
    color: #1a5276;
    margin-bottom: 0.5rem;
}

.section-title p {
    color: #666;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background-color: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.card-img {
    height: 150px;
    background-color: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a5276;
    font-size: 3rem;
}

.card-body {
    padding: 1.5rem;
}

.card-body h3 {
    margin-bottom: 0.5rem;
    color: #1a5276;
}

.card-body p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.card-link {
    display: inline-block;
    color: #2980b9;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
}

.card-link i {
    margin-left: 0.3rem;
}

/* Featured Datasets */
.featured {
    padding: 3rem 1rem;
    background-color: #f8f9fa;
}

.dataset-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.dataset-table th,
.dataset-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
    white-space: nowrap;
}

.dataset-table th {
    background-color: #1a5276;
    color: white;
    font-weight: 500;
}

.dataset-table tr:hover {
    background-color: #f5f5f5;
}

.download-btn {
    background-color: #27ae60;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 5px;
}

/* Footer */
.gov-footer {
    background-color: #2c3e50;
    color: white;
    padding: 3rem 1rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-col h3 {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

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

.footer-col li {
    margin-bottom: 0.8rem;
}

.footer-col a {
    color: #ecf0f1;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-col a:hover {
    color: #f39c12;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    color: white;
    font-size: 1.2rem;
}

.copyright {
    text-align: center;
    padding: 1.5rem;
    background-color: #1a252f;
    color: #bdc3c7;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        text-align: center;
    }

    .header-nav {
        margin-top: 1rem;
    }

    .header-nav a {
        margin: 0 0.5rem;
    }

    .main-nav ul {
        flex-wrap: wrap;
    }

    .main-nav li {
        width: 50%;
        text-align: center;
    }

    .hero h2 {
        font-size: 2rem;
    }
}

.search-box>* {
    font-family: "Kanit", sans-serif;
}

button {
    font-family: inherit;
}
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch; /* สำหรับ iOS เลื่อนนุ่มนวล */
}

/* เพิ่มในส่วน style */
.search-results {
  padding: 2rem 1rem;
  background-color: white;
  border-top: 1px solid #eee;
}

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

.result-card {
  background-color: white;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
  padding: 1.5rem;
  border-left: 4px solid #2980b9;
}

.result-card h4 {
  color: #1a5276;
  margin-bottom: 0.5rem;
}

.result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.result-meta span {
  background-color: #f5f5f5;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  font-size: 0.8rem;
  color: #555;
}

.result-actions {
  margin-top: 1rem;
}

.download-link {
  display: inline-block;
  background-color: #27ae60;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.9rem;
}

.download-link i {
  margin-right: 0.3rem;
}

.pagination {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
  gap: 0.5rem;
}

.page-btn {
  padding: 0.5rem 1rem;
  border: 1px solid #ddd;
  background-color: white;
  cursor: pointer;
  border-radius: 4px;
}

.page-btn.active {
  background-color: #2980b9;
  color: white;
  border-color: #2980b9;
}

        /* เพิ่มสไตล์เฉพาะสำหรับหน้านี้ */
        .projects-container {
            padding: 2rem 0;
        }
        
        .project-card {
            background: white;
            border-radius: 8px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            margin-bottom: 1.5rem;
            overflow: hidden;
            transition: transform 0.3s ease;
        }
        
        .project-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        }
        
        .project-header {
            background-color: #1a5276;
            color: white;
            padding: 1rem;
        }
        
        .project-header h3 {
            margin: 0;
            font-size: 1.2rem;
        }
        
        .project-body {
            padding: 1.5rem;
        }
        
        .project-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 1rem;
            margin-bottom: 1rem;
        }
        
        .meta-item {
            flex: 1 1 200px;
        }
        
        .meta-label {
            font-weight: 500;
            color: #666;
            margin-bottom: 0.3rem;
            font-size: 0.9rem;
        }
        
        .meta-value {
            color: #333;
        }
        
        .pagination {
            display: flex;
            justify-content: center;
            margin-top: 2rem;
            gap: 0.5rem;
        }
        
        .page-btn {
            padding: 0.5rem 1rem;
            border: 1px solid #ddd;
            background-color: white;
            cursor: pointer;
            border-radius: 4px;
        }
        
        .page-btn.active {
            background-color: #1a5276;
            color: white;
            border-color: #1a5276;
        }
        
        .search-filter {
            display: flex;
            gap: 1rem;
            margin-top: 2rem;
            margin-bottom: 2rem;
        }
        
        #searchInput {
            flex: 1;
            padding: 0.75rem;
            border: 1px solid #ddd;
            border-radius: 4px;
            font-family: inherit;
        }
        
        #searchButton {
            background-color: #1a5276;
            color: white;
            border: none;
            padding: 0 1.5rem;
            border-radius: 4px;
            cursor: pointer;
        }
        
        .results-count {
            margin-bottom: 1.5rem;
            color: #555;
            font-style: italic;
        }

.projects-container h1 {
    color: #f39c12;
}

select, button, input {
    font-family: inherit;
}
