
:root{
    --aia-red:#d31145;
    --aia-red-dark:#b90f38;
    --aia-pink:#fff0f4;
    --aia-pink-2:#fde3eb;
    --aia-ink:#18202b;
    --aia-muted:#69727f;
    --aia-line:#e7e9ee;
    --aia-card:#ffffff;
}

body{
    color:var(--aia-ink);
    background:#fff;
    font-family:Tahoma,"Noto Sans Thai","Leelawadee UI",Arial,sans-serif;
}

.top-strip{
    background:#fff;
    border-bottom:1px solid #f0f1f3;
    color:#727a86;
}

.aia-inspired-header{
    background:rgba(255,255,255,.97);
    box-shadow:0 8px 30px rgba(30,38,55,.05);
}

.main-header-row{
    min-height:82px;
}

.brand-mark{
    gap:12px;
}

.brand-box{
    width:52px!important;
    height:52px!important;
    min-width:52px;
    border-radius:50%!important;
    display:grid!important;
    place-items:center!important;
    background:var(--aia-red)!important;
    color:#fff!important;
    font-size:.73rem!important;
    font-weight:900!important;
    letter-spacing:.02em;
    box-shadow:0 7px 22px rgba(211,17,69,.18);
}

.brand-copy strong{
    color:var(--aia-red);
    font-size:1.15rem;
}

.brand-copy small{
    color:#8a929d;
    max-width:280px;
}

.aia-main-nav > a,
.nav-drop-btn{
    color:#202731!important;
    font-weight:700!important;
}

.aia-main-nav > a:hover,
.nav-drop-btn:hover{
    color:var(--aia-red)!important;
}

.aia-main-nav .header-cta{
    color:#fff!important;
    background:var(--aia-red)!important;
    border-radius:999px!important;
    padding:11px 18px!important;
    box-shadow:0 8px 20px rgba(211,17,69,.18);
}

.aia-main-nav .header-cta:hover{
    background:var(--aia-red-dark)!important;
}

.nav-dropdown-menu{
    border-radius:14px!important;
    border:1px solid var(--aia-line)!important;
    box-shadow:0 16px 45px rgba(24,32,43,.12)!important;
    overflow:hidden;
}

.nav-dropdown-menu a:hover{
    background:#fff2f5!important;
    color:var(--aia-red)!important;
}

.btn,
.hero-btn,
.large-btn{
    border-radius:999px!important;
}

.btn-primary,
.hero-btn{
    background:var(--aia-red)!important;
    border-color:var(--aia-red)!important;
    box-shadow:0 9px 22px rgba(211,17,69,.16);
}

.btn-primary:hover,
.hero-btn:hover{
    background:var(--aia-red-dark)!important;
}

