/* 
* style.css - สไตล์ชีทหลักสำหรับเว็บไซต์โรงเรียนเทพปัญญา
* เวอร์ชัน: 1.0
* พาร์ท 1/3
*/

/* ====================== รีเซ็ต CSS ====================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Prompt', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
}

ul,
ol {
    list-style: none;
}

button,
input,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
    outline: none;
    border: none;
}

button {
    cursor: pointer;
    background: none;
}

/* ====================== คลาสยูทิลิตี้ ====================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.grid-layout {
    display: grid;
    gap: 20px;
}

.grid-layout.two-columns {
    grid-template-columns: 1fr 1fr;
}

/* ====================== ส่วนบนของเว็บไซต์ ====================== */
header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* แถบด้านบนสุด */
.top-bar {
    padding: 8px 0;
    font-size: 14px;
    background-color: var(--primary-color);
    color: #fff;
}

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

.contact-info span {
    margin-right: 15px;
}

.contact-info i {
    margin-right: 5px;
}

.social-icons a {
    display: inline-block;
    margin-left: 10px;
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-3px);
}

.accessibility {
    display: flex;
    align-items: center;
}

.font-size-btn,
.color-mode-btn {
    margin-left: 5px;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.font-size-btn:hover,
.color-mode-btn:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

/* โลโก้และชื่อโรงเรียน */
.logo-section {
    padding: 20px 0;
}

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

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

.logo {
    width: 80px;
    height: auto;
    margin-right: 15px;
}

.site-title h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
}

.site-title h2 {
    font-size: 16px;
    font-weight: 400;
    color: #666;
}

.search-container {
    position: relative;
}

.search-form {
    display: flex;
    align-items: center;
}

.search-form input {
    width: 250px;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 30px;
    transition: all 0.3s ease;
}

.search-form input:focus {
    width: 300px;
    border-color: var(--primary-color);
}

.search-form button {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    font-size: 16px;
    background: none;
    border: none;
}

/* แถบแสดงเมนูปัจจุบัน (Breadcrumb) */
.breadcrumb-container {
    background-color: #f5f5f5;
    padding: 10px 0;
    font-size: 14px;
    border-bottom: 1px solid #e0e0e0;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item:not(:last-child)::after {
    content: '\f054';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 10px;
    margin: 0 10px;
    color: #aaa;
}

.breadcrumb-item a {
    color: #555;
    transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
    color: var(--primary-color);
}

.breadcrumb-item.active a {
    color: var(--primary-color);
    font-weight: 600;
}

/* ตัวเลือกธีม */
.theme-selector {
    padding: 10px 0;
    background-color: #f0f0f0;
    border-bottom: 1px solid #ddd;
}

.theme-options {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.theme-btn {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.theme-btn:hover {
    border-color: var(--primary-color);
}

.theme-btn.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

.color-sample {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    margin-right: 5px;
}

/* ====================== เนื้อหาหลัก ====================== */

/* สไลด์โชว์หลัก */
.hero-slider {
    position: relative;
    height: 450px;
    overflow: hidden;
}

.slider-container {
    position: relative;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease;
}

.slide.active {
    opacity: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-caption {
    position: absolute;
    bottom: 50px;
    left: 50px;
    max-width: 600px;
}

.thai-frame {
    position: relative;
    padding: 30px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.thai-motif {
    position: absolute;
    width: 30px;
    height: 30px;
    background-size: contain;
    background-repeat: no-repeat;
}

.thai-motif-top-left {
    top: 5px;
    left: 5px;
    background-image: url('../images/thai-motif-tl.png');
}

.thai-motif-top-right {
    top: 5px;
    right: 5px;
    background-image: url('../images/thai-motif-tr.png');
}

.thai-motif-bottom-left {
    bottom: 5px;
    left: 5px;
    background-image: url('../images/thai-motif-bl.png');
}

.thai-motif-bottom-right {
    bottom: 5px;
    right: 5px;
    background-image: url('../images/thai-motif-br.png');
}

.slide-caption h2 {
    font-size: 32px;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.slide-caption p {
    font-size: 18px;
    color: #333;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background-color: rgba(0, 0, 0, 0.3);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    z-index: 10;
    transition: all 0.3s ease;
}

.slider-btn:hover {
    background-color: var(--primary-color);
}

.slider-btn.prev {
    left: 20px;
}

.slider-btn.next {
    right: 20px;
}

.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.dot {
    width: 12px;
    height: 12px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background-color: #fff;
}

/* ข่าวด่วนและลิงก์ด่วน */
.announcement-section {
    padding: 40px 0;
}

.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 24px;
    color: var(--primary-color);
}

.section-header i {
    margin-right: 10px;
}

.highlight-news,
.quick-links {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    height: 100%;
}

.news-marquee {
    overflow: hidden;
    position: relative;
    height: 150px;
}

.marquee-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    animation: marquee 15s linear infinite;
}

@keyframes marquee {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-50%);
    }
}

.marquee-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
}

