@charset "UTF-8";
/* ==========================================================================
   ACF Activities - ตารางกิจกรรม
   ออกแบบให้เข้ากับ Astra (Free) + Elementor Pro
   โทนสีชุดเดียวกับ acf-projects (anticorruptionthai)
   ========================================================================== */

:root{
    --acfa-navy:      #1e3a8a;   /* น้ำเงินเข้ม */
    --acfa-red:       #dc2626;   /* แดง */
    --acfa-row-bg:    #ececec;   /* พื้นหลังแถวกิจกรรม */
    --acfa-line:      #c4c4c4;   /* เส้นแบ่งคอลัมน์ในแถว */
    --acfa-radius:    18px;      /* ความโค้งของแถว */
}

/* ---------- LAYOUT ---------- */
.acfa-wrap{
    max-width: 1100px;
    margin: 0 auto;
    font-family: inherit;        /* ใช้ฟอนต์จาก Astra */
}

/* ---------- DROPDOWN เลือกปี (มุมขวาบน) ---------- */
.acfa-topbar{
    display: flex;
    justify-content: flex-end;
    margin-bottom: 8px;
}
.acfa-select{
    position: relative;
    display: inline-flex;
    align-items: stretch;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.acfa-select select{
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    outline: none;
    background: #e5e5e5;
    color: #111827;
    font-weight: 700;
    font-size: 17px;
    padding: 9px 52px 9px 26px;  /* เผื่อที่ให้ปุ่มลูกศรด้านขวา */
    cursor: pointer;
    line-height: 1.2;
}
.acfa-select-arrow{
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 38px;
    background: var(--acfa-navy);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    pointer-events: none;        /* คลิกทะลุไปที่ select */
}
.acfa-go{
    margin-left: 8px;
    padding: 9px 16px;
    border: 0;
    border-radius: 6px;
    background: var(--acfa-navy);
    color: #fff;
    cursor: pointer;
}

/* ---------- หัวข้อเดือน ---------- */
.acfa-month{ margin: 26px 0 34px; }
.acfa-month-title{
    margin: 0 0 18px;
    font-size: 34px;
    font-weight: 800;
    line-height: 1.3;
}
.acfa-month.is-red  .acfa-month-title{ color: var(--acfa-red); }
.acfa-month.is-navy .acfa-month-title{ color: var(--acfa-navy); }

/* ---------- แถวกิจกรรม ---------- */
.acfa-rows{
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.acfa-row{
    display: grid;
    grid-template-columns: 90px 1.35fr 190px 1.35fr;
    align-items: center;
    background: var(--acfa-row-bg);
    border-radius: var(--acfa-radius);
    padding: 22px 28px;
    column-gap: 0;
}

/* สีตัวอักษรตามโทนของเดือน */
.acfa-month.is-red  .acfa-row{ color: var(--acfa-red); }
.acfa-month.is-navy .acfa-row{ color: var(--acfa-navy); }

.acfa-day{
    font-size: 30px;
    font-weight: 800;
    text-align: center;
    padding-right: 18px;
    line-height: 1;
}
/* ช่วงวันที่ในเดือนเดียวกัน เช่น "1-5", "29-31" -> ลดขนาดลงเล็กน้อยให้พอดีคอลัมน์ */
.acfa-day.is-range{
    font-size: 23px;
    letter-spacing: -.5px;
}
/* ช่วงข้ามเดือน เช่น "29 มิ.ย. - 2 ก.ค." -> ตัวเล็ก ขึ้นบรรทัดได้ */
.acfa-day.is-cross{
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
    white-space: normal;
}
.acfa-title{
    font-size: 17px;
    font-weight: 600;
    line-height: 1.55;
    padding: 2px 22px;
    border-left: 1px solid var(--acfa-line);
    align-self: stretch;
    display: flex;
    align-items: center;
}
.acfa-time{
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    padding: 2px 16px;
    border-left:  1px solid var(--acfa-line);
    border-right: 1px solid var(--acfa-line);
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
}
.acfa-place{
    font-size: 15.5px;
    font-weight: 500;
    line-height: 1.6;
    padding: 2px 0 2px 24px;
}

/* ---------- ข้อความว่าง ---------- */
.acfa-empty{
    padding: 40px;
    text-align: center;
    color: #6b7280;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px dashed #e5e7eb;
}

/* ---------- RESPONSIVE ---------- */

/* Tablet (≤ 921px): ลดขนาด + บีบคอลัมน์ */
@media (max-width: 921px){
    .acfa-month-title{ font-size: 28px; }
    .acfa-row{
        grid-template-columns: 64px 1.2fr 140px 1.2fr;
        padding: 18px 18px;
    }
    .acfa-day{ font-size: 26px; padding-right: 10px; }
    .acfa-day.is-range{ font-size: 19px; }
    .acfa-day.is-cross{ font-size: 12.5px; }
    .acfa-title{ font-size: 15.5px; padding: 2px 14px; }
    .acfa-time{ font-size: 14.5px; padding: 2px 10px; }
    .acfa-place{ font-size: 14.5px; padding-left: 14px; }
}

/* Mobile (≤ 700px): เรียงเป็นบล็อกแนวตั้ง - วันที่อยู่ซ้าย เนื้อหาซ้อนขวา */
@media (max-width: 700px){
    .acfa-month-title{ font-size: 24px; }
    .acfa-row{
        grid-template-columns: 56px 1fr;
        row-gap: 8px;
        align-items: start;
        padding: 16px 16px;
    }
    .acfa-day{
        grid-row: 1 / span 3;
        font-size: 28px;
        padding: 2px 12px 0 0;
        text-align: left;
    }
    .acfa-day.is-range{ font-size: 20px; }
    .acfa-day.is-cross{ font-size: 12px; }
    .acfa-title{ grid-column: 2; padding: 0; border: 0; display: block; }
    .acfa-time{
        grid-column: 2;
        border: 0;
        padding: 0;
        justify-content: flex-start;
        text-align: left;
        font-weight: 500;
    }
    .acfa-time::before{
        content: "เวลา ";
        font-weight: 700;
        margin-right: 6px;
    }
    .acfa-place{ grid-column: 2; padding: 0; }
    .acfa-place::before{
        content: "สถานที่ ";
        font-weight: 700;
        margin-right: 6px;
    }
}
