/* General Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Sarabun', 'Kanit', sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.top-header {
    background: rgba(0,0,0,0.2);
    padding: 10px 0;
    font-size: 14px;
}

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

.header-contact {
    display: flex;
    gap: 20px;
}

.header-contact a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

.header-contact a:hover {
    color: #ffd700;
}

.main-header {
    padding: 20px 0;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

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

.logo-text h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 5px;
}

.logo-text p {
    font-size: 16px;
    opacity: 0.9;
}

/* Navigation Styles */
nav {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255,255,255,0.2);
}

.nav-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 18px 30px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: rgba(255,255,255,0.2);
    border-bottom-color: #ffd700;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
}

/* News Ticker Section - แถบข่าวสำคัญวิ่ง */
.news-ticker-section {
    background: #fff3cd;
    border-top: 3px solid #ffc107;
    border-bottom: 3px solid #ffc107;
    padding: 0;
    overflow: hidden;
}

.news-ticker {
    display: flex;
    align-items: center;
    width: 100%;
}

.ticker-label {
    background: #dc3545;
    color: white;
    padding: 15px 25px;
    font-weight: 700;
    font-size: 16px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: pulse 2s infinite;
}

.ticker-label i {
    font-size: 20px;
}

@keyframes pulse {
    0%, 100% {
        background: #dc3545;
    }
    50% {
        background: #c82333;
    }
}

.ticker-content {
    flex: 1;
    background: #fff9e6;
    padding: 15px 0;
    overflow: hidden;
}

.ticker-content marquee {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.ticker-item {
    margin: 0 30px;
    color: #d32f2f;
}

.ticker-separator {
    color: #999;
    margin: 0 20px;
}

/* Announcements Section - ข่าวประกาศ */
.announcements-section {
    padding: 60px 0;
    background: #f9f9f9;
}

.announcements-section .section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.announcements-section .section-title h2 {
    display: flex;
    align-items: center;
    gap: 15px;
}

.view-all-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.view-all-link:hover {
    color: #764ba2;
    gap: 12px;
}

.announcements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

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

.announcement-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.announcement-card a {
    text-decoration: none;
    color: inherit;
}

.announcement-image {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
}

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

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

.announcement-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #dc3545;
    color: white;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 3px 10px rgba(220, 53, 69, 0.4);
    animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.announcement-content {
    padding: 25px;
}

.announcement-content h3 {
    color: #1e3c72;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.announcement-date {
    color: #667eea;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.announcement-excerpt {
    color: #666;
    font-size: 15px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
}

.hero h1 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 20px;
    margin-bottom: 30px;
    opacity: 0.95;
}

/* Quick Menu Section */
.quick-menu {
    padding: 60px 0;
    background: white;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 36px;
    color: #1e3c72;
    margin-bottom: 10px;
    font-weight: 700;
}

.section-title p {
    font-size: 18px;
    color: #666;
}

.quick-menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.quick-menu-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.quick-menu-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.quick-menu-item i {
    font-size: 48px;
    margin-bottom: 15px;
    display: block;
}

.quick-menu-item h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
}

.quick-menu-item p {
    font-size: 14px;
    opacity: 0.9;
}

/* Social Section */
.social-section {
    text-align: center;
    margin-top: 40px;
}

.social-section h3 {
    font-size: 24px;
    color: #1e3c72;
    margin-bottom: 20px;
}

.social-link {
    display: inline-block;
    background: #1877f2;
    color: white;
    padding: 15px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: #145dbf;
    transform: scale(1.05);
}

.social-link i {
    margin-right: 10px;
}

/* Content Section */
.content-section {
    padding: 60px 0;
    background: white;
}

.content-box {
    background: #f9f9f9;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.content-box h2 {
    color: #1e3c72;
    font-size: 28px;
    margin-bottom: 20px;
}

.content-box h3 {
    color: #2a5298;
    font-size: 22px;
    margin: 25px 0 15px;
}

.content-box p {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 15px;
    color: #555;
}

.content-box ul {
    margin-left: 30px;
    margin-bottom: 20px;
}

.content-box ul li {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 10px;
    color: #555;
}

/* News Section */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

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

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.news-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.news-content {
    padding: 25px;
}

.news-date {
    color: #2a5298;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
}

.news-card h3 {
    color: #1e3c72;
    font-size: 22px;
    margin-bottom: 15px;
    font-weight: 600;
}

.news-card p {
    color: #666;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.read-more {
    color: #2a5298;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.read-more:hover {
    color: #1e3c72;
}

/* Videos Section */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

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

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    height: 250px;
    background: #000;
}

.video-thumbnail iframe {
    width: 100%;
    height: 100%;
}

.video-info {
    padding: 20px;
}

.video-card h3 {
    color: #1e3c72;
    font-size: 20px;
    margin-bottom: 10px;
    font-weight: 600;
}

