/* ===================================
   ITA Website - Complete Stylesheet
   มหาวิทยาลัยศรีนครินทรวิโรฒ
   Fully Responsive Design
   
   แก้ไข: ปัญหา Header ทับซ้อนกับ Page Header
   =================================== */

/* ----- CSS Variables ----- */
:root {
    /* Colors */
    --primary-color: #1a237e;
    --primary-light: #3949ab;
    --primary-dark: #0d1642;
    --secondary-color: #5c6bc0;
    --accent-color: #ffd54f;
    --accent-dark: #ffca28;
    
    /* Text Colors */
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-light: #999999;
    --text-white: #ffffff;
    
    /* Background Colors */
    --bg-white: #ffffff;
    --bg-light: #f8f9fa;
    --bg-gray: #f5f5f5;
    
    /* Shadows */
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 5px 20px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.15);
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 15px;
    --radius-lg: 20px;
    --radius-full: 50px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Header Heights - สำคัญสำหรับการคำนวณ padding-top */
    --header-height-desktop: 145px;
    --header-height-tablet: 125px;
    --header-height-mobile: 75px;
}

/* ----- Reset & Base ----- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-gray);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    outline: none;
}

/* ----- Container ----- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
}

/* ===================================
   Header Styles
   =================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 50%, var(--secondary-color) 100%);
    box-shadow: var(--shadow-md);
}

/* Header Top Bar */
.header-top {
    background: rgba(0, 0, 0, 0.2);
    padding: 8px 0;
    font-size: 0.85rem;
    color: var(--text-white);
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.header-top-left,
.header-top-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-top a,
.header-top span {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-white);
    opacity: 0.9;
    transition: opacity var(--transition-fast);
}

.header-top a:hover {
    opacity: 1;
}

/* Header Main */
.header-main {
    padding: 15px 0;
}

.header-main .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--text-white);
}

.logo-icon {
    width: 55px;
    height: 55px;
    background: var(--bg-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-color);
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.logo-text h1 {
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.3;
}

.logo-text p {
    font-size: 0.8rem;
    opacity: 0.9;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    padding: 10px;
    gap: 5px;
}

.hamburger-line {
    width: 24px;
    height: 3px;
    background: var(--text-white);
    border-radius: 2px;
    transition: var(--transition-normal);
}

.mobile-menu-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Navigation */
.nav {
    background: rgba(0, 0, 0, 0.15);
}

.nav .container {
    padding: 0;
}

.nav-menu {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 15px 20px;
    color: var(--text-white);
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: var(--transition-normal);
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, 0.1);
    border-bottom-color: var(--accent-color);
}

.nav-link i {
    font-size: 1rem;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.mobile-menu-overlay.active {
    opacity: 1;
}

/* ===================================
   Hero Section
   =================================== */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: var(--text-white);
    /* แก้ไข: padding-top ต้องมากกว่าความสูง header */
    padding-top: calc(var(--header-height-desktop) + 40px);
    padding-bottom: 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='40' fill='none' stroke='rgba(255,255,255,0.1)' stroke-width='2'/%3E%3C/svg%3E") repeat;
    background-size: 100px;
    opacity: 0.5;
    animation: float 20s linear infinite;
}

@keyframes float {
    0% { background-position: 0 0; }
    100% { background-position: 100px 100px; }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
}

.hero h2 {
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero h3 {
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    font-weight: 400;
    margin-bottom: 20px;
    opacity: 0.9;
}

.hero > .container > .hero-content > p {
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    max-width: 800px;
    margin: 0 auto 30px;
    opacity: 0.9;
    line-height: 1.8;
}

.hero-badges {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 12px 20px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(10px);
    font-size: 0.95rem;
    transition: var(--transition-normal);
}

.badge:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.badge i {
    font-size: 1.3rem;
    color: var(--accent-color);
}

/* ===================================
   Stats Section (Carousel)
   =================================== */
.stats {
    background: var(--bg-white);
    padding: 60px 0;
    margin-top: -50px;
    position: relative;
    z-index: 2;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.stat-card {
    text-align: center;
    padding: 15px 15px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    border-radius: var(--radius-md);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.stat-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.stat-card h3 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Carousel Layout */
.stats-carousel {
    display: grid;
    grid-template-columns: 48px 1fr 48px;
    align-items: center;
    gap: 15px;
    position: relative;
}

.stats-viewport {
    overflow: hidden;
    width: 100%;
}

.stats-carousel-track {
    display: flex;
    transition: transform 450ms ease;
    will-change: transform;
}

.stats-carousel-track .stat-card {
    flex: 0 0 calc((100% - 25px) / 2);
    margin-right: 25px;
}

.stats-carousel-track .stat-card:last-child {
    margin-right: 0;
}

.stats-nav {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(26, 35, 126, 0.08);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-normal);
}

.stats-nav:hover {
    background: rgba(26, 35, 126, 0.18);
    transform: translateY(-2px);
}

.stats-nav:active {
    transform: scale(0.96);
}

.stats-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 22px;
}

.stats-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(26, 35, 126, 0.25);
    border: 0;
    padding: 0;
    cursor: pointer;
}

