/* Import Quicksand font */
@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@300;400;500;600;700&display=swap');

/* Cherolina Script Font - Using elegant script fallback */
@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400;500;600;700&family=Great+Vibes&display=swap');

:root {
    --white: #FFFFFF;
    --light-purple: #E8D5FF;
    --dark-purple: #444469;
    --black: #000000;
    --gray: #666666;
}

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

html, body {
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Quicksand', sans-serif;
    color: var(--black);
    line-height: 1.6;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    background-color: var(--white);
    background-image: url('images/background-500.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 2rem;
    overflow: hidden;
}

/* Responsive background for header */
@media (min-width: 768px) {
    .hero-section {
        background-image: url('images/background-1400.jpg');
    }
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.3);
    z-index: 1;
}

/* Audio Control Button */
.audio-control-btn {
    position: fixed;
    top: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.9);
    border: 2px solid var(--dark-purple);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.audio-control-btn:hover {
    background-color: var(--white);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.audio-control-btn:active {
    transform: scale(0.95);
}

.audio-icon {
    width: 24px;
    height: 24px;
    color: var(--dark-purple);
    transition: color 0.3s ease;
}

.audio-control-btn:hover .audio-icon {
    color: var(--dark-purple);
}

@media (max-width: 768px) {
    .audio-control-btn {
        top: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }
    
    .audio-icon {
        width: 20px;
        height: 20px;
    }
}

.hero-content {
    max-width: 1200px;
    width: 100%;
    text-align: center;
    position: relative;
    z-index: 2;
}


/* Main Title */
.main-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 3rem;
}

.name-title {
    font-family: 'Quicksand', sans-serif;
    font-size: clamp(3rem, 9vw, 5rem);
    font-weight: 400;
    letter-spacing: 0.15em;
    color: var(--black);
    line-height: 1.1;
    opacity: 0;
    transform: translateY(40px) scale(0.9);
    animation: reginaEntrance 1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.script-title-image {
    height: clamp(3.2rem, 7vw, 5rem);
    width: auto;
    display: block;
    margin-top: 0.3rem;
    opacity: 0;
    transform: translateY(30px) scale(0.8) rotate(-5deg);
    animation: fifteenEntrance 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: 0.3s;
}

.script-title-white {
    filter: brightness(0) invert(1);
}


/* Countdown Timer */
.countdown-container {
    margin: 2rem 0;
}

.countdown {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
}

.countdown-number {
    font-family: 'Quicksand', sans-serif;
    font-size: clamp(2.2rem, 6vw, 4rem);
    font-weight: 500;
    color: var(--black);
    line-height: 1.1;
}

.countdown-separator {
    font-size: clamp(1.5rem, 4vw, 2.8rem);
    font-weight: 700;
    color: var(--black);
    margin: .2rem 0.5rem;
    align-self: start;
}

.countdown-label {
    font-family: 'Quicksand', sans-serif;
    font-size: clamp(0.6rem, 1.6vw, 1rem);
    font-weight: 500;
    color: var(--gray);
    margin-top: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0em;
}

/* Sections */
.section {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    position: relative;
}

.section-white {
    background-color: var(--white);
}

.section-purple {
    background-color: #BFBFD5;
}

.section-dark-purple {
    background-color: var(--dark-purple);
    color: var(--white);
}

.section-content {
    max-width: 800px;
    width: 100%;
    text-align: center;
    position: relative;
}

.section-title {
    font-family: 'Quicksand', sans-serif;
    font-size: clamp(1.4rem, 5.3vw, 2.6rem);
    font-weight: 600;
    line-height: 1.2;
    margin: 1rem 0 1rem;
    color: var(--black);
    letter-spacing: 0.02em;
}

.section-dark-purple .section-title {
    color: var(--white);
}

.section-date,
.section-time {
    font-family: 'Quicksand', sans-serif;
    font-size: clamp(1rem, 3.8vw, 1.8rem);
    font-weight: 400;
    margin: 0.2rem 0;
    color: var(--black);
}

.venue-name {
    font-family: 'Quicksand', sans-serif;
    font-size: clamp(1rem, 3.8vw, 1.8rem);
    font-weight: 400;
    margin: 1rem 0;
    color: var(--black);
}

.venue-address {
    font-family: 'Quicksand', sans-serif;
    font-size: clamp(1rem, 2.8vw, 1.5rem);
    font-weight: 400;
    margin: 0.5rem 0 1.5rem;
    color: var(--gray);
}

.regalo-text {
    font-family: 'Quicksand', sans-serif;
    font-size: clamp(1rem, 2.8vw, 1.4rem);
    font-weight: 400;
    margin: 1rem 0 1.5rem;
    line-height: 1.7;
    color: var(--black);
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    text-transform: uppercase;
}

.btn-map {
    display: inline-block;
    padding: 1rem 2.5rem;
    background-color: var(--dark-purple);
    color: var(--white);
    text-decoration: none;
    border: none;
    border-radius: 50px;
    font-family: 'Quicksand', sans-serif;
    font-size: clamp(1rem, 2vw, 1.2rem);
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, all 0.3s ease;
    margin-top: 1rem;
    text-transform: uppercase;
}

.btn-map:hover {
    transform: translateY(-3px);
    background-color: #292971;
    scale: 1.05;
    /* box-shadow: 0 5px 15px rgba(139, 95, 191, 0.4); */
}

/* Map Modal */
.map-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.map-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.map-modal-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.6);
    cursor: pointer;
}

