/* ==========================================================================
   Royal Rose Wedding Invitation Website - Stylesheet
   ========================================================================== */

/* --- CSS Variables & Theme Tokens --- */
:root {
    --bg-rose-light: #fff5f7;
    --bg-rose-soft: #fce8eb;
    --bg-rose-card: rgba(255, 245, 247, 0.88);
    
    --primary-burgundy: #7a1c30;
    --primary-rose-gold: #c27b88;
    --accent-gold: #d4af37;
    --accent-gold-dark: #b38f24;
    
    --text-dark: #3a2228;
    --text-muted: #6e4c55;
    --text-gold: #c5a059;
    
    --font-arabic: 'Amiri', serif;
    --font-heading: 'Cormorant Garamond', serif;
    --font-script: 'Great Vibes', cursive;
    --font-sans: 'Montserrat', sans-serif;
    
    --shadow-soft: 0 10px 30px rgba(122, 28, 48, 0.08);
    --shadow-card: 0 15px 35px rgba(122, 28, 48, 0.12);
    --glass-border: 1px solid rgba(194, 123, 136, 0.3);
    --gold-gradient: linear-gradient(135deg, #d4af37 0%, #f3e5ab 50%, #b38f24 100%);
    --rose-gradient: linear-gradient(135deg, #fff5f7 0%, #fce8eb 100%);
}

/* --- Global Reset & Base Setup --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background: var(--bg-rose-light);
    color: var(--text-dark);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    width: 100%;
}

/* Prevent scroll memory restoration when overlay is active */
body.overlay-active {
    overflow: hidden !important;
    height: 100vh !important;
    position: fixed;
    width: 100%;
}

/* --- Full-Screen Preloader Image Screen with Direct Seamless Transition --- */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg-rose-light);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    opacity: 1;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.preloader-full-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.preloader.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* --- Falling Rose Petals Canvas --- */
#petals-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 99;
}

/* --- Opening Video Overlay (Background set to loading graphic to prevent white flash) --- */
.opening-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: url('images/loading_screen.png') no-repeat center center / cover;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.opening-overlay.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#opening-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* --- Hero Section --- */
.hero-section {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 550px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
}

.hero-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#hero-loop-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(26, 8, 14, 0.1) 0%,
        rgba(26, 8, 14, 0.3) 60%,
        rgba(26, 8, 14, 0.75) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding-bottom: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* --- Redesigned Premium Scroll Indicator --- */
.scroll-arrow-link {
    text-decoration: none;
    color: #ffffff;
}

.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.3s ease;
}

.scroll-indicator:hover {
    transform: translateY(4px);
}

.scroll-text {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.scroll-mouse {
    width: 26px;
    height: 40px;
    border: 2px solid var(--accent-gold);
    border-radius: 20px;
    position: relative;
    display: flex;
    justify-content: center;
    background: rgba(122, 28, 48, 0.35);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.scroll-wheel {
    width: 4px;
    height: 8px;
    background: var(--accent-gold);
    border-radius: 4px;
    position: absolute;
    top: 7px;
    animation: scrollWheel 1.8s infinite ease-in-out;
}

.scroll-chevron {
    font-size: 0.85rem;
    color: var(--accent-gold);
    animation: bounceChevron 1.8s infinite ease-in-out;
    margin-top: -2px;
}

@keyframes scrollWheel {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(14px); }
}

@keyframes bounceChevron {
    0%, 100% { transform: translateY(0); opacity: 0.7; }
    50% { transform: translateY(5px); opacity: 1; }
}

/* --- Section Layouts & Typography --- */
.section {
    padding: 3.5rem 1.2rem;
    position: relative;
    z-index: 2;
}

.container {
    max-width: 950px;
    margin: 0 auto;
}

.text-center {
    text-align: center;
}

.section-subtitle {
    font-family: var(--font-script);
    font-size: 2.2rem;
    color: var(--primary-rose-gold);
    margin-bottom: 0.2rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.3rem;
    color: var(--primary-burgundy);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 2rem;
}

/* --- Blessing & Quranic Verse Section --- */
.blessing-section {
    background: linear-gradient(180deg, var(--bg-rose-light) 0%, #fdecf0 100%);
}

.arabic-bismillah {
    font-family: var(--font-arabic);
    font-size: 2.4rem;
    color: var(--primary-burgundy);
    margin-bottom: 1.8rem;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(122, 28, 48, 0.1);
    word-break: break-word;
}

.blessing-text-box {
    margin: 1.8rem 0;
}

.blessing-line.line-1 {
    font-family: var(--font-heading);
    font-size: 1.7rem;
    font-style: italic;
    color: var(--text-muted);
}

.blessing-line.line-2 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--text-dark);
    margin: 0.5rem 0;
}

