/* ===================================
   دعوة فرح - Invitation Page Styles
   Public Invitation View
   =================================== */

/* Invitation Body */
.invitation-body {
    font-family: var(--font-tajawal);
    background: #FEFEFE;
    color: var(--text-primary);
    overflow-x: hidden;
}

/* ===================================
   Loading Screen
   =================================== */
.invitation-loader {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #1A1A2E 0%, #2D2D44 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.invitation-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
    color: white;
}

.loader-icon {
    font-size: 4rem;
    display: block;
    animation: pulse 1.5s ease-in-out infinite;
    margin-bottom: 20px;
}

.loader-content p {
    font-size: 1.2rem;
    opacity: 0.8;
}

/* ===================================
   Main Container
   =================================== */
.invitation-container {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.invitation-container.loaded {
    opacity: 1;
}

/* ===================================
   Cover Section
   =================================== */
.inv-cover {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.cover-bg {
    position: absolute;
    inset: 0;
}

.cover-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Default gradient background if no image */
    background: linear-gradient(135deg, #1A1A2E 0%, #2D2D44 50%, #1A1A2E 100%);
}

.cover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(26, 26, 46, 0.3) 0%,
        rgba(26, 26, 46, 0.6) 50%,
        rgba(26, 26, 46, 0.9) 100%
    );
}

/* Floating Petals Animation */
.floating-petals {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.floating-petals::before,
.floating-petals::after {
    content: '🌸';
    position: absolute;
    font-size: 2rem;
    opacity: 0.6;
    animation: floatPetal 8s linear infinite;
}

.floating-petals::before {
    top: -10%;
    right: 10%;
    animation-delay: 0s;
}

.floating-petals::after {
    content: '💮';
    top: -10%;
    left: 20%;
    animation-delay: 3s;
    animation-duration: 10s;
}

@keyframes floatPetal {
    0% {
        transform: translateY(-10%) rotate(0deg) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(110vh) rotate(360deg) translateX(100px);
        opacity: 0;
    }
}

.sparkles-effect {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, rgba(212, 175, 55, 0.8), transparent),
        radial-gradient(2px 2px at 40% 70%, rgba(212, 175, 55, 0.6), transparent),
        radial-gradient(2px 2px at 60% 20%, rgba(232, 180, 184, 0.7), transparent),
        radial-gradient(2px 2px at 80% 50%, rgba(212, 175, 55, 0.5), transparent);
    animation: sparkle 4s ease-in-out infinite alternate;
}

@keyframes sparkle {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Cover Content */
.cover-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 40px 20px;
    max-width: 700px;
}

