@font-face {
    font-family: 'Alathesia';
    src: url('Alathesia.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --gold: #dfb15b;
    --dark-overlay: rgba(17, 24, 39, 0.75);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    font-family: 'Montserrat', sans-serif;
    background-color: #111;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

html.locked, body.locked {
    overflow: hidden !important;
    height: 100vh !important;
}

.section {
    position: relative;
    min-height: 100vh;
    width: 100vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-size: cover;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Different backgrounds for different sections */
.landing-section {
    background-image: url('https://images.unsplash.com/photo-1519741497674-611481863552?q=80&w=2070&auto=format&fit=crop');
}

.details-section {
    background-image: url('https://images.unsplash.com/photo-1469371670807-013ccf25f16a?q=80&w=2070&auto=format&fit=crop');
    padding: 2rem;
    text-align: center;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark-overlay);
    z-index: 1;
}

.overlay-light {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    z-index: 1;
}

.rain {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><rect width="1" height="15" fill="rgba(255,255,255,0.1)" transform="rotate(15)"/></svg>');
    animation: rain 0.5s linear infinite;
}

.content {
    position: relative;
    z-index: 3;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.arabic-text {
    font-family: 'Amiri', serif;
    font-size: 4.5rem;
    line-height: 1.5;
    color: transparent;
    -webkit-text-stroke: 1px var(--gold);
    position: relative;
    direction: rtl;
    
    /* Animation for revealing the stroke right-to-left */
    clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%);
    animation: 
        revealText 2s ease-in-out forwards,
        fillColor 1.5s ease-in-out 1.5s forwards;
}

.arabic-text.static {
    font-size: 1.5rem;
    animation: none;
    clip-path: none;
    color: var(--gold);
    -webkit-text-stroke: 0;
    text-shadow: none;
}

@keyframes revealText {
    0% { clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%); }
    100% { clip-path: polygon(100% 0, 0 0, 0 100%, 100% 100%); }
}

@keyframes fillColor {
    0% {
        color: transparent;
        -webkit-text-stroke: 1px var(--gold);
    }
    100% {
        color: var(--gold);
        -webkit-text-stroke: 0px var(--gold);
        text-shadow: 0 0 15px rgba(223, 177, 91, 0.4);
    }
}

@keyframes revealTextLTR {
    0% { clip-path: polygon(0 0, 0 0, 0 100%, 0 100%); }
    100% { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
}

@keyframes fillColorNames {
    0% {
        color: transparent;
        -webkit-text-stroke: 1px #f3f4f6;
    }
    100% {
        color: #f3f4f6;
        -webkit-text-stroke: 0px #f3f4f6;
        text-shadow: 0 0 15px rgba(243, 244, 246, 0.4);
    }
}

.subtitle {
    color: #d1d5db;
    font-size: 0.8rem;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    opacity: 0;
    animation: fadeIn 1.5s ease-in-out 0.5s forwards;
}

.subtitle.static {
    animation: none;
    opacity: 1;
    margin-bottom: 0;
}

.btn-open {
    display: inline-block;
    padding: 0.8rem 2.5rem;
    border: 1px solid var(--gold);
    border-radius: 50px;
    color: var(--gold);
    text-decoration: none;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    transition: all 0.3s ease;
    opacity: 0;
    animation: fadeIn 1.5s ease-in-out 0.5s forwards;
    background: transparent;
    cursor: pointer;
}

.btn-open:hover {
    background: var(--gold);
    color: #111;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes rain {
    0% { background-position: 0 0; }
    100% { background-position: 20px 100px; }
}

.details-names {
    font-family: 'Angelina Malika Free', serif;
    font-weight: normal;
    font-style: italic;
    font-size: 3.5em;
    line-height: 1.2;
    letter-spacing: 1px;
    color: #fff;
    margin: 2rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    position: relative;
}

.details-names span:not(.details-ampersand) {
    display: inline-block;
    color: transparent;
    -webkit-text-stroke: 1px #f3f4f6;
    clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
}

.details-names span.details-ampersand {
    display: inline-block;
    font-family: 'Great Vibes', cursive;
    font-size: 6rem;
    color: transparent;
    -webkit-text-stroke: 1px var(--gold);
    clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
}

.details-names.start-animation span:not(.details-ampersand) {
    animation: 
        revealTextLTR 2s ease-in-out forwards,
        fillColorNames 1.5s ease-in-out 2.5s forwards;
}

.details-names.start-animation span.details-ampersand {
    animation: 
        revealTextLTR 2s ease-in-out forwards,
        fillColor 1.5s ease-in-out 2.5s forwards;
}

.details-date {
    color: #9ca3af;
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 4rem;
}

.diamond {
    color: var(--gold);
    font-size: 0.5rem;
}

.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: #6b7280;
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.scroll-line {
    width: 1px;
    height: 30px;
    background-color: var(--gold);
}

/* Families Section */
.families-section {
    background-color: #121926; /* Dark slate blue fallback */
    background-image: url('photo.png');
    padding: 6rem 2rem;
    justify-content: center;
}

.families-content {
    max-width: 800px;
    margin: 0 auto;
    gap: 1.5rem;
}

.quran-verse {
    font-family: 'Amiri', serif;
    font-size: 2.2rem;
    color: var(--gold);
    direction: rtl;
    line-height: 1.5;
}

.verse-translation {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-style: italic;
    color: #4b5563;
    margin-bottom: 0.5rem;
}

.verse-ref {
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    color: #475569;
    text-transform: uppercase;
    margin-bottom: 3rem;
}

.verse-ref::before {
    content: "— ";
}

.blessings-text {
    font-size: 0.6rem;
    letter-spacing: 0.3em;
    color: var(--gold);
    text-transform: uppercase;
}

.families-heading {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    color: #111;
    font-weight: normal;
    margin-bottom: 1rem;
}

.families-divider {
    width: 40px;
    height: 1px;
    background-color: var(--gold);
    margin: 0 auto 3rem auto;
}

.parents-container {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    width: 100%;
    position: relative;
    gap: 2rem;
}

.parents-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.parents-title {
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    color: var(--gold);
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    font-weight: bold;
}

.parent-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: #111;
    margin-bottom: 0.2rem;
}

.parent-role {
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    color: #64748b;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.family-address {
    font-size: 0.8rem;
    color: #4b5563; /* Matches the dark text theme we just set */
    text-align: center;
    line-height: 1.6;
    margin-bottom: 1rem;
    font-style: italic;
}

.family-contacts {
    font-size: 0.8rem;
    color: #111;
    text-align: center;
    line-height: 1.8;
}

.family-contacts a {
    color: var(--gold);
    text-decoration: none;
    transition: color 0.3s ease;
    font-family: 'Playfair Display', serif;
}

.family-contacts a:hover {
    color: #111;
}

.late-text {
    color: var(--gold);
    text-transform: none;
    font-style: italic;
    font-family: 'Playfair Display', serif;
}

.parents-separator {
    font-family: 'Great Vibes', cursive;
    font-size: 1.5rem;
    color: var(--gold);
    align-self: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 50%;
}

/* Events Section */
.events-section {
    background-color: #ffffff; /* White background fallback */
    background-image: url('phototwo.png');
    padding: 3rem 2rem;
    justify-content: center;
    min-height: auto;
}

.events-content {
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
}

.events-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 3rem;
    width: 100%;
}

    align-items: center;
    gap: 4rem;
    width: 100%;
    margin-top: 2rem;
}

