/* Thiệp Cưới - 132 — thiệp dài 1 cột 500px, tông đỏ đô, Lora + chữ viết tay */
:root { --w132-red: #840b1d; --w132-red-dark: #5e0714; --ink: #840b1d; --muted: #a0545f; --line: #e9cfd3; --paper: #fffaf6; }

.wedding-132-body { margin: 0; background: #efe6e0; }
.wedding-132 { position: relative; max-width: 500px; margin: 0 auto; overflow: hidden; color: var(--w132-red); background: var(--paper); font-family: 'Lora', Georgia, serif; font-size: 16px; line-height: 1.6; text-align: center; }
.wedding-132 * { box-sizing: border-box; }
.wedding-132 img { display: block; max-width: 100%; }
.wedding-132 p { margin: 0; }
.wedding-132 svg { display: block; fill: currentColor; }

.w132-script { font-family: 'PinyonScript Regular', 'AlexBrush Regular', cursive; font-weight: 400; text-transform: none; line-height: 1.2; }
.w132-section { padding: 56px 24px; }
.w132-heading { color: var(--w132-red); font-size: 20px; font-weight: 700; line-height: 1.5; text-transform: uppercase; }
.w132-text { max-width: 453px; margin: 0 auto; font-size: 15px; line-height: 1.8; }

/* 1. Hero */
.w132-hero { position: relative; min-height: min(155vw, 779px); background: var(--w132-red-dark); }
.w132-cover { width: 100%; height: min(155vw, 779px); object-fit: cover; }
.w132-hero::after { content: ''; position: absolute; inset: auto 0 0; height: 285px; background: linear-gradient(rgba(255,255,255,0), rgba(0,0,0,.55)); pointer-events: none; }
.w132-hero-text { position: absolute; inset: auto 0 48px; z-index: 1; padding: 0 16px; color: #fff; }
.w132-hero-names { margin: 0; font-size: clamp(44px, 12vw, 60px); }
.w132-hero-names > span, .w132-names > span { display: block; }
.w132-amp { font-size: .6em; line-height: 1; }
.w132-hero-date { margin-top: 6px; font-size: 30px; letter-spacing: .04em; }

/* 2. Ảnh khung vòm + đếm ngược */
.w132-arch-wrap { position: relative; padding-top: 72px; }
.w132-arch { position: relative; width: 78%; max-width: 392px; aspect-ratio: 392 / 480; margin: 0 auto; padding: 12px; border: 2px solid var(--w132-red); border-radius: 999px 999px 0 0; }
.w132-arch::before { content: ''; position: absolute; inset: -10px; border: 1px solid var(--line); border-radius: 999px 999px 0 0; }
.w132-arch img { width: 100%; height: 100%; object-fit: cover; border-radius: 999px 999px 0 0; }
.w132-arch-heart { display: block; width: 44px; margin: -22px auto 0; position: relative; padding: 8px; border-radius: 50%; background: var(--paper); }
.w132-arch-wrap .w132-heading { margin-top: 36px; }
.w132-countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 375px; margin: 20px auto 0; }
.w132-countdown div { display: grid; place-items: center; min-height: 85px; border-radius: 10px; color: #fff; background: var(--w132-red); }
.w132-countdown strong { font-size: 26px; font-weight: 400; line-height: 1.1; }
.w132-countdown span { font-size: 14px; }

/* Ảnh ngang có chữ (This day / All of me / Thank you) */
.w132-banner { position: relative; min-height: 326px; background: var(--w132-red-dark); color: #fff; }
.w132-banner img { width: 100%; height: 326px; object-fit: cover; }
.w132-banner::after { content: ''; position: absolute; inset: auto 0 0; height: 60%; background: linear-gradient(rgba(255,255,255,0), rgba(0,0,0,.55)); pointer-events: none; }
.w132-banner-text { position: absolute; inset: auto 0 22px; z-index: 1; padding: 0 16px; }
.w132-banner .w132-script { font-size: 60px; }
.w132-banner-sub { font-size: 18px; text-transform: uppercase; letter-spacing: .06em; }
.w132-banner-quote .w132-script { font-size: 44px; }

/* 4. Lời mời + gia đình */
.w132-guest { display: block; margin: 6px 0; font-family: 'PinyonScript Regular', 'AlexBrush Regular', cursive; font-size: 36px; font-weight: 400; text-transform: none; }
.w132-parents { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 32px; }
.w132-parent p { font-size: 15px; }
.w132-parent-label { margin-bottom: 4px !important; font-size: 16px !important; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.w132-names { margin-top: 36px; font-size: clamp(46px, 13vw, 64px); }

/* 5. Sự kiện */
.w132-events { padding-top: 24px; }
.w132-event-title { margin: 0; font-size: 22px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.w132-event-time { margin-top: 4px !important; font-size: 18px; text-transform: uppercase; }
.w132-event-date { display: grid; grid-template-columns: 1fr 110px 1fr; align-items: center; margin: 8px 0; }
.w132-event-date > span { font-size: 21px; text-transform: uppercase; }
.w132-event-date strong { font-size: 88px; line-height: 1; }
.w132-event-lunar { font-size: 17px; }
.w132-event-place { margin-top: 10px !important; font-size: 19px; font-weight: 700; text-transform: uppercase; }
.w132-event-address { font-size: 17px; }
.w132-pill { display: inline-block; margin-top: 16px; padding: 4px 28px; border-radius: 100px; color: #fff; background: var(--w132-red); font-size: 16px; text-decoration: none; text-transform: uppercase; animation: w132-pulse 1.6s ease-in-out infinite; }
.w132-divider { display: flex; align-items: center; gap: 12px; width: 70%; margin: 44px auto; }
.w132-divider::before, .w132-divider::after { content: ''; flex: 1; height: 1px; background: var(--w132-red); opacity: .5; }
.w132-divider svg { width: 18px; }

/* Nút chung */
.w132-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 24px; border: 1px solid var(--w132-red); border-radius: 999px; color: #fff; background: var(--w132-red); font: 600 14px 'Lora', Georgia, serif; text-decoration: none; cursor: pointer; }
.w132-btn-outline { color: var(--w132-red); background: transparent; }
.w132-events .add-to-calendar { margin-top: 36px; }

/* 7. Chú rể / Cô dâu */
.w132-couple-row { display: grid; grid-template-columns: 233fr 233fr; align-items: center; gap: 12px; }
.w132-couple-row-reverse .w132-portrait { order: 2; }
.w132-portrait { margin: 0; aspect-ratio: 233 / 349; overflow: hidden; border-radius: 120px 120px 0 0; background: var(--line); }
.w132-portrait img { width: 100%; height: 100%; object-fit: cover; }
.w132-couple-name .w132-script { font-size: 40px; }
.w132-couple-full { font-size: 20px; text-transform: uppercase; }
.w132-couple-heart { display: block; width: 26px; margin: 12px auto; }
.w132-couple .w132-text { margin-top: 32px; }

/* 8. Lịch */
.w132-calendar-wrap { padding-top: 16px; }
.w132-month { font-size: 52px; }
.w132-calendar { margin: 12px 0 28px; padding: 18px 20px 22px; border-radius: 6px; color: #fff; background: var(--w132-red); }
.w132-calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 4px; }
.w132-calendar-grid span { position: relative; display: grid; place-items: center; min-height: 34px; font-size: 15px; }
.w132-calendar-head span { min-height: 30px; margin-bottom: 4px; border-bottom: 1px solid rgba(255,255,255,.3); font-weight: 700; font-size: 13px; }
.w132-calendar .is-wedding-day svg { position: absolute; width: 36px; color: #fff; animation: w132-beat 1.2s ease-in-out infinite; }
.w132-calendar .is-wedding-day b { position: relative; color: var(--w132-red); }

/* 9. Album nền đỏ đô */
.w132-album { color: #fff; background: var(--w132-red); }
.w132-album-title { margin: 0; font-size: 34px; font-weight: 400; text-transform: uppercase; line-height: 1.3; }
.w132-album-title .w132-script { font-size: 48px; text-transform: none; }
.w132-album-intro { margin: 14px 0 26px !important; font-size: 15px; line-height: 1.8; text-align: justify; }
.w132-mosaic { display: grid; grid-template-columns: repeat(12, 1fr); gap: 12px; }
.w132-mosaic .gallery-item { display: block; overflow: hidden; grid-column: span 6; aspect-ratio: 227 / 331; }
.w132-mosaic .gallery-item:nth-child(8n+1) { grid-column: span 12; aspect-ratio: 465 / 302; }
.w132-mosaic .gallery-item:nth-child(8n+2) { grid-column: span 8; grid-row: span 2; aspect-ratio: auto; }
.w132-mosaic .gallery-item:nth-child(8n+3),
.w132-mosaic .gallery-item:nth-child(8n+4) { grid-column: span 4; aspect-ratio: 163 / 221; }
.w132-mosaic .gallery-item:last-child:nth-child(8n+2) { grid-row: auto; aspect-ratio: 465 / 302; grid-column: span 12; }
.w132-mosaic img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.w132-mosaic .gallery-item:hover img { transform: scale(1.05); }

/* 10. RSVP */
.w132-rsvp .w132-text { margin-top: 12px; }
.w132-form { display: grid; gap: 14px; max-width: 420px; margin: 26px auto 0; padding: 22px; border: 1px solid var(--line); border-radius: 12px; background: #fff; text-align: left; }
.w132-form label { display: grid; gap: 4px; }
.w132-form label > span { color: #333; font-size: 14px; }
.w132-form input, .w132-form select, .w132-form textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; color: #333; background: #fff; font: 14px 'Lora', Georgia, serif; outline: 0; }
.w132-form input:focus, .w132-form select:focus, .w132-form textarea:focus { border-color: var(--w132-red); }
.w132-form textarea { resize: vertical; }
.w132-form .attendance { display: grid; gap: 8px; }
.w132-form .attendance button { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; color: #555; background: #fff; font: 14px 'Lora', Georgia, serif; text-align: left; cursor: pointer; }
.w132-form .attendance button.is-selected { border-color: var(--w132-red); color: #fff; background: var(--w132-red); }
.w132-form [data-guest-count][hidden] { display: none; }
.w132-form .form-status, .w132-guestbook .form-status { min-height: 20px; color: var(--w132-red); font-size: 13px; text-align: center; }

/* 11. Sổ lưu bút (ghi đè style chung css/guestbook.css) */
.w132-guestbook { background: #fff; }
.w132-guestbook .event-heading h2 { margin: 0; font-size: 22px; font-weight: 700; text-transform: uppercase; }
.w132-guestbook .event-heading p { font-size: 15px; }
.w132-guestbook .guestbook-item-head strong { color: var(--w132-red); }
.w132-guestbook .guestbook-form input, .w132-guestbook .guestbook-form textarea { font-family: 'Lora', Georgia, serif; font-size: 14px; }
.w132-guestbook .guestbook-form input:focus, .w132-guestbook .guestbook-form textarea:focus { border-color: var(--w132-red); }

/* 12. Mừng cưới */
.w132-gift .gift-box { margin-top: 20px; }
.gift-box-cover { display: grid; justify-items: center; gap: 10px; width: 100%; max-width: 260px; margin: 0 auto; padding: 28px 20px; border: 1px dashed var(--w132-red); border-radius: 12px; color: var(--w132-red); background: #fff; font: 600 14px 'Lora', Georgia, serif; cursor: pointer; }
.gift-box-cover svg { width: 34px; animation: w132-beat 1.2s ease-in-out infinite; }
.w132-gift [hidden] { display: none !important; }
.w132-gift-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.w132-gift-card { padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.w132-gift-card img { width: 100%; margin-bottom: 10px; border-radius: 6px; }
.w132-gift-card p { font-size: 14px; }

/* 13. Thank you */
.w132-thanks, .w132-thanks img { min-height: 365px; }
.w132-thanks img { height: 365px; }
.w132-thanks-text { max-width: 471px; margin: 4px auto 0 !important; font-size: 15px; line-height: 1.6; }

/* Nút nhạc */
.music-toggle { position: fixed; right: max(16px, calc(50% - 234px)); bottom: 20px; z-index: 30; display: grid; place-items: center; width: 46px; height: 46px; border: 0; border-radius: 50%; color: #fff; background: var(--w132-red); box-shadow: 0 4px 16px rgba(0,0,0,.25); cursor: pointer; }
.music-toggle svg { width: 22px; }
.music-toggle[aria-pressed='true'] { animation: w132-spin 4s linear infinite; }

.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }

/* Hiệu ứng khi lướt tới — js/template-132.js thêm .is-visible khi phần tử vào màn hình */
[data-anim] { opacity: 0; transition: opacity 1.2s ease, transform 1.2s ease; }
[data-anim='fadeInUp'] { transform: translateY(40px); }
[data-anim='fadeInDown'] { transform: translateY(-40px); }
[data-anim='fadeInLeft'] { transform: translateX(-50px); }
[data-anim='fadeInRight'] { transform: translateX(50px); }
[data-anim='zoomIn'] { transform: scale(.6); }
[data-anim='flipInY'] { transform: perspective(600px) rotateY(80deg); }
[data-anim='flipInX'] { transform: perspective(600px) rotateX(80deg); }
[data-anim].is-visible { opacity: 1; transform: none; }

@keyframes w132-pulse { 50% { transform: scale(1.06); } }
@keyframes w132-beat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
@keyframes w132-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
	[data-anim] { opacity: 1; transform: none; transition: none; }
	.w132-pill, .music-toggle, .w132-calendar .is-wedding-day svg, .gift-box-cover svg { animation: none !important; }
}

@media (max-width: 380px) {
	.w132-section { padding-left: 16px; padding-right: 16px; }
	.w132-event-date { grid-template-columns: 1fr 84px 1fr; }
	.w132-event-date > span { font-size: 17px; }
	.w132-event-date strong { font-size: 70px; }
}
