/* Wedding Invitation Styles */

:root {
    --primary-color: #c5a572; /* Warm cream gold */
    --secondary-color: #8b7355; /* Warm taupe */
    --accent-color: #e6d7c3; /* Soft cream */
    --text-dark: #3d3d3d;
    --text-light: #7a7a7a;
    --background-light: #faf8f5;
    --white: #ffffff;
    --cream-light: #f5f2ed;
    --cream-medium: #e8e2d5;
    --shadow: rgba(0, 0, 0, 0.08);
    --gradient: linear-gradient(135deg, #f5f2ed, #e8e2d5, #c5a572);
}

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

body {
    font-family: 'Lato', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--background-light);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--white);
    box-shadow: 0 0 50px var(--shadow);
    min-height: 100vh;
}

/* Hero Section */
.hero {
    position: relative;
    background: var(--primary-color);
    padding: 80px 20px;
    text-align: center;
    color: var(--white);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(125deg, var(--secondary-color), var(--primary-color), var(--accent-color));
    opacity: 0.3;
    background-size: 400% 400%;
    animation: flowingGradient 10s ease infinite;
    z-index: 1;
}

.hero::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15), transparent 40%);
    animation: softPulse 8s ease-in-out infinite;
    z-index: 1;
}

@keyframes flowingGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes softPulse {
    0% { transform: scale(0.8); opacity: 0; }
    50% { opacity: 0.3; }
    100% { transform: scale(1.2); opacity: 0; }
}

@keyframes sparkle {
    0% { transform: translateX(0) translateY(0); }
    100% { transform: translateX(-100px) translateY(-100px); }
}

@keyframes moveGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes dreamyBokeh {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.5) rotate(10deg);
        opacity: 0.8;
    }
}


.hero-content {
    position: relative;
    z-index: 2;
    animation: breathe 6s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.floral-decoration {
    width: 100px;
    height: 50px;
    margin: 0 auto;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 50"><path d="M10,25 Q30,10 50,25 Q70,40 90,25" stroke="%23ffffff" stroke-width="2" fill="none" opacity="0.7"/><circle cx="20" cy="20" r="3" fill="%23ffffff" opacity="0.5"/><circle cx="50" cy="25" r="4" fill="%23ffffff" opacity="0.7"/><circle cx="80" cy="20" r="3" fill="%23ffffff" opacity="0.5"/></svg>') no-repeat center;
    background-size: contain;
}

.couple-names {
    font-family: 'Dancing Script', cursive;
    font-size: 4rem;
    font-weight: 700;
    margin: 30px 0;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.5);
    animation: fadeInUp 1s ease-out;
    position: relative;
    z-index: 3;
}

.bride-name, .groom-name {
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

.groom-name {
    animation-delay: 1.5s;
}

.ampersand {
    font-size: 3rem;
    margin: 0 20px;
    opacity: 0.8;
}

.wedding-date {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 20px;
    animation: fadeInUp 1s ease-out 0.5s both;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.4);
    position: relative;
    z-index: 3;
}

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

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

/* Main Content */
main {
    padding: 0;
}

section {
    padding: 80px 40px;
    text-align: center;
}

section:nth-child(even) {
    background: var(--background-light);
}

h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 30px;
    position: relative;
    transition: transform 0.3s ease;
}

h2:hover {
    transform: translateY(-2px);
}

h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background: var(--gradient);
    border-radius: 2px;
    transition: width 0.3s ease;
}

h2:hover::after {
    width: 80px;
}

.persian-poem {
    font-family: 'Vazirmatn', 'Playfair Display', serif;
    font-size: 1.2rem;
    color: var(--secondary-color);
    margin-bottom: 30px;
}

/* Invitation Message */
.invitation-message {
    max-width: 800px;
    margin: 0 auto;
}

.message-text {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 30px;
    color: var(--text-light);
}

.honor-presence {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-style: italic;
    color: var(--secondary-color);
    font-weight: 400;
}

