/* =============================================================
   assets/css/main.css — Home Page Sections
   ============================================================= */

/* --- Container --- */
.xg-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 40px;
}

/* --- Section base --- */
.xg-section {
    padding: 64px 0;
    background: #f0f4fb;
}
.xg-section__head { margin-bottom: 40px; }
.xg-section__head--center { text-align: center; }
.xg-section__eyebrow {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #1E5BB8;
    margin-bottom: 8px;
    letter-spacing: .04em;
}
.xg-section__title {
    font-family: 'Poppins', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: #0D2B5E;
    margin-bottom: 12px;
    line-height: 1.25;
}
.xg-section__desc {
    font-size: 15px;
    color: #555;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* --- Buttons --- */
.xg-btn {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    padding: 10px 22px;
    cursor: pointer;
    text-decoration: none;
    transition: background .2s, color .2s, border-color .2s;
    text-align: center;
}
.xg-btn--primary {
    background: #1E5BB8;
    color: #fff;
    border: 2px solid #1E5BB8;
    width: 100%;
}
.xg-btn--primary:hover { background: #174d9e; border-color: #174d9e; }
.xg-btn--outline {
    background: #fff;
    color: #1E5BB8;
    border: 1.5px solid #1E5BB8;
    padding: 9px 28px;
}
.xg-btn--outline:hover { background: #1E5BB8; color: #fff; }


/* =============================================================
   SECTION 1 — Tuyến xe
   ============================================================= */
.xg-routes__grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 16px;
}
.xg-route-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    display: flex;
    flex-direction: column;
}
.xg-route-card__img img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
}
.xg-route-card__body {
    padding: 14px 12px 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 6px;
}
.xg-route-card__title {
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #0D2B5E;
    line-height: 1.3;
}
.xg-route-card__desc {
    font-size: 12px;
    color: #555;
    line-height: 1.5;
    flex: 1;
}
.xg-route-card__price {
    font-size: 13px;
    font-weight: 700;
    color: #FF6A00;
}

@media (max-width: 1200px) {
    .xg-routes__grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 640px) {
    .xg-routes__grid { grid-template-columns: repeat(2, 1fr); }
}


/* =============================================================
   SECTION 2 — Dịch vụ nổi bật
   ============================================================= */
.xg-services { background: #f0f4fb; }
.xg-services__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}
.xg-service-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,.07);
    display: flex;
    flex-direction: column;
}
.xg-service-card__img img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
}
.xg-service-card__body {
    padding: 24px 28px 28px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    align-items: center;
    text-align: center;
}
.xg-service-card__title {
    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #0D2B5E;
}
.xg-service-card__icon { font-size: 20px; }
.xg-service-card__desc {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    flex: 1;
}

@media (max-width: 768px) {
    .xg-services__grid { grid-template-columns: 1fr; }
}


/* =============================================================
   SECTION 3 — Kinh nghiệm xe ghép
   ============================================================= */
.xg-posts { background: #f0f4fb; }
.xg-posts__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.xg-post-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    display: flex;
    gap: 0;
}
.xg-post-card__img {
    flex-shrink: 0;
    width: 200px;
}
.xg-post-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.xg-post-card__body {
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: center;
}
.xg-post-card__title {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #0D2B5E;
    line-height: 1.35;
}
.xg-post-card__title a { color: inherit; text-decoration: none; }
.xg-post-card__title a:hover { color: #1E5BB8; }
.xg-post-card__excerpt {
    font-size: 13px;
    color: #666;
    line-height: 1.55;
    flex: 1;
}
.xg-post-card__readmore {
    font-size: 13px;
    font-weight: 600;
    color: #1E5BB8;
    text-decoration: none;
    align-self: flex-start;
}
.xg-post-card__readmore:hover { text-decoration: underline; }

@media (max-width: 768px) {
    .xg-posts__grid { grid-template-columns: 1fr; }
    .xg-post-card { flex-direction: column; }
    .xg-post-card__img { width: 100%; height: 180px; }
}

@media (max-width: 960px) {
    .xg-container { padding: 0 24px; }
    .xg-section__title { font-size: 26px; }
}
@media (max-width: 640px) {
    .xg-container { padding: 0 16px; }
    .xg-section { padding: 40px 0; }
}
