/* ============================================
   INVITATION STYLES - Simplificado
   ============================================ */

.invitation {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 450px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.5s ease;
}

.invitation-inner {
    background: linear-gradient(180deg,
        #fef9ec 0%,
        #faf3de 15%,
        #f5ebd0 30%,
        #f0e3c2 50%,
        #ebdbb4 70%,
        #e6d3a6 100%
    );
    border-radius: 8px;
    padding: 50px 40px;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.5);
}

.invitation-frame {
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    border: 2px solid rgba(139, 90, 43, 0.35);
    border-radius: 4px;
    pointer-events: none;
}

.invitation-content {
    position: relative;
    text-align: center;
    z-index: 2;
}

/* Ornaments */
.ornament {
    opacity: 0;
}

.ornament-top {
    width: 180px;
    height: 45px;
    margin: 0 auto 12px;
}

.ornament-bottom {
    width: 110px;
    height: 30px;
    margin: 18px auto 0;
}

.ornament-svg {
    width: 100%;
    height: 100%;
    color: #8b5a2b;
}

/* Subtitle */
.invitation-subtitle {
    font-family: 'Cinzel', serif;
    font-size: 13px;
    color: #7a5530;
    letter-spacing: 6px;
    text-transform: uppercase;
    margin-bottom: 8px;
    opacity: 0;
}

/* Title */
.invitation-title {
    font-family: 'Great Vibes', cursive;
    font-size: 40px;
    color: #4a2a10;
    margin-bottom: 15px;
    opacity: 0;
}

/* Name */
.invitation-name {
    font-family: 'Great Vibes', cursive;
    font-size: 72px;
    color: #2a1808;
    line-height: 1;
    margin-bottom: 5px;
    opacity: 0;
}

/* Age Display */
.age-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 12px 0 18px;
    opacity: 0;
}

.age-line {
    width: 65px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #b8960c, transparent);
}

.age-text {
    font-family: 'Cinzel', serif;
    font-size: 28px;
    font-weight: 700;
    color: #6b4a1a;
    letter-spacing: 8px;
}

/* Divider */
.divider {
    width: 180px;
    margin: 0 auto 18px;
    opacity: 0;
}

.divider-svg {
    width: 100%;
    height: 20px;
    color: #8b5a2b;
}

/* Event Info */
.event-info {
    margin-bottom: 18px;
    opacity: 0;
}

.info-item {
    margin: 10px 0;
}

.info-label {
    display: block;
    font-family: 'Cinzel', serif;
    font-size: 11px;
    color: #8a6530;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.info-value {
    font-family: 'Cormorant Garamond', serif;
    font-size: 20px;
    font-weight: 600;
    color: #2d1a0a;
}

.info-value small {
    display: block;
    font-size: 16px;
    color: #4a3020;
    margin-top: 4px;
}

/* Message */
.invitation-message {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 17px;
    color: #3d2914;
    line-height: 1.9;
    padding: 18px 15px;
    border-top: 1px solid rgba(139, 90, 43, 0.25);
    border-bottom: 1px solid rgba(139, 90, 43, 0.25);
    margin-top: 8px;
    opacity: 0;
}

/* ============================================
   OPENED STATE - FULLSCREEN
   ============================================ */

.envelope-wrapper.opened .invitation {
    opacity: 1;
    pointer-events: auto;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    transform: none;
    z-index: 9999;
    background: linear-gradient(180deg,
        #fef9ec 0%,
        #faf3de 15%,
        #f5ebd0 30%,
        #f0e3c2 50%,
        #ebdbb4 70%,
        #e6d3a6 100%
    );
}

.envelope-wrapper.opened .invitation-inner {
    width: 100%;
    height: 100%;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    padding: 30px 20px;
    box-shadow: none;
}

.envelope-wrapper.opened .invitation-frame {
    display: none;
}

.envelope-wrapper.opened .invitation-content {
    max-width: 500px;
    width: 100%;
}

/* Show elements when opened */
.envelope-wrapper.opened .ornament,
.envelope-wrapper.opened .invitation-subtitle,
.envelope-wrapper.opened .invitation-title,
.envelope-wrapper.opened .invitation-name,
.envelope-wrapper.opened .age-display,
.envelope-wrapper.opened .divider,
.envelope-wrapper.opened .event-info,
.envelope-wrapper.opened .invitation-message,
.envelope-wrapper.opened .action-buttons {
    opacity: 1;
}

/* ============================================
   ACTION BUTTONS
   ============================================ */

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

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: linear-gradient(135deg, #8b5a2b 0%, #6b4423 100%);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 25px;
    color: #fff8e7;
    font-family: 'Cinzel', serif;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: linear-gradient(135deg, #9a6b3a 0%, #7a5030 100%);
    transform: translateY(-2px);
}

.btn-icon {
    width: 16px;
    height: 16px;
    stroke: #d4af37;
}

/* ============================================
   MODAL
   ============================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 20, 40, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: linear-gradient(180deg, #faf6e8 0%, #f0e6d0 100%);
    border-radius: 20px;
    padding: 40px;
    max-width: 400px;
    width: 90%;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    color: #8b5a2b;
    cursor: pointer;
}

.modal-title {
    font-family: 'Great Vibes', cursive;
    font-size: 38px;
    color: #3d2914;
    text-align: center;
    margin-bottom: 25px;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dresscode-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.dresscode-icon {
    width: 50px;
    height: 50px;
    min-width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a5a7a 0%, #0d3d5c 100%);
    border-radius: 50%;
}

.dresscode-icon svg {
    width: 24px;
    height: 24px;
    stroke: #ffd700;
    fill: none;
    stroke-width: 1.5;
}

.dresscode-item p {
    font-family: 'Cormorant Garamond', serif;
    font-size: 16px;
    color: #3d2914;
    margin: 0;
}

.dresscode-item strong {
    color: #8b3a3a;
    display: block;
    margin-top: 3px;
}

.dresscode-item small {
    color: #1a5a7a;
    font-style: italic;
    display: block;
    margin-top: 5px;
}

/* ============================================
   RESPONSIVE MOBILE
   ============================================ */

@media (max-width: 768px) {
    .invitation-name {
        font-size: 58px;
    }

    .invitation-title {
        font-size: 32px;
    }

    .age-text {
        font-size: 22px;
        letter-spacing: 5px;
    }
}

@media (max-width: 480px) {
    .invitation-inner {
        padding: 25px 15px;
    }

    .invitation-name {
        font-size: 48px;
    }

    .invitation-title {
        font-size: 28px;
    }

    .invitation-subtitle {
        font-size: 10px;
        letter-spacing: 4px;
    }

    .age-text {
        font-size: 18px;
        letter-spacing: 4px;
    }

    .age-line {
        width: 40px;
    }

    .info-value {
        font-size: 16px;
    }

    .info-label {
        font-size: 9px;
    }

    .invitation-message {
        font-size: 14px;
        padding: 12px 10px;
    }

    .ornament-top {
        width: 140px;
        height: 35px;
    }

    .ornament-bottom {
        width: 90px;
        height: 24px;
    }

    .divider {
        width: 140px;
    }

    .action-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .action-btn {
        justify-content: center;
        width: 100%;
        max-width: 180px;
    }
}

@media (max-width: 380px) {
    .invitation-name {
        font-size: 42px;
    }

    .invitation-title {
        font-size: 24px;
    }

    .invitation-subtitle {
        font-size: 9px;
    }

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

    .info-value {
        font-size: 14px;
    }

    .invitation-message {
        font-size: 13px;
    }
}
