@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;500;600;700&display=swap');

body {
    font-family: 'Kanit', sans-serif;
    background-color: #f8f9fa;
    color: #333333;
}

/* ===================================================
   1. Typography Standard (อ้างอิงสัดส่วน Freedom Standard)
   =================================================== */

/* --- ขนาดบนจอ Notebook / Desktop (กว้างตั้งแต่ 992px ขึ้นไป) --- */
@media (min-width: 992px) {
    /* 1.1 เนื้อหาทั่วไปในหน้าเว็บ (อ่านง่าย โปร่งกำลังดี) */
    body, p, li {
        font-size: 1.125rem !important; /* 18px */
        line-height: 1.75 !important;   /* ระยะห่างบรรทัดโปร่งสบายตา */
        color: #334155;                 /* สีเทาเข้ม อ่านสบายตากว่าสีดำสนิท */
    }

    /* 1.2 หัวข้อหลักประจำหน้า / Hero Title */
    h1, .hero-title {
        font-size: 2.25rem !important; /* 36px */
        font-weight: 700;
        line-height: 1.3;
    }

    /* 1.3 หัวข้อ Section (เช่น บริการของเรา / ผลงานซ่อม) */
    h2, .section-title {
        font-size: 1.75rem !important; /* 28px */
        font-weight: 700;
    }

    /* 1.4 หัวข้อการ์ด / หัวข้อย่อย (เช่น ชื่ออาการเสีย / ชื่อแบรนด์ / การ์ดผลงาน) */
    h3, h4, .card-title, .repair-card-title, .portfolio-title {
        font-size: 1.25rem !important; /* 20px */
        font-weight: 600;
        line-height: 1.4;
    }

    /* 1.5 ข้อความสั้นอธิบายใต้การ์ดบริการ / สถิติ / รายละเอียดผลงาน */
    .service-card p, 
    .custom-card p,
    .card-body p,
    .repair-card-text,
    .portfolio-desc {
        font-size: 0.9375rem !important; /* 15px */
        line-height: 1.6 !important;
        color: #64748b;
    }

    /* 1.6 ตัวเลขกล่องสถิติ (Stat Box: 10+, 4,000+) */
    .stat-card h3,
    .stat-card .fw-bold,
    .stat-card h4 {
        /* ลดขนาดตัวเลขให้ไม่กินพื้นที่มากเกินไป */
        font-size: 1.25rem !important; /* ~20px กระชับกว่าเดิม */
        margin-bottom: 0.15rem;
    }

    .stat-card p,
    .stat-card .small,
    .stat-card .text-muted {
        font-size: 0.875rem !important; /* 14px กระชับสวยงาม */
        line-height: 1.3 !important;
    }

    /* 1.7 ข้อความสั้นในการ์ดผลงานซ่อม & บทความล่าสุด */
    .card-text-lines {
        font-size: 0.9375rem !important; /* 15px */
        line-height: 1.6;
    }

    .article-title {
        font-size: 1.05rem !important; /* ~16.8px */
        line-height: 1.5;
    }

    /* 1.8 ปุ่มกดต่างๆ (Buttons) บนจอใหญ่ */
    .btn {
        font-size: 1.05rem !important; /* ~16.8px */
        padding: 9px 22px;
    }

    /* 1.9 เนื้อหาในหน้าบทความแบบละเอียด (Article Detail Page) */
    .article-content p, 
    .article-content li {
        font-size: 1.125rem !important; /* 18px */
        line-height: 1.8 !important;
        margin-bottom: 1.25rem;
    }

    .article-content h2 {
        font-size: 1.6rem !important;  /* ~25.6px */
        font-weight: 700;
        margin-top: 2rem;
        margin-bottom: 1rem;
    }

    .article-content h3 {
        font-size: 1.3rem !important;  /* ~20.8px */
        font-weight: 600;
    }
}


/* --- ขนาดบนจอมือถือ / แท็บเล็ต (กว้างไม่เกิน 991.98px) --- */
@media (max-width: 991.98px) {
    body, p, li {
        font-size: 1rem; /* 16px มาตรฐานมือถือ */
        line-height: 1.6;
    }

    .card-text-lines {
        font-size: 13px;
    }

    .article-title {
        font-size: 14px;
        line-height: 1.3;
    }
}


/* ===================================================
   2. Components & Layout Styling
   =================================================== */

/* Custom Hero Section */
.hero-section {
    background: linear-gradient(135deg, #0b132b 0%, #1c2541 100%);
    position: relative;
    overflow: hidden;

    /* ระยะเว้นจาก Navbar ด้านบนเพื่อป้องกันโลโก้/ป้ายโดนบัง */
    padding-top: 150px !important; 
    padding-bottom: 60px !important;
}

.hero-img {
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* Stat Box */
.stat-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
    /* ลด padding เพื่อลดความสูงของกล่องสถิติตามคำขอ */
    padding: 0.4rem 0.6rem;
}

.stat-card:hover {
    transform: translateY(-3px);
}

/* Brand Logos */
.brand-logo-img {
    max-height: 28px;
    filter: grayscale(30%);
    opacity: 0.8;
    transition: all 0.2s ease;
}

.brand-logo-img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

/* Process Step Cards */
.process-icon-box {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #0d6efd;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin: 0 auto 10px auto;
}

/* Card Improvements */
.custom-card {
    border-radius: 12px;
    transition: all 0.2s ease-in-out;
}

.custom-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
}

.repair-img {
    height: 170px;
    object-fit: cover;
}

.article-thumb {
    height: 75px;
    width: 100%;
    object-fit: cover;
}

.card-text-lines {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* CTA Banner Card */
.cta-banner-card {
    background: linear-gradient(135deg, #0b132b 0%, #1c2541 100%);
    border-radius: 20px;
    border: 1px solid rgba(255, 123, 0, 0.3);
    box-shadow: 0 10px 30px rgba(11, 19, 43, 0.25);
}

.cta-banner-img {
    filter: drop-shadow(0px 5px 15px rgba(0,0,0,0.4));
    transition: transform 0.3s ease;
}

.cta-banner-card:hover .cta-banner-img {
    transform: scale(1.05);
}