/* --- Cài đặt chung & Font chữ --- */
body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    color: #333;
    background-color: #f9f9f9;
}

/* === Header (統一済み) === */
.sticky-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: #2e7d32;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}


.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.logo {
    font-size: 1.5em;
    font-weight: bold;
    color: white;
    text-decoration: none; 
}

.nav-links a {
    color: rgba(255, 255, 255, 0.468);
    text-decoration: none;
    margin-left: 20px;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.nav-links a:hover {
    background-color: #2e7d32;
    color: #fff;
}

/* --- Banner chính --- */
.hero-banner {
    height: 60vh;
    background: url("../img/hakkathon3.jpg") no-repeat center center/cover;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
}

.hero-banner p {
    font-size: 2.5em;
    font-weight: bold;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
    max-width: 600px;
}


/* Language switch */
.lang-switch {
  text-align: center;
  margin-bottom: 20px;
}

.lang-switch button {
  margin: 5px;
  padding: 8px 14px;
  font-size: 0.95rem;
  border: none;
  border-radius: 6px;
  background-color: #c8e6c9;
  color: #2e7d32;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.lang-switch button:hover {
  background-color: #a5d6a7;
}
/* --- Bố cục chính --- */
.layout {
    display: flex;
    gap: 30px;
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px 5px 5px 20px;
}

.main-content {
    flex: 3; /* Chiếm 3/4 không gian */
    padding: auto;
}

.sidebar {
    flex: 1; /* Chiếm 1/4 không gian */
    background-color: #f8fbf8; /* Mới: Thêm màu nền xanh lá cây rất nhạt */
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    
    /* --- Các thuộc tính mới để làm sidebar cố định --- */
    position: sticky; /* Giúp sidebar "dính" lại khi cuộn */
    top: 80px; /* Vị trí sidebar sẽ dừng lại, cách đỉnh 80px */
    height: fit-content; /* Đảm bảo chiều cao vừa đủ với nội dung */
}
/* --- Kiểu dáng các Section --- */
section {
    background-color: #ffffff;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

h2 {
    font-size: 2em;
    color: #2c5e3A;
    border-bottom: 2px solid #e0e0e0;
    padding: 0px 20px 10px 20px;
    margin-bottom: 20px;
}

h3 {
    font-size: 1.5em;
    color: #333;
    margin-top: 20px;
    padding: 20px;
}
p {
    padding: 20px;
}

section img {
    max-width: 60%; /* Mới: Giảm kích thước ảnh */
    width: auto; /* Đảm bảo chiều rộng tự động theo max-width */
    height: auto;
    border-radius: 8px;
    margin-top: 15px;
    display: block; /* Để có thể dùng margin auto để căn giữa */
    margin-left: auto; /* Căn giữa */
    margin-right: auto; /* Căn giữa */
}

/* --- Container thẻ 4 mùa --- */
.card-container {
    display: flex;
    gap: 20px;
    justify-content: space-between;
    margin-top: 20px;
}

.card {
    flex: 1;
    text-align: center;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card img {
    max-width: 70%; /* Mới: Ảnh chiếm khoảng 70% chiều rộng của card */
    width: auto; /* Đảm bảo chiều rộng tự động theo max-width */
    height: 150px; /* Giảm chiều cao để phù hợp với chiều rộng nhỏ hơn */
    object-fit: cover;
    margin: 0 auto; /* Căn giữa ảnh trong card */
    border-radius: 0;
    display: block; /* Để có thể dùng margin auto để căn giữa */
}

.card h3 {
    margin: 15px 0;
}

/* --- Bảng thông tin --- */
.table-wrap {
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
}

th, td {
    padding: 12px;
    border: 1px solid #ddd;
}

thead {
    background-color: #2c5e3A;
    color: white;
}

tbody tr:nth-of-type(even) {
    background-color: #f2f2f2;
}

.note {
    font-style: italic;
    color: #666;
    margin-top: 10px;
    font-size: 0.9em;
}

.chip {
    background-color: #e7f3e7;
    color: #2c5e3A;
    padding: 5px 12px;
    border-radius: 16px;
    font-weight: bold;
    display: inline-block;
}

/* --- Sidebar --- */
.sidebar p {
    font-size: 0.95em;
    margin-bottom: 20px;
}

.sidebar a {
    display: block;
    background-color: #2c5e3A;
    color: white;
    padding: 12px;
    text-align: center;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 10px;
    transition: background-color 0.3s ease;
}

.sidebar a:hover {
    background-color: #2e7d32;
}

/* --- Responsive cho thiết bị di động --- */
@media (max-width: 800px) {
    .layout {
        flex-direction: column;
    }
    .nav-container {
        flex-direction: column;
        height: auto;
        padding: 10px;
    }
    .nav-links {
        margin-top: 10px;
    }
    .nav-links a {
        margin: 0 5px;
    }
    .hero-banner p {
        font-size: 1.8em;
    }
    .card-container {
        flex-direction: column;
    }
    .card img {
        height: 250px;
    }
}
/* === Footer (統一済み) === */
footer {
  background-color: #2e7d32;
  color: #fff;
  text-align: center;
  padding: 25px 10px;
  font-size: 0.95rem;
}

footer a {
  color: #fff;
  text-decoration: none;
  margin: 0 10px;
  transition: color 0.3s ease;
}

footer a:hover {
  color: #c8e6c9;
}
