/* === CSS Reset & Variables === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #059669;
    --secondary: #047857;
    --accent: #10b981;
    --light-green: #d1fae5;
    --lighter-green: #f0fdf4;
    --text: #1f2937;
    --text-gray: #6b7280;
    --white: #ffffff;
    --border: #e5e7eb;
    --shadow-sm: 0 2px 8px rgba(5, 150, 105, 0.08);
    --shadow-md: 0 4px 12px rgba(5, 150, 105, 0.12);
    --shadow-lg: 0 8px 24px rgba(5, 150, 105, 0.15);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', 'Sarabun', Tahoma, sans-serif;
    line-height: 1.7;
    color: var(--text);
    background: var(--lighter-green);
}

/* === Navbar === */
.navbar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    padding: 15px 0;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid var(--accent);
}

.navbar-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    font-weight: 700;
    color: var(--white);
    text-decoration: none;
    transition: transform 0.3s ease;
}

.navbar-brand:hover {
    transform: translateY(-2px);
}

.navbar-logo-img {
    height: 48px;
    width: auto;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.15);
    padding: 6px;
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    align-items: center;
}

.nav-menu a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-menu a:hover {
    background: rgba(255, 255, 255, 0.15);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 2px;
    background: var(--accent);
    transition: transform 0.3s ease;
}

.nav-menu a:hover::after {
    transform: translateX(-50%) scaleX(1);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.hamburger span {
    width: 26px;
    height: 3px;
    background: var(--white);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* === Container === */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* === Banner Section === */
.banner-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    padding: 0;
    overflow: hidden;
    width: 100%;
    position: relative;
    border-bottom: 4px solid var(--accent);
    box-shadow: 0 4px 20px rgba(5, 150, 105, 0.2);
}

.banner-slider-wrapper {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
}

.banner-track {
    display: inline-block;
    animation: marquee 30s linear infinite;
}

.banner-track:hover {
    animation-play-state: paused;
}

.banner-item {
    display: inline-block;
    height: 300px;
    width: auto;
    max-width: 100vw;
    object-fit: cover;
    vertical-align: top;
    filter: brightness(0.95);
    transition: filter 0.3s ease;
}

.banner-item:hover {
    filter: brightness(1);
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* === Main Content Layout === */
.main-content-wrapper {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 40px;
    padding: 50px 0;
    align-items: start;
}

.section-header {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text);
    border-left: 5px solid var(--primary);
    padding: 12px 0 12px 20px;
    background: var(--white);
    border-radius: 0 12px 12px 0;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* === Sidebar Left === */
.sidebar-left {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.director-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: all 0.4s ease;
    border: 2px solid var(--light-green);
}

.director-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.director-card img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-bottom: 3px solid var(--primary);
}

.director-info {
    padding: 20px;
    background: linear-gradient(to bottom, var(--white) 0%, var(--lighter-green) 100%);
}

.director-info h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
}

.director-info p {
    color: var(--primary);
    font-size: 14px;
    font-weight: 600;
}