.bismillah-text {
    font-family: var(--font-aref);
    font-size: 1.5rem;
    color: var(--primary-gold-light);
    margin-bottom: 40px;
    letter-spacing: 2px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.couple-names {
    margin-bottom: 30px;
}

.couple-names h1 {
    font-family: var(--font-aref);
    font-size: 4rem;
    font-weight: 700;
    color: white;
    display: inline-block;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    line-height: 1.3;
}

.ampersand {
    font-family: var(--font-tajawal);
    font-size: 2.5rem;
    color: var(--primary-gold);
    margin: 0 15px;
    vertical-align: middle;
}

.wedding-title {
    margin-top: 25px;
}

.wedding-title span {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
    display: block;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounceDown 2s ease-in-out infinite;
}

.scroll-indicator i {
    font-size: 1.5rem;
    color: var(--primary-gold-light);
    background: rgba(212, 175, 55, 0.2);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes bounceDown {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

/* ===================================
   Common Section Styles
   =================================== */
.inv-section {
    padding: 80px 20px;
    max-width: 900px;
    margin: 0 auto;
}

.section-decorator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.decorative-line {
    width: 80px;
    height: 1px;
    background: linear-gradient(to left, transparent, var(--primary-gold), transparent);
}

.gold-icon {
    color: var(--primary-gold);
    font-size: 1.2rem;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title i {
    font-size: 2rem;
    color: var(--primary-gold);
    margin-bottom: 15px;
    display: block;
}

.section-title h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
}

/* ===================================
   Welcome Section
   =================================== */
.welcome-section {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    margin-top: -50px;
    position: relative;
    z-index: 10;
}

.welcome-text {
    text-align: center;
    padding: 30px;
}

.welcome-text p {
    font-family: var(--font-amiri);
    font-size: 1.5rem;
    line-height: 2;
    color: var(--text-primary);
}

/* ===================================
   Invitation Text Section
   =================================== */
.text-card {
    background: linear-gradient(135deg, var(--bg-secondary), white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--primary-gold-light);
}

.card-header {
    background: var(--gradient-gold);
    padding: 20px;
    text-align: center;
    color: var(--bg-dark);
}

.card-header i {
    font-size: 1.5rem;
    margin-left: 10px;
}

.card-header h2 {
    display: inline;
    font-size: 1.4rem;
    font-weight: 700;
}

.card-body {
    padding: 40px 30px;
    text-align: center;
}

.main-invitation-text {
    font-size: 1.2rem;
    line-height: 2;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.main-invitation-text strong {
    color: var(--primary-gold-dark);
    font-weight: 700;
}

.invitation-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-style: italic;
}

.card-footer {
    background: var(--bg-secondary);
    padding: 18px;
    text-align: center;
    border-top: 1px solid var(--primary-gold-light);
}

.parents-names span {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* ===================================
   Love Story Section
   =================================== */
.story-timeline {
    position: relative;
    padding: 20px 0;
}

.story-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    right: 50%;
    transform: translateX(50%);
    width: 3px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-gold), var(--primary-rose));
    border-radius: 3px;
}

.timeline-item {
    position: relative;
    padding: 20px 40px;
    width: 50%;
}

.timeline-item:nth-child(odd) {
    right: 50%;
    text-align: left;
    padding-right: 50px;
}

.timeline-item:nth-child(even) {
    left: 50%;
    text-align: right;
    padding-left: 50px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    top: 30px;
    width: 16px;
    height: 16px;
    background: var(--primary-gold);
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
}

.timeline-item:nth-child(odd)::before {
    right: -8px;
}

.timeline-item:nth-child(even)::before {
    left: -8px;
}

/* ===================================
   Photo Gallery Section
   =================================== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    color: white;
    font-size: 1.5rem;
}

/* ===================================
   Event Details Section
   =================================== */
.event-cards {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 40px;
}

.event-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 25px;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-normal);
}

.event-card:hover {
    transform: translateY(-5px);
}

.event-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--bg-dark);
    flex-shrink: 0;
}

.event-info h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.event-date-time {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
}

.event-date-time .date {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-gold-dark);
}

.event-date-time .time {
    font-size: 1rem;
    color: var(--text-secondary);
}

.event-location {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.event-location i {
    color: #EF4444;
}

/* Countdown Timer */
.countdown-container {
    background: linear-gradient(135deg, var(--bg-dark), #2d2d44);
    border-radius: var(--radius-lg);
    padding: 35px;
    text-align: center;
}

.countdown-title {
    color: var(--primary-gold-light);
    font-size: 1.2rem;
    margin-bottom: 25px;
}

.countdown-timer {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.countdown-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 20px 15px;
    min-width: 85px;
}

.countdown-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--primary-gold-light);
    line-height: 1;
    font-family: var(--font-tajawal);
}

.countdown-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 8px;
}

.countdown-separator {
    font-size: 2rem;
    color: var(--primary-gold);
    font-weight: 300;
    align-self: flex-start;
    padding-top: 15px;
}

/* Map Container */
.map-container {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.map-header {
    background: var(--bg-secondary);
    padding: 18px 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.map-header i {
    color: #EF4444;
    font-size: 1.2rem;
}

.map-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
}

.map-embed {
    padding: 15px;
}

.get-directions-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    background: var(--primary-gold);
    color: var(--bg-dark);
    font-weight: 700;
    transition: all var(--transition-fast);
}

.get-directions-btn:hover {
    background: var(--primary-gold-dark);
}

/* ===================================
   RSVP Section
   =================================== */
.rsvp-section {
    background: var(--bg-secondary);
    padding: 80px 20px;
}

.rsvp-card {
    max-width: 650px;
    margin: 0 auto;
    background: white;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.rsvp-header {
    background: var(--gradient-romantic);
    padding: 35px 30px;
    text-align: center;
    color: white;
}

.rsvp-header i {
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: block;
}

.rsvp-header h2 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.rsvp-header p {
    opacity: 0.9;
    font-size: 1rem;
}

.rsvp-form {
    padding: 35px 30px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    font-size: 1rem;
    color: var(--text-primary);
    transition: all var(--transition-fast);
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary-gold);
    background: white;
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.1);
}

.attendance-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.attendance-option input {
    display: none;
}

