/* ==========================================================================
   วัตถุประสงค์: สไตล์เฉพาะหน้าแรก (ฮีโร่ + การ์ด)
   ========================================================================== */

/* ไม่ override พื้นหน้า (ใช้ `body.index-body` ใน style.css) */
.index-body {
    color: #09090b;
    font-size: 1rem; /* 16px บนมือถือ */
}

/* มือถือ: รูปฮีโร่ไม่ชนขอบล่างของแถบ header — override .pt-4 ของ Bootstrap */
@media (max-width: 767.98px) {
    .index-body .home-hero {
        padding-top: 3.25rem !important;
    }
}

/* Neutral Mesh Pattern (Subtle dots or very faint gradient) */
.bg-mesh {
    background-color: #ffffff;
    background-image: radial-gradient(#e5e7eb 1px, transparent 1px);
    background-size: 40px 40px;
    position: relative;
    z-index: 1;
}

.hero-title {
    color: #09090b !important;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    color: #71717a !important;
    font-weight: 400;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* ฮีโร่แนวสองคอลัมน์: ไม่บังคับกึ่งกลาง, ฝั่งข้อความ */
.hero-subtitle--side {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
}

/* ตัวนำฮีโร่: เว้นบรรทัด อ่านง่าย */
.home-hero__lead {
    font-size: 1.0625rem;
    line-height: 1.65;
    word-break: break-word;
}

@media (min-width: 768px) {
    .home-hero__lead {
        font-size: 1.125rem;
    }
}

/* ----- ฮีโร่: รูป col-lg-7 + ข้อความ col-lg-5, รูปสูงขั้นต่ำบนเดสก์ท็อป ให้ดูใหญ่ขึ้นโดยไม่ทับ ----- */
.home-hero__col-illu,
.home-hero__col-copy {
    min-width: 0; /* กัน row flex ล้นเกิน 50% */
}

.home-hero__col-illu {
    background: transparent;
    line-height: 0;
    padding: 0;
    margin: 0;
    border: 0;
    box-shadow: none;
}

.home-hero__col-copy {
    position: static;
    z-index: auto;
}

/* รูป webp: พื้นโปร่งตาม alpha; min-height บน lg+ ดันให้แสดงสูง/ใหญ่ขึ้นในคอลัมน์ */
.home-hero-illu {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    object-position: left center;
    background: transparent;
    border: 0;
}

@media (min-width: 992px) {
    .home-hero-illu {
        width: 100%;
        height: min(60vh, 640px);
        min-height: 400px;
        object-fit: contain;
        object-position: left center;
    }
}

/* ลดช่องว่างฮีโร่ – แถวการ์ดจุดเด่น (เลื่อนกล่องขึ้น) */
.home-features-wrap {
    margin-top: -0.25rem;
}

@media (min-width: 768px) {
    .home-features-wrap {
        margin-top: -0.75rem;
    }
}

@media (min-width: 992px) {
    .home-features-wrap {
        margin-top: -1rem;
    }
}

/* touch target ปุ่มฮีโร่ */
.min-h-44 {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.text-muted-foreground {
    color: #71717a;
}

/* ----- การ์ดจุดเด่น: รูปประกอบมุมขวาล่าง (จาก assets/images/home) ----- */
.home-feature-card {
    border-color: #e4e4e7 !important;
    border-radius: 0.75rem;
    /* ให้รูปมุมไม่โดนตัด — padding กล่องกันทับมุมโค้ง */
    overflow: visible;
}

.home-feature-card--shadow {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
}

/* padding รอบ — หัวข้อไม่ชิดขอบบน, รูปมุมไม่ชิดขอบขวา-ล่าง */
.home-feature-card__body {
    padding: 1rem 1rem 3.5rem 1rem;
    min-height: 10.5rem;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .home-feature-card__body {
        min-height: 9.5rem;
        padding: 1rem 1.125rem 3.5rem 1.125rem;
    }
}

/* ข้อความการ์ด: บรรทัดชัด, อ่านสบาย */
.home-feature-card__p {
    line-height: 1.7;
    font-size: 1rem;
    margin-bottom: 0;
    word-break: break-word;
}

.home-feature-card__text {
    position: relative;
    z-index: 1;
}

.home-feature-card .card-title {
    margin-bottom: 0.65rem;
    line-height: 1.35;
}

/* รูปตกแต่ง: ขวา-ล่าง, ไม่บังกดลิงก์ — ขยายให้ใหญ่ขึ้น */
.home-feature-card__deco {
    position: absolute;
    right: 0.75rem;
    bottom: 0.75rem;
    width: auto;
    max-width: 55%;
    max-height: 6.5rem;
    min-width: 4rem;
    height: auto;
    object-fit: contain;
    object-position: right bottom;
    pointer-events: none;
    z-index: 0;
    opacity: 0.95;
}

@media (min-width: 768px) {
    .home-feature-card__deco {
        max-width: 52%;
        max-height: 6.25rem;
        right: 0.875rem;
        bottom: 0.875rem;
    }
}

/* Feature Cards - Minimalist Shadcn Style (คลาสเดิม) */
.feature-card {
    background: #ffffff;
    border: 1px solid #e4e4e7;
    border-radius: 1rem;
    padding: 2.5rem 2rem;
    transition: all 0.2s ease-in-out;
    z-index: 2;
    position: relative;
}

.feature-card .card-title {
    color: #09090b !important;
    font-weight: 700;
    margin-bottom: 1rem;
}

.feature-card .card-text {
    color: #71717a !important;
    font-size: 0.95rem;
    line-height: 1.6;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: #a1a1aa;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

.feature-card .btn-outline-secondary {
    border-color: #e4e4e7;
    color: #18181b;
}

.feature-card .btn-outline-secondary:hover {
    background-color: #f4f4f5;
    border-color: #d4d4d8;
}