.sidebar-left a {
    display: block;
    text-align: center;
    margin-top: 16px;
    padding: 14px 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.sidebar-left a:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* === Main Right (PR Section) === */
.main-right {
    display: flex;
    flex-direction: column;
}

.pr-list-large {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.pr-card-large {
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    border: 2px solid var(--light-green);
}

.pr-card-large:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.pr-date-badge {
    position: absolute;
    top: 16px;
    right: 0;
    background: var(--secondary);
    color: var(--white);
    padding: 8px 18px 8px 12px;
    font-weight: 700;
    font-size: 13px;
    border-radius: 6px 0 0 6px;
    box-shadow: -3px 3px 8px rgba(0, 0, 0, 0.15);
    z-index: 2;
}

.pr-image-wrapper-large {
    width: 100%;
    aspect-ratio: 210 / 297;
    /* สัดส่วน A4 */
    overflow: hidden;
    border-bottom: 1px solid #eee;
    background: #f9f9f9;
    position: relative;
}

.pr-image-wrapper-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* หรือ contain หากต้องการให้เห็นทั้งภาพโดยไม่ตัด */
    transition: transform 0.5s ease;
}

.pr-card-large:hover .pr-image-wrapper-large img {
    transform: scale(1.05);
}

.pr-content-large {
    padding: 20px;
    background: var(--white);
    flex-grow: 1;
}

.pr-title-large {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pr-content-large>div:last-child {
    font-size: 13px;
    color: var(--text-gray);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* === Announcements Section === */
.announcements-section {
    padding: 70px 0;
    background: var(--white);
    margin-top: 60px;
    border-top: 3px solid var(--accent);
}

.section-title-orange {
    text-align: center;
    margin-bottom: 50px;
    color: var(--primary);
    font-size: 32px;
    font-weight: 800;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
    letter-spacing: 1px;
}

.section-title-orange i {
    margin-right: 12px;
    color: var(--accent);
}

.section-title-orange::after {
    content: '';
    display: block;
    width: 80px;
    height: 5px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    margin: 15px auto 0;
    border-radius: 3px;
}

/* === Tabs === */
.tabs-wrapper {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 14px 28px;
    background: var(--white);
    border: 2px solid var(--light-green);
    border-radius: 50px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-gray);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    color: var(--primary);
    border-color: var(--accent);
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    border-color: transparent;
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.3);
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === List Items === */
.list-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.list-item {
    display: flex;
    align-items: center;
    background: var(--white);
    padding: 20px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    border: 2px solid var(--light-green);
    transition: all 0.3s ease;
}

.list-item:hover {
    transform: translateX(8px);
    border-left: 6px solid var(--primary);
    box-shadow: var(--shadow-md);
}

.list-date {
    background: linear-gradient(135deg, var(--lighter-green) 0%, var(--light-green) 100%);
    color: var(--primary);
    padding: 12px;
    border-radius: 12px;
    text-align: center;
    min-width: 75px;
    margin-right: 24px;
    border: 2px solid var(--accent);
}

.list-date .day {
    display: block;
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
    color: var(--secondary);
}

.list-date .month {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 600;
    margin-top: 4px;
}

.list-info {
    flex-grow: 1;
}

.list-title {
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    font-size: 17px;
    display: block;
    margin-bottom: 8px;
    transition: color 0.3s ease;
    line-height: 1.5;
}

.list-title:hover {
    color: var(--primary);
}

.list-meta {
    font-size: 13px;
    color: var(--text-gray);
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.has-file {
    color: var(--accent);
    font-weight: 600;
}

.btn-read {
    text-decoration: none;
    color: var(--text-gray);
    font-size: 14px;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 25px;
    background: var(--lighter-green);
    transition: all 0.3s ease;
    white-space: nowrap;
    border: 2px solid var(--light-green);
}

.btn-read:hover {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    border-color: transparent;
}

.empty-state {
    text-align: center;
    padding: 60px 30px;
    color: var(--text-gray);
    background: var(--lighter-green);
    border-radius: 16px;
    border: 3px dashed var(--light-green);
    font-size: 16px;
}

/* === Footer === */
footer {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    color: #e5e7eb;
    padding: 50px 20px 25px;
    border-top: 4px solid var(--primary);
}

.footer-content {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    margin-bottom: 20px;
    color: var(--accent);
    font-size: 18px;
    font-weight: 700;
}

.footer-section p {
    line-height: 1.8;
    color: #d1d5db;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: #d1d5db;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
    display: inline-block;
}

.footer-section a:hover {
    color: var(--accent);
    transform: translateX(5px);
}

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 25px;
    text-align: center;
    color: #9ca3af;
    font-size: 14px;
}

/* === Responsive Design === */
@media (max-width: 992px) {
    .main-content-wrapper {
        grid-template-columns: 1fr;
    }

    .sidebar-left {
        order: 2;
    }

    .main-right {
        order: 1;
    }

    .director-card {
        max-width: 450px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--secondary);
        flex-direction: column;
        gap: 0;
        padding: 20px;
        width: 100%;
        box-shadow: var(--shadow-lg);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu a {
        width: 100%;
        text-align: center;
        padding: 12px;
    }

    .banner-item {
        height: 280px;
    }

    .section-title-orange {
        font-size: 24px;
    }

    .pr-list-large {
        grid-template-columns: 1fr;
    }

    .tabs-wrapper {
        gap: 8px;
    }

    .tab-btn {
        padding: 10px 18px;
        font-size: 14px;
    }
}

@media (max-width: 600px) {
    .list-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .list-date {
        margin-bottom: 12px;
        display: flex;
        gap: 12px;
        align-items: center;
        width: 100%;
        justify-content: center;
    }

    .list-date .day,
    .list-date .month {
        display: inline;
    }

    .btn-read {
        width: 100%;
        text-align: center;
        margin-top: 12px;
    }

    .container {
        padding: 0 16px;
    }
}