/* ==========================================================================
   Garage Auto An Phong - CSS trang chủ
   ========================================================================== */

/* ------------------------------------------------------- 1. Hero banner */
.ap-hero {
    position: relative;
    background: var(--ap-dark);
    background-size: cover;
    background-position: center;
    color: #fff;
    overflow: hidden;
}

.ap-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 15, 15, .96) 0%, rgba(15, 15, 15, .82) 45%, rgba(15, 15, 15, .55) 100%);
}

.ap-hero-inner {
    position: relative;
    max-width: var(--ap-max);
    margin: 0 auto;
    padding: 46px 20px 34px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.ap-hero-name {
    font-size: 62px;
    font-weight: 900;
    font-style: italic;
    letter-spacing: 1px;
    color: var(--ap-red);
    text-transform: uppercase;
    line-height: 1;
}

.ap-hero-sub {
    font-size: 34px;
    font-weight: 700;
    font-style: italic;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, .85);
    border-radius: 40px;
    padding: 4px 26px;
    display: inline-block;
    margin: 12px 0 22px;
}

.ap-hero-points { display: grid; gap: 7px; }

.ap-hero-points li {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 16px;
}

.ap-hero-points li::before {
    content: '›';
    color: var(--ap-red);
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
}

.ap-hero-photo img {
    width: 100%;
    border-radius: 2px;
    object-fit: cover;
}

/* Dải liên hệ dưới hero */
.ap-hero-bar {
    position: relative;
    max-width: var(--ap-max);
    margin: 0 auto;
    padding: 0 20px 34px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 26px;
}

.ap-hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 34px;
    border: 1px solid var(--ap-red);
    border-radius: 40px;
    padding: 9px 22px;
    color: #fff;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    font-size: 14px;
    transition: background .2s ease;
}

.ap-hero-cta:hover { background: var(--ap-red); }

.ap-hero-cta span:last-child { color: var(--ap-red); font-size: 20px; line-height: 1; }