.marquee-item:hover {
    background-color: #f9f9f9;
}

.marquee-item .date {
    min-width: 100px;
    font-weight: 600;
    color: var(--primary-color);
}

.quick-link-icons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.quick-link-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.quick-link-item:hover {
    background-color: var(--primary-color);
    color: #fff;
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.quick-link-item i {
    font-size: 24px;
    margin-bottom: 10px;
}

/* 
* style.css - สไตล์ชีทหลักสำหรับเว็บไซต์โรงเรียนเทพปัญญา
* เวอร์ชัน: 1.0
* พาร์ท 2/3
*/

/* ส่วนวิสัยทัศน์และพันธกิจ */
.vision-section {
    padding: 60px 0;
    background-color: #fff;
}

.section-header-center {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.section-header-center h2 {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-header-center h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
}

.section-header-center p {
    max-width: 700px;
    margin: 0 auto;
    color: #666;
}

.vision-mission-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.vision-box,
.mission-box {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.vision-box:hover,
.mission-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.vision-header,
.mission-header {
    padding: 20px;
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
}

.vision-header i,
.mission-header i {
    font-size: 36px;
    color: #fff;
    margin-right: 15px;
}

.vision-header h3,
.mission-header h3 {
    color: #fff;
    font-size: 24px;
    margin: 0;
}

.vision-content,
.mission-content {
    padding: 25px;
}

.vision-content p,
.mission-content p {
    color: #555;
    line-height: 1.8;
    margin-bottom: 20px;
}

.mission-list {
    padding-left: 20px;
}

.mission-list li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 25px;
}

.mission-list li::before {
    content: '\f138';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 2px;
    color: var(--primary-color);
}

/* ส่วนสถิติและตัวเลข */
.stats-section {
    position: relative;
    padding: 60px 0;
    color: #fff;
}

.parallax-bg {
    background-image: url('../images/stats-bg.jpg');
    background-position: center;
    background-size: cover;
    background-attachment: fixed;
    position: relative;
}

.parallax-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 102, 204, 0.8);
}

.stats-container {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.stat-item {
    text-align: center;
    padding: 20px;
}

.stat-icon {
    font-size: 40px;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.9);
}

.stat-number {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 10px;
}

.stat-text {
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* ส่วนหลักสูตรเด่น */
.programs-section {
    padding: 60px 0;
    background-color: #f9f9f9;
}

.programs-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.program-box {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 30px 20px;
    transition: all 0.3s ease;
}

.program-box:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    background-color: var(--primary-color);
}

.program-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #f0f0f0;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.program-box:hover .program-icon {
    background-color: #fff;
}

.program-icon i {
    font-size: 32px;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.program-box:hover .program-icon i {
    color: var(--primary-color);
}

.program-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
    transition: all 0.3s ease;
}

.program-box:hover .program-title {
    color: #fff;
}

.program-desc {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.program-box:hover .program-desc {
    color: rgba(255, 255, 255, 0.8);
}

.program-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 20px;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.program-btn i {
    margin-left: 5px;
}

.program-box:hover .program-btn {
    background-color: #fff;
    color: var(--primary-color);
}

/* ส่วนพื้นที่และสิ่งอำนวยความสะดวก */
.facilities-section {
    padding: 60px 0;
    background-color: #fff;
}

.facilities-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.facility-card {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

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

.facility-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.facility-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.facility-card:hover .facility-image img {
    transform: scale(1.1);
}

.facility-category {
    position: absolute;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    color: #fff;
    padding: 6px 15px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 0 5px 0 0;
}

.facility-body {
    padding: 20px;
}

.facility-title {
    font-size: 18px;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
}

.facility-desc {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
}

.facility-link {
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 14px;
}

.facility-link i {
    margin-left: 5px;
    transition: transform 0.2s ease;
}

.facility-link:hover i {
    transform: translateX(3px);
}

/* ส่วนคั่นด้วยภาพพื้นหลัง */
.parallax-section {
    position: relative;
    height: 350px;
    background-image: url('../images/parallax-bg.jpg');
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 40px 0;
    padding: 0 20px;
}

.parallax-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
}

.parallax-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    text-align: center;
}

