html, body {
    overflow-x: hidden;
    width: 100%;
}

main {
    overflow-x: hidden;
    width: 100%;
}

.btn-direction {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: linear-gradient(135deg, #e6d0af, #dcc097);
    color: #545f1b;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    border-radius: 999px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .15);
    transition: all 0.25s ease;
}

.btn-direction:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, .25);
}

.footer a {
    color: #6a4e23;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.footer a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: #e6d0af;
    transition: width 0.3s ease;
}

.footer a:hover {
    color: #8b6332;
}

.footer a:hover::after {
    width: 100%;
}

.icon-location {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.menu-row {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.menu-text {
    background: #ffffff;
    color: #4b5563;
    padding: 10px 18px;
    border-radius: 9999px;
    font-size: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .15);
    white-space: nowrap;
    transition: all 0.3s ease;
}

.menu-icon {
    width: 44px;
    height: 44px;
    background: #55601b;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .2);
    transition: all 0.3s ease;
}

.menu-toggle {
    width: 60px !important;
    height: 60px !important;
    min-width: 60px;
    min-height: 60px;
    border-radius: 50%;
    background: #55601b;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
    transition: all 0.3s ease;
    touch-action: manipulation;
    pointer-events: auto;
    cursor: pointer;
    border: none;
    padding: 0;
    outline: none;
}

.menu-row:hover .menu-text {
    box-shadow: 0 4px 16px rgba(0, 0, 0, .25) !important;
    transform: translateY(-2px);
}

.menu-row:hover .menu-icon {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5), 0 6px 20px rgba(0, 0, 0, .35) !important;
    transform: scale(1.05);
}

@media (hover: hover) {
    .menu-toggle:hover {
        box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5), 0 6px 20px rgba(0, 0, 0, .4) !important;
        transform: scale(1.05);
    }
}

.zoomable {
    cursor: zoom-in;
}

.image-popup {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0; width: 100%; height: 100%;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.85);
    justify-content: center;
    align-items: center; overflow: hidden;
}

.image-popup img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.image-popup-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: #fff;
    cursor: pointer;
    text-shadow: 0 0 8px rgba(0, 0, 0, 1), 0 0 16px rgba(0, 0, 0, 0.9), 0 2px 4px rgba(0, 0, 0, 0.8);
}

.ask-selection {
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 4px;
}

.bii-player {
    position: fixed;
    bottom: 30px;
    left: 20px;
    z-index: 9999;
    touch-action: manipulation;
    pointer-events: auto;
}

@media (min-width: 768px) {
    .bii-player {
        bottom: 70px;
    }
}

.bii-player .playerIcon {
    width: 60px !important;
    height: 60px !important;
    cursor: pointer;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    background: var(--theme-color, #545F1B);
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    touch-action: manipulation;
    pointer-events: auto;
    border: none;
    padding: 0;
    outline: none;
}

@media (hover: hover) {
    .bii-player .playerIcon:hover {
        transform: scale(1.05);
        box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5), 0 6px 16px rgba(0, 0, 0, 0.4);
    }
}

.bii-player .playerIcon::before,
.bii-player .playerIcon::after {
    display: none !important;
}

.bii-player .playerIcon span {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 10;
}

.bii-player .playerIcon span[style*="display: none"] {
    display: none !important;
}

.bii-player .playerIcon svg {
    width: 28px !important;
    height: 28px !important;
    display: block !important;
    margin: 0 auto;
    transform: translateX(1px);
}

@media (max-width: 768px) {
    .bii-player .playerIcon {
        width: 70px !important;
        height: 70px !important;
    }

    .bii-player .playerIcon svg {
        width: 32px !important;
        height: 32px !important;
    }

    .menu-toggle {
        width: 70px !important;
        height: 70px !important;
    }
}