.stats-dot.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    box-shadow: 0 0 0 6px rgba(26, 35, 126, 0.12);
}

@media (max-width: 768px) {
    /* Mobile: 1 card visible */
    .stats-carousel {
        grid-template-columns: 42px 1fr 42px;
        gap: 10px;
    }

    .stats-nav {
        width: 42px;
        height: 42px;
    }

    .stats-carousel-track .stat-card {
        flex: 0 0 100%;
        margin-right: 0;
    }

    /* Keep small gap by reducing track translate step naturally */
    .stats-dots {
        margin-top: 18px;
    }
}



/* ===================================
   Section Common Styles
   =================================== */
.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    color: var(--primary-color);
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

.section-title p {
    color: var(--text-secondary);
    margin-top: 20px;
    font-size: 1rem;
}

/* ===================================
   Buttons
   =================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius-full);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition-normal);
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: var(--text-white);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(26, 35, 126, 0.4);
}

.btn-outline {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--text-white);
}

.btn-secondary {
    background: var(--accent-color);
    color: var(--primary-color);
}

.btn-secondary:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
}

/* ===================================
   Announcements Section
   =================================== */
.announcements {
    background: var(--bg-light);
}

.announcement-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.announcement-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
}

.announcement-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.announcement-card .card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: var(--text-white);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.announcement-card .card-header i {
    font-size: 2rem;
    flex-shrink: 0;
}

.announcement-card .card-header h3 {
    font-size: 1.1rem;
    margin-bottom: 3px;
}

.announcement-card .card-header span {
    font-size: 0.85rem;
    opacity: 0.9;
}

.announcement-card .card-body {
    padding: 25px;
}

.announcement-card h4 {
    color: var(--primary-color);
    margin-bottom: 12px;
    font-size: 1.05rem;
    line-height: 1.5;
}

.announcement-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
    line-height: 1.7;
}

/* ===================================
   News Section
   =================================== */
