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

:root {
    --primary-color: #3d2616;
    --primary-dark: #2e1f14;
    --secondary-color: #7d6b5a;
    --accent-color: #e8d5b7;
    --background: #fffcf8;
    --card-background: #ffffff;
    --text-primary: #3d2616;
    --text-secondary: #7d6b5a;
    --border-color: #e5dfd7;
    --shadow: rgba(0, 0, 0, 0.08);
    --hover-shadow: rgba(61, 38, 22, 0.25);
    --success-color: #6b8e6f;
    --error-color: #c85a54;
}

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

.container {
    max-width: 680px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 40px;
}

.profile-image {
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px var(--shadow);
    border: 4px solid var(--card-background);
    overflow: hidden;
}

.couple-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.initials {
    font-family: 'Cormorant Garamond', serif;
    font-size: 48px;
    font-weight: 600;
    color: var(--card-background);
    letter-spacing: 2px;
}

.couple-names {
    font-family: 'Cormorant Garamond', serif;
    font-size: 42px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.wedding-date {
    font-size: 18px;
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 8px;
    letter-spacing: 2px;
}

.tagline {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 300;
    font-style: italic;
}

/* Links Section */
.links {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 40px;
}

.link-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--card-background);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px 24px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px var(--shadow);
    cursor: pointer;
    text-align: center;
}

.link-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px var(--hover-shadow);
    border-color: var(--primary-color);
}

.link-button:active {
    transform: translateY(0);
}

.link-icon {
    display: none;
}

.link-text {
    font-size: 18px;
    font-weight: 500;
    flex-grow: 1;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: var(--card-background);
    margin: 0;
    padding: 40px;
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
    position: relative;
    max-height: 90vh;
    overflow: auto;
}

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

.close {
    color: var(--text-primary);
    background: var(--accent-color);
    position: absolute;
    right: 15px;
    top: 15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
}

.close:hover {
    background: var(--primary-color);
    color: white;
    transform: rotate(90deg);
}

.modal-content h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 32px;
    color: var(--text-primary);
    margin-bottom: 24px;
    text-align: center;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.error-message {
    display: block;
    color: var(--error-color);
    font-size: 13px;
    margin-top: 6px;
    min-height: 18px;
    font-weight: 500;
}

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: var(--error-color);
    background-color: rgba(200, 90, 84, 0.05);
}

.error-message {
    display: block;
    color: var(--error-color);
    font-size: 13px;
    margin-top: 6px;
    min-height: 18px;
    font-weight: 500;
}

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: var(--error-color);
    background-color: rgba(200, 90, 84, 0.05);
}

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    color: var(--text-primary);
    transition: border-color 0.3s ease;
    background: var(--background);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.submit-button {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
    font-family: 'Montserrat', sans-serif;
}

.submit-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--hover-shadow);
}

.submit-button:active:not(:disabled) {
    transform: translateY(0);
}

.submit-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-loading {
    display: none;
}

.submit-button.loading .btn-text {
    display: none;
}

.submit-button.loading .btn-loading {
    display: inline;
}

.success-message {
    text-align: center;
    padding: 40px 20px;
}

.success-message h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 16px;
}

/* Success Modal */
.modal-content.success-modal {
    text-align: center;
    max-width: 400px;
}

.success-content {
    padding: 20px;
}

.success-content h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 36px;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.success-content p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.6;
}

.success-content .submit-button {
    margin-top: 24px;
    width: 200px;
    margin-left: auto;
    margin-right: auto;
    display: block;
}

.success-message p {
    font-size: 18px;
    color: var(--text-secondary);
}

/* Details Content */
.details-content {
    padding: 20px 0;
}

.detail-item {
    margin-bottom: 32px;
}

.detail-item:last-child {
    margin-bottom: 0;
}

.detail-item h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 24px;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.detail-item p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.detail-item p:last-child {
    margin-bottom: 0;
}

.inline-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.inline-link:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Registry Styles */
.registry-intro {
    text-align: center;
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.6;
}

.registry-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.registry-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--background);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: all 0.3s ease;
}

.registry-link:hover {
    border-color: var(--primary-color);
    transform: translateX(4px);
}

.registry-icon {
    font-size: 24px;
}

/* Photos Styles */
.photos-intro {
    text-align: center;
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.photo-sharing {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.hashtag {
    font-family: 'Cormorant Garamond', serif;
    font-size: 24px;
    color: var(--primary-color);
    font-weight: 600;
    letter-spacing: 1px;
}

/* Footer Styles */
.footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.footer p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

/* Ensure footer line using .wedding-date matches the header exactly */
.footer .wedding-date {
    color: var(--primary-color);
    font-weight: 500;
    font-size: 14px;
    line-height: 1.4;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.footer-small {
    font-size: 12px;
    color: var(--text-secondary);
    opacity: 0.7;
}

/* Accommodation Page Styles */
.back-link {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 16px;
    margin-bottom: 24px;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: var(--secondary-color);
}

.page-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 42px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 8px;
}

.page-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 40px;
}

.accommodation-list {
    display: grid;
    gap: 20px;
    margin-bottom: 40px;
}

.accommodation-item {
    background: var(--card-background);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px 24px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px var(--shadow);
}

.accommodation-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px var(--hover-shadow);
    border-color: var(--primary-color);
}

.accommodation-item h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.accommodation-capacity {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 4px 0;
    font-style: italic;
}

.accommodation-contact {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 4px 0;
}

.accommodation-link {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 15px;
    margin-top: 4px;
    transition: color 0.3s ease;
    word-break: break-word;
}

.accommodation-link:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.footer-link {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 16px;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--secondary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 20px 10px;
    }

    .couple-names {
        font-size: 32px;
    }

    .wedding-date {
        font-size: 16px;
    }

    .profile-image {
        width: 100px;
        height: 100px;
    }

    .initials {
        font-size: 40px;
    }

    .link-button {
        padding: 16px 20px;
    }

    .link-icon {
        font-size: 24px;
    }

    .link-text {
        font-size: 16px;
    }

    .modal-content {
        padding: 30px 20px;
        margin: 10% auto;
    }

    .modal-content h2 {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 15px 5px;
    }

    .couple-names {
        font-size: 28px;
    }

    .modal-content {
        width: 95%;
        padding: 24px 16px;
    }
}