.map-modal-content {
    position: relative;
    width: 100%;
    max-width: 900px;
    height: 90vh;
    max-height: 90vh;
    background-color: var(--white);
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.map-modal.is-open .map-modal-content {
    transform: scale(1);
}

.map-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.95);
    border: 2px solid var(--dark-purple);
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    color: var(--dark-purple);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.map-modal-close:hover {
    background-color: var(--white);
    transform: scale(1.05);
}

.map-modal-header {
    padding: 1.5rem 3rem 1rem 1.5rem;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.map-modal-header h3 {
    font-family: 'Quicksand', sans-serif;
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    font-weight: 600;
    color: var(--black);
    margin: 0 0 0.25rem 0;
}

.map-modal-header p {
    font-family: 'Quicksand', sans-serif;
    font-size: clamp(0.9rem, 2vw, 1rem);
    color: var(--gray);
    margin: 0 0 0.5rem 0;
}

.map-modal-link {
    display: inline-block;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark-purple);
    text-decoration: none;
    margin-top: 0.5rem;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

.map-modal-link:hover {
    color: #53408a;
    text-decoration: underline;
}

.map-modal-iframe-wrapper {
    flex: 1 1 0;
    min-height: 300px;
    min-width: 0;
    position: relative;
    overflow: hidden;
}

.map-modal-iframe-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 300px;
    border: none;
    display: block;
}

@media (max-width: 768px) {
    .map-modal-content {
        height: 85vh;
        max-height: 85vh;
    }

    .map-modal-iframe-wrapper {
        min-height: 250px;
    }

    .map-modal-close {
        top: 0.75rem;
        right: 0.75rem;
        width: 40px;
        height: 40px;
    }

    .map-modal-header {
        padding: 1.25rem 2.5rem 1rem 1rem;
    }
}

/* Gift Modal */
.gift-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.gift-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.gift-modal-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.6);
    cursor: pointer;
}

.gift-modal-content {
    position: relative;
    width: 100%;
    max-width: 420px;
    background-color: var(--white);
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 2.5rem 2rem 2rem;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.gift-modal.is-open .gift-modal-content {
    transform: scale(1);
}

.gift-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.95);
    border: 2px solid var(--dark-purple);
    border-radius: 50%;
    cursor: pointer;
    color: var(--dark-purple);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.gift-modal-close:hover {
    background-color: var(--white);
    transform: scale(1.05);
}

.gift-modal-body {
    text-align: center;
    padding-top: 0.5rem;
}

