/* Our Story Section Styles - wedding-mele prefix */

/* Font is registered globally in `public/css/style.css` */
@media (max-width: 767px) {
    .wedding-mele-heart-overlay {
      position: absolute;
      top: 0px;
      left: -71px;
      width: 100%;
    }
  }
  
  @media (min-width: 1024px) and (max-width: 1366px) {
    .wedding-mele-heart-overlay {
      position: absolute;
      top: 0;
      left: 0;
      width: 38%;
    }
  }
  
@media (max-width: 576px) {
    .wedding-mele-timeline {
        margin: 12px auto;
        max-width: 220px;
        display: none;
    }

    .wedding-mele-person-section.wedding-mele-vickram-section.wm-reveal.is-visible {
        margin-bottom: 32px;
        position: relative;
        left: -40px;
    }
    .wedding-mele-person-section.wedding-mele-nisha-section.wm-reveal.is-visible {
        right: -30px;
    }

    

    
}
.wedding-mele-our-story-section {
    width: 100%;
    min-width: 100%;
    background-color: #ffffff;
    padding: 36px 0;
    position: relative;
    overflow: visible;
    box-sizing: border-box;
}

/* Title Section */
.wedding-mele-story-title-section {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    z-index: 2;
}

.wedding-mele-bride-groom-text {
    font-family: 'Britaniya', 'Britania Vintage', 'Volkhov', serif;
    font-size: 30px;
    font-weight: normal;
    font-style: italic;
    color: #2F4F75;
    margin-bottom: 0px;
    letter-spacing: 2px;
}

.wedding-mele-title-decorative {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0px 0;
}

.wedding-mele-decorative-img {
    width: auto;
    height: 40px;
    max-width: 200px;
    object-fit: contain;
}

.wedding-mele-our-story-title {
    font-family: 'Volkhov', serif;
    font-size: 45px;
    font-weight: 700;
    color: #2F4F75;
    margin-top: 0px;
    letter-spacing: 1px;
}

/* Main Content Wrapper */
.wedding-mele-story-content-wrapper {
    position: relative;
    min-height: 500px;
    padding: 0px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    width: 100%;
}

/* Decorative Frames */
.wedding-mele-left-frame,
.wedding-mele-right-frame {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 80%;
    z-index: 1;
    pointer-events: none;
    /* display: none; */
    align-items: center;
    justify-content: center;
}

.wedding-mele-left-frame {
    left: 0;
}

.wedding-mele-right-frame {
    right: 0;
}

.wedding-mele-frame-image {
    width: auto;
    height: 100%;
    max-width: 200px;
    object-fit: contain;
    opacity: 1;
    display: block;
}

/* Center Content */
.wedding-mele-story-center-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Person Sections */
.wedding-mele-person-section {
    position: relative;
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}

.wedding-mele-vickram-section {
    order: 1;
    align-self: flex-start;
    margin-top: 50px;
}

.wedding-mele-nisha-section {
    order: 3;
    align-self: flex-end;
    margin-bottom: 50px;
}

/* Text Bubbles */
.wedding-mele-text-bubble {
    position: relative;
    width: 320px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wedding-mele-bubble-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 104%;
    height: 140%;
    object-fit: contain;
    z-index: 1;
}
/* Desktop: hearts hidden; mobile will show them */
.wedding-mele-heart-icon.wedding-mele-heart-right {
    display: none;
}
.wedding-mele-heart-icon.wedding-mele-heart-left {
    display: none;
}

.wedding-mele-bubble-content {
    position: relative;
    z-index: 2;
    padding: 35px 38px;
    text-align: left;
    top: 34px;
}

.wedding-mele-person-name {
    font-family: 'Volkhov', serif;
    font-size: 26px;
    font-weight: 400;
    font-style: italic;
    color: #2F4F75;
    margin-bottom: 15px;
    letter-spacing: 1px;
    text-align: center;
}
.wedding-mele-person-description {
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #666666;
    line-height: 1.6;
    text-align: center;
    margin: 3px;
    padding: 6px;
}