.regrets-message {
    margin-top: 30px;
    font-size: 0.8rem;
    color: var(--text-light);
    font-style: italic;
}

/* Wedding Details */
.details-grid {
    display: flex;
    justify-content: center;
    max-width: 500px;
    margin: 0 auto;
}

.detail-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(197, 165, 114, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--cream-medium);
    position: relative;
    overflow: hidden;
}

.detail-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient);
}

.detail-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(197, 165, 114, 0.2);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.detail-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.detail-info p {
    margin-bottom: 10px;
    color: var(--text-light);
}

.date-time {
    font-weight: 600;
    color: var(--text-dark) !important;
    font-size: 1.1rem;
}

.location {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    color: var(--secondary-color) !important;
}

.action-buttons {
    margin-top: 25px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.action-btn {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 12px 25px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 25px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
    position: relative;
    overflow: visible; /* To allow dropdown to show */
}

.action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(197, 165, 114, 0.25);
    background: var(--secondary-color);
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f1f1f1;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: 12px;
    overflow: hidden;
    animation: fadeIn 0.3s ease-out;
    bottom: 125%; /* Position above the button */
    left: 50%;
    transform: translateX(-50%);
}

.dropdown-content a {
    color: var(--text-dark);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    transition: background-color 0.2s;
}

.dropdown-content a:hover {
    background-color: var(--accent-color);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, 10px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}


/* Countdown Timer */
.countdown {
    background: var(--primary-color);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.countdown::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(125deg, var(--secondary-color), var(--primary-color), var(--accent-color));
    opacity: 0.15; /* More subtle here */
    background-size: 400% 400%;
    animation: flowingGradient 20s ease infinite reverse; /* Slower and reversed */
    z-index: 1;
}

.countdown > * {
    position: relative;
    z-index: 2;
}

.countdown h2 {
    color: var(--white);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.countdown h2::after {
    background: var(--white);
}

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

.time-unit {
    background: var(--secondary-color);
    border-radius: 20px;
    padding: 30px 20px;
    min-width: 120px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 25px rgba(197, 165, 114, 0.2);
    transition: transform 0.3s ease;
}

.time-unit:hover {
    transform: translateY(-5px);
}

.time-unit .number {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    font-family: 'Playfair Display', serif;
    animation: gentlePulse 3s ease-in-out infinite;
}

@keyframes gentlePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.married-message {
    background: rgba(255, 255, 255, 0.95) !important;
    color: var(--primary-color) !important;
    border: 2px solid var(--primary-color) !important;
}

.married-message .number {
    font-size: 4rem !important;
}

.married-message .label {
    color: var(--primary-color) !important;
    text-shadow: none !important;
    font-weight: 700 !important;
    font-size: 1.3rem !important;
}

.time-unit .label {
    display: block;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
    opacity: 0.9;
}

/* RSVP Section */
.rsvp-section {
    max-width: 600px;
    margin: 0 auto;
}

.rsvp-form {
    text-align: left;
    margin-top: 40px;
}

/* Add subtle breathing animation to the hero section */
.hero-content {
    position: relative;
    z-index: 2;
    animation: breathe 6s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* Add floating animation for form labels */
.form-group {
    margin-bottom: 25px;
    position: relative;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
    transition: color 0.3s ease;
    position: relative;
}

label::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: width 0.3s ease;
}

.form-group:focus-within label::after {
    width: 100%;
}

.form-group:focus-within label {
    color: var(--primary-color);
}

input, select, textarea {
    width: 100%;
    padding: 18px 20px;
    border: 2px solid var(--cream-medium);
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
    background: var(--white);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(197, 165, 114, 0.15);
    transform: translateY(-2px);
}

.rsvp-submit {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 18px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
}

.rsvp-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.rsvp-submit:hover::before {
    opacity: 0.2;
}

.rsvp-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(197, 165, 114, 0.3);
    background: var(--secondary-color);
}

