/* Define Green/White Color Palette as CSS Variables */
:root {
    --main-green-dark: hsl(80, 20%, 25%);    /* Dark Olive Green */
    --main-green-light: hsl(80, 20%, 35%);   /* Lighter Olive Green */
    --accent-green: hsl(80, 40%, 60%);       /* Brighter Olive/Khaki for accents */
    --white: #ffffff;
    --light-gray: #f4f4f4;
    --dark-gray: #333;
    --border-color: hsl(80, 15%, 45%);       /* Border color for dark elements */
    --shadow-color: rgba(0,0,0,0.2);
}

/* General Body Styles */
body {
    font-family: 'Kanit', sans-serif, 'Montserrat'; /* ปรับ Kanit เป็น Font หลัก */
    margin: 0;
    padding: 0;
    background-color: var(--light-gray);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header Section */
.page-header {
    background-color: var(--main-green-dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.full-width-header-img {
    width: 100%;
    height: auto; /* Changed to auto to maintain aspect ratio */
    object-fit: cover;
    display: block;
}

/* News Ticker Section */
.news-ticker-container {
    width: 100%;
    overflow: hidden;
    height: 40px;
    display: flex;
    align-items: center;
    background-color: rgba(0,0,0,0.3);
    padding: 0 20px;
    box-sizing: border-box;
}

.news-ticker-wrapper {
    display: inline-block;
    animation: ticker-slide 25s linear infinite;
    padding-left: 100%;
    white-space: nowrap;
}

.news-item {
    display: inline-block;
    color: var(--light-gray);
    text-decoration: none;
    padding-right: 50px;
    font-size: 1.1em;
    transition: color 0.3s ease;
}

.news-item:hover {
    color: var(--accent-green);
}

.news-ticker-container:hover .news-ticker-wrapper {
    animation-play-state: paused;
}

@keyframes ticker-slide {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* Header ITA Menu Section */
.header-ita-menu {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    width: 100%;
    padding: 10px 20px;
    box-sizing: border-box;
    background-color: var(--main-green-dark);
}

.header-ita-menu a {
    color: var(--white);
    text-decoration: none;
    font-weight: bold;
    padding: 5px 10px;
    border: 1px solid var(--accent-green);
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.header-ita-menu a:hover {
    background-color: var(--accent-green);
    color: var(--main-green-dark);
}

/* Main Layout */
.main-layout {
    display: flex;
    flex-grow: 1;
    justify-content: center;
    padding: 20px 0;
    gap: 20px;
}

/* Sidebar Base Styling */
.sidebar-base {
    width: 280px;
    background-color: var(--main-green-light);
    padding: 15px 0;
    border-radius: 8px;
    flex-shrink: 0;
    box-shadow: 0 2px 5px var(--shadow-color);
    overflow-y: auto;
}

.sidebar {
    margin-left: 20px;
}

.right-sidebar {
    margin-right: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.director-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 10px 10px;
    color: var(--light-gray);
}

.director-photo {
    width: 180px;
    height: 160px;
    border-radius: 100%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 3px solid var(--light-gray);
    box-shadow: 0 0 8px var(--shadow-color);
}

.director-profile h3 {
    margin: 10px 0 5px;
    color: var(--white);
    font-size: 1.2em;
}

.director-profile p {
    margin: 0 0 15px;
    color: var(--light-gray);
    font-size: 0.9em;
}

/* Sidebar Menu */
.sidebar-menu h3 {
    color: var(--white);
    padding: 10px 20px 5px;
    margin: 15px 0 5px;
    border-bottom: 1px solid var(--border-color);
    font-size: 1.1em;
    text-transform: uppercase;
}

.sidebar-menu ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
}

.sidebar-menu li {
    width: 100%;
    margin-bottom: 3px;
}

.sidebar-menu li a {
    display: block;
    color: var(--white);
    padding: 8px 20px;
    text-decoration: none;
    white-space: normal;
    text-align: left;
    transition: background-color 0.3s ease;
}

.sidebar-menu li a:hover {
    background-color: var(--main-green-dark);
}

/* Main Content Area */
.content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 1000px;
    width: 100%;
}

.content-section {
    background-color: var(--white);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px var(--shadow-color);
    min-height: 250px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    font-size: 1.2em;
    color: var(--dark-gray);
    text-align: left;
}

.content-section h3 {
    margin-top: 0;
    color: var(--main-green-dark);
}

/* Specific style for Facebook embed */
.fb-page {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    display: block;
}

.fb-page iframe {
    width: 100%;
}

/* Footer Section */
.page-footer {
    background-color: var(--main-green-dark);
    color: var(--light-gray);
    padding: 20px;
    text-align: center;
    font-size: 0.9em;
    margin-top: 20px;
}

.page-footer p {
    margin: 5px 0;
}

.page-footer a {
    color: var(--accent-green);
    text-decoration: none;
}

.page-footer a:hover {
    text-decoration: underline;
}

/* ======================================= */
/* จัดสไตล์สำหรับกล่องแสดงความคิดเห็น (เพิ่มใหม่) */
/* ======================================= */
.comment-box {
    width: 100%;
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    background-color: #f9f9f9;
    font-family: Arial, sans-serif;
}

.comment-box h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 24px;
}

.comment-box textarea {
    width: 100%;
    height: 100px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 15px;
    resize: vertical;
    font-size: 16px;
}

.comment-box button {
    width: 100%;
    padding: 12px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.comment-box button:hover {
    background-color: #0056b3;
}