/* ========================================
   FORCE NOTO SANS THAI FONT
======================================== */
* {
    font-family: 'Noto Sans Thai', sans-serif !important;
}

body,
h1, h2, h3, h4, h5, h6,
p, a, span, div, li, td, th,
button, input, textarea, select {
    font-family: 'Noto Sans Thai', sans-serif !important;
}
    
/* ========================================
   HISTORY PAGE STYLES
======================================== */


/* Description Section */
.history-description {
    background: #f8f9fa;
    padding: 60px 0;
}

.description-content {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.08);
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    font-family: 'Noto Sans Thai', sans-serif !important;
}

.description-content h1,
.description-content h2,
.description-content h3,
.description-content h4 {
    color: var(--accent-color);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    font-family: 'Noto Sans Thai', sans-serif !important;
}

.description-content h1 {
    font-size: 2rem;
}

.description-content h2 {
    font-size: 1.75rem;
}

.description-content h3 {
    font-size: 1.5rem;
}

.description-content h4 {
    font-size: 1.25rem;
}

.description-content p {
    margin-bottom: 1.2rem;
    font-family: 'Noto Sans Thai', sans-serif !important;
}

.description-content ul,
.description-content ol {
    padding-left: 2rem;
    margin-bottom: 1.2rem;
}

.description-content li {
    margin-bottom: 0.5rem;
    font-family: 'Noto Sans Thai', sans-serif !important;
}

.description-content a {
    color: var(--accent-color);
    text-decoration: underline;
}

.description-content a:hover {
    color: color-mix(in srgb, var(--accent-color), transparent 20%);
}

.description-content strong,
.description-content b {
    font-weight: 600;
}

/* Section Title */
.section-title {
    margin-bottom: 40px;
}

.section-title h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--heading-color);
    margin-bottom: 1rem;
    font-family: 'Noto Sans Thai', sans-serif !important;
}

.section-title p {
    font-size: 1.1rem;
    color: color-mix(in srgb, var(--default-color), transparent 40%);
    font-family: 'Noto Sans Thai', sans-serif !important;
}

/* Timeline Section */
.history-timeline {
    padding: 60px 0;
    background: white;
}

/* Timeline Wrapper */
.timeline-wrapper {
    position: relative;
    padding: 50px 0;
}

/* Timeline Center Line */
.timeline-wrapper::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, 
        var(--accent-color) 0%, 
        color-mix(in srgb, var(--accent-color), transparent 30%) 50%, 
        var(--accent-color) 100%);
    transform: translateX(-50%);
    z-index: 0;
}

/* Timeline Item */
.timeline-item {
    position: relative;
    margin-bottom: 60px;
    width: 100%;
    display: flex;
    align-items: center;
}

/* Timeline Badge (Icon in center) */
.timeline-badge {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    background: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 6px #fff, 0 4px 15px rgba(0, 0, 0, 0.15);
    z-index: 2;
}

.timeline-badge i {
    font-size: 1.5rem;
    color: white;
}

/* Timeline Panel (Content Box) */
.timeline-panel {
    width: 45%;
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    position: relative;
    transition: all 0.3s ease;
    border: 1px solid color-mix(in srgb, var(--default-color), transparent 90%);
}

.timeline-panel:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* Left Side Items */
.timeline-left .timeline-panel {
    margin-right: auto;
    margin-left: 0;
}

.timeline-left .timeline-panel::after {
    content: '';
    position: absolute;
    right: -12px;
    top: 25px;
    width: 0;
    height: 0;
    border-left: 12px solid white;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
}

/* Right Side Items */
.timeline-right .timeline-panel {
    margin-left: auto;
    margin-right: 0;
}

.timeline-right .timeline-panel::after {
    content: '';
    position: absolute;
    left: -12px;
    top: 25px;
    width: 0;
    height: 0;
    border-right: 12px solid white;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
}