.venue-details {
    flex: 1;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.venue-media {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.venue-images {
    display: flex;
    gap: 1rem;
}

.venue-img {
    flex: 1;
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.venue-map iframe {
    border-radius: 15px;
    width: 100%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.event-time {
    font-size: 0.8rem;
    color: #e2e8f0;
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}

.event-location {
    font-size: 0.85rem;
    color: #cbd5e1;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.event-link {
    font-size: 0.8rem;
    color: #d1c4a9;
    text-decoration: none;
    border-bottom: 1px solid #d1c4a9;
    padding-bottom: 2px;
    transition: color 0.3s ease;
}

.event-link:hover {
    color: var(--gold);
    border-color: var(--gold);
}

/* Story Section */
.story-section {
    background-color: #fff;
    background-image: url('photothree.png');
    padding: 6rem 2rem;
    justify-content: center;
}

.story-content {
    max-width: 900px; /* slightly smaller max width */
    width: 100%;
    margin: 0 auto;
}

.timeline {
    display: flex;
    flex-direction: column;
    gap: 6rem; /* bigger gap between stories */
    width: 100%;
}

.timeline-item {
    display: flex;
    align-items: center;
    gap: 5rem; /* gap between image and text */
    width: 100%;
}

.timeline-item.right {
    flex-direction: row-reverse;
}

.timeline-image {
    flex: 0 0 45%;
    max-width: 380px;
    max-height: 240px; /* Reduced height */
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover; /* Fills the reduced height perfectly */
}

.timeline-text {
    flex: 1;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.timeline-item.right .timeline-text {
    text-align: right;
}

.story-date {
    font-size: 0.95rem;
    color: #556b53; /* earthy green from screenshot */
    margin-bottom: 0.8rem;
    letter-spacing: 0.05em;
}

.story-title {
    font-family: 'Great Vibes', cursive;
    font-size: 3.5rem; /* larger cursive title */
    color: #111;
    font-weight: normal;
    margin-bottom: 1.5rem;
}

.story-desc {
    font-size: 1rem;
    color: #4b5563;
    line-height: 1.8;
}

/* RSVP Section */
.rsvp-section {
    background-color: #0f172a;
    background-image: url('photoone.png');
    padding: 6rem 2rem;
    justify-content: center;
}

.rsvp-content {
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    gap: 1.5rem;
}

.top-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    width: 100%;
    flex-wrap: wrap;
}

.btn-pill {
    padding: 0.8rem 2rem;
    border-radius: 50px;
    background: transparent;
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-gold {
    border: 1px solid var(--gold);
    color: var(--gold);
}

.btn-gold:hover {
    background: var(--gold);
    color: #111;
}

.btn-green {
    border: 1px solid #10b981;
    color: #10b981;
}

.btn-green:hover {
    background: #10b981;
    color: #111;
}

.join-us {
    font-size: 0.65rem;
    letter-spacing: 0.4em;
    color: var(--gold);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.rsvp-heading {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    color: #f8fafc;
    font-weight: normal;
    margin-bottom: 0.5rem;
}

.rsvp-subtext {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.1rem;
    color: var(--gold);
    margin-bottom: 1rem;
}

.rsvp-divider {
    width: 30px;
    height: 1px;
    background-color: #334155;
    margin: 0 auto 2rem auto;
}

.rsvp-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.rsvp-card {
    background: #1e293b;
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 12px;
    padding: 1.2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
    width: 100%;
    text-align: left;
}

.rsvp-card:hover {
    background: #334155;
}

.icon-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 0.8rem;
}

.icon-green {
    border: 1px solid #10b981;
    color: #10b981;
}

.icon-red {
    border: 1px solid #ef4444;
    color: #ef4444;
}

.rsvp-card-text {
    font-family: 'Playfair Display', serif;
    color: #cbd5e1;
    font-size: 1.1rem;
}

.rsvp-card-text.italic {
    font-style: italic;
    color: #94a3b8;
}

/* Footer Section */
.footer-section {
    background-color: #0b1120; /* Very dark blue/black to match image */
    background-image: url('photofour.png');
    padding: 3rem 2rem; /* Reduced padding */
    justify-content: center;
    min-height: auto; /* Reduced height */
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    z-index: 2;
}

.footer-arabic {
    display: inline-block;
    font-family: 'Amiri', serif;
    font-size: 2.2rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: transparent;
    -webkit-text-stroke: 1px transparent;
}

.footer-arabic.start-animation {
    animation: 
        glowStroke 2s ease-in-out forwards,
        fillColor 2s ease-in-out 2s forwards;
}

@keyframes glowStroke {
    0% {
        -webkit-text-stroke: 1px transparent;
    }
    100% {
        -webkit-text-stroke: 1px var(--gold);
    }
}

.footer-translation {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    color: #475569;
    text-transform: uppercase;
    margin-bottom: 3rem;
}

.footer-names {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: #111;
    margin-bottom: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
}

.footer-ampersand {
    font-family: 'Great Vibes', cursive;
    font-size: 3.5rem;
    color: var(--gold);
}

.footer-details {
    font-size: 0.65rem;
    letter-spacing: 0.25em;
    color: #475569;
    text-transform: uppercase;
    line-height: 2.2;
}

@media (max-width: 768px) {
    .section {
        background-attachment: scroll !important; /* Fixes extreme background zoom on mobile */
        background-position: center;
    }

    .arabic-text { font-size: 3rem; }
    .details-names { font-size: 3rem; }
    .details-ampersand { font-size: 4rem; }
    
    .parents-container {
        flex-direction: column;
        align-items: center;
        gap: 3rem;
    }
    
    .parents-separator {
        position: static;
        transform: none;
        margin: 1rem 0;
    }
    
    .quran-verse {
        font-size: 1.8rem;
    }

    .events-container {
        flex-direction: column;
        gap: 4rem;
    }
    
    .timeline-item, .timeline-item.right {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
    
    .timeline-text, .timeline-item.right .timeline-text {
        text-align: center;
    }
    
    /* Footer Mobile Responsiveness */
    .footer-arabic {
        font-size: 1.6rem;
    }
    .footer-names {
        font-size: 2rem;
        flex-direction: column;
        gap: 0.2rem;
    }
    .footer-ampersand {
        font-size: 2.5rem;
    }
    .footer-details {
        font-size: 0.55rem;
    }
}