.news {
    background: var(--bg-white);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.news-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.news-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.news-card:hover img {
    transform: scale(1.05);
}

.news-card .card-content {
    padding: 20px;
}

.news-card .date {
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.news-card h4 {
    color: var(--text-primary);
    margin-bottom: 10px;
    line-height: 1.5;
    font-size: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 15px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===================================
   Action Plan Section
   =================================== */
.action-plan {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: var(--text-white);
}

.action-plan .section-title h2 {
    color: var(--text-white);
}

.action-plan .section-title h2::after {
    background: linear-gradient(90deg, var(--accent-color), #ffeb3b);
}

.action-plan .section-title p {
    color: rgba(255, 255, 255, 0.8);
}

.plan-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.plan-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    padding: 30px 25px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition-normal);
}

.plan-card:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

.plan-card i {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 20px;
}

.plan-card h4 {
    font-size: 1.15rem;
    margin-bottom: 12px;
}

.plan-card p {
    opacity: 0.9;
    font-size: 0.9rem;
    line-height: 1.7;
}

/* ===================================
   ITA Info Section
   =================================== */
.ita-info {
    background: var(--bg-light);
}

.info-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.info-text h3 {
    color: var(--primary-color);
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    margin-bottom: 20px;
}

.info-text p {
    color: var(--text-secondary);
    margin-bottom: 15px;
    line-height: 1.8;
}

.info-list {
    margin: 25px 0;
}

.info-list li {
    padding: 12px 0;
    padding-left: 30px;
    position: relative;
    color: var(--text-secondary);
}

.info-list li::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    color: #4caf50;
}

.info-image {
    display: flex;
    justify-content: center;
}

.ita-logo-box {
    width: 100%;
    max-width: 380px;
    background: var(--bg-white);
    padding: 40px 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.ita-logo-box h2 {
    font-size: clamp(3rem, 8vw, 4rem);
    color: var(--primary-color);
    margin-bottom: 10px;
}

.ita-logo-box .subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.ita-logo-box .description {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

.ita-logo-box .year {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* ===================================
   Contact Section
   =================================== */
.contact {
    background: var(--bg-white);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.contact-card {
    text-align: center;
    padding: 35px 25px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    transition: var(--transition-normal);
}

.contact-card:hover {
    background: var(--primary-color);
    color: var(--text-white);
    transform: translateY(-5px);
}

.contact-card:hover i {
    color: var(--accent-color);
}

.contact-card:hover h4,
.contact-card:hover p {
    color: var(--text-white);
}

.contact-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    transition: var(--transition-normal);
}

.contact-card h4 {
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 1.1rem;
    transition: var(--transition-normal);
}

.contact-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    transition: var(--transition-normal);
}

/* ===================================
   Footer Styles
   =================================== */
.footer {
    background: var(--primary-dark);
    color: var(--text-white);
    padding: 60px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(4, 1fr);
    gap: 40px;
    padding-bottom: 40px;
}

/* Footer About */
.footer-about {
    padding-right: 20px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.footer-logo i {
    font-size: 1.8rem;
    color: var(--accent-color);
}

.footer-logo h3 {
    font-size: 1.3rem;
    color: var(--accent-color);
}

.footer-about p {
    opacity: 0.8;
    line-height: 1.8;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    transition: var(--transition-normal);
}

.social-links a:hover {
    background: var(--accent-color);
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* Footer Links */
.footer-links h4,
.footer-contact h4 {
    color: var(--accent-color);
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.footer-links ul li {
    margin-bottom: 12px;
}

.footer-links ul li a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    transition: var(--transition-fast);
    display: inline-block;
}

.footer-links ul li a:hover {
    color: var(--accent-color);
    transform: translateX(5px);
}

/* Footer Contact */
.footer-contact ul li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.footer-contact ul li i {
    color: var(--accent-color);
    margin-top: 4px;
    flex-shrink: 0;
}

.footer-contact ul li span,
.footer-contact ul li a {
    color: rgba(255, 255, 255, 0.8);
}

.footer-contact ul li a:hover {
    color: var(--accent-color);
}

/* Footer Bottom */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 25px 0;
    text-align: center;
}

.footer-bottom p {
    opacity: 0.8;
    font-size: 0.9rem;
}

.footer-sub {
    font-size: 0.8rem;
    margin-top: 8px;
    opacity: 0.6;
}

/* ===================================
   Scroll to Top Button
   =================================== */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: var(--text-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition-normal);
    z-index: 999;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* ===================================
   News Detail Page Styles
   ★★★ แก้ไขส่วนนี้ - Page Header ★★★
   =================================== */

/* Page Header - แก้ไขปัญหาทับซ้อนกับ Fixed Header */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: var(--text-white);
    /* ★ แก้ไข: เพิ่ม padding-top ให้มากกว่าความสูง header ★ */
    padding-top: calc(var(--header-height-desktop) + 50px);
    padding-bottom: 50px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Pattern Background */
.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='40' fill='none' stroke='rgba(255,255,255,0.05)' stroke-width='2'/%3E%3C/svg%3E") repeat;
    background-size: 80px;
    pointer-events: none;
}

.page-header .container {
    position: relative;
    z-index: 1;
}

.page-header h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: 15px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

.breadcrumb {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--accent-color);
    transition: var(--transition-fast);
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    opacity: 0.7;
}

/* News Detail Content */
.news-detail {
    padding: 50px 0;
    background: var(--bg-light);
}

.news-detail-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
}

.news-main {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.news-main .news-image {
    width: 100%;
    height: auto;
    max-height: 450px;
    object-fit: cover;
}

.news-main .news-content {
    padding: 35px;
}

.news-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.news-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.news-meta span i {
    color: var(--primary-color);
}

.news-main h1 {
    color: var(--primary-color);
    font-size: clamp(1.3rem, 3vw, 1.7rem);
    margin-bottom: 25px;
    line-height: 1.5;
}

.news-body {
    color: var(--text-secondary);
    line-height: 1.9;
}

.news-body p {
    margin-bottom: 18px;
}

.news-body h3 {
    color: var(--primary-color);
    margin: 30px 0 15px;
    font-size: 1.2rem;
}

.news-body ul,
.news-body ol {
    margin: 20px 0;
    padding-left: 25px;
}

.news-body ul li,
.news-body ol li {
    margin-bottom: 10px;
    list-style: disc;
}

.news-body ol li {
    list-style: decimal;
}

.news-body blockquote {
    background: linear-gradient(135deg, #f0f4ff, #e8ecff);
    border-left: 4px solid var(--primary-color);
    padding: 20px 25px;
    margin: 25px 0;
    font-style: italic;
    color: var(--text-primary);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* News Gallery */
.news-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 30px 0;
}

.news-gallery img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-normal);
}

.news-gallery img:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

/* News Tags */
.news-tags {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #eee;
}

.news-tags h4,
.news-share h4 {
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    background: #e8eaf6;
    color: var(--primary-color);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    transition: var(--transition-normal);
}

.tag:hover {
    background: var(--primary-color);
    color: var(--text-white);
}

/* News Share */
.news-share {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #eee;
}

.share-buttons {
    display: flex;
    gap: 12px;
}

.share-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    transition: var(--transition-normal);
    font-size: 1rem;
}