.blessing-line.line-3 {
    font-family: var(--font-script);
    font-size: 3.4rem;
    color: var(--primary-burgundy);
    margin-top: 0.3rem;
}

.divider-ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
}

.ornament-line {
    width: 50px;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--accent-gold), transparent);
}

.ornament-icon {
    color: var(--accent-gold);
    font-size: 0.85rem;
}

.quran-verse-card {
    background: var(--bg-rose-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: var(--glass-border);
    border-radius: 20px;
    padding: 2rem 1.5rem;
    box-shadow: var(--shadow-card);
    max-width: 800px;
    margin: 0 auto;
}

.arabic-ayah {
    font-family: var(--font-arabic);
    font-size: 1.75rem;
    line-height: 2.1;
    color: var(--primary-burgundy);
    direction: rtl;
    margin-bottom: 1.2rem;
    font-weight: 600;
}

.ayah-citation {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-gold);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* --- Groom & Bride Section --- */
.couple-section {
    background: var(--bg-rose-light);
    padding-bottom: 1.5rem;
}

.couple-single-wrapper {
    max-width: 750px;
    margin: 0 auto;
}

.couple-banner-card {
    background: var(--bg-rose-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: var(--glass-border);
    border-radius: 24px;
    padding: 1.2rem;
    box-shadow: var(--shadow-card);
}

.banner-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 16px;
    overflow: hidden;
}

.couple-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.frame-border {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    border: 1px solid rgba(212, 175, 55, 0.6);
    border-radius: 12px;
    pointer-events: none;
}

/* --- Family & Parent Details Section --- */
.family-section {
    padding-top: 1.5rem;
    padding-bottom: 3.5rem;
    background: var(--bg-rose-light);
}

.family-card {
    background: var(--bg-rose-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: var(--glass-border);
    border-radius: 24px;
    padding: 2.2rem 1.8rem;
    box-shadow: var(--shadow-card);
    max-width: 750px;
    margin: 0 auto;
}

.family-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.family-box {
    flex: 1;
    text-align: center;
}

.family-tag {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-gold);
    margin-bottom: 0.3rem;
}

.person-name {
    font-family: var(--font-heading);
    font-size: 2.3rem;
    font-weight: 700;
    color: var(--primary-burgundy);
    line-height: 1.1;
    margin-bottom: 0.8rem;
}

.parents-detail {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(194, 123, 136, 0.2);
    border-radius: 14px;
    padding: 0.8rem 1rem;
}

.relation-label {
    font-family: var(--font-script);
    font-size: 1.5rem;
    color: var(--primary-rose-gold);
    line-height: 1;
    margin-bottom: 0.2rem;
}

.parents-names {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-dark);
}

.family-heart-divider {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    color: var(--primary-burgundy);
}

.divider-line-v {
    width: 1px;
    height: 35px;
    background: linear-gradient(to bottom, transparent, var(--accent-gold), transparent);
}

.heart-pulse {
    font-size: 1.4rem;
    color: var(--accent-gold);
    animation: heartBeat 2s infinite;
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    15% { transform: scale(1.25); }
    30% { transform: scale(1); }
    45% { transform: scale(1.15); }
}

/* --- Countdown Section --- */
.countdown-section {
    background: linear-gradient(135deg, #7a1c30 0%, #4a0f1d 100%);
    color: #ffffff;
    border-radius: 22px;
    margin: 1.2rem auto;
    padding: 2.2rem 1rem;
    max-width: 780px;
    box-shadow: 0 16px 35px rgba(74, 15, 29, 0.22);
}

.countdown-section .section-subtitle {
    color: var(--accent-gold);
    font-size: 1.9rem;
}

.countdown-section .section-title {
    color: #ffffff;
    font-size: 1.85rem;
    margin-bottom: 1.5rem;
}

.countdown-grid {
    display: flex;
    justify-content: center;
    gap: 0.7rem;
    flex-wrap: nowrap;
}

.time-box {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 12px;
    padding: 0.85rem 0.6rem;
    flex: 1;
    max-width: 88px;
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.18);
    text-align: center;
}

.time-number {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.95rem;
    font-weight: 700;
    color: var(--accent-gold);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.time-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.85);
}

/* Add to Google Calendar Button */
.calendar-action {
    margin-top: 1.6rem;
    display: flex;
    justify-content: center;
}

.btn-calendar {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold);
    font-size: 0.88rem;
    padding: 0.8rem 1.6rem;
}

.btn-calendar:hover {
    background: var(--accent-gold);
    color: var(--primary-burgundy);
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(212, 175, 55, 0.35);
}