.video-card p {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 40px;
}

.contact-info {
    background: #f9f9f9;
    padding: 40px;
    border-radius: 15px;
}

.contact-item {
    display: flex;
    align-items: start;
    gap: 20px;
    margin-bottom: 25px;
}

.contact-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.contact-details h3 {
    color: #1e3c72;
    font-size: 20px;
    margin-bottom: 5px;
}

.contact-details p {
    color: #666;
    font-size: 16px;
}

.contact-form {
    background: #f9f9f9;
    padding: 40px;
    border-radius: 15px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #1e3c72;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 16px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    font-family: 'Sarabun', sans-serif;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.btn-submit {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 40px;
    border: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
}

/* Map Section */
.map-container {
    margin-top: 40px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.map-container iframe {
    width: 100%;
    height: 450px;
    border: none;
}

/* Footer */
footer {
    background: #1e3c72;
    color: white;
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3 {
    font-size: 20px;
    margin-bottom: 20px;
    font-weight: 600;
}

.footer-section p,
.footer-section ul li {
    font-size: 14px;
    line-height: 1.8;
    opacity: 0.9;
}

.footer-section ul {
    list-style: none;
}

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

.footer-section a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #ffd700;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.footer-bottom p {
    font-size: 14px;
    opacity: 0.8;
}

/* Registration Form Styles */
.registration-form {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    max-width: 800px;
    margin: 0 auto;
}

.form-section {
    margin-bottom: 35px;
}

.form-section h3 {
    color: #1e3c72;
    font-size: 22px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row.full-width {
    grid-template-columns: 1fr;
}

.radio-group {
    display: flex;
    gap: 20px;
    align-items: center;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 400;
}

.radio-group input[type="radio"] {
    width: auto;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 400;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
}

/* Program Schedule Table */
.schedule-table {
    width: 100%;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-top: 30px;
}

.schedule-table table {
    width: 100%;
    border-collapse: collapse;
}

.schedule-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 16px;
}

.schedule-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    font-size: 15px;
}

.schedule-table tr:hover {
    background: #f9f9f9;
}

.schedule-table .time-col {
    font-weight: 600;
    color: #2a5298;
    width: 150px;
}

/* Detail Page Styles */
.detail-section {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.detail-section h2 {
    color: #1e3c72;
    font-size: 28px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.detail-section h3 {
    color: #2a5298;
    font-size: 22px;
    margin: 25px 0 15px;
}

.info-grid {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 15px 30px;
    margin: 20px 0;
}

.info-label {
    font-weight: 600;
    color: #1e3c72;
}

.info-value {
    color: #555;
}

.highlight-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 15px;
    margin: 30px 0;
    text-align: center;
}

.highlight-box h3 {
    font-size: 24px;
    margin-bottom: 15px;
}

.highlight-box p {
    font-size: 18px;
    opacity: 0.95;
}

/* Responsive Design */
@media (max-width: 968px) {
    .nav-menu {
        flex-direction: column;
        width: 100%;
    }
    
    .nav-menu a {
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .quick-menu-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 32px;
    }
    
    .hero p {
        font-size: 16px;
    }
    
    .section-title h2 {
        font-size: 28px;
    }
    
    .quick-menu-grid {
        grid-template-columns: 1fr;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .logo-text h1 {
        font-size: 22px;
    }
}

/* Filter bar for videos */
.video-filter-bar .filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}

.video-filter-bar .filter-item {
    min-width: 160px;
}

.video-filter-bar label {
    font-size: 14px;
    margin-bottom: 4px;
    color: #333;
}

.video-filter-bar select {
    width: 100%;
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.video-filter-bar .btn-primary {
    padding: 8px 16px;
    border-radius: 999px;
    border: none;
    background: #0056b3;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
}

.video-filter-bar .btn-primary:hover {
    background: #003f88;
}

/* Access badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}

.badge-public {
    background: #e0f2fe;
    color: #0369a1;
}

.badge-protected {
    background: #fee2e2;
    color: #b91c1c;
}

/* Locked video box */
.video-locked-box {
    background: #f9fafb;
    border: 1px dashed #d1d5db;
    padding: 14px;
    border-radius: 10px;
    text-align: left;
    font-size: 0.9rem;
}

.video-locked-box .unlock-form {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

.video-locked-box .unlock-form input[type="password"] {
    flex: 1;
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    font-size: 0.9rem;
}

.video-locked-box .unlock-form button {
    padding: 6px 10px;
    border-radius: 8px;
    border: none;
    background: #0f766e;
    color: #fff;
    font-size: 0.85rem;
    cursor: pointer;
}

.video-locked-box .unlock-form button:hover {
    background: #115e59;
}

.video-error {
    color: #b91c1c;
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.video-success {
    color: #15803d;
    font-size: 0.85rem;
    margin-bottom: 4px;
}
