/* การแสดงของกองต่างๆ */
/* พื้นหลังแบบองค์กร เรียบ + Gradient */
.unit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 32px;
    /* padding: 40px 20px; */
    justify-items: center;

    /* background: linear-gradient(135deg, #e8f1fb, #ffffff); */
}

/* กล่องหน่วยงาน */
.unit-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px 16px;
    width: 100%;
    max-width: 180px;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.unit-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

/* วงกลมไอคอน */
.unit-icon {
    background-color: #0a5ed7;
    width: 64px;
    height: 64px;
    margin: 0 auto 16px auto;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 28px;
    transition: background-color 0.3s ease;
}

.unit-card:hover .unit-icon {
    background-color: #FEB800;
}

/* ข้อความหน่วยงาน */
.unit-title {
    font-size: 1rem;
    font-weight: 600;
    color: #0a5ed7;
    line-height: 1.4;
}

.unit-card:hover .unit-title {
    color: #FEB800;
}


.section-header {
    display: flex;
    align-items: center;
    /* <<< แก้ตรงนี้ */
    gap: 12px;
}

.icon-box {
    background-color: #e74c3c;
    color: #fff;
    font-size: 1.4rem;
    padding: 10px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1a1a1a;
    line-height: 1.2;
}

.section-subtitle {
    font-size: 0.95rem;
    color: #6c757d;
    margin-top: 2px;
    /* <<< เพิ่มตรงนี้นิดเดียวให้บาลานซ์ */
    line-height: 1.4;
}



/* ปฏิทิน */
#event-detail-box {
    min-height: 100%;
}

.fc-row .fc-content-skeleton {
    position: relative;
    z-index: 4;
    padding-bottom: 2px;
    text-align: center;
}

.fc-other-month {
    color: #e0e0e0;
}

/*  */

.publish-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* แสดง 4 กล่องต่อแถว */
    gap: 24px;
}

/* Tablet: แสดง 2 กล่อง */
@media (max-width: 992px) {
    .publish-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .publish-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .publish-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


@media (max-width: 480px) {
    .publish-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.publish-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px 16px;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: #1a1a1a;
    min-height: 200px;
    justify-content: space-between;

}

.icon-circle {
    background-color: #0a5ed7;
    color: #fff;
    width: 82px;
    height: 82px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: background-color 0.3s, color 0.3s;
}

.label {
    font-size: 1rem;
    font-weight: 600;
    transition: color 0.3s;
}

.arrow {
    color: #0a5ed7;
    font-size: 1rem;
    transition: color 0.3s;
}

/* ✅ ลูกเล่น hover */
.publish-card:hover {
    background-color: #0a5ed7;
    color: #fff;
}

.publish-card:hover .icon-circle {
    background-color: #ffffff;
    color: #0a5ed7;
}

.publish-card:hover .label,
.publish-card:hover .arrow {
    color: #ffffff;
}

/* ปฏิทินข้อมูลด้านใน */
.calendarcard-container {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    margin-bottom: 24px;
}

.calendarcard-container:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.main-highlight {
    border: 2px solid #0a5ed7;
    box-shadow: 0 0 0 4px rgba(10, 94, 215, 0.1);
}

.calendarcard-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
}

.calendarcard-img {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
}

.calendarcard-meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.calendarcard-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: #0a5ed7;
    margin-bottom: 8px;
}

.calendarcard-meta-row {
    font-size: 0.95rem;
    color: #555;
    display: flex;
    align-items: center;
    gap: 8px;
}

.calendarcard-description {
    border-top: 1px solid #eee;
    padding: 16px 20px 20px;
}

.calendarcard-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px 24px;
}

.calendarcard-row {
    display: flex;
    flex-direction: column;
}

.calendarcard-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #444;
    margin-bottom: 4px;
}

.calendarcard-value {
    color: #1a1a1a;
    font-size: 0.95rem;
}

.calendarcard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 16px;
}

@media (max-width: 576px) {
    .calendarcard-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .calendarcard-img {
        width: 100%;
        height: auto;
        border-radius: 12px;
    }

    .calendarcard-meta {
        align-items: center;
    }

    .calendarcard-info {
        grid-template-columns: 1fr;
    }

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

.theme-text-primary {
    color: #0156b3 !important;
}

.theme-text-secondary {
    color: #FEB800 !important;
}

.theme-bg-primary {
    background-color: #0156b3 !important;
}

.theme-bg-secondary {
    background-color: #FEB800 !important;
}