.option-box {
    padding: 20px;
    border: 2px solid #e5e5e5;
    border-radius: var(--radius-md);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.option-box i {
    font-size: 1.5rem;
    margin-bottom: 8px;
    display: block;
}

.option-box span {
    font-size: 0.95rem;
    font-weight: 600;
}

.attendance-option input:checked + .option-box.attending {
    border-color: #10B981;
    background: #F0FDF4;
    color: #059669;
}

.attendance-option input:checked + .option-box.not-attending {
    border-color: #EF4444;
    background: #FEF2F2;
    color: #DC2626;
}

.rsvp-submit-btn {
    width: 100%;
    margin-top: 10px;
}

.rsvp-success {
    text-align: center;
    padding: 50px 30px;
}

.success-animation i {
    font-size: 5rem;
    color: #10B981;
    margin-bottom: 20px;
    display: block;
    animation: successPop 0.5s ease;
}

@keyframes successPop {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.rsvp-success h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.rsvp-success p {
    color: var(--text-secondary);
}

/* ===================================
   Wishes Wall Section
   =================================== */
.wishes-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.wish-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    gap: 15px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
}

.wish-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.wish-avatar {
    width: 50px;
    height: 50px;
    background: var(--gradient-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--bg-dark);
    flex-shrink: 0;
}

.wish-content h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.wish-content p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.wish-time {
    font-size: 0.8rem;
    color: var(--text-light);
    display: block;
    margin-top: 8px;
}

/* ===================================
   Music Player (Floating)
   =================================== */
.music-player {
    position: fixed;
    bottom: 25px;
    left: 25px;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 10px;
}

.music-toggle {
    width: 55px;
    height: 55px;
    background: var(--gradient-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--bg-dark);
    box-shadow: var(--shadow-gold);
    cursor: pointer;
    transition: all var(--transition-normal);
    border: none;
}

.music-toggle:hover {
    transform: scale(1.1);
}

.music-toggle.playing {
    animation: musicPulse 1s ease-in-out infinite;
}

@keyframes musicPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.5); }
    50% { box-shadow: 0 0 0 15px rgba(212, 175, 55, 0); }
}

.music-info {
    background: white;
    padding: 10px 18px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    max-width: 150px;
    overflow: hidden;
}

.song-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    display: block;
}

/* ===================================
   Footer
   =================================== */
.inv-footer {
    background: var(--bg-dark);
    padding: 30px 20px;
    margin-top: 50px;
}

.footer-content {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

.text-red {
    color: #EF4444;
}

.footer-share {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-share span {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.share-buttons {
    display: flex;
    gap: 8px;
}

.share-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: white;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
}

.share-btn.whatsapp { background: #25D366; }
.share-btn.twitter { background: #1DA1F2; }
.share-btn.telegram { background: #0088cc; }
.share-btn.copy-link { background: #6B7280; }

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* ===================================
   Lightbox Modal
   =================================== */
.lightbox-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.lightbox-modal.active {
    display: flex;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.lightbox-close {
    top: 20px;
    left: 20px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
}

.lightbox-prev {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.lightbox-next {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.4);
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--radius-md);
}

/* ===================================
   Responsive Design for Invitation
   =================================== */
@media (max-width: 1024px) {
    .couple-names h1 {
        font-size: 3rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .inv-cover {
        min-height: 90vh;
    }
    
    .bismillah-text {
        font-size: 1.2rem;
    }
    
    .couple-names h1 {
        font-size: 2.2rem;
    }
    
    .ampersand {
        font-size: 1.8rem;
        margin: 0 10px;
    }
    
    .wedding-title span {
        font-size: 1.1rem;
    }
    
    .welcome-text p {
        font-size: 1.2rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .event-card {
        flex-direction: column;
        text-align: center;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .attendance-options {
        grid-template-columns: 1fr;
    }
    
    .countdown-timer {
        gap: 10px;
    }
    
    .countdown-item {
        min-width: 70px;
        padding: 15px 10px;
    }
    
    .countdown-number {
        font-size: 2rem;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .music-player {
        bottom: 15px;
        left: 15px;
    }
    
    .music-info {
        display: none;
    }
}

@media (max-width: 480px) {
    .invitation-container {
        padding: 0;
    }
    
    .inv-section {
        padding: 50px 15px;
    }
    
    .couple-names h1 {
        font-size: 1.8rem;
    }
    
    .ampersand {
        display: block;
        margin: 10px 0;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .rsvp-form {
        padding: 25px 20px;
    }
    
    .share-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }
}
