/* CSS Variables */
:root {
    --primary-color: #8B7355;
    --secondary-color: #D4B996;
    --accent-color: #A52A2A;
    --text-color: #333333;
    --light-text: #666666;
    --background: #f9f7f4;
    --white: #ffffff;
    --gold: #D4AF37;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

/* Reset and Base Styles */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body { 
    font-family: 'Montserrat', sans-serif; 
    line-height: 1.6; 
    color: var(--text-color); 
    background: linear-gradient(135deg, var(--background) 0%, #f5f1ea 100%);
    min-height: 100vh;
    padding: 20px;
}

/* Invitation Styles */
.invitation-container {
    max-width: 600px;
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
    border: 2px solid var(--gold);
    margin: 0 auto;
}

.invitation-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 3rem 2rem;
    text-align: center;
    position: relative;
}

.invitation-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gold);
}

.together-text {
    font-family: 'Dancing Script', cursive;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--gold);
}

.couple-names {
    font-family: 'Dancing Script', cursive;
    font-size: 4rem;
    margin: 1rem 0;
    line-height: 1.1;
}

.invite-text {
    font-size: 1.3rem;
    margin: 1.5rem 0;
    font-weight: 300;
}

.invitation-body {
    padding: 3rem 2rem;
    text-align: center;
}

.strictly-text {
    font-style: italic;
    color: var(--light-text);
    margin: 2rem 0;
    padding: 1rem;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.rsvp-section {
    margin: 2rem 0;
    padding: 2rem;
    background: var(--background);
    border-radius: 15px;
}

.rsvp-title {
    font-family: 'Dancing Script', cursive;
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.footer-note {
    margin-top: 2rem;
    color: var(--light-text);
    font-size: 0.9rem;
}

/* Form Container Styles */
.form-container {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.form-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 2rem 1.5rem;
    text-align: center;
}

.form-header h1 {
    font-family: 'Dancing Script', cursive;
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    color: white;
}

.form-header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
}

.events-section {
    padding: 1.5rem;
    background-color: var(--background);
    border-bottom: 1px solid #eee;
}

.event-cards {
    display: grid;
    gap: 1.5rem;
}

.event-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

/* Form Elements */
.form-content {
    padding: 2rem 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

input, select, textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(139, 115, 85, 0.2);
}

.checkbox-group {
    margin-top: 1rem;
}

.checkbox-option {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.checkbox-option input {
    width: auto;
}

.conditional-section {
    display: none;
    margin-top: 1.5rem;
    padding: 1.5rem;
    background-color: var(--background);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
}

.conditional-section.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.name-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.name-input-group input {
    flex: 1;
}

.remove-name-btn {
    background: none;
    border: none;
    color: var(--accent-color);
    cursor: pointer;
    padding: 5px;
    font-size: 1.2rem;
}

.add-name-btn {
    background: none;
    border: 1px dashed var(--primary-color);
    color: var(--primary-color);
    padding: 10px 15px;
    border-radius: var(--border-radius);
    cursor: pointer;
    margin-top: 10px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    transition: var(--transition);
}

.add-name-btn:hover {
    background-color: rgba(139, 115, 85, 0.1);
}

.submit-btn {
    display: block;
    width: 100%;
    padding: 15px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1.1rem;
    cursor: pointer;
    margin-top: 2rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    transition: var(--transition);
}

.submit-btn:hover {
    background-color: #7a6347;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.submit-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Messages */
.success-message {
    display: none;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    margin-bottom: 1.5rem;
}

.success-message.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.error-message {
    display: none;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    text-align: center;
}

.error-message.active {
    display: block;
}

.form-footer {
    text-align: center;
    padding: 1.5rem;
    background-color: var(--background);
    color: var(--light-text);
    font-size: 0.9rem;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
}

.submit-content {
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-note {
    background-color: #e8f4fd;
    border-left: 4px solid #2196F3;
    padding: 12px 15px;
    margin: 10px 0;
    border-radius: 4px;
    font-size: 0.9rem;
}

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

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Floral decorations */
.floral-decoration {
    position: absolute;
    width: 100px;
    height: 100px;
    opacity: 0.1;
    pointer-events: none;
}

.floral-1 {
    top: 20px;
    left: 20px;
    transform: rotate(-15deg);
}

.floral-2 {
    bottom: 20px;
    right: 20px;
    transform: rotate(15deg);
}

/* Responsive Design */
@media (max-width: 768px) {
    .couple-names {
        font-size: 3rem;
    }
    
    .invitation-header {
        padding: 2rem 1.5rem;
    }
    
    .invitation-body {
        padding: 2rem 1.5rem;
    }
    
    .form-header h1 {
        font-size: 3rem;
    }
    
    body {
        padding: 15px;
    }
}

@media (min-width: 768px) {
    .event-cards {
        grid-template-columns: 1fr 1fr;
    }
    
    .form-header h1 {
        font-size: 4.5rem;
    }
}

/* Radio Group Styles */
.radio-group {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.radio-option {
    flex: 1;
    position: relative;
}

.radio-option input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.radio-label {
    display: block;
    padding: 12px 15px;
    background-color: var(--background);
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
}

.radio-option input:checked + .radio-label {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.radio-label:hover {
    background-color: rgba(139, 115, 85, 0.1);
}

/* Conditional Section Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.conditional-section.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

/* Responsive Radio Groups */
@media (max-width: 480px) {
    .radio-group {
        flex-direction: column;
        gap: 0.5rem;
    }
}