.gift-modal-icon {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 1.5rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.gift-modal-label {
    font-family: 'Quicksand', sans-serif;
    font-size: clamp(0.95rem, 2.2vw, 1.1rem);
    font-weight: 500;
    color: var(--gray);
    margin: 0 0 0.5rem 0;
}

.gift-modal-alias {
    font-family: 'Quicksand', sans-serif;
    font-size: clamp(1.4rem, 4vw, 1.8rem);
    font-weight: 600;
    color: var(--dark-purple);
    margin: 0;
    letter-spacing: 0.02em;
}

@media (max-width: 768px) {
    .gift-modal-content {
        padding: 2rem 1.5rem 1.5rem;
    }

    .gift-modal-close {
        top: 0.75rem;
        right: 0.75rem;
        width: 40px;
        height: 40px;
    }

    .gift-modal-icon {
        width: 70px;
        height: 70px;
        margin-bottom: 1.25rem;
    }
}

.hashtag-text {
    font-family: 'Quicksand', sans-serif;
    font-size: clamp(1rem, 2.8vw, 1.4rem);
    font-weight: 400;
    margin: 1rem 0;
    line-height: 1.8;
    color: var(--black);
}

.hashtag {
    color: var(--dark-purple);
    font-weight: 700;
    font-size: 1.15em;
}

.theme-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.theme-title .name-title {
    color: var(--white);
    animation: reginaEntrance 1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.theme-title .script-title-image {
    animation: fifteenEntrance 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: 0.3s;
}

.theme-slogan {
    font-family: 'Quicksand', sans-serif;
    font-size: clamp(1rem, 3vw, 1.4rem);
    font-weight: 300;
    font-style: italic;
    color: var(--white);
}

.dress-code {
    font-family: 'Quicksand', sans-serif;
    font-size: clamp(1rem, 3.8vw, 1.8rem);
    font-weight: 400;
    margin-top: 1rem;
    letter-spacing: 0.05em;
}

/* Icon Container */
.icon-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
    border-radius: 50%;
    background-color: #fff;
    width: 90px;
    height: 90px;
    align-items: center;
    margin: auto;
    border: 1px solid #e1e1f5;
}

.icon-image {
    width: 60px;
    height: 60px;
    object-fit: contain;
    opacity: 0;
    transform: translateY(30px) scale(0.8);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    /* filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1)); */
}

/* Icon animations when section becomes visible */
.fade-in-section.visible .icon-animate .icon-image {
    opacity: 1;
    transform: translateY(0) scale(1);
    animation: iconEntrance 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes iconEntrance {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.7) rotate(-10deg);
    }
    40% {
        opacity: 0.8;
        transform: translateY(-8px) scale(1.1) rotate(5deg);
    }
    70% {
        transform: translateY(3px) scale(0.98) rotate(-2deg);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1) rotate(0deg);
    }
}

/* Hover effect for icons */
.icon-image:hover {
    transform: scale(1.1) rotate(5deg);
    transition: transform 0.3s ease;
    /* filter: drop-shadow(0 4px 8px rgba(139, 95, 191, 0.3)); */
}

/* RSVP Form */
.rsvp-form {
    max-width: 600px;
    margin: 2rem auto 0;
    text-align: left;
}

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

.form-group label {
    display: block;
    font-family: 'Quicksand', sans-serif;
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--black);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid var(--dark-purple);
    border-radius: 8px;
    font-family: 'Quicksand', sans-serif;
    font-size: clamp(0.9rem, 2vw, 1rem);
    background-color: var(--white);
    color: var(--black);
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--dark-purple);
    box-shadow: 0 0 0 3px rgba(139, 95, 191, 0.1);
}

.guest-fields {
    background-color: rgba(255, 255, 255, 0.5);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    border: 2px solid rgba(139, 95, 191, 0.3);
}

.guest-fields h3 {
    font-family: 'Quicksand', sans-serif;
    font-size: clamp(1rem, 2.2vw, 1.2rem);
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--dark-purple);
}

