﻿:root {
    --bg: #b69e85;
    --bg-light: #c2ab93;
    --card: #94715a;
    --brown: #7d5c4c;
    --brown-dark: #5e4235;
    --white: #ffffff;
    --yellow: #f6d860;
    --zalo: #0068ff;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    min-height: 100svh;
    -webkit-font-smoothing: antialiased;
    font-family: "Be Vietnam Pro", "Segoe UI", Arial, sans-serif;
    color: var(--white);
    background:
        radial-gradient(ellipse at 50% 0%, var(--bg-light) 0%, transparent 60%),
        var(--bg);
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
}

p, ul {
    margin: 0;
}

/* ---------- Khung trang ---------- */
.page {
    width: min(1320px, calc(100% - 64px));
    margin: 28px auto;
}

/* ---------- Đầu trang ---------- */
.top {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 40px;
    padding: 0 12px;
}

.logo {
    width: clamp(150px, 15vw, 190px);
    aspect-ratio: 1;
    padding: 8px;
    background: var(--white);
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.intro {
    text-align: center;
}

.company {
    margin: 0;
    color: var(--brown);
    font-size: clamp(22px, 2.3vw, 31px);
    font-weight: 800;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: -.2px;
}

.address {
    margin-top: 6px;
    color: var(--brown);
    font-size: clamp(17px, 1.75vw, 24px);
    font-weight: 700;
}

.dash {
    color: var(--brown);
    font-weight: 700;
    line-height: 1;
    letter-spacing: 2px;
}

.services-title,
.services {
    font-size: clamp(16px, 1.65vw, 22px);
    font-style: italic;
    font-weight: 300;
    line-height: 1.55;
}

.services-title {
    margin-top: 6px;
}

.services {
    list-style: none;
    padding: 0;
}

.services li {
    display: inline;
}

.services li::before {
    content: "- ";
}

.services li:last-child::after {
    content: " -";
}

/* ---------- Ba thẻ dịch vụ ---------- */
.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(24px, 5.5vw, 76px);
    margin-top: 72px;
    padding: 0 12px;
}

.card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 clamp(20px, 3vw, 40px) 36px;
    background: var(--card);
    border-radius: 6px;
    text-align: center;
}

.card__media {
    position: relative;
    width: 78%;
    margin-top: -46px;
}

.card__photo {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 22px;
    box-shadow: 0 10px 24px rgba(60, 38, 25, .25);
}

.card__qr {
    position: absolute;
    top: 5%;
    width: 33%;
    background: var(--white);
    padding: 3px;
    transition: transform .2s ease, box-shadow .2s ease;
}

.card__qr img {
    width: 100%;
    height: auto;
}

.card__qr--right { right: 4%; }
.card__qr--left { left: 5%; }

.card__qr:hover {
    transform: scale(1.06);
    box-shadow: 0 8px 20px rgba(0,0,0,.3);
}

.card__text {
    margin-top: 26px;
    font-size: clamp(18px, 2vw, 26px);
    font-style: italic;
    font-weight: 300;
    line-height: 1.5;
}

.card__actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.card__phone {
    font-size: clamp(18px, 2vw, 26px);
    font-style: italic;
    font-weight: 400;
    line-height: 1.5;
    text-decoration: none;
    white-space: nowrap;
    transition: color .2s ease;
}

.card__phone:hover {
    color: var(--yellow);
}

/* Nút Zalo nhỏ trong thẻ: chỉ hiện trên thiết bị cảm ứng (không quét được QR trên chính điện thoại) */
.card__zalo {
    display: none;
    padding: 8px 20px;
    border-radius: 999px;
    background: var(--zalo);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
}

/* ---------- Chân trang ---------- */
.site {
    margin-top: 26px;
    color: var(--brown);
    font-size: clamp(16px, 2.2vw, 28px);
    font-weight: 500;
    letter-spacing: .38em;
    text-align: center;
    text-transform: uppercase;
}

/* ---------- Nút liên hệ (chỉ hiện trên điện thoại) ---------- */
.contact-bar {
    display: none;
}