.share-btn:hover {
    transform: scale(1.1);
}

.share-btn.facebook { background: #1877f2; }
.share-btn.twitter { background: #1da1f2; }
.share-btn.line { background: #00c300; }
.share-btn.copy { background: #666; }

/* News Navigation */
.news-navigation {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #eee;
}

.nav-prev,
.nav-next {
    flex: 1;
    max-width: 48%;
}

.nav-prev a,
.nav-next a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    transition: var(--transition-normal);
}

.nav-prev a:hover,
.nav-next a:hover {
    background: var(--primary-color);
    color: var(--text-white);
}

.nav-next {
    text-align: right;
}

.nav-next a {
    flex-direction: row-reverse;
}

.nav-label {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-bottom: 4px;
}

.nav-title {
    font-weight: 600;
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Sidebar */
.news-sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.sidebar-widget {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 25px;
    box-shadow: var(--shadow-md);
}

.sidebar-widget h3 {
    color: var(--primary-color);
    font-size: 1.05rem;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e8eaf6;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Related News */
.related-news-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.related-news-item:last-child {
    border-bottom: none;
}

.related-news-item img {
    width: 70px;
    height: 55px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.related-news-item .item-content h4 {
    font-size: 0.85rem;
    color: var(--text-primary);
    margin-bottom: 5px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-news-item .item-content h4:hover {
    color: var(--primary-color);
}

.related-news-item .item-content span {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* Category List */
.category-list li {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category-list li:last-child {
    border-bottom: none;
}

.category-list li a {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.category-list li a:hover {
    color: var(--primary-color);
}

.category-list li span {
    background: #e8eaf6;
    color: var(--primary-color);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
}

/* Download List */
.download-list li {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.download-list li:last-child {
    border-bottom: none;
}

.download-list li a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.download-list li a:hover {
    color: var(--primary-color);
}

.download-list li a i {
    color: var(--primary-color);
    font-size: 1.1rem;
}

/* ===================================
   Animations
   =================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate {
    animation: fadeInUp 0.6s ease forwards;
}

/* ===================================
   Loading State
   =================================== */
.loading-placeholder {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===================================
   Lightbox
   =================================== */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    cursor: pointer;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: var(--radius-md);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    background: var(--bg-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.lightbox-close:hover {
    background: var(--accent-color);
}

/* ===================================
   Toast Notification
   =================================== */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-primary);
    color: var(--text-white);
    padding: 15px 30px;
    border-radius: var(--radius-full);
    font-size: 0.95rem;
    z-index: 10001;
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.3s ease;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

/* ----- Tablets (max-width: 1024px) ----- */
@media (max-width: 1024px) {
    :root {
        --header-height-tablet: 125px;
    }

    /* Hero Tablet */
    .hero {
        padding-top: calc(var(--header-height-tablet) + 40px);
        padding-bottom: 80px;
    }

    /* ★ Page Header Tablet ★ */
    .page-header {
        padding-top: calc(var(--header-height-tablet) + 40px);
        padding-bottom: 45px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .plan-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }

    .footer-about {
        grid-column: span 3;
        padding-right: 0;
        text-align: center;
        margin-bottom: 20px;
    }

    .footer-about .social-links {
        justify-content: center;
    }

    .news-detail-container {
        grid-template-columns: 1fr;
    }

    .news-sidebar {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .sidebar-widget {
        flex: 1 1 300px;
    }
}

/* ----- Tablets Small (max-width: 900px) ----- */
@media (max-width: 900px) {
    .announcement-grid {
        grid-template-columns: 1fr;
    }

    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .info-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .info-image {
        order: -1;
    }

    .ita-logo-box {
        max-width: 320px;
    }
}

/* ----- Mobile (max-width: 768px) ----- */
@media (max-width: 768px) {
    :root {
        --header-height-mobile: 75px;
    }

    /* Header Mobile */
    .header-top {
        display: none;
    }

    .header-main {
        padding: 12px 0;
    }

    .logo-icon {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }

    .logo-text h1 {
        font-size: 1rem;
    }

    .logo-text p {
        font-size: 0.7rem;
    }

    /* Mobile Menu Button */
    .mobile-menu-btn {
        display: flex;
    }

    /* Navigation Mobile */
    .nav {
        position: fixed;
        top: 0;
        right: -280px;
        width: 280px;
        height: 100vh;
        background: var(--primary-color);
        z-index: 1001;
        transition: right var(--transition-normal);
        overflow-y: auto;
        padding-top: 20px;
    }

    .nav.active {
        right: 0;
    }

    .nav .container {
        padding: 0;
    }

    .nav-menu {
        flex-direction: column;
    }

    .nav-link {
        padding: 18px 25px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        border-left: 4px solid transparent;
    }

    .nav-link:hover,
    .nav-link.active {
        border-bottom-color: rgba(255, 255, 255, 0.1);
        border-left-color: var(--accent-color);
    }

    .mobile-menu-overlay {
        display: block;
    }

    .mobile-menu-overlay.active {
        z-index: 1000;
    }

    /* Hero Mobile */
    .hero {
        padding-top: calc(var(--header-height-mobile) + 40px);
        padding-bottom: 60px;
    }

    .hero-badges {
        gap: 10px;
    }

    .badge {
        padding: 10px 16px;
        font-size: 0.85rem;
    }

    .badge i {
        font-size: 1.1rem;
    }

    /* ★★★ Page Header Mobile - แก้ไขหลัก ★★★ */
    .page-header {
        padding-top: calc(var(--header-height-mobile) + 35px);
        padding-bottom: 35px;
    }

    .page-header h2 {
        font-size: 1.4rem;
    }

    .breadcrumb {
        font-size: 0.85rem;
        gap: 8px;
    }

    /* Stats Mobile */
    .stats {
        padding: 40px 0;
        margin-top: -30px;
    }

    .stats-grid {
        gap: 15px;
    }

    .stat-card {
        padding: 20px 15px;
    }

    .stat-card i {
        font-size: 2rem;
    }

    /* Section Mobile */
    .section {
        padding: 50px 0;
    }

    .section-title {
        margin-bottom: 35px;
    }

    /* News Grid Mobile */
    .news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Plan Grid Mobile */
    .plan-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .plan-card {
        padding: 25px 20px;
    }

    .plan-card i {
        font-size: 2rem;
    }

    /* Contact Mobile */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Footer Mobile */
    .footer {
        padding: 40px 0 0;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .footer-about {
        grid-column: span 1;
    }

    .social-links {
        justify-content: center;
    }

    .footer-contact ul li {
        justify-content: center;
    }

    /* News Detail Mobile */
    .news-detail {
        padding: 40px 0;
    }

    .news-main .news-content {
        padding: 20px;
    }

    .news-main h1 {
        font-size: 1.3rem;
    }

    .news-meta {
        gap: 12px;
    }

    .news-meta span {
        font-size: 0.8rem;
    }

    .news-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .news-gallery img {
        height: 100px;
    }

    .news-navigation {
        flex-direction: column;
        gap: 15px;
    }

    .nav-prev,
    .nav-next {
        max-width: 100%;
    }

    .nav-next {
        text-align: left;
    }

    .nav-next a {
        flex-direction: row;
    }

    .sidebar-widget {
        flex: 1 1 100%;
    }

    /* Scroll Top Mobile */
    .scroll-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }
}

/* ----- Mobile Small (max-width: 480px) ----- */
@media (max-width: 480px) {
    :root {
        --header-height-mobile: 70px;
    }

    .container {
        padding: 0 12px;
    }

    .logo {
        gap: 10px;
    }

    .logo-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .logo-text h1 {
        font-size: 0.9rem;
    }

    /* Hero Small Mobile */
    .hero {
        padding-top: calc(var(--header-height-mobile) + 30px);
        padding-bottom: 50px;
    }

    .badge {
        padding: 8px 14px;
        font-size: 0.8rem;
    }

    /* ★★★ Page Header Small Mobile ★★★ */
    .page-header {
        padding-top: calc(var(--header-height-mobile) + 25px);
        padding-bottom: 25px;
    }

    .page-header h2 {
        font-size: 1.25rem;
        margin-bottom: 12px;
    }

    .breadcrumb {
        font-size: 0.8rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .announcement-card .card-header {
        padding: 15px;
    }

    .announcement-card .card-body {
        padding: 20px;
    }

    .plan-card {
        padding: 20px 15px;
    }

    .news-gallery {
        grid-template-columns: 1fr;
    }

    .news-gallery img {
        height: 180px;
    }

    .share-buttons {
        justify-content: center;
    }

    .tags {
        justify-content: center;
    }

    .news-main .news-content {
        padding: 15px;
    }

    .news-main h1 {
        font-size: 1.15rem;
    }
}

/* ----- Print Styles ----- */
@media print {
    .header,
    .footer,
    .scroll-top,
    .news-share,
    .news-navigation,
    .news-sidebar,
    .mobile-menu-btn,
    .mobile-menu-overlay {
        display: none !important;
    }

    .page-header {
        padding-top: 20px !important;
        background: #1a237e !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .news-detail {
        padding: 0;
    }

    .news-main {
        box-shadow: none;
    }

    .news-detail-container {
        grid-template-columns: 1fr;
    }
}



/* ===================================
   BUTTON FIX FOR RESPONSIVE / TOUCH DEVICES
   แก้ไขปุ่มให้กดได้บนมือถือ
   =================================== */

/* ----- ขนาด Touch Target ขั้นต่ำ ----- */
/* ปุ่มทุกชนิดควรมีพื้นที่กดอย่างน้อย 44x44px ตามมาตรฐาน WCAG */

.btn {
    /* ขนาดขั้นต่ำสำหรับ Touch */
    min-height: 44px;
    min-width: 44px;
    
    /* ให้แน่ใจว่าสามารถคลิกได้ */
    position: relative;
    z-index: 1;
    
    /* ป้องกัน text selection เมื่อกด */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    
    /* ป้องกัน double-tap zoom บน iOS */
    touch-action: manipulation;
    
    /* Cursor */
    cursor: pointer;
}

/* ----- Mobile Menu Button ----- */
.mobile-menu-btn {
    /* ขนาดที่เหมาะกับนิ้ว */
    min-width: 48px;
    min-height: 48px;
    
    /* ให้อยู่เหนือ element อื่น */
    position: relative;
    z-index: 1002;
    
    /* Touch behavior */
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.2);
    
    /* ให้คลิกได้ */
    pointer-events: auto;
    cursor: pointer;
}

/* ----- Scroll to Top Button ----- */
.scroll-top {
    /* ขนาดที่เหมาะกับนิ้ว */
    min-width: 50px;
    min-height: 50px;
    
    /* ให้อยู่เหนือ element อื่น */
    z-index: 999;
    
    /* Touch behavior */
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(255, 213, 79, 0.3);
    
    /* ให้คลิกได้ */
    pointer-events: auto;
    cursor: pointer;
}

/* ----- Navigation Links ----- */
.nav-link {
    /* ขนาดพื้นที่คลิกขั้นต่ำ */
    min-height: 44px;
    
    /* ให้คลิกได้ */
    position: relative;
    z-index: 1;
    
    /* Touch behavior */
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1);
    
    cursor: pointer;
}

/* ----- Social Links ----- */
.social-links a {
    /* ขนาดที่เหมาะกับนิ้ว */
    min-width: 44px;
    min-height: 44px;
    
    /* Touch behavior */
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(255, 213, 79, 0.3);
    
    /* ให้คลิกได้ */
    pointer-events: auto;
    cursor: pointer;
}

/* ----- Share Buttons ----- */
.share-btn {
    /* ขนาดที่เหมาะกับนิ้ว */
    min-width: 44px;
    min-height: 44px;
    
    /* Touch behavior */
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    
    /* ให้คลิกได้ */
    pointer-events: auto;
    cursor: pointer;
}

/* ----- Card Links & Buttons ----- */
.news-card .btn,
.announcement-card .btn {
    /* ขนาดพื้นที่คลิกขั้นต่ำ */
    min-height: 44px;
    padding: 12px 24px;
    
    /* ให้อยู่เหนือ card */
    position: relative;
    z-index: 2;
    
    /* Touch behavior */
    touch-action: manipulation;
    
    cursor: pointer;
}

/* ----- Tags ----- */
.tag {
    /* ขนาดพื้นที่คลิกขั้นต่ำ */
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    
    /* Touch behavior */
    touch-action: manipulation;
    
    cursor: pointer;
}

/* ----- Gallery Images (Clickable) ----- */
.news-gallery img {
    /* Touch behavior */
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    
    cursor: pointer;
    pointer-events: auto;
}

/* ----- Lightbox Close Button ----- */
.lightbox-close {
    /* ขนาดที่เหมาะกับนิ้ว */
    min-width: 48px;
    min-height: 48px;
    
    /* ให้อยู่เหนือรูปภาพ */
    z-index: 10001;
    
    /* Touch behavior */
    touch-action: manipulation;
    
    cursor: pointer;
    pointer-events: auto;
}

/* ----- Footer Links ----- */
.footer-links ul li a {
    /* ขนาดพื้นที่คลิกขั้นต่ำ */
    display: inline-block;
    min-height: 40px;
    line-height: 40px;
    padding: 0 5px;
    
    /* Touch behavior */
    touch-action: manipulation;
}

/* ----- Download List Links ----- */
.download-list li a {
    /* ขนาดพื้นที่คลิกขั้นต่ำ */
    min-height: 44px;
    padding: 10px 0;
    
    /* Touch behavior */
    touch-action: manipulation;
}

/* ----- Related News Items ----- */
.related-news-item {
    /* Touch behavior */
    touch-action: manipulation;
}

.related-news-item .item-content h4 a {
    /* ให้คลิกได้ทั้งพื้นที่ */
    display: block;
    padding: 5px 0;
}

/* ----- News Navigation ----- */
.nav-prev a,
.nav-next a {
    /* ขนาดพื้นที่คลิกขั้นต่ำ */
    min-height: 60px;
    
    /* Touch behavior */
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(26, 35, 126, 0.1);
    
    cursor: pointer;
}

/* ----- Category List Links ----- */
.category-list li a {
    /* ขนาดพื้นที่คลิกขั้นต่ำ */
    display: block;
    min-height: 40px;
    line-height: 40px;
    
    /* Touch behavior */
    touch-action: manipulation;
}

/* ===================================
   RESPONSIVE BUTTON FIXES
   =================================== */

@media (max-width: 768px) {
    /* ----- ปุ่มทั่วไปบน Mobile ----- */
    .btn {
        /* เพิ่มขนาดปุ่มบน Mobile */
        min-height: 48px;
        padding: 14px 28px;
        font-size: 1rem;
        
        /* เพิ่มพื้นที่กดรอบๆ */
        margin: 5px 0;
    }

    /* ----- Mobile Menu Button ----- */
    .mobile-menu-btn {
        /* ขนาดใหญ่ขึ้นบน Mobile */
        width: 50px;
        height: 50px;
        min-width: 50px;
        min-height: 50px;
        
        /* ให้ชัดเจนว่ากดได้ */
        background: rgba(255, 255, 255, 0.15);
        border-radius: 8px;
    }

    /* Active state สำหรับ touch */
    .mobile-menu-btn:active {
        background: rgba(255, 255, 255, 0.3);
        transform: scale(0.95);
    }

    /* ----- Navigation Links บน Mobile ----- */
    .nav-link {
        /* พื้นที่กดใหญ่ขึ้น */
        min-height: 50px;
        padding: 15px 25px;
        font-size: 1rem;
        
        /* ให้กดทั้งแถว */
        display: flex;
        width: 100%;
    }

    /* Active state สำหรับ touch */
    .nav-link:active {
        background: rgba(255, 255, 255, 0.2);
    }

    /* ----- Scroll to Top บน Mobile ----- */
    .scroll-top {
        /* ขนาดและตำแหน่งที่เหมาะสม */
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 15px;
    }

    /* Active state สำหรับ touch */
    .scroll-top:active {
        transform: scale(0.9);
    }

    /* ----- Share Buttons บน Mobile ----- */
    .share-btn {
        /* ขนาดใหญ่ขึ้น */
        width: 48px;
        height: 48px;
    }

    /* Active state สำหรับ touch */
    .share-btn:active {
        transform: scale(0.9);
        opacity: 0.8;
    }

    /* ----- Social Links บน Mobile ----- */
    .social-links a {
        /* ขนาดใหญ่ขึ้น */
        width: 46px;
        height: 46px;
    }

    /* Active state สำหรับ touch */
    .social-links a:active {
        transform: scale(0.9);
    }

    /* ----- Card Buttons บน Mobile ----- */
    .news-card .btn,
    .announcement-card .btn {
        /* ปุ่มเต็มความกว้าง */
        width: 100%;
        justify-content: center;
        min-height: 48px;
    }

    /* ----- News Navigation บน Mobile ----- */
    .nav-prev a,
    .nav-next a {
        min-height: 70px;
        padding: 15px;
    }

    /* Active state สำหรับ touch */
    .nav-prev a:active,
    .nav-next a:active {
        background: var(--primary-light);
        color: white;
    }

    /* ----- Gallery Images บน Mobile ----- */
    .news-gallery img {
        /* ขนาดที่กดง่าย */
        min-height: 100px;
    }

    /* Active state สำหรับ touch */
    .news-gallery img:active {
        opacity: 0.8;
        transform: scale(0.98);
    }

    /* ----- Tags บน Mobile ----- */
    .tag {
        /* ขนาดที่กดง่าย */
        min-height: 40px;
        padding: 8px 18px;
        font-size: 0.9rem;
    }

    /* Active state สำหรับ touch */
    .tag:active {
        background: var(--primary-color);
        color: white;
    }

    /* ----- Lightbox Close บน Mobile ----- */
    .lightbox-close {
        /* ขนาดใหญ่และตำแหน่งที่กดง่าย */
        width: 50px;
        height: 50px;
        top: 15px;
        right: 15px;
        font-size: 1.5rem;
    }

    /* Active state สำหรับ touch */
    .lightbox-close:active {
        background: var(--accent-dark);
        transform: scale(0.9);
    }

    /* ----- Breadcrumb Links ----- */
    .breadcrumb a {
        /* พื้นที่กดมากขึ้น */
        padding: 8px 5px;
        min-height: 40px;
        display: inline-flex;
        align-items: center;
    }

    /* ----- Contact Card (ทำให้กดได้ทั้ง card) ----- */
    .contact-card {
        cursor: pointer;
    }

    .contact-card:active {
        transform: scale(0.98);
    }

    /* ----- Plan Card (ทำให้มี feedback เมื่อกด) ----- */
    .plan-card:active {
        transform: scale(0.98);
        background: rgba(255, 255, 255, 0.25);
    }

    /* ----- Stat Card (ทำให้มี feedback เมื่อกด) ----- */
    .stat-card:active {
        transform: scale(0.98);
    }
}

/* ----- Small Mobile ----- */
@media (max-width: 480px) {
    .btn {
        /* ปุ่มเต็มความกว้างบนจอเล็ก */
        min-height: 50px;
        padding: 14px 20px;
    }

    .mobile-menu-btn {
        width: 48px;
        height: 48px;
    }

    .scroll-top {
        width: 48px;
        height: 48px;
        bottom: 15px;
        right: 12px;
    }

    /* Tags wrap เต็มบรรทัด */
    .tags {
        gap: 8px;
    }

    .tag {
        flex: 0 0 auto;
    }

    /* Share buttons centered */
    .share-buttons {
        justify-content: center;
        gap: 15px;
    }
}

/* ===================================
   TOUCH FEEDBACK STYLES
   ทำให้ผู้ใช้รู้ว่ากดแล้ว
   =================================== */

/* Ripple effect base (optional - ต้องใช้ JS) */
.btn,
.nav-link,
.social-links a,
.share-btn {
    overflow: hidden;
    position: relative;
}

/* Touch highlight color สำหรับ iOS/Android */
* {
    -webkit-tap-highlight-color: rgba(26, 35, 126, 0.1);
}

/* ปิด highlight สำหรับบาง element */
.lightbox,
.mobile-menu-overlay {
    -webkit-tap-highlight-color: transparent;
}

/* ===================================
   FIX: ELEMENTS BLOCKING BUTTONS
   แก้ไข element ที่บังปุ่ม
   =================================== */

/* ให้แน่ใจว่า pseudo-elements ไม่บังปุ่ม */
.hero::before,
.page-header::before {
    pointer-events: none;
}

/* News card image container ไม่บังปุ่ม */
.news-card {
    position: relative;
}

.news-card img {
    pointer-events: none; /* รูปไม่บังปุ่ม */
}

.news-card .card-content {
    position: relative;
    z-index: 1;
}

/* Announcement card */
.announcement-card .card-body {
    position: relative;
    z-index: 1;
}

/* ===================================
   FIX: OVERLAY NOT BLOCKING CONTENT
   =================================== */

/* Mobile menu overlay ต้องปิดเมนูได้ */
.mobile-menu-overlay {
    pointer-events: none;
}

.mobile-menu-overlay.active {
    pointer-events: auto;
    cursor: pointer;
}

/* ===================================
   ACCESSIBILITY: FOCUS STATES
   สำหรับ keyboard navigation
   =================================== */

.btn:focus,
.nav-link:focus,
.social-links a:focus,
.share-btn:focus,
.scroll-top:focus,
.mobile-menu-btn:focus,
.tag:focus {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
}

/* Focus visible only for keyboard */
.btn:focus:not(:focus-visible),
.nav-link:focus:not(:focus-visible),
.social-links a:focus:not(:focus-visible),
.share-btn:focus:not(:focus-visible) {
    outline: none;
}

.btn:focus-visible,
.nav-link:focus-visible,
.social-links a:focus-visible,
.share-btn:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
}