.ap-hero-contact { display: flex; align-items: flex-start; gap: 10px; color: #fff; }

.ap-hero-contact .ap-ico {
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    border-radius: 50%;
    background: var(--ap-red);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    margin-top: 2px;
}

.ap-hero-contact small { display: block; font-size: 12.5px; color: #bdbdbd; }

.ap-hero-contact b { font-size: 16px; font-weight: 700; }

.ap-hero-contact .ap-addr { font-size: 13.5px; max-width: 260px; line-height: 1.4; }

/* --------------------------------------------------- 2. Khối đặt lịch */
.ap-booking {
    position: relative;
    background: var(--ap-white);
    padding: 46px 0;
    overflow: hidden;
}

.ap-booking-watermark {
    position: absolute;
    top: 26px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 74px;
    font-weight: 800;
    color: rgba(0, 0, 0, .05);
    white-space: nowrap;
    pointer-events: none;
    z-index: 0;
}

.ap-booking-inner {
    position: relative;
    max-width: var(--ap-max);
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 440px 1fr;
    gap: 30px;
    align-items: center;
}

/* Chữ mờ nằm dưới, form và tiêu đề nổi lên trên */
.ap-booking-box { position: relative; z-index: 1; }

.ap-booking-title {
    font-size: 27px;
    font-weight: 800;
    color: var(--ap-red);
    margin-bottom: 16px;
    line-height: 1.25;
}

.ap-booking-form {
    background: var(--ap-red);
    padding: 18px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.ap-booking-form input,
.ap-booking-form select {
    width: 100%;
    padding: 9px 11px;
    border: 0;
    border-radius: 2px;
    font-size: 13.5px;
    font-family: inherit;
    color: var(--ap-text);
}

.ap-booking-form button {
    grid-column: 1 / -1;
    padding: 10px;
    background: var(--ap-dark);
    color: #fff;
    border: 0;
    border-radius: 2px;
    font-weight: 600;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: background .2s ease;
}

.ap-booking-form button:hover { background: #000; }

.ap-booking-photo img { width: 100%; }

/* --------------------------------------------------- 3. Giới thiệu */
.ap-about { background: var(--ap-grey); padding: 52px 0; }

.ap-about-row {
    max-width: var(--ap-max);
    margin: 0 auto 44px;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 46px;
    align-items: center;
}

.ap-about-row:last-child { margin-bottom: 0; }

.ap-about-media { position: relative; }

.ap-about-media img { width: 100%; }

/* Huy hiệu "Hơn 10 NĂM kinh nghiệm" */
.ap-badge {
    position: absolute;
    left: -14px;
    top: 24px;
    background: var(--ap-red);
    color: #fff;
    text-align: center;
    padding: 14px 16px;
    min-width: 96px;
}

.ap-badge-pre { font-size: 12px; }
.ap-badge-value { font-size: 38px; font-weight: 800; line-height: 1; }
.ap-badge-unit { font-size: 15px; font-weight: 700; letter-spacing: 1px; }
.ap-badge-note { font-size: 11px; margin-top: 3px; }

.ap-about-title { font-size: 33px; font-weight: 800; color: var(--ap-dark); line-height: 1.2; }
.ap-about-title span { display: block; color: var(--ap-red); }
.ap-about-desc { font-size: 14px; color: var(--ap-text-mute); margin-top: 14px; }

/* --------------------------------------------------- 4. Tab dịch vụ */
.ap-services { padding: 52px 0 60px; position: relative; overflow: hidden; }

.ap-services-head { text-align: center; margin-bottom: 24px; }

.ap-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 38px;
}

.ap-tab {
    min-width: 175px;
    padding: 10px 18px;
    background: var(--ap-grey);
    border: 0;
    border-radius: 2px;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--ap-text);
    cursor: pointer;
    position: relative;
    transition: all .2s ease;
}

.ap-tab:hover { background: #e4e4e4; }

.ap-tab.is-active { background: var(--ap-red); color: #fff; font-weight: 600; }

/* Mũi tên nhỏ dưới tab đang chọn */
.ap-tab.is-active::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 7px solid transparent;
    border-top-color: var(--ap-red);
}

.ap-tab-panel {
    display: none;
    max-width: var(--ap-max);
    margin: 0 auto;
    padding: 0 20px;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.ap-tab-panel.is-active { display: grid; }

.ap-tab-title { font-size: 25px; font-weight: 800; color: var(--ap-red); margin-bottom: 12px; }
.ap-tab-desc { font-size: 14px; color: var(--ap-text-mute); }

/* Chữ mờ nền lớn */
.ap-watermark {
    position: absolute;
    left: 50%;
    bottom: 26px;
    transform: translateX(-50%);
    font-size: 96px;
    font-weight: 800;
    color: rgba(0, 0, 0, .045);
    white-space: nowrap;
    pointer-events: none;
    z-index: -1;
}

/* ------------------------------------------- 5. Khối dịch vụ nền tối */
.ap-feature { background: var(--ap-dark-2); }

.ap-feature-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 380px;
}

/* Hàng chẵn: ảnh bên trái, chữ bên phải */
.ap-feature-row:nth-child(even) .ap-feature-text { order: 2; }
.ap-feature-row:nth-child(even) .ap-feature-img { order: 1; }

.ap-feature-text {
    padding: 46px 52px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #d8d8d8;
}

.ap-feature-title { font-size: 27px; font-weight: 800; color: #fff; margin-bottom: 12px; }
.ap-feature-desc { font-size: 13.5px; line-height: 1.75; color: #b5b5b5; }

.ap-feature-points { margin-top: 20px; display: grid; gap: 12px; }

.ap-feature-points li { display: flex; align-items: center; gap: 11px; font-size: 13.5px; color: #e4e4e4; }

.ap-feature-badge {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    border: 1px solid var(--ap-red);
    border-radius: 50%;
    color: var(--ap-red);
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ap-feature-img { min-height: 340px; background-size: cover; background-position: center; }

/* --------------------------------------------------- 6. Logo hãng xe */
.ap-brands { background: var(--ap-red); padding: 34px 0; }

.ap-brands-grid {
    max-width: var(--ap-max);
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 26px 16px;
    align-items: center;
    justify-items: center;
}

.ap-brands-grid img {
    max-height: 46px;
    width: auto;
    opacity: .95;
    transition: opacity .2s ease;
}

.ap-brands-grid img:hover { opacity: 1; }

/* --------------------------------------------------------------- Mobile */
@media (max-width: 900px) {
    .ap-hero-inner,
    .ap-booking-inner,
    .ap-about-row,
    .ap-tab-panel.is-active,
    .ap-feature-row { grid-template-columns: 1fr; }

    .ap-hero-name { font-size: 42px; }
    .ap-hero-sub { font-size: 24px; }
    .ap-booking-watermark,
    .ap-watermark { display: none; }
    .ap-badge { left: 0; }

    .ap-feature-row:nth-child(even) .ap-feature-text,
    .ap-feature-row:nth-child(even) .ap-feature-img { order: initial; }

    .ap-feature-text { padding: 32px 22px; }
    .ap-feature-img { min-height: 240px; }
    .ap-brands-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 560px) {
    .ap-booking-form { grid-template-columns: 1fr; }
    .ap-brands-grid { grid-template-columns: repeat(2, 1fr); }
}