/* Heart Icons */
.wedding-mele-heart-icon {
    position: absolute;
    z-index: 3;
}

.wedding-mele-heart-right {
    top: 15px;
    right: 20px;
}

.wedding-mele-heart-left {
    top: 15px;
    left: 20px;
}

.wedding-mele-heart-icon svg {
    width: 24px;
    height: 24px;
}

/* Couple Images */
.wedding-mele-couple-images {
    order: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0;
    position: relative;
    z-index: 3;
    flex: 0 0 auto;
    width: 65%;
    max-width: 900px;
    margin: 0 auto;
    min-height: 550px;
    transition: width 260ms ease-out; /* smooth while scrolling */
    will-change: width;
}

.wedding-mele-person-image {
    position: absolute;
    z-index: 5; /* In front of timeline (z-index: 1) */
    transition: none; /* No transition by default */
}

/* Default positions - images at endpoints */
.wedding-mele-vickram-image {
    position: relative;
    opacity: 0.7;
}

.wedding-mele-nisha-image {
    position: relative;
    opacity: 0.7;
}

/* Animated state: only used for opacity (width handled by JS) */
.wedding-mele-couple-images.animate {
    justify-content: space-between;
}

.wedding-mele-couple-images.animate .wedding-mele-vickram-image,
.wedding-mele-couple-images.animate .wedding-mele-nisha-image {
    opacity: 1;
}

.wedding-mele-person-img {
    width: auto;
    height: 550px;
    max-width: 300px;
    object-fit: contain;
    display: block;
}