.hero-slider{
    /*
     * Banner ที่อัปโหลดจาก Admin:
     * - ย่อให้พอดีกับหน้าจอ
     * - ไม่บีบ/ยืด
     * - ไม่ crop รูป
     * - รองรับภาพแนะนำ 1920x720 และภาพสัดส่วนอื่น
     */
    position:relative;
    width:100%;
    height:clamp(260px,37.5vw,720px)!important;
    min-height:0!important;
    max-height:720px;
    overflow:hidden;
    background:linear-gradient(180deg,#fff,#fff8fa);
}

.hero-slide{
    overflow:hidden;
    background:#fff;
}

.hero-slide img{
    position:absolute!important;
    inset:0!important;
    width:100%!important;
    height:100%!important;
    max-width:100%!important;
    object-fit:contain!important;
    object-position:center center!important;
    background:#fff;
}

/*
 * ป้องกันภาพ Banner ที่มีข้อความในภาพเองถูก overlay มืดเกินไป
 * แต่ยังคงเงาบาง ๆ ฝั่งซ้ายสำหรับกรณีใช้ Title ของ Slider
 */
.hero-slide-shade{
    background:linear-gradient(
        90deg,
        rgba(0,0,0,.18),
        rgba(0,0,0,.03) 55%,
        rgba(0,0,0,0)
    )!important;
}

/* ภาพทั่วไปฝั่งลูกค้า ห้ามกว้างล้น container */
main img{
    max-width:100%;
}

.quick-actions-section{
    background:#fff;
}

.quick-card{
    border-radius:18px!important;
    border:1px solid var(--aia-line)!important;
    box-shadow:0 10px 28px rgba(25,33,48,.05);
    transition:.18s ease;
}

.quick-card:hover{
    transform:translateY(-3px);
    box-shadow:0 16px 34px rgba(25,33,48,.08);
}

.quick-icon{
    background:var(--aia-pink)!important;
    color:var(--aia-red)!important;
}

.contact-home-card{
    border-radius:24px!important;
    background:linear-gradient(135deg,#fff3f6,#fff)!important;
    border:1px solid #f6d7e0!important;
    box-shadow:0 16px 40px rgba(211,17,69,.07);
}

.eyebrow{
    color:var(--aia-red)!important;
    font-weight:800;
    letter-spacing:.02em;
}

.section-title{
    color:var(--aia-ink);
}

.about-home{
    background:linear-gradient(180deg,#fff,#fff3f7);
}

.site-footer{
    background:#fff3f7!important;
    color:#424a55!important;
    border-top:1px solid #f4dce3;
}

/* ===== Shared article design ===== */
.article-section-v16{
    padding:64px 0;
    background:
      radial-gradient(circle at 90% 10%,rgba(253,220,230,.5),transparent 27%),
      linear-gradient(180deg,#fff,#fffafb);
}

.article-section-head{
    text-align:center;
    max-width:760px;
    margin:0 auto 30px;
}

.article-section-head h2{
    margin:4px 0 8px;
    font-size:clamp(1.8rem,4vw,2.65rem);
}

.article-section-head p{
    color:var(--aia-muted);
    margin:0;
    line-height:1.7;
}

.article-grid-v16{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:22px;
}

.article-card-v16{
    background:var(--aia-card);
    border:1px solid var(--aia-line);
    border-radius:18px;
    overflow:hidden;
    display:flex;
    flex-direction:column;
    min-width:0;
    box-shadow:0 12px 32px rgba(22,30,46,.07);
    transition:transform .18s ease,box-shadow .18s ease;
}

.article-card-v16:hover{
    transform:translateY(-5px);
    box-shadow:0 18px 42px rgba(22,30,46,.11);
}

.article-card-image-link{
    display:block;
    position:relative;
    overflow:hidden;
}

.article-card-image{
    /*
     * หน้าแรก/หน้ารวมบทความ:
     * ทำการ์ดทุกใบเท่ากัน 16:9
     * crop เฉพาะตอนแสดงผล ไม่แก้ไฟล์จริงบน Server
     */
    width:100%;
    aspect-ratio:16/9;
    display:block;
    object-fit:cover;
    object-position:center;
    background:#f0f1f3;
    transition:transform .28s ease;
}

.article-card-v16:hover .article-card-image{
    transform:scale(1.035);
}

.article-card-body{
    padding:18px 19px 20px;
    display:flex;
    flex-direction:column;
    flex:1;
}

.article-card-date{
    display:flex;
    align-items:center;
    gap:7px;
    color:#818895;
    font-size:.79rem;
    margin-bottom:9px;
}

.article-card-date:before{
    content:"";
    width:8px;
    height:8px;
    border-radius:50%;
    background:var(--aia-red);
}

.article-card-title{
    margin:0 0 8px;
    font-size:1.08rem;
    line-height:1.45;
    color:var(--aia-ink);
}

.article-card-excerpt{
    margin:0 0 18px;
    color:var(--aia-muted);
    line-height:1.68;
    display:-webkit-box;
    -webkit-line-clamp:3;
    -webkit-box-orient:vertical;
    overflow:hidden;
}

.article-read-btn{
    margin-top:auto;
    align-self:flex-start;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    min-height:42px;
    padding:9px 17px;
    border-radius:999px;
    background:var(--aia-red);
    color:#fff!important;
    text-decoration:none!important;
    font-weight:800;
    box-shadow:0 8px 18px rgba(211,17,69,.18);
    transition:.18s ease;
}

.article-read-btn:hover{
    background:var(--aia-red-dark);
    transform:translateX(2px);
}

.article-all-wrap{
    display:flex;
    justify-content:center;
    margin-top:32px;
}

.article-all-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    min-width:230px;
    padding:13px 24px;
    border-radius:999px;
    background:var(--aia-red);
    color:#fff!important;
    text-decoration:none!important;
    font-size:1rem;
    font-weight:900;
    box-shadow:0 10px 24px rgba(211,17,69,.20);
}

.article-all-btn:hover{
    background:var(--aia-red-dark);
}

.article-page-hero{
    padding:58px 0 38px;
    background:
      radial-gradient(circle at 13% 35%,rgba(255,224,232,.75),transparent 23%),
      radial-gradient(circle at 88% 10%,rgba(255,236,241,.95),transparent 28%),
      #fff;
    text-align:center;
}

.article-page-hero h1{
    margin:0;
    font-size:clamp(2rem,5vw,3.25rem);
}

.article-page-hero h1 span{
    color:var(--aia-red);
}

.article-page-hero p{
    max-width:760px;
    margin:12px auto 0;
    color:var(--aia-muted);
    line-height:1.7;
}

.article-list-page{
    padding:30px 0 70px;
}

.article-pagination{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:7px;
    flex-wrap:wrap;
    margin-top:34px;
}

.article-pagination a,
.article-pagination span{
    min-width:40px;
    height:40px;
    padding:0 11px;
    border-radius:999px;
    border:1px solid var(--aia-line);
    display:grid;
    place-items:center;
    text-decoration:none;
    color:#353d49;
    background:#fff;
}

.article-pagination .current{
    background:var(--aia-red);
    color:#fff;
    border-color:var(--aia-red);
}

.article-detail-v16{
    padding:40px 0 72px;
    background:#f8f9fb;
}

.article-detail-shell{
    max-width:980px;
    margin:0 auto;
    background:#fff;
    border:1px solid var(--aia-line);
    border-radius:24px;
    overflow:hidden;
    box-shadow:0 16px 44px rgba(22,30,46,.07);
}

.article-detail-cover{
    /*
     * หน้าบทความเต็ม:
     * แสดงรูปครบทั้งภาพ ไม่ crop และย่ออัตโนมัติหากภาพใหญ่เกิน
     */
    display:block;
    width:auto;
    height:auto;
    max-width:calc(100% - 48px);
    max-height:min(72vh,760px);
    object-fit:contain;
    margin:24px auto 0;
    background:#fff;
    border-radius:16px;
    box-shadow:0 10px 28px rgba(22,30,46,.08);
}

.article-detail-body{
    padding:clamp(22px,5vw,48px);
}

.article-detail-date{
    color:#8a919b;
    margin-bottom:9px;
}

.article-detail-title{
    margin:0 0 12px;
    font-size:clamp(1.8rem,4vw,2.8rem);
    line-height:1.35;
}

.article-detail-excerpt{
    padding:15px 17px;
    margin:20px 0 24px;
    background:#fff3f6;
    border-left:4px solid var(--aia-red);
    color:#5f6875;
    line-height:1.75;
    border-radius:0 12px 12px 0;
}

.article-detail-content{
    font-size:1.02rem;
    color:#29313d;
    line-height:1.95;
}

.article-detail-back{
    display:inline-flex;
    align-items:center;
    gap:7px;
    margin-top:30px;
    color:var(--aia-red)!important;
    font-weight:800;
    text-decoration:none!important;
}

.article-empty-v16{
    grid-column:1/-1;
    text-align:center;
    padding:40px 20px;
    border:1px dashed #d8dde5;
    border-radius:18px;
    background:#fff;
    color:#7a818c;
}

@media(max-width:960px){
    .article-grid-v16{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}

@media(max-width:700px){
    .hero-slider{
        height:clamp(220px,56vw,360px)!important;
    }

    .hero-slide img{
        object-fit:contain!important;
        object-position:center center!important;
    }

    .article-detail-cover{
        max-width:calc(100% - 24px);
        max-height:62vh;
        margin-top:12px;
        border-radius:12px;
    }

    .main-header-row{
        min-height:70px;
    }

    .brand-copy small{
        display:none;
    }

    .article-grid-v16{
        grid-template-columns:1fr;
    }

    .article-section-v16{
        padding:44px 0;
    }
}


/* =========================================================
   v22 FIX: Banner ต้องไม่ล้นกรอบเว็บไซต์
   ========================================================= */
.hero-slider{
    box-sizing:border-box!important;
    width:calc(100% - 32px)!important;
    max-width:1200px!important;
    height:auto!important;
    aspect-ratio:1920 / 720!important;
    min-height:0!important;
    max-height:none!important;
    margin:18px auto 0!important;
    overflow:hidden!important;
    border-radius:18px!important;
    background:#fff!important;
    position:relative!important;
}

.hero-slide{
    position:absolute!important;
    inset:0!important;
    width:100%!important;
    height:100%!important;
    overflow:hidden!important;
    background:#fff!important;
    border-radius:inherit!important;
}

.hero-slide.active{
    position:absolute!important;
}

.hero-slide img{
    position:absolute!important;
    inset:0!important;
    display:block!important;
    width:100%!important;
    height:100%!important;
    max-width:100%!important;
    max-height:100%!important;
    object-fit:contain!important;
    object-position:center center!important;
    margin:0!important;
    padding:0!important;
    background:#fff!important;
}

/* รูปโฆษณามีข้อความอยู่ในภาพแล้ว ไม่ต้องใช้ชั้นดำทับ */
.hero-slide-shade{
    display:none!important;
    background:none!important;
    opacity:0!important;
}

/* ถ้ามี Title/Subtitle ที่ Admin ใส่ใน Slider ให้ยังแสดงได้ */
.hero-slide-content{
    position:absolute!important;
    z-index:3!important;
    left:0!important;
    right:0!important;
    bottom:0!important;
    max-width:100%!important;
    padding:22px 28px!important;
    box-sizing:border-box!important;
    pointer-events:none;
}

.hero-slide-content .hero-btn{
    pointer-events:auto;
}

/* ป้องกัน component ลูกดันความกว้างเว็บไซต์ */
.hero-slider *,
.hero-slide *{
    box-sizing:border-box;
}

@media(max-width:900px){
    .hero-slider{
        width:calc(100% - 24px)!important;
        margin-top:12px!important;
        border-radius:14px!important;
    }

    .hero-slide-content{
        padding:16px 18px!important;
    }
}

@media(max-width:600px){
    .hero-slider{
        width:calc(100% - 16px)!important;
        aspect-ratio:16 / 7!important;
        margin-top:8px!important;
        border-radius:10px!important;
    }

    .hero-slide img{
        object-fit:contain!important;
    }

    .hero-slide-content{
        padding:12px!important;
    }
}


/* =========================================================
   v23: Full-width website banner + automatic left slider
   ========================================================= */

/* กว้างเท่าพื้นที่หน้าเว็บ ไม่เกินหน้าเว็บ และรักษา 1920:720 */
main > .hero-slider{
    position:relative!important;
    box-sizing:border-box!important;
    width:100%!important;
    max-width:100%!important;
    aspect-ratio:1920 / 720!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    margin:0!important;
    padding:0!important;
    overflow:hidden!important;
    border-radius:0!important;
    background:#fff!important;
}

/* แถวภาพทั้งหมดที่จะ translate ไปทางซ้าย */
.hero-slider .hero-track{
    display:flex!important;
    width:100%!important;
    height:100%!important;
    margin:0!important;
    padding:0!important;
    transform:translate3d(0,0,0);
    will-change:transform;
}

/* Override CSS Slider เดิมที่ใช้ position:absolute + fade */
.hero-slider .hero-track .hero-slide{
    position:relative!important;
    inset:auto!important;
    flex:0 0 100%!important;
    width:100%!important;
    min-width:100%!important;
    height:100%!important;
    opacity:1!important;
    visibility:visible!important;
    overflow:hidden!important;
    border-radius:0!important;
    background:#fff!important;
}

/* ภาพ 1920x720 จะเต็มกรอบพอดี
   ภาพสัดส่วนอื่นจะ fill โดยไม่ยืด/บีบ แต่สามารถ crop ขอบเล็กน้อย */
.hero-slider .hero-track .hero-slide > img{
    position:absolute!important;
    inset:0!important;
    display:block!important;
    width:100%!important;
    height:100%!important;
    max-width:none!important;
    max-height:none!important;
    object-fit:cover!important;
    object-position:center center!important;
    margin:0!important;
    padding:0!important;
    background:#fff!important;
}

/* ไม่มีลูกศร และไม่มี dot navigation */
.hero-slider .hero-arrow,
.hero-slider .hero-dots{
    display:none!important;
}

/* เอาชั้นมืดออกเพื่อคงสีต้นฉบับ */
.hero-slider .hero-slide-shade{
    display:none!important;
    opacity:0!important;
    background:none!important;
}

/* ถ้า Admin ใส่หัวข้อ/ข้อความบน Slider ให้กล่องข้อความอ่านได้โดยไม่ทำให้ทั้งภาพมืด */
.hero-slider .hero-slide-content{
    position:absolute!important;
    z-index:3!important;
    left:clamp(16px,4vw,70px)!important;
    right:auto!important;
    bottom:clamp(16px,4vw,56px)!important;
    width:min(620px,72%)!important;
    height:auto!important;
    min-height:0!important;
    padding:18px 20px!important;
    border-radius:16px!important;
    color:#17202b!important;
    background:rgba(255,255,255,.90)!important;
    box-shadow:0 10px 30px rgba(18,26,40,.10)!important;
    backdrop-filter:blur(5px);
    justify-content:flex-start!important;
    pointer-events:none;
}

.hero-slider .hero-slide-content h1{
    color:#17202b!important;
    text-shadow:none!important;
    margin-bottom:8px!important;
}

.hero-slider .hero-slide-content p{
    color:#36404d!important;
    text-shadow:none!important;
    margin-bottom:12px!important;
}

.hero-slider .hero-slide-content .hero-btn{
    pointer-events:auto;
}

/* ลดการเคลื่อนไหวสำหรับผู้ใช้ที่ตั้งค่าระบบไว้ */
@media (prefers-reduced-motion: reduce){
    .hero-slider .hero-track{
        transition-duration:0s!important;
    }
}

@media(max-width:700px){
    main > .hero-slider{
        width:100%!important;
        aspect-ratio:16 / 7!important;
        margin:0!important;
        border-radius:0!important;
    }

    .hero-slider .hero-slide-content{
        left:10px!important;
        bottom:10px!important;
        width:calc(100% - 20px)!important;
        padding:12px 14px!important;
        border-radius:12px!important;
    }

    .hero-slider .hero-slide-content h1{
        font-size:1.35rem!important;
    }

    .hero-slider .hero-slide-content p{
        font-size:.92rem!important;
    }
}

/* ตามมาตรฐานที่กำหนดไว้: ข้อความฝั่งลูกค้าต้องเข้ม อ่านง่าย */
main,
main p,
main small,
.site-footer,
.site-footer p{
    color:#343d49;
}