.featured-content h2 {
    font-size: 36px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.featured-content p {
    font-size: 18px;
    margin-bottom: 20px;
}

.btn-primary {
    display: inline-block;
    padding: 12px 25px;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.btn-primary i {
    margin-right: 8px;
}

/* ส่วนข่าวสารล่าสุด */
.news-section {
    padding: 60px 0;
    background-color: #f9f9f9;
}

.section-header.with-decoration {
    justify-content: center;
    position: relative;
    margin-bottom: 30px;
}

.section-header .decoration {
    height: 1px;
    background-color: #ddd;
    flex-grow: 1;
}

.section-header .decoration.left {
    margin-right: 20px;
}

.section-header .decoration.right {
    margin-left: 20px;
}

.section-header .view-all {
    position: absolute;
    right: 0;
    color: var(--primary-color);
    font-size: 14px;
}

.view-all i {
    margin-left: 5px;
}

.tabs-container {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.tabs {
    display: flex;
    background-color: #f0f0f0;
    border-bottom: 1px solid #ddd;
}

.tab-btn {
    padding: 15px 20px;
    font-weight: 600;
    color: #666;
    transition: all 0.3s ease;
    flex-grow: 1;
    text-align: center;
}

.tab-btn:hover {
    color: var(--primary-color);
}

.tab-btn.active {
    background-color: #fff;
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
}

.tab-content {
    padding: 20px;
}

.tab-pane {
    display: none;
}

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

.news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.news-card {
    background-color: #fff;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

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

.news-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.news-card:hover .news-image img {
    transform: scale(1.05);
}

.news-date {
    position: absolute;
    top: 10px;
    left: 10px;
    display: inline-block;
    padding: 5px 10px;
    background-color: var(--primary-color);
    color: #fff;
    font-size: 12px;
    border-radius: 3px;
}

.news-body {
    padding: 20px;
}

.news-body h3 {
    font-size: 18px;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
}

.news-body p {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #888;
    font-size: 14px;
}

.views i {
    margin-right: 5px;
}

.read-more {
    color: var(--primary-color);
    font-weight: 600;
}

.read-more i {
    margin-left: 5px;
    transition: all 0.3s ease;
}

.read-more:hover i {
    transform: translateX(5px);
}

.view-more-container {
    text-align: center;
    margin-top: 30px;
}

.btn-view-more {
    display: inline-block;
    padding: 10px 20px;
    background-color: #f0f0f0;
    color: var(--primary-color);
    font-weight: 600;
    border-radius: 30px;
    transition: all 0.3s ease;
}

.btn-view-more:hover {
    background-color: var(--primary-color);
    color: #fff;
}

.btn-view-more i {
    margin-left: 5px;
}

/* ภาพกิจกรรมล่าสุด */
.gallery-section {
    padding: 60px 0;
    background-color: #fff;
}

.gallery-container {
    position: relative;
    overflow: hidden;
}

.gallery-items {
    display: flex;
    gap: 20px;
    transition: all 0.3s ease;
}

.gallery-item {
    flex: 0 0 calc(25% - 15px);
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    height: 250px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 102, 204, 0.8);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    text-align: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay h3 {
    font-size: 18px;
    margin-bottom: 5px;
}

.gallery-overlay p {
    font-size: 14px;
    margin-bottom: 15px;
    opacity: 0.8;
}

.btn-view {
    display: inline-block;
    padding: 8px 15px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    transition: all 0.3s ease;
}

.btn-view:hover {
    background-color: #fff;
    color: var(--primary-color);
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.3);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    z-index: 10;
    transition: all 0.3s ease;
}

.gallery-nav:hover {
    background-color: var(--primary-color);
}

.gallery-nav.prev {
    left: 10px;
}

.gallery-nav.next {
    right: 10px;
}

/* 
* style.css - สไตล์ชีทหลักสำหรับเว็บไซต์โรงเรียนเทพปัญญา
* เวอร์ชัน: 1.0
* พาร์ท 3/3
*/

/* ส่วน FAQ */
.faq-section {
    padding: 60px 0;
    background-color: #f9f9f9;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background-color: #fff;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.faq-question {
    padding: 18px 20px;
    background-color: #f9f9f9;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.faq-question h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: #333;
}

.faq-question i {
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question {
    background-color: var(--primary-color);
}

.faq-item.active .faq-question h3 {
    color: #fff;
}

.faq-item.active .faq-question i {
    color: #fff;
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item.active .faq-answer {
    padding: 20px;
    max-height: 500px;
}

.faq-answer p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

/* ส่วนลิงค์หน่วยงานที่เกี่ยวข้อง */
.links-section {
    padding: 60px 0;
    background-color: #fff;
}

.links-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.link-item {
    flex: 0 0 calc(16.666% - 15px);
    max-width: calc(16.666% - 15px);
    background-color: #fff;
    border-radius: 5px;
    padding: 15px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.link-item img {
    max-width: 100%;
    height: auto;
}

/* ส่วนท้ายเว็บไซต์ */
.footer {
    background-color: #222;
    color: #fff;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, var(--primary-color), #fff, var(--primary-color));
}

.footer-top {
    padding: 60px 0 40px;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.footer-widget-title {
    font-size: 18px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
    color: #fff;
}

.footer-widget-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 20px;
}

.footer-logo img {
    width: 80px;
    height: auto;
    margin-bottom: 10px;
}

.footer-logo h3 {
    font-size: 22px;
    margin-bottom: 5px;
    color: #fff;
}

.footer-desc {
    margin-bottom: 20px;
    color: #bbb;
    line-height: 1.6;
}

.footer-contact p {
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px;
    color: #bbb;
}

.footer-contact p i {
    margin-right: 10px;
    margin-top: 5px;
    color: var(--primary-color);
}

.footer-links {
    list-style: none;
}

.footer-links.two-columns {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links li a {
    color: #bbb;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.footer-links li a i {
    margin-right: 8px;
    font-size: 12px;
    color: var(--primary-color);
}

.footer-links li a:hover {
    color: #fff;
    padding-left: 5px;
}


.social-widgets {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.social-widget-btn {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.social-widget-btn i {
    font-size: 18px;
    margin-right: 10px;
}

.social-widget-btn.facebook {
    background-color: #3b5998;
    color: #fff;
}

.social-widget-btn.youtube {
    background-color: #ff0000;
    color: #fff;
}

.social-widget-btn.instagram {
    background-color: #c13584;
    color: #fff;
}

.social-widget-btn.line {
    background-color: #00b900;
    color: #fff;
}

.social-widget-btn:hover {
    transform: translateY(-3px);
    opacity: 0.9;
}

.newsletter {
    margin-top: 20px;
}

.newsletter p {
    color: #bbb;
    margin-bottom: 15px;
}

.newsletter-form {
    display: flex;
}

.newsletter-form input {
    flex-grow: 1;
    padding: 10px 15px;
    border: none;
    border-radius: 30px 0 0 30px;
}

.newsletter-form button {
    padding: 10px 15px;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 0 30px 30px 0;
    transition: all 0.3s ease;
}

.newsletter-form button:hover {
    background-color: var(--primary-dark);
}

.footer-bottom {
    padding: 20px 0;
    background-color: #111;
    font-size: 14px;
}

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

.footer-bottom-links a {
    margin-left: 20px;
    color: #bbb;
    transition: all 0.3s ease;
}

.footer-bottom-links a:hover {
    color: #fff;
}

/* ปุ่มย้อนกลับไปด้านบน */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--primary-dark);
    transform: translateY(-5px);
}

/* Popup แนะนำ */
.popup-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.popup-container.show {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    width: 90%;
    max-width: 600px;
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    animation: popupFadeIn 0.5s ease;
}

@keyframes popupFadeIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.popup-close:hover {
    color: #333;
    transform: rotate(90deg);
}

.popup-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
}

.popup-logo {
    margin-bottom: 15px;
}

.popup-logo img {
    width: 80px;
    height: auto;
}

.popup-header h2 {
    font-size: 24px;
    color: var(--primary-color);
}

.popup-body {
    padding: 20px;
}

.popup-frame {
    margin: 0;
}

.popup-frame h3 {
    font-size: 20px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.popup-frame p {
    margin-bottom: 10px;
}

.popup-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn-secondary i {
    margin-right: 8px;
}

/* ====================== เอฟเฟกต์การเลื่อนเข้ามา (Scroll Reveal) ====================== */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ====================== ยูทิลิตี้เพิ่มเติม ====================== */
.mt-30 {
    margin-top: 30px;
}


/* ====================== อนิเมชัน ====================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideLeft {
    from {
        transform: translateX(30px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideRight {
    from {
        transform: translateX(-30px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.animate-fadeIn {
    animation: fadeIn 1s ease forwards;
}

.animate-slideUp {
    animation: slideUp 1s ease forwards;
}

.animate-slideDown {
    animation: slideDown 1s ease forwards;
}

.animate-slideLeft {
    animation: slideLeft 1s ease forwards;
}

.animate-slideRight {
    animation: slideRight 1s ease forwards;
}

/* ====================== ปรับแต่งสำหรับหน้าจอขนาดเล็ก ====================== */
@media (max-width: 991px) {

    .vision-mission-container,
    .facilities-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .programs-grid,
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-widgets {
        grid-template-columns: repeat(2, 1fr);
    }

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

@media (max-width: 767px) {

    .vision-mission-container,
    .facilities-grid,
    .programs-grid,
    .stats-container,
    .footer-widgets {
        grid-template-columns: 1fr;
    }

    .section-header-center h2 {
        font-size: 28px;
    }

    .stat-number {
        font-size: 38px;
    }

    .quick-link-icons {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-bottom .container {
        flex-direction: column;
        text-align: center;
    }

    .footer-bottom-links {
        margin-top: 10px;
    }

    .footer-bottom-links a {
        margin: 0 10px;
    }
}