/* --- Event & Venue Section --- */
.event-section {
    background: var(--bg-rose-light);
}

.event-card-wrapper {
    max-width: 700px;
    margin: 0 auto;
}

.event-card {
    background: var(--bg-rose-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem 1.8rem;
    box-shadow: var(--shadow-card);
    text-align: center;
}

.event-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-burgundy) 0%, #521120 100%);
    color: var(--accent-gold);
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.2rem auto;
    box-shadow: 0 10px 20px rgba(122, 28, 48, 0.2);
}

.event-name {
    font-family: var(--font-heading);
    font-size: 2.1rem;
    color: var(--primary-burgundy);
    margin-bottom: 1.8rem;
}

.event-info-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-bottom: 2rem;
    text-align: left;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.65);
    padding: 1rem 1.2rem;
    border-radius: 14px;
    border: 1px solid rgba(194, 123, 136, 0.2);
}

.info-item i {
    font-size: 1.4rem;
    color: var(--primary-burgundy);
    margin-top: 0.15rem;
}

.info-item h4 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    color: var(--primary-burgundy);
    margin-bottom: 0.1rem;
}

.info-item p {
    color: var(--text-dark);
    font-size: 0.95rem;
}

.venue-title {
    font-weight: 600;
    color: var(--primary-burgundy) !important;
}

.venue-address {
    color: var(--text-muted) !important;
    font-size: 0.9rem;
}

.map-container {
    margin-top: 1.8rem;
}

.map-action {
    margin-top: 1.2rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    padding: 0.85rem 1.8rem;
    border-radius: 50px;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 380px;
}

.btn-gold {
    background: var(--gold-gradient);
    color: var(--primary-burgundy);
    border: none;
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(212, 175, 55, 0.4);
}

/* --- Footer Section & Grand Invites Branding --- */
.footer {
    padding: 3.5rem 1.2rem 2.5rem 1.2rem;
    background: linear-gradient(180deg, var(--bg-rose-light) 0%, var(--bg-rose-soft) 100%);
    border-top: var(--glass-border);
}

.footer-blessing {
    font-family: var(--font-heading);
    font-size: 1.7rem;
    color: var(--primary-burgundy);
    margin-bottom: 0.3rem;
}

.footer-couple {
    font-family: var(--font-script);
    font-size: 2.2rem;
    color: var(--primary-rose-gold);
}

.footer-brand-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0 1.5rem 0;
}

.brand-line {
    width: 60px;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(194, 123, 136, 0.5), transparent);
}

.brand-heart {
    color: var(--accent-gold);
    font-size: 0.8rem;
}

.footer-brand-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.brand-name {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-burgundy);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.brand-social-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 0.3rem 0;
}

.social-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(122, 28, 48, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-burgundy);
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icon-btn:hover {
    background: var(--primary-burgundy);
    color: var(--accent-gold);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(122, 28, 48, 0.2);
}

.brand-tagline {
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-style: italic;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    max-width: 90%;
}

/* --- Scroll Fade-in Animation Utility --- */
.fade-in {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive Mobile Optimization --- */
@media (max-width: 600px) {
    .section { padding: 2.5rem 1rem; }
    .arabic-bismillah { font-size: 1.8rem; }
    .arabic-ayah { font-size: 1.45rem; line-height: 1.9; }
    .blessing-line.line-1 { font-size: 1.3rem; }
    .blessing-line.line-2 { font-size: 1.15rem; }
    .blessing-line.line-3 { font-size: 2.6rem; }
    .section-title { font-size: 1.9rem; }
    .section-subtitle { font-size: 1.8rem; }
    .family-card { padding: 1.5rem 1rem; }
    .family-grid { flex-direction: column; gap: 1rem; }
    .family-heart-divider { flex-direction: row; width: 100%; justify-content: center; }
    .divider-line-v { width: 40px; height: 1px; background: linear-gradient(to right, transparent, var(--accent-gold), transparent); }
    .person-name { font-size: 1.9rem; }
    .parents-names { font-size: 1.05rem; }
    .countdown-section { padding: 1.8rem 0.8rem; max-width: 95%; }
    .time-box { padding: 0.75rem 0.35rem; max-width: 75px; }
    .time-number { font-size: 1.6rem; }
    .time-label { font-size: 0.6rem; letter-spacing: 0.5px; }
    .event-card { padding: 1.8rem 1rem; }
    .brand-name { font-size: 0.85rem; }
    .brand-tagline { font-size: 0.74rem; }
    .btn-calendar { font-size: 0.82rem; padding: 0.75rem 1.2rem; }
}