/* Fix banner spacing for tablet screens */
@media (min-width: 768px) and (max-width: 900px) {
    #banner .text-center.uppercase.leading-tight {
        margin-top: 4px !important;
        font-size: 48px !important;
    }

    #banner .font-Corinthia {
        font-size: 72px !important;
    }

    #banner .relative.px-\[41px\] {
        margin-top: 12px !important;
        padding-top: 10px !important;
        padding-bottom: 16px !important;
    }

    #banner .relative.px-\[41px\] > div {
        font-size: 28px !important;
    }

    #banner .text-\[40px\] {
        font-size: 36px !important;
    }

    #introduction .text-\[40px\] {
        font-size: 36px !important;
    }

    #story .text-\[16px\] {
        font-size: 14px !important;
    }

    #bank .text-base {
        font-size: 14px !important;
    }

    #bank .text-\[40px\] {
        font-size: 36px !important;
    }

    #bank .text-xl {
        font-size: 18px !important;
    }

    #bank .text-\[16px\] {
        font-size: 14px !important;
    }

    #invitation .text-\[40px\] {
        font-size: 36px !important;
    }

    #invitation .text-\[18px\] {
        font-size: 16px !important;
    }

    #invitation .text-2xl {
        font-size: 20px !important;
    }

    #invitation section.max-w-9xl {
        padding-top: 40px !important;
    }

    #event .text-\[40px\] {
        font-size: 36px !important;
    }

    #event .text-\[18px\] {
        font-size: 16px !important;
    }

    #album .text-\[48px\] {
        font-size: 40px !important;
    }

    #story .text-\[40px\] {
        font-size: 36px !important;
    }
}

@media (min-width: 900px) and (max-width: 1000px) {
    #banner .text-\[40px\] {
        font-size: 52px !important;
    }

    #introduction .text-\[40px\] {
        font-size: 40px !important;
    }

    #story .text-\[16px\] {
        font-size: 15px !important;
    }

    #bank .text-base {
        font-size: 15px !important;
    }
}

@media (min-width: 901px) {
    #invitation section.max-w-9xl {
        padding-top: 40px !important;
    }
}

/* Fix event section title spacing on small screens */
@media (max-width: 767px) {
    .relative.h-\[167px\] {
        height: auto !important;
        min-height: 120px !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    .relative.h-\[167px\] .text-\[32px\] {
        font-size: 24px !important;
        line-height: 1.3 !important;
        padding: 16px 0 !important;
    }

    #banner .text-\[40px\] {
        font-size: 36px !important;
    }

    #introduction .text-\[40px\] {
        font-size: 32px !important;
    }

    #story .text-\[16px\] {
        font-size: 14px !important;
    }

    #bank .text-base {
        font-size: 14px !important;
    }

    #bank .text-\[40px\] {
        font-size: 32px !important;
    }

    #invitation .text-\[40px\] {
        font-size: 32px !important;
    }

    #invitation .text-2xl {
        font-size: 16px !important;
    }

    #event .text-\[40px\] {
        font-size: 32px !important;
    }

    #event .text-\[18px\] {
        font-size: 14px !important;
    }

    #album .text-\[48px\] {
        font-size: 36px !important;
    }

    #story .text-\[40px\] {
        font-size: 32px !important;
    }

    #banner section.max-h-\[745px\] {
        max-height: none !important;
        display: flex !important;
        flex-direction: column !important;
    }

    #banner .md\:hidden.grid-cols-2 {
        order: 2 !important;
        margin-bottom: 0 !important;
    }
}

@media (min-width: 500px) and (max-width: 767px) {
    #banner .md\:hidden.grid-cols-2 {
        height: 450px !important;
    }
}

/* Story Images Section */
.story-images-container {
    max-width: 1270px;
    margin: 20px auto 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    position: relative;
}

/* Lớp mờ cho content introduction */
#introduction-contentGroom-introduction,
#introduction-contentBride-introduction {
    background: rgba(255, 255, 255, 0.7);
    padding: 8px 12px;
    border-radius: 8px;
}

/* Style cho ảnh man và woman trong introduction */
#introduction-imageGroom,
#introduction-imageBride {
    width: auto !important;
    max-width: 100%;
    height: 100% !important;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: block;
    margin: 0 auto;
}

@media (hover: hover) {
    #introduction-imageGroom:hover,
    #introduction-imageBride:hover {
        transform: translateY(-8px);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    }
}
.bank-mobile{
        display: flex;
        width: 100%;
}

/* Style cho ảnh bank mobile */
@media (max-width: 767px) {
    .bank-mobile img {
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .bank-mobile {
        gap: 0.5rem;
        margin-top: 15px;
    }
}

/* Style cho ảnh bank desktop */
#bank-imageGroom,
#bank-imageBride {
    width: auto !important;
    max-width: 100%;
    height: auto !important;
    max-height: 100%;
    display: block;
    position: relative;
}

@media (min-width: 768px) {
    #bank-imageGroom,
    #bank-imageBride {
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
}

@media (min-width: 769px) and (max-width: 1000px) {
    #bank-imageGroom,
    #bank-imageBride {
        margin-top: 150px !important;
    }
}