.radio-group {
    display: flex;
    gap: 2rem;
    margin-top: 0.5rem;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.radio-option input[type="radio"] {
    width: auto;
    margin: 0;
}

.radio-option label {
    margin: 0;
    font-weight: 400;
    cursor: pointer;
}

.btn-submit {
    width: 100%;
    padding: 1rem 2rem;
    background-color: var(--dark-purple);
    color: var(--white);
    border: none;
    border-radius: 50px;
    font-family: 'Quicksand', sans-serif;
    font-size: clamp(1rem, 2vw, 1.2rem);
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-top: 1rem;
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(139, 95, 191, 0.4);
}

.btn-submit:active {
    transform: translateY(-1px);
}

.form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-family: 'Quicksand', sans-serif;
    font-weight: 500;
    display: none;
    line-height: 1.6;
}

.form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.form-message.error a {
    color: #721c24;
    text-decoration: underline;
    font-weight: 600;
}

.form-message.error strong {
    display: block;
    margin-bottom: 0.5rem;
}

.form-message.error small {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.9em;
    opacity: 0.9;
}

.rsvp-deadline {
    font-family: 'Quicksand', sans-serif;
    font-size: clamp(1rem, 2.8vw, 1.4rem);
    font-weight: 500;
    margin-bottom: 2rem;
    text-transform: uppercase;
    /* color: var(--gray); */
}

/* Separator Section */
.separator-section {
    width: 100vw;
    min-width: 430px;
    max-width: 100vw;
    display: block;
    padding: 0;
    margin: 0;
    background-color: var(--white);
    overflow: hidden;
    line-height: 0; /* Removes extra spacing below image */
    position: relative;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

.separator-section picture {
    width: 100%;
    max-width: 100%;
    display: block;
    margin: 0;
    padding: 0;
}

.separator-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    object-position: center;
    margin: 0;
    padding: 0;
}

/* Footer */
.footer-section {
    min-height: 40vh;
    background-color: var(--white);
    background-image: url('images/background-te-espero-500.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    position: relative;
}

/* Responsive background for footer */
@media (min-width: 768px) {
    .footer-section {
        background-image: url('images/background-te-espero-1400.jpg');
    }
}

.footer-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.4);
    z-index: 1;
}

.footer-content {
    text-align: center;
    position: relative;
    width: 100%;
    max-width: 800px;
    z-index: 2;
}

.footer-text-image {
    width: auto;
    height: clamp(3.5rem, 9vw, 6rem);
    display: block;
    margin: 3rem auto;
    max-width: 90%;
    object-fit: contain;
}


/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease-out forwards;
}

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

/* Separate entrance animations for Regina and Fifteen */
@keyframes reginaEntrance {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.9);
    }
    60% {
        opacity: 1;
        transform: translateY(-5px) scale(1.05);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fifteenEntrance {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.8) rotate(-5deg);
    }
    50% {
        opacity: 0.8;
        transform: translateY(-8px) scale(1.1) rotate(3deg);
    }
    80% {
        transform: translateY(2px) scale(0.95) rotate(-1deg);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1) rotate(0deg);
    }
}

.fade-in-section {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

/* Stagger animations for elements */
.fade-in-up:nth-child(1) { animation-delay: 0.1s; }
.fade-in-up:nth-child(2) { animation-delay: 0.2s; }
.fade-in-up:nth-child(3) { animation-delay: 0.3s; }
.fade-in-up:nth-child(4) { animation-delay: 0.4s; }

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        min-height: 80vh;
        padding: 1rem;
    }

    .section {
        min-height: 50vh;
        padding: 3rem 1.5rem;
    }

    .countdown {
        gap: 0.5rem;
    }

    .countdown-item {
        min-width: 70px;
    }

    .countdown-separator {
        margin: 0 0.2rem;
    }


    .radio-group {
        flex-direction: column;
        gap: 1rem;
    }

    .guest-fields {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .countdown {
        gap: 0.15rem;
    }

    /* .countdown-item {
        min-width: 50px;
    } */

    /* .countdown-separator {
        display: none;
    } */

    .section {
        padding: 2rem 1rem;
    }

    .btn-map,
    .btn-submit {
        padding: 0.8rem 1.5rem;
    }
}

/* Print styles */
@media print {
    .hero-section,
    .section {
        page-break-inside: avoid;
    }
}
