/* ========================================================
   RESPONSIVE STYLES — HOA LỤA - HỒNG
   Single Continuous Card Strip (900px Max-Width, Flush Full Top)
   ======================================================== */

/* Small Mobile (< 500px) */
@media (max-width: 500px) {
  .cover-card-container {
    width: 100%;
    max-width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    padding: 0 12px;
    animation: floatCoverCard 4s ease-in-out infinite alternate;
    will-change: transform, opacity;
  }

  .cover-screen-wrapper.opened .cover-card-container,
  .cover-screen-wrapper.opening .cover-card-container {
    animation: coverCardFlyUp 1.25s cubic-bezier(0.35, 0, 0.15, 1) forwards !important;
    pointer-events: none !important;
  }

  .cover-card-box {
    position: relative;
    width: 90vw;
    max-width: 360px;
    height: auto;
    min-height: 360px;
    max-height: none;
    background: #fdf0f2;
    background-image: linear-gradient(180deg, #fff3f5 0%, #fae8eb 50%, #fcedf0 100%);
    border-radius: 28px;
    border: 1px solid rgba(223, 178, 184, 0.65);
    box-shadow: 
      0 18px 45px rgba(181, 79, 92, 0.2),
      0 4px 14px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 26px 18px 22px 18px;
    overflow: hidden;
    text-align: center;
  }

  .cover-lotus-left {
    position: absolute;
    top: -30px;
    left: -45px;
    width: 240px;
    opacity: 0.48;
    pointer-events: none;
    transform: scaleX(-1) rotate(10deg);
  }

  .cover-lotus-right {
    display: none;
  }

  .cover-card-inner {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: auto;
    width: 100%;
    padding: 8px 0 0;
    box-sizing: border-box;
  }

  .cover-heart-badge {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #ebd3d7;
    background: #fffafa;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(181, 79, 92, 0.1);
    margin: 4px 0;
  }

  .cover-sub-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.35rem;
    letter-spacing: 0.22em;
    color: #943d49;
    text-transform: uppercase;
    font-weight: 600;
    margin: 0;
  }

  .cover-names {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 4px 0 0 0;
    transform: none;
    gap: 0;
  }

  .cover-names .c-name {
    font-family: 'Great Vibes', cursive;
    font-size: 2.75rem;
    color: #943d49;
    line-height: 1.1;
    font-weight: 400;
    -webkit-text-stroke: 0;
    white-space: nowrap;
  }

  .cover-names .c-amp {
    font-family: 'Great Vibes', cursive;
    font-size: 1.95rem;
    color: #c46270;
    margin: 0;
    font-weight: 400;
    -webkit-text-stroke: 0;
    line-height: 1;
  }

  .cover-date {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    letter-spacing: 0.1em;
    color: #7a464e;
    font-weight: 500;
    margin: 0;
  }

  .cover-invite-label {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 8px;
    font-size: inherit;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: #8a6a70;
    margin: 4px 0 0 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding-inline: 2px;
    white-space: nowrap;
  }

  .cover-invite-label .c-line {
    height: 1px;
    width: 18px;
    min-width: 12px;
    flex-shrink: 1;
    background: #e4afb7;
  }

  .cover-guest-invite-inner {
    display: inline-flex;
    align-items: baseline;
    flex-wrap: nowrap;
    gap: 5px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .cover-guest-prefix {
    font-size: 0.85rem;
    white-space: nowrap;
  }

  .cover-guest-name {
    font-size: 1.05rem;
    white-space: nowrap;
  }

  .btn-cover-open {
    background: linear-gradient(135deg, #ea8ea0 0%, #db7587 100%);
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 12px 36px;
    border-radius: 999px;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: auto;
    min-width: max-content;
    box-sizing: border-box;
    white-space: nowrap;
    margin-top: 28px;
    box-shadow: 0 6px 20px rgba(219, 117, 135, 0.45);
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    animation: pulseOpenBtn 2.2s infinite;
  }

  @keyframes pulseOpenBtn {
    0%, 100% {
      box-shadow: 0 6px 20px rgba(219, 117, 135, 0.45);
      transform: scale(1);
    }
    50% {
      box-shadow: 0 8px 24px rgba(219, 117, 135, 0.65);
      transform: scale(1.03);
    }
  }

  .main-wrapper {
    padding: 0;
  }

  .wedding-single-card {
    border-radius: 0;
    border: none;
    box-shadow: none;
  }

  .card-section {
    padding-left: 18px;
    padding-right: 18px;
  }

  .section-ceremony {
    padding-left: 0;
    padding-right: 0;
  }

  .c1-top-intro-block {
    min-height: 0;
    padding: 18px 0 12px 0;
  }

  .decor-c1-top-right {
    width: 108%;
    max-width: none;
    top: 48px;
    right: -30px;
  }

  .c1-intro-text-group {
    padding-left: 0;
    padding-right: 0;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    align-items: stretch;
  }

  .card-intro-heading,
  .card-intro-label {
    font-size: 1.35rem;
    font-weight: 400;
    letter-spacing: 0.22em;
    line-height: 1.65;
    margin: 10px auto 0 auto;
    width: 100%;
    max-width: none;
    white-space: pre-line;
    text-align: center;
  }

  .card1-script-names {
    font-size: clamp(2.85rem, 11.5vw, 3.5rem);
    font-weight: 500;
    -webkit-text-stroke: 0.55px currentColor;
    /* Thấp hơn trên mobile để tránh đè hoa sen */
    margin-top: clamp(340px, 52vh, 460px);
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 4px;
    padding-inline: 20px;
    align-items: stretch;
    text-align: center;
    width: 100%;
    max-width: 100%;
    gap: 8px;
    box-sizing: border-box;
    overflow: visible;
  }

  .card1-script-names .groom-short-name {
    align-self: stretch;
    text-align: center;
    transform: none;
    margin: 0;
    padding: 0 28% 0 0.15em;
    max-width: 100%;
    width: 100%;
    white-space: nowrap;
    box-sizing: border-box;
  }

  .card1-script-names .amp {
    font-size: clamp(1.85rem, 7vw, 2.35rem);
    margin: 0 auto;
    align-self: center;
    padding: 0 0.15em;
  }

  .card1-script-names .bride-short-name {
    align-self: stretch;
    text-align: center;
    transform: none;
    margin: 0;
    padding: 0 0.15em 0 28%;
    max-width: 100%;
    width: 100%;
    white-space: nowrap;
    box-sizing: border-box;
  }

  .intro-guest-invite {
    margin: 18px auto 8px auto;
    max-width: 92%;
    gap: 6px;
  }

  .intro-couple-message {
    width: 94%;
    max-width: none;
    margin-top: 40px;
    padding: 0 8px;
  }

  .intro-guest-prefix {
    font-size: 0.95rem;
    font-weight: 500;
  }

  .intro-guest-name {
    font-size: 1.22rem;
    font-weight: 600;
  }

  .section-ceremony .card-divider-line {
    margin-top: 40px;
    margin-bottom: 20px;
  }

  .info-white-panel {
    width: calc(100% - 20px);
    padding: 18px 14px 22px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.34);
    box-shadow:
      0 8px 22px rgba(140, 49, 62, 0.1),
      0 2px 6px rgba(140, 49, 62, 0.05);
  }

  .couple-sides-block {
    width: calc(100% - 20px);
    gap: 22px;
    margin: 56px auto 36px auto;
  }

  .couple-side-row,
  .couple-side-row--bride {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .couple-side-family {
    font-size: 1.05rem;
    letter-spacing: 0.12em;
  }

  .couple-side-role {
    font-size: 1.05rem;
    letter-spacing: 0.12em;
    margin-bottom: 8px;
  }

  .couple-side-name {
    font-size: 2.35rem;
  }

  .gallery-block-c2 .gallery-carousel {
    height: 300px;
    margin: 14px 0 8px;
  }

  .gallery-block-c2 .carousel-slide {
    width: min(200px, 54vw);
  }

  .gallery-block-c2 .carousel-btn.prev { left: 2px; }
  .gallery-block-c2 .carousel-btn.next { right: 2px; }

  .gift-block-c3 {
    gap: 4px;
  }

  .gift-block-c3 .card-heading-title {
    font-size: 18px;
    letter-spacing: 0.08em;
    margin-bottom: 0;
  }

  .gift-thankyou-note {
    font-size: 1rem;
    white-space: normal;
    overflow-wrap: break-word;
    word-wrap: break-word;
    max-width: 92%;
    width: 100%;
    padding: 0 14px;
    line-height: 1.55;
    margin: 0 auto;
  }

  .info-white-panel--reception {
    margin-top: 14px;
  }

  .card-heading-title {
    font-size: 18px;
    letter-spacing: 0.14em;
    margin-bottom: 16px;
  }

  .reception-lead-c2 {
    font-size: 18px;
    letter-spacing: 0.14em;
  }

  .couple-person .full-name {
    font-family: var(--font-script);
    font-size: clamp(2.45rem, 8.5vw, 3.1rem);
    font-weight: 400;
    letter-spacing: 0.5px;
    color: #9f4955;
  }

  .couple-person .role-badge {
    font-size: 0.78rem;
  }

  .couple-names-c1 .amp-symbol {
    font-size: clamp(1.7rem, 6vw, 2.1rem);
  }

  .reception-big-time-c2,
  .ceremony-time-c1 {
    font-size: 1.65rem;
    font-weight: 700;
    color: #a14856;
  }

  .parents-grid-c1 {
    gap: 8px;
  }

  .parents-col small {
    font-size: 0.72rem;
  }

  .parents-col h4 {
    font-size: 0.92rem;
    font-weight: 700;
    color: #a14856;
  }

  .parents-col p {
    font-size: 0.72rem;
  }

  .announcement-c1 {
    font-size: 1rem;
    letter-spacing: 0.06em;
    line-height: 1.5;
  }

  .ceremony-intro-lbl {
    font-size: 1rem;
    letter-spacing: 0.06em;
    line-height: 1.5;
  }

  .ceremony-loc-lbl {
    font-size: 1.15rem;
  }

  .ceremony-at-lbl {
    font-size: 0.72rem;
  }

  .ceremony-date-bar {
    font-size: 0.82rem;
  }

  .ceremony-date-bar .big-day {
    font-size: 1.65rem;
  }

  .watermark-c1-parents-right {
    top: 765px;
    right: 4%;
    width: 105px;
    opacity: 0.25;
  }

  .watermark-c1-groom-left {
    top: 960px;
    left: -35px;
    width: 260px;
    opacity: 0.35;
  }

  .watermark-c1-ceremony-right {
    top: 1120px;
    right: 6%;
    width: 85px;
    opacity: 0.22;
  }

  .c2-pill-actions {
    grid-template-columns: 1fr;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .btn-pill-calendar,
  .btn-pill-rsvp {
    font-size: 0.82rem;
    padding: 11px 16px;
    gap: 6px;
    min-width: 0;
    width: 100%;
    white-space: nowrap;
  }

  .decor-c2-tall-stem {
    top: 520px;
    right: -25px;
    width: 155px;
    opacity: 0.25;
  }

  .dresscode-palette {
    gap: 14px;
  }

  .dresscode-item .color-circle {
    width: 38px;
    height: 38px;
  }

  .watermark-c3-timeline-left {
    top: 15px;
    left: -25px;
    width: 170px;
    opacity: 0.28;
  }

  .countdown-grid-c3 {
    gap: 8px;
  }

  .countdown-box-c3 {
    padding: 10px 4px 8px;
    border-radius: 12px;
  }

  .countdown-box-c3 .cd-num {
    font-size: 1.35rem;
  }

  .gift-envelope-img-c3 {
    width: 215px;
  }

  .watermark-c3-gift-left {
    bottom: 60px;
    left: -18px;
    width: 115px;
    opacity: 0.22;
  }

  .watermark-c3-gift-right {
    bottom: 75px;
    right: -18px;
    width: 110px;
    opacity: 0.22;
  }
}

/* Tablet & Desktop Centering (900px Max-Width) */
@media (min-width: 768px) {
  .main-wrapper {
    max-width: 900px;
    padding: 0;
  }

  .wedding-single-card {
    max-width: 900px;
    margin: 0 auto;
    border-radius: 0;
    border-top: none;
    border-bottom: none;
  }

  .gallery-block-c2 .gallery-carousel {
    height: 420px;
  }

  .gallery-block-c2 .carousel-slide {
    width: 260px;
  }

  .gallery-block-c2 .carousel-btn.prev { left: 12px; }
  .gallery-block-c2 .carousel-btn.next { right: 12px; }
}

/* Màn thấp (iPhone SE): thấp hơn nhưng vẫn đủ chỗ tên cô dâu + lời mời */
@media (max-width: 500px) and (max-height: 720px) {
  .card1-script-names {
    margin-top: clamp(280px, 44vh, 350px);
    font-size: clamp(2.6rem, 10.5vw, 3.2rem);
    gap: 6px;
  }

  .card1-script-names .amp {
    font-size: clamp(1.7rem, 6.5vw, 2.1rem);
  }

  .intro-guest-invite {
    margin-top: 12px;
  }

  .decor-c1-top-right {
    top: 36px;
    width: 95%;
    opacity: 0.85;
  }
}