.btn {
    flex: 1;
    padding: 14px 10px;
    border-radius: 999px;
    text-align: center;
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
    transition: transform .15s ease, filter .15s ease;
}

.btn--call {
    background: var(--yellow);
    color: var(--brown-dark);
}

.btn--zalo {
    background: var(--zalo);
    color: var(--white);
}

/* ---------- Trải nghiệm cảm ứng ---------- */
a {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.btn:active,
.card__zalo:active,
.card__phone:active,
.card__qr:active {
    transform: scale(.96);
}

/* Hiệu ứng hover chỉ dành cho thiết bị có chuột */
@media (hover: none) {
    .card__qr:hover {
        transform: none;
        box-shadow: none;
    }

    .card__phone:hover {
        color: inherit;
    }

    .card__zalo {
        display: inline-block;
    }
}

/* ---------- Máy tính bảng ---------- */
@media (max-width: 1100px) {
    body {
        display: block;
        background-attachment: scroll;
    }

    .page {
        width: calc(100% - 48px);
        margin: 24px auto;
    }

    .top {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 20px;
        padding: 0;
    }

    .cards {
        grid-template-columns: repeat(2, 1fr);
        column-gap: 28px;
        row-gap: 72px;
        padding: 0;
    }

    /* Thẻ thứ 3 nằm giữa hàng dưới */
    .card:last-child {
        grid-column: 1 / -1;
        justify-self: center;
        width: calc(50% - 14px);
    }

    .card__zalo {
        display: inline-block;
    }
}

/* ---------- Điện thoại ---------- */
@media (max-width: 640px) {
    body {
        overflow-x: hidden;
    }

    .page {
        width: calc(100% - 32px);
        margin: 16px auto calc(86px + env(safe-area-inset-bottom));
    }

    .logo {
        width: clamp(110px, 32vw, 140px);
    }

    .company {
        font-size: clamp(19px, 5.6vw, 24px);
    }

    .address {
        font-size: clamp(15px, 4.2vw, 18px);
    }

    .services-title,
    .services {
        font-size: 15.5px;
        line-height: 1.6;
    }

    .cards {
        grid-template-columns: 1fr;
        row-gap: 64px;
        margin-top: 64px;
    }

    .card:last-child {
        width: auto;
        justify-self: stretch;
    }

    .card {
        padding: 0 18px 24px;
        border-radius: 10px;
    }

    .card__media {
        width: min(82%, 340px);
        margin-top: -36px;
    }

    .card__photo {
        border-radius: 18px;
    }

    .card__text {
        margin-top: 18px;
        font-size: 18px;
    }

    .card__phone {
        font-size: 19px;
    }

    .site {
        margin-top: 28px;
        font-size: clamp(13px, 4vw, 16px);
        letter-spacing: .28em;
    }

    /* Thanh gọi / Zalo cố định dưới màn hình */
    .contact-bar {
        display: flex;
        gap: 10px;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 10;
        padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
        background: rgba(125, 92, 76, .92);
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
        box-shadow: 0 -6px 20px rgba(0, 0, 0, .15);
        animation: bar-in .35s ease-out both;
    }

    .btn {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 48px;
        padding: 10px;
        font-size: 15px;
        white-space: nowrap;
    }
}

/* Màn hình rất nhỏ (≤ 360px) */
@media (max-width: 360px) {
    .page {
        width: calc(100% - 24px);
    }

    .services-title,
    .services {
        font-size: 14.5px;
    }

    .card {
        padding: 0 12px 22px;
    }

    .card__text {
        font-size: 16.5px;
    }

    .btn {
        font-size: 14px;
    }
}

@keyframes bar-in {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* Nháy nhẹ số điện thoại khi thanh đổi sang số của thẻ khác */
.contact-bar.is-changed .btn__phone {
    display: inline-block;
    animation: phone-flash .45s ease-out;
}

@keyframes phone-flash {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}

.nowrap {
    white-space: nowrap;
}
