:root {
  --bg: #faf7f2;
  --surface: #ffffff;
  --ink: #1d1b19;
  --muted: #6f6a64;
  --line: #e6e0d7;
  --accent: #a8875a;
  --serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --sans: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 300 16px/1.65 var(--sans); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0 0 .5em; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 10px 24px; background: rgba(250, 247, 242, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand span { font-family: var(--serif); font-size: 22px; font-weight: 600; letter-spacing: .04em; }
.site-nav { display: flex; gap: 26px; }
.site-nav a { text-decoration: none; font-size: 14px; font-weight: 400; letter-spacing: .03em; padding: 6px 0; border-bottom: 1px solid transparent; }
.site-nav a:hover, .site-nav a.active { border-color: var(--ink); }
.nav-toggle, .nav-button { display: none; }

@media (max-width: 860px) {
  .nav-button { display: block; width: 40px; height: 40px; position: relative; cursor: pointer; }
  .nav-button span, .nav-button span::before, .nav-button span::after { position: absolute; left: 9px; width: 22px; height: 1.5px; background: var(--ink); content: ''; }
  .nav-button span { top: 19px; }
  .nav-button span::before { top: -7px; left: 0; }
  .nav-button span::after { top: 7px; left: 0; }
  .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 24px 16px; }
  .site-nav a { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
  .nav-toggle:checked ~ .site-nav { display: flex; }
  .site-header { padding: 8px 16px; }
  .brand span { font-size: 19px; }
}

/* Layout */
main { min-height: 60vh; }
.section { max-width: 1160px; margin: 0 auto; padding: 56px 24px; }
.section.narrow { max-width: 760px; }
.section-title { text-align: center; font-size: clamp(28px, 4vw, 38px); margin-bottom: 28px; }
.section-title::after { content: ''; display: block; width: 48px; height: 1px; background: var(--accent); margin: 14px auto 0; }
.page-title { font-size: clamp(32px, 5vw, 46px); text-align: center; }
.page-title.left { text-align: left; }
.center { text-align: center; }
.muted { color: var(--muted); }
.desc { font-size: 17px; }
.breadcrumb { font-size: 14px; color: var(--muted); }
.breadcrumb a { text-decoration: none; }
@media (max-width: 600px) { .section { padding: 40px 16px; } }

/* Buttons */
.btn { display: inline-block; padding: 12px 26px; background: var(--ink); color: #fff; text-decoration: none; border: 1px solid var(--ink);
  font: 400 14px/1.2 var(--sans); letter-spacing: .06em; text-transform: uppercase; cursor: pointer; transition: .2s; }
.btn:hover { background: #3a3632; }
.btn-outline { background: transparent; color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }

/* Hero */
.hero { display: grid; grid-template-columns: 1.4fr 1fr; min-height: min(78vh, 720px); }
.hero-img { position: relative; overflow: hidden; background: #ece6dc; }
.hero-img > img, .hero-img > .placeholder { width: 100%; height: 100%; object-fit: cover; }
/* Ảnh đầu trang tự chuyển */
.hero-img .slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 1.2s ease, visibility 0s linear 1.2s; }
.hero-img .slide.is-active { opacity: 1; visibility: visible; transition: opacity 1.2s ease; }
.hero-img .slide img { width: 100%; height: 100%; object-fit: cover; }
.slide-caption { position: absolute; left: 16px; bottom: 16px; max-width: calc(100% - 32px); padding: 6px 12px; background: rgba(255,255,255,.88); color: var(--ink); font-size: 14px; letter-spacing: .02em; }
.slide-dots { position: absolute; right: 10px; bottom: 12px; display: flex; z-index: 2; }
.slide-dots button { width: 26px; height: 26px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.slide-dots button::after { content: ''; width: 10px; height: 10px; border: 1px solid #fff; border-radius: 50%; background: rgba(255,255,255,.35); box-shadow: 0 0 3px rgba(0,0,0,.35); }
.slide-dots button.is-active::after { background: #fff; }
@media (prefers-reduced-motion: reduce) { .hero-img .slide, .hero-img .slide.is-active { transition: none; } }
.hero-text { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 48px 32px; }
.hero-logo { width: min(320px, 80%); }
@media (max-width: 860px) { .hero-logo { width: min(220px, 60%); } .lead { font-size: 22px; } }
.lead { font-family: var(--serif); font-style: italic; font-size: 26px; margin: 8px 0 28px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-img { aspect-ratio: 4 / 3; }
  .hero-text { padding: 32px 16px; }
}

/* Placeholder (khi chưa có ảnh thật) */
.placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 100%;
  min-height: 160px; background: linear-gradient(135deg, #efe8dd, #e2d8c8); color: var(--muted); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }
.placeholder img { width: 72px; opacity: .45; }

/* Services */
.services { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; }
.services > .service { flex: 0 1 calc((100% - 60px) / 4); }
.service { background: var(--surface); border: 1px solid var(--line); padding: 28px 22px; text-decoration: none; transition: .2s; }
.service:hover { border-color: var(--accent); transform: translateY(-2px); }
.service h3 { font-size: 23px; }
.service p { margin: 0; color: var(--muted); font-size: 15px; }
@media (max-width: 960px) { .services > .service { flex-basis: calc((100% - 20px) / 2); } }
@media (max-width: 520px) { .services > .service { flex-basis: 100%; } }

/* Cards / grid */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 32px; }
@media (max-width: 860px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 14px; } }
@media (max-width: 480px) { .grid { grid-template-columns: 1fr; } }
.card { display: block; background: var(--surface); text-decoration: none; border: 1px solid var(--line); }
.card-img { aspect-ratio: 4 / 3; overflow: hidden; background: #ece6dc; }
.card-img > img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .card-img > img { transform: scale(1.04); }
.card-body { padding: 14px 16px 16px; }
.card-body h3 { font-size: 22px; margin: 0 0 2px; }
.card-body p { margin: 0; color: var(--muted); font-size: 14px; }

/* Filters */
.filters { margin: 8px 0 28px; display: grid; gap: 10px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filter-label { font-size: 13px; color: var(--muted); min-width: 84px; }
.chip { padding: 6px 14px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; font-size: 14px; border-radius: 99px; }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Detail */
.gallery { columns: 2 320px; column-gap: 12px; margin-top: 28px; }
.gallery > * { break-inside: avoid; margin-bottom: 12px; display: block; }
.gallery .placeholder { aspect-ratio: 4 / 3; }
.video { position: relative; aspect-ratio: 16 / 9; margin: 24px auto 0; max-width: 900px; background: #000; }
.video.video-doc { aspect-ratio: 9 / 16; max-width: 360px; }
.video.video-vuong { aspect-ratio: 1 / 1; max-width: 500px; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Why */
.why-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; text-align: center; }
.why-list h3 { font-size: 24px; }
.why-list p { color: var(--muted); margin: 0; }
@media (max-width: 760px) { .why-list { grid-template-columns: 1fr; } }

/* Services page */
.service-row { border-bottom: 1px solid var(--line); padding: 28px 0; }
.service-row h3 { font-size: 28px; }
.service-group { font-size: 34px; margin: 40px 0 0; padding-bottom: 10px; border-bottom: 2px solid var(--accent); }
.service-group + .muted { margin-top: 12px; }
.desc.center { max-width: 680px; margin-left: auto; margin-right: auto; }

/* Contact */
.contact-buttons { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 24px 0; }
.map { aspect-ratio: 16 / 10; margin-top: 16px; }
.map iframe { width: 100%; height: 100%; border: 0; }

/* Footer */
.site-footer { background: #f1ece3; border-top: 1px solid var(--line); margin-top: 40px; }
.footer-inner { max-width: 1160px; margin: 0 auto; padding: 40px 24px 16px; display: flex; gap: 40px; justify-content: space-between; flex-wrap: wrap; }
.footer-logo { width: 220px; }
.footer-contact h3 { font-size: 22px; }
.footer-contact p { margin: 4px 0; font-size: 15px; }
.copyright { text-align: center; font-size: 13px; color: var(--muted); padding: 0 16px 90px; margin: 0; }

/* Floating contact */
.float-contact { position: fixed; right: 16px; bottom: 16px; z-index: 30; display: flex; flex-direction: column; gap: 10px; }
.float-btn { width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff;
  text-decoration: none; box-shadow: 0 4px 14px rgba(0, 0, 0, .18); font: 600 13px var(--sans); }
.float-btn.zalo { background: #0068ff; }
.float-btn.fb { background: #0866ff; }
.float-btn.phone { background: #1d1b19; }
.gallery > .placeholder { display: flex; }
@media (max-width: 600px) {
  .float-contact { right: 12px; bottom: 12px; gap: 8px; }
  .float-btn { width: 46px; height: 46px; font-size: 12px; }
}
.gallery > a > img { width: 100%; }
.video-link { font-size: 14px; color: var(--muted); margin-top: 8px; text-align: center; }
/* Safari trên iPhone tự nới iframe theo nội dung bên trong: ép iframe theo khung */
.video iframe { width: 1px; min-width: 100%; }
/* Video tải thẳng lên web */
/* Video giữ đúng tỉ lệ gốc, dọc hay ngang đều vừa màn hình */
.own-video { margin: 24px auto 0; text-align: center; }
.own-video video { display: inline-block; max-width: min(100%, 900px); max-height: 80vh; width: auto; height: auto; background: #000; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Trang Thiệp cưới online */
.invite-ways { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 980px; margin: 0 auto 24px; }
.invite-ways > div { background: var(--surface); border: 1px solid var(--line); padding: 28px 24px; }
.invite-ways h3 { font-size: 26px; }
.invite-ways.single { grid-template-columns: 1fr; max-width: 620px; text-align: center; }
.invite-ways.single .invite-steps { text-align: left; }
.form-site label.check { display: grid; gap: 2px; }
.form-site label.check input { width: auto; margin: 0 6px 0 0; vertical-align: -2px; }
@media (max-width: 760px) { .invite-ways { grid-template-columns: 1fr; } }
.invite-steps { padding-left: 22px; display: grid; gap: 10px; margin: 0 0 16px; }
.form-site { display: grid; gap: 16px; max-width: 520px; margin: 0 auto; text-align: left; }
.form-site label { display: grid; gap: 6px; font-size: 15px; font-weight: 400; }
.form-site input { width: 100%; padding: 12px 14px; border: 1px solid var(--line); background: #fff; font: inherit; color: var(--ink); border-radius: 0; }
.form-site small { color: var(--muted); font-size: 13px; }
.form-site .two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .form-site .two { grid-template-columns: 1fr; } }
.form-site .btn { justify-self: center; }
.form-error { color: #b3261e; text-align: center; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