.rsvp-confirmation {
    background: linear-gradient(135deg, var(--cream-light), var(--accent-color));
    border: 1px solid var(--primary-color);
    border-radius: 15px;
    padding: 35px;
    margin-top: 30px;
    color: var(--text-dark);
    box-shadow: 0 8px 25px rgba(197, 165, 114, 0.15);
}

.rsvp-confirmation h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-family: 'Playfair Display', serif;
}

/* Additional Info */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.info-card {
    background: var(--white);
    padding: 35px 30px;
    border-radius: 18px;
    box-shadow: 0 6px 25px rgba(197, 165, 114, 0.12);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--cream-medium);
    position: relative;
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient);
    border-radius: 18px 18px 0 0;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(197, 165, 114, 0.18);
}

.info-card h4 {
    font-family: 'Playfair Display', serif;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.info-card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* Photo Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.photo-placeholder {
    aspect-ratio: 1;
    background: linear-gradient(135deg, var(--cream-light), var(--cream-medium));
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--primary-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.photo-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(197, 165, 114, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.photo-placeholder:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(197, 165, 114, 0.2);
}

.photo-placeholder:hover::before {
    transform: translateX(100%);
}

.photo-placeholder span {
    font-size: 3rem;
    margin-bottom: 10px;
}

.photo-placeholder p {
    font-size: 0.9rem;
    color: var(--text-light);
    text-align: center;
    padding: 0 15px;
}

.gallery-note {
    margin-top: 30px;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Footer */
footer {
    background: var(--text-dark);
    color: var(--white);
    padding: 60px 40px 40px;
    text-align: center;
}

.footer-message {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.couple-signature {
    font-size: 1.1rem;
    margin-bottom: 40px;
}

.social-sharing p {
    margin-bottom: 15px;
    opacity: 0.8;
}

.share-btn {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: transform 0.3s ease, background 0.3s ease;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
}

.share-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.share-btn:hover::before {
    opacity: 0.3;
}

.share-btn:hover {
    transform: scale(1.05);
    background: var(--secondary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        padding: 60px 20px;
    }
    
    .couple-names {
        font-size: 2.5rem;
    }
    
    .ampersand {
        font-size: 2rem;
        margin: 0 10px;
    }
    
    section {
        padding: 60px 20px;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .countdown-timer {
        gap: 20px;
    }
    
    .time-unit {
        min-width: 80px;
        padding: 20px 15px;
    }
    
    .time-unit .number {
        font-size: 2rem;
    }
    
    .details-grid {
        gap: 30px;
    }
    
    .detail-card {
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    .couple-names {
        font-size: 2rem;
    }
    
    .countdown-timer {
        gap: 15px;
    }
    
    .time-unit {
        min-width: 70px;
        padding: 15px 10px;
    }
    
    .time-unit .number {
        font-size: 1.5rem;
    }
    
    .time-unit .label {
        font-size: 0.8rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

/* Animation for form submission */
.form-submitted {
    animation: slideUp 0.5s ease-out;
}

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

/* Language Toggle */
.language-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 25px;
    padding: 5px;
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--white);
    padding: 8px 15px;
    margin-left: 0;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.3s, color 0.3s;
    font-family: 'Lato', sans-serif;
    font-weight: 600;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.4);
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lang-btn.active {
    background: var(--white);
    color: var(--primary-color);
    font-weight: bold;
    text-shadow: none;
}


/* RTL Styles */
body.rtl {
    direction: rtl;
    font-family: 'Vazirmatn', 'Lato', sans-serif;
}

body.rtl .couple-names {
    font-family: 'Vazirmatn', 'Dancing Script', cursive;
}

body.rtl .wedding-date,
body.rtl h2,
body.rtl .honor-presence,
body.rtl .detail-card h3,
body.rtl .location,
body.rtl .time-unit .number,
body.rtl .footer-message {
    font-family: 'Vazirmatn', 'Playfair Display', serif;
}

body.rtl .countdown-timer{
    flex-direction: row-reverse;
}