/* Timeline */
.wedding-mele-timeline {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70%;
    max-width: 900px;
    height: 8px;
    z-index: 1; /* Behind images */
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.wedding-mele-timeline-line {
    width: 64%; /* Line spans from 18% to 82% (64% width) */
    left: 18%; /* Start at left dot position */
    height: 8px;
    background-color: #2F4F75;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.wedding-mele-timeline-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid #2F4F75;
    background-color: #ffffff;
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1; /* Behind images, same as timeline */
}

.wedding-mele-timeline-dot-left {
    left: 18%;
}

.wedding-mele-timeline-dot-right {
    right: 18%;
}

/* Responsive Design */
@media (max-width: 1300px) {
    .wedding-mele-our-story-section {
        overflow: visible;
        position: relative;
    }

    .wedding-mele-our-story-section .container {
        position: relative;
        overflow: visible;
    }

    .wedding-mele-story-content-wrapper {
        overflow: visible;
        position: relative;
    }

    .wedding-mele-left-frame,
    .wedding-mele-right-frame {
        display: flex !important;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        height: 80%;
        z-index: 1;
    }

    .wedding-mele-left-frame {
        left: 0;
    }

    .wedding-mele-right-frame {
        right: 0;
    }

    .wedding-mele-frame-image {
        width: auto;
        height: 100%;
        max-width: 250px;
        object-fit: contain;
        opacity: 1;
        display: block;
    }
}

@media (max-width: 1200px) {
    .wedding-mele-story-center-content {
        max-width: 1000px;
        gap: 25px;
    }

    .wedding-mele-text-bubble {
        width: 320px;
    }

    .wedding-mele-person-img {
        height: 450px;
        max-width: 250px;
    }
}

/* iPad Pro (portrait/small desktop) – keep desktop layout, prevent overflow and “come close” on scroll */
@media (min-width: 993px) and (max-width: 1024px) {
    .wedding-mele-our-story-section {
        padding: 48px 0 56px;
    }

    .wedding-mele-story-center-content {
        max-width: 960px;
        gap: 32px;
        padding: 0 24px;
    }

    .wedding-mele-text-bubble {
        width: 280px;
        max-width: 280px;
    }

    .wedding-mele-vickram-section {
        margin-top: 36px;
        margin-bottom: 12px;
    }

    .wedding-mele-nisha-section {
        margin-bottom: 36px;
        margin-top: 12px;
    }

    .wedding-mele-person-img {
        height: 420px;
        max-width: 240px;
    }

    .wedding-mele-couple-images {
        width: 36% !important;
        min-height: 420px;
    }

}

@media (max-width: 992px) {
    .wedding-mele-our-story-section {
        padding: 60px 0;
    }

    .wedding-mele-story-title-section {
        margin-bottom: 40px;
    }

    .wedding-mele-bride-groom-text {
        font-size: 24px;
    }

    .wedding-mele-our-story-title {
        font-size: 40px;
    }

    .wedding-mele-story-content-wrapper {
        min-height: auto;
        padding: 30px 0;
    }

    .wedding-mele-story-center-content {
        flex-direction: column;
        gap: 20px;
        padding: 0 15px;
    }

    .wedding-mele-vickram-section {
        order: 1;
        margin-top: 0;
        align-self: center;
    }

    .wedding-mele-couple-images {
        order: 2;
        flex-direction: row;
        gap: 4px;
        justify-content: center !important;
    }

    .wedding-mele-vickram-image,
    .wedding-mele-nisha-image {
        transform: none;
    }

    .wedding-mele-couple-images.animate .wedding-mele-vickram-image,
    .wedding-mele-couple-images.animate .wedding-mele-nisha-image {
        transform: none;
    }

    .wedding-mele-timeline {
        display: none !important;
    }

    .wedding-mele-nisha-section {
        order: 3;
        margin-bottom: 0;
        align-self: center;
    }

    .wedding-mele-text-bubble {
        width: 100%;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }

    .wedding-mele-person-img {
        height: 400px;
        max-width: 220px;
    }

    .wedding-mele-couple-images {
        width: 100% !important;
        justify-content: center;
    }

    .wedding-mele-left-frame,
    .wedding-mele-right-frame {
        display: none !important;
    }
}

/* iPad / tablet (769px–991px) – stacked layout, no full-bleed, comfortable spacing for scroll */
@media (min-width: 769px) and (max-width: 991px) {
    .wedding-mele-our-story-section {
        padding: 52px 0 60px;
        width: 100%;
        min-width: 100%;
        overflow-x: hidden;
    }

    .wedding-mele-our-story-section .container {
        width: 100%;
        max-width: 100%;
        padding-left: 24px;
        padding-right: 24px;
        margin-left: auto;
        margin-right: auto;
    }

    .wedding-mele-story-title-section {
        margin-bottom: 36px;
    }

    .wedding-mele-story-center-content {
        gap: 28px;
        padding: 0;
    }

    .wedding-mele-text-bubble {
        max-width: 420px;
    }

    .wedding-mele-person-section.wedding-mele-vickram-section {
        margin-bottom: 8px;
    }

    .wedding-mele-person-section.wedding-mele-nisha-section {
        margin-top: 8px;
    }

    .wedding-mele-person-img {
        height: 380px;
        max-width: 200px;
    }

    .wedding-mele-bubble-content {
        padding: 30px 28px;
        top: 30px;
    }

    .wedding-mele-couple-images {
        min-height: 380px;
        gap: 6px;
    }
}

/* iPad Mini and smaller – responsive layout, avoid 100vw horizontal scroll */
@media (max-width: 768px) {
    .wedding-mele-our-story-section {
        padding: 48px 0 56px;
        overflow-x: hidden;
        width: 100%;
        max-width: 100%;
        position: relative;
        box-sizing: border-box;
    }

    .wedding-mele-our-story-section .container {
        position: relative;
        z-index: 1;
        width: 100%;
        max-width: 100%;
        padding-left: 16px;
        padding-right: 16px;
        margin-left: auto;
        margin-right: auto;
        box-sizing: border-box;
    }

    .wedding-mele-story-title-section {
        margin-bottom: 36px;
    }

    .wedding-mele-bride-groom-text {
        font-size: 22px;
    }

    .wedding-mele-our-story-title {
        font-size: 34px;
    }

    .wedding-mele-decorative-img {
        height: 32px;
    }

    .wedding-mele-story-center-content {
        gap: 16px;
        padding: 0;
    }

    .wedding-mele-person-name {
        font-size: 24px;
    }

    .wedding-mele-person-description {
        font-size: 18px;
        line-height: 1.55;
    }

    .wedding-mele-person-img {
        height: 340px;
        max-width: 200px;
    }

    .wedding-mele-bubble-content {
        padding: 47px 28px;
        top: 38px;
    }
    .wedding-mele-text-bubble {
        width: 100%;
        max-width: 389px;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 50px;
    }

    .wedding-mele-couple-images {
        min-height: 320px;
        width: 100% !important;
        gap: 4px;
    }

    .wedding-mele-left-frame,
    .wedding-mele-right-frame {
        display: none !important;
    }

    .wedding-mele-timeline {
        display: none !important;
    }

    /* Show heart icons on mobile to match desktop design */
    .wedding-mele-heart-icon.wedding-mele-heart-right,
    .wedding-mele-heart-icon.wedding-mele-heart-left {
        display: block !important;
    }
}

/* iPad Mini only (768px) – Vickram bubble left, Nisha bubble right */
@media (min-width: 577px) and (max-width: 768px) {
    .wedding-mele-story-center-content {
        align-items: stretch;
    }

    .wedding-mele-person-section.wedding-mele-vickram-section {
        align-self: flex-start;
    }

    .wedding-mele-person-section.wedding-mele-vickram-section .wedding-mele-text-bubble {
        margin-left: 0;
        margin-right: auto;
    }

    .wedding-mele-person-section.wedding-mele-nisha-section {
        align-self: flex-end;
    }

    .wedding-mele-person-section.wedding-mele-nisha-section .wedding-mele-text-bubble {
        margin-left: auto;
        margin-right: 0;
    }
}

@media (max-width: 576px) {
    .wedding-mele-our-story-section {
        padding: 36px 0 48px;
        width: 100%;
        max-width: 100%;
    }

    .wedding-mele-our-story-section .container {
        padding-left: 14px;
        padding-right: 14px;
    }

    .wedding-mele-story-title-section {
        margin-bottom: 28px;
    }

    .wedding-mele-bride-groom-text {
        font-size: 19px;
        letter-spacing: 1px;
    }

    .wedding-mele-our-story-title {
        font-size: 28px;
    }

    .wedding-mele-decorative-img {
        height: 28px;
    }

    .wedding-mele-story-center-content {
        gap: 12px;
        padding: 0;
    }

    .wedding-mele-person-name {
        font-size: 22px;
        margin-bottom: 10px;
    }

    .wedding-mele-person-description {
        font-size: 15px;
        padding: 7px 65px;
    }

    .wedding-mele-person-img {
        height: 280px;
        max-width: 160px;
    }

    .wedding-mele-bubble-content {
        padding: 22px 18px;
        top: 24px;
    }

    .wedding-mele-text-bubble {
        max-width: 100%;
        min-height: 160px;
        margin-left: auto;
        margin-right: auto;
    }

    .wedding-mele-couple-images {
        min-height: 280px;
        width: 100% !important;
        gap: 2px;
        justify-content: center;
    }

    .wedding-mele-bubble-bg {
        height: 130%;
    }

    .wedding-mele-timeline {
        display: none !important;
    }
}

/* Extra small phones – single column stack stays readable */
@media (max-width: 390px) {
    .wedding-mele-our-story-title {
        font-size: 26px;
    }

    .wedding-mele-person-name {
        font-size: 20px;
    }

    .wedding-mele-person-img {
        height: 260px;
        max-width: 140px;
    }

    .wedding-mele-bubble-content {
        padding: 18px 14px;
    }
}

/* Mobile: softer reveal for Our Story blocks (no slide, just fade) */
@media (max-width: 992px) {
    .wedding-mele-our-story-section .wm-reveal {
        transform: translate3d(0, 12px, 0);
    }

    .wedding-mele-our-story-section .wm-reveal.wm-reveal--left,
    .wedding-mele-our-story-section .wm-reveal.wm-reveal--right {
        transform: translate3d(0, 12px, 0);
    }

    .wedding-mele-our-story-section .wedding-mele-couple-images.wm-reveal {
        transform: translate3d(0, 12px, 0);
    }
}