@media (min-width: 1001px) and (max-width: 1200px) {
    #bank-imageGroom,
    #bank-imageBride {
        margin-top: 100px !important;
    }
}

/* Decor cho bank images ở màn 769-1100px */
@media (min-width: 769px) and (max-width: 1100px) {
    #bank-container-groom::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 150px;
        height: 150px;
        background: url('../images/decoLeft1.png') no-repeat center;
        background-size: contain;
        opacity: 1;
        pointer-events: none;
        z-index: 1;
    }

    #bank-container-bride::before {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 150px;
        height: 150px;
        background: url('../images/decoRight1.png') no-repeat center;
        background-size: contain;
        opacity: 1;
        pointer-events: none;
        z-index: 1;
    }
}

/* Background mờ cho title và description bank */
[id*="title-bank"],
[id*="description-bank"] {
    background: rgba(255, 255, 255, 0.35);
    padding: 8px 12px;
    border-radius: 8px;
    display: inline-block;
}

/* Container ảnh bank - flex để căn giữa (chỉ desktop) */
@media (min-width: 768px) {
    .relative.w-full.h-full.md\:block.hidden {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
    .bank-mobile{
        display: none!important;
    }
}

/* Background decor images */
.story-images-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 500px;
    height: 500px;
    background: url('../images/decoLeft1(1).png') no-repeat center;
    background-size: contain;
    opacity: 1;
    pointer-events: none;
    animation: floatDecor 3s ease-in-out infinite;
    z-index: -1;
}

.story-images-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 500px;
    height: 500px;
    background: url('../images/decoRight1(2).png') no-repeat center;
    background-size: contain;
    opacity: 1;
    pointer-events: none;
    animation: floatDecor 3s ease-in-out infinite;
    animation-delay: 1.5s;
    z-index: -1;
}

@keyframes floatDecor {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

@media (min-width: 768px) {
    .story-images-container::before,
    .story-images-container::after {
        width: 600px;
        height: 600px;
    }

    .story-images-container::before {
        left: -80px;
    }

    .story-images-container::after {
        right: -80px;
    }
}

/* Invitation Banner - giới hạn kích thước */
#invitation-imageBanner {
    width: 100% !important;
    height: auto !important;
    max-width: 500px;
    object-position: 50% 0% !important;
}

@media (min-width: 640px) {
    #invitation-imageBanner {
        max-width: 600px;
    }
}

@media (min-width: 768px) {
    #invitation-imageBanner {
        max-width: 700px;
    }
}

@media (min-width: 1024px) {
    #invitation-imageBanner {
        max-width: 828px;
    }
}

/* Giảm font-size địa chỉ ở màn 900-1000px */
@media (min-width: 900px) and (max-width: 1000px) {
    .invitation-address {
        font-size: 22px !important;
    }
}


.story-image-wrapper {
    margin-top: 30px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.story-card {
    display: inline-block;
    position: relative;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.story-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}
.story-image-wrapper p {
    margin: 0;
    font-size: 16px;
    color: #fff;
    text-align: center;
    background: rgba(85, 96, 27, 0.8);
    padding: 6px 12px;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    pointer-events: none;
}

.story-image {
    max-width: 100%;
    max-height: 100%;
    display: block;
    object-fit: contain;
    object-position: center;
    cursor: pointer;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.story-image-side-left {
    height: 300px;
    width:auto;
}
.story-image-side-right {
    height: 515px;
    width: auto;
}

.story-image-center {
    height: 415px;
    width: auto;
}

/* Tablet: Triangle layout - 1 ảnh to trên, 2 ảnh nhỏ dưới */
@media (min-width: 768px) and (max-width: 1023px) {
    .story-images-container {
        gap: 1rem;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .story-image-center {
        width: 100%;
        max-width: 450px;
        height: auto;
        order: -1;
    }

    .story-image-side-left {
        width: calc(50% - 0.5rem);
        height: auto;
    }
    .story-image-side-right {
        width: calc(50% - 0.5rem);
        height: auto;
    }
}

/* Desktop: Row layout */
@media (min-width: 1024px) {
    .story-images-container {
        flex-direction: row;
        align-items: center;
        justify-content: center;
    }

    .story-image-side-left {
        width: 300px;
        height: auto;
    }
    .story-image-side-right {
        width: 320px;
        height: auto;
    }

    .story-image-center {
        width: 500px;
        height: auto;
    }
}