/* Timeline Year */
.timeline-year h3 {
    color: var(--accent-color);
    font-weight: 700;
    font-size: 1.5rem;
    margin: 0 0 12px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid color-mix(in srgb, var(--default-color), transparent 90%);
    font-family: 'Noto Sans Thai', sans-serif !important;
}

/* Timeline Image */
.timeline-image {
    margin-bottom: 15px;
    overflow: hidden;
    border-radius: 8px;
}

.timeline-image img {
    width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.timeline-image img:hover {
    transform: scale(1.05);
    cursor: pointer;
}

/* Timeline Content */
.timeline-title {
    color: var(--heading-color);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
    font-family: 'Noto Sans Thai', sans-serif !important;
}

.timeline-description {
    color: color-mix(in srgb, var(--default-color), transparent 20%);
    font-size: 1rem;
    line-height: 1.7;
    font-family: 'Noto Sans Thai', sans-serif !important;
}

/* Read More Button */
.timeline-description .btn {
    font-family: 'Noto Sans Thai', sans-serif !important;
}

/* Empty State */
.history-timeline .bi-inbox {
    font-size: 4rem;
    opacity: 0.3;
}

.history-timeline h3,
.history-timeline p {
    font-family: 'Noto Sans Thai', sans-serif !important;
}

/* Responsive Design */
@media (max-width: 992px) {
    /* Stack timeline vertically */
    .timeline-wrapper::before {
        left: 30px;
    }
    
    .timeline-badge {
        left: 30px;
        width: 50px;
        height: 50px;
    }
    
    .timeline-badge i {
        font-size: 1.3rem;
    }
    
    .timeline-left .timeline-panel,
    .timeline-right .timeline-panel {
        width: calc(100% - 100px);
        margin-left: 80px;
        margin-right: 0;
    }
    
    .timeline-left .timeline-panel::after,
    .timeline-right .timeline-panel::after {
        left: -12px;
        right: auto;
        border-right: 12px solid white;
        border-left: none;
    }
}

@media (max-width: 768px) {
    .page-title .heading h1 {
        font-size: 36px;
    }
    
    .page-title .heading p {
        font-size: 16px;
    }
    
    .description-content {
        padding: 30px 20px;
        font-size: 15px;
    }
    
    .section-title h2 {
        font-size: 1.75rem;
    }
    
    .timeline-year h3 {
        font-size: 1.3rem;
    }
    
    .timeline-title {
        font-size: 1.15rem;
    }
    
    .timeline-description {
        font-size: 0.95rem;
    }
    
    .timeline-panel {
        padding: 20px;
    }
}

@media (max-width: 576px) {
    .page-title .heading h1 {
        font-size: 32px;
    }
    
    .page-title .heading p {
        font-size: 15px;
    }
    
    .timeline-wrapper::before {
        left: 20px;
    }
    
    .timeline-badge {
        left: 20px;
        width: 45px;
        height: 45px;
    }
    
    .timeline-badge i {
        font-size: 1.1rem;
    }
    
    .timeline-left .timeline-panel,
    .timeline-right .timeline-panel {
        width: calc(100% - 80px);
        margin-left: 70px;
    }
    
    .description-content {
        padding: 20px 15px;
    }
}

/* Animation Enhancements */
.timeline-item[data-aos] {
    opacity: 0;
    transition-property: transform, opacity;
}

.timeline-item[data-aos].aos-animate {
    opacity: 1;
}

/* Highlight Current Year (ปัจจุบัน) */
.timeline-current .timeline-panel {
    border: 2px solid #ffd700;
    background: linear-gradient(135deg, #fffbeb 0%, #ffffff 100%);
}

.timeline-current .timeline-badge {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 6px #fff, 0 4px 15px rgba(255, 215, 0, 0.3);
    }
    50% {
        box-shadow: 0 0 0 6px #fff, 0 4px 25px rgba(255, 215, 0, 0.6);
    }
}

/* Print Styles */
@media print {
    .page-title,
    .timeline-wrapper::before,
    .timeline-badge {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .timeline-panel {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .history-header-overlay {
        background: rgba(255, 255, 255, 0.95);
    }
}
