:root {
    /* Paleta EXACTA de LoventInvita Eucalipto */
    --primary-color: #8B9D8B;        /* Verde eucalipto para botones */
    --secondary-color: #6B7C6B;      /* Verde más oscuro */
    --accent-color: #D4B5A8;         /* Rosa/beige para acentos */
    --bg-light: #FAF8F5;             /* Fondo beige muy claro */
    --bg-white: #FFFFFF;
    --text-dark: #4A4A4A;            /* Gris oscuro para textos */
    --text-light: #8B8B8B;           /* Gris para textos secundarios */
    --border-color: #E8E3DD;         /* Bordes suaves */
}

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

html {
    scroll-behavior: smooth;
}

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

.hidden {
    display: none !important;
}

/* ========================================
   SOBRE - VERDE RESPONSIVE
======================================== */

#envelope-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(180deg, #f5f3f0 0%, #ebe7e0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 1s ease;
    padding: 1rem;
}

.envelope-container {
    perspective: 1500px;
    text-align: center;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
}

.envelope-top-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    color: var(--text-dark);
    font-weight: 300;
    font-style: italic;
    letter-spacing: 0.5px;
    transition: opacity 0.5s ease;
}

.envelope-top-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    color: var(--secondary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    transition: opacity 0.5s ease;
}

.envelope-bottom-names {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--secondary-color);
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.envelope {
    position: relative;
    width: 90%;
    max-width: 550px;
    aspect-ratio: 1.45 / 1;
    animation: floatEnvelope 3s ease-in-out infinite;
}

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

.envelope-body {
    z-index: 2;
    position: relative;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #4a5d4a 0%, #3d4f3d 50%, #4a5d4a 100%);
    border-radius: 8px;
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.3),
        inset 0 -2px 5px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

/* Líneas superiores del sobre (forma V invertida) */
.envelope-body::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    border-radius: 8px;
    background:
        linear-gradient(
            to bottom right,
            transparent calc(50% - 1px),
            rgba(0, 0, 0, 0.10) calc(50% - 1px),
            rgba(0, 0, 0, 0.10) calc(50% + 1px),
            transparent calc(50% + 1px)
        ),
        linear-gradient(
            to bottom left,
            transparent calc(50% - 1px),
            rgba(0, 0, 0, 0.10) calc(50% - 1px),
            rgba(0, 0, 0, 0.10) calc(50% + 1px),
            transparent calc(50% + 1px)
        );
    /* clip-path: polygon(0 0, 50% 55%, 100% 0); */
}

/* Líneas inferiores del sobre (forma de V) */
.envelope-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    border-radius: 8px;
    background:
        linear-gradient(
            to top right,
            transparent calc(50% - 1px),
            rgba(0, 0, 0, 0.12) calc(50% - 1px),
            rgba(0, 0, 0, 0.12) calc(50% + 1px),
            transparent calc(50% + 1px)
        ),
        linear-gradient(
            to top left,
            transparent calc(50% - 1px),
            rgba(0, 0, 0, 0.12) calc(50% - 1px),
            rgba(0, 0, 0, 0.12) calc(50% + 1px),
            transparent calc(50% + 1px)
        );
}

/* Solapa superior */
.envelope-flap {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 55%;
    background: linear-gradient(180deg, #556e55 0%, #4a5d4a 100%);
    clip-path: polygon(0 0, 50% 100%, 100% 0);
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.2);
    transform-origin: top center;
    z-index: 1;
}

.envelope-body-lip {
    z-index: 2;
    position: relative;
    top:0;
    left: 0;
    right: 0;
    height: 48%;
    background: rgba(61, 79, 61, 0.98);
    border-radius: 0 0 10px 10px;
    pointer-events:none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    opacity: 0;
    transition: opacity 0.4s ease 0.5s;
}

.envelope.opening .envelope-body-lip {
    opacity: 1;
}

/* Sello de cera */
.wax-seal {
    position: absolute;
    width: 90px;
    height: 90px;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin-top: 30px;
    cursor: pointer;
    z-index: 10;
    transition: transform 0.4s ease;
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.4));
}

.wax-seal:hover {
    transform: translate(-50%, -50%) scale(1.08) rotate(-5deg);
    margin-top: 30px;
}

.seal-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-image: url('images/sello-rv.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.seal-inner::before,
.seal-inner::after,
.seal-text {
    display: none;
}

/* Texto "Clic aquí para abrir" */
.envelope-message {
    position: absolute;
    top: 28%;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.85);
    text-align: center;
    font-style: italic;
    letter-spacing: 1px;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    z-index: 5;
    width: 90%;
    line-height: 1.5;
}

/* ========================================
   ANIMACIONES DE APERTURA DEL SOBRE
======================================== */

.envelope.opening .envelope-flap {
    animation: openFlap 0.8s ease forwards;
}

@keyframes openFlap {
    0% { transform: rotateX(0deg);opacity: 1;}
    100% { transform: rotateX(-160deg);opacity:0.92; }
}

.envelope.opening .wax-seal {
    animation: sealFade 0.6s ease 0.3s forwards;
}

@keyframes sealFade {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
        margin-top: 30px;
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
        margin-top: 30px;
    }
}

.envelope.opening .envelope-message {
    animation: textFade 0.4s ease 0.2s forwards;
}

@keyframes textFade {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

.envelope.opening .envelope-body::after {
    animation: linesFade 0.5s ease 0.5s forwards;
}

@keyframes linesFade {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

/* Contenido interior del sobre (nombre invitado + Ver invitación) */
.envelope-inner-content {
    position: absolute;
    top: 52%;
    left: 50%;
    width: 90%;
    max-width: 320px;
    transform: translate(-50%, 95px);
    padding: 0;
    opacity: 0;
    pointer-events: none;
    z-index: 2;
}

.envelope.opening .envelope-inner-content {
    animation: innerContentSlideOut 1s cubic-bezier(0.34, 1.12, 0.64, 1) 0.75s forwards;
    pointer-events: auto;
    cursor: pointer;
    z-index:-1;
}

/* La tarjeta sale del sobre hacia arriba (efecto "saliendo del sobre" como en referencia) */
@keyframes innerContentSlideOut {
    0% {
        opacity: 0;
        transform: translate(-50%, 95px) scale(0.92);
    }
    75% {
        opacity: 0;
	transform: translate(-50%, -260px) scale(1);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -335px) scale(1);
    }
}

.envelope-cards-stack{
    position: relative;
    width: 100%;
    min-height: 140px;
}

.envelope-inner-card {
    position: absolute;
    width: 85%;
    background: rgba(255, 252, 248, 0.98);
    border: 1px solid rgba(61, 79, 61, 0.28);
    text-align: center;
    box-shadow: 0 1px 8px rgba(0,0,0,0.06);
    border-radius: 24px 24px 8px 8px;
    padding: 1rem 1.3rem;
    left:120px
}

.envelope-card-guest{
    left: 0;
    top: 0;
    width: 72%;
    max-width: 220px;
    z-index: 1;

    min-height: 140px;
}

.envelope-inner-name {
    font-family: 'Great Vibes', cursive;
    font-size: 1.6rem;
    color: var(--primary-color, #4a5d4a);
    margin: 0 0 0.25rem 0;
    line-height: 1.2;
    word-break: break-word;
}

.envelope-inner-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.envelope-card-details{
    right: 0;
    bottom: 0;
    width: 58%;
    min-width: 120px;
    max-width: 160px;
    z-index:2;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    color: var(--primary-color, #4a5d4a);
    transition: background 0.25s ease, color 0.25s ease, transform 0.2s ease;
}

.envelope-card-details:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.02);
}

.envelope-card-details:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.envelope-details-line {
    display:block;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--text-light, #6b7b6b);
    text-align:center;
    white-space:nowrap;
}

.envelope-details-cta {
    display:block;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    text-align:center;
}

.envelope-inner-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-light, #6b7b6b);
    margin: 0 0 0.35rem 0;
}

.envelope-inner-guests {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    color: var(--text-light, #6b7b6b);
    margin: 0;
}


.envelope.opening {
    animation: floatEnvelope 3s ease-in-out infinite;
}

@keyframes envelopeSlideUp {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    60% {
        opacity: 1;
        transform: translateY(-40px) scale(1.02);
    }
    100% {
        opacity: 0;
        transform: translateY(-120px) scale(0.9);
    }
}

#envelope-screen.fade-out {
    animation: screenFadeOut 0.8s ease forwards;
}

@keyframes screenFadeOut {
    0% { opacity: 1; }
    100% { opacity: 0; pointer-events: none; }
}

/* ========================================
   HERO SECTION
======================================== */

#hero {
    min-height: 100vh;
    background: linear-gradient(180deg, var(--bg-light) 0%, #ffffff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    padding: 2rem;
}

#hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h80v80H0z' fill='none'/%3E%3Ccircle cx='20' cy='20' r='0.8' fill='%238B9D8B' fill-opacity='0.05'/%3E%3Ccircle cx='60' cy='40' r='0.8' fill='%238B9D8B' fill-opacity='0.05'/%3E%3Ccircle cx='40' cy='60' r='0.8' fill='%238B9D8B' fill-opacity='0.05'/%3E%3C/svg%3E");
    background-size: 80px 80px;
    pointer-events: none;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(139, 157, 139, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(139, 157, 139, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    animation: fadeInUp 1s ease;
}

.floral-top, .floral-bottom {
    width: 180px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color) 20%, var(--primary-color) 80%, transparent);
    margin: 2rem auto;
    position: relative;
}

.floral-top::before, .floral-bottom::before {
    content: '✦ — ✦ — ✦';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: var(--primary-color);
    font-size: 0.85rem;
    letter-spacing: 0.3em;
    background: var(--bg-light);
    padding: 0 0.5rem;
}

.pre-title {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--text-light);
    margin-bottom: 1rem;
    font-weight: 300;
}

.couple-names {
    font-family: 'Great Vibes', cursive;
    font-size: 5rem;
    font-weight: 400;
    color: var(--primary-color);
    margin: 1rem 0;
    line-height: 1.1;
}

.name-bride {
    margin-top: -0.15em;
}

.name-bride, .name-groom {
    display: inline-block;
}

.ampersand {
    font-size: 4rem;
    margin: 0 1rem;
    opacity: 0.7;
}

.full-names {
    font-size: 1.1rem;
    color: var(--text-light);
    margin: 1.5rem 0;
    font-weight: 300;
}

.full-names p {
    margin: 0.3rem 0;
}

.date-box {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 2rem 3rem;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    margin: 2rem auto;
    max-width: 500px;
    border: 1px solid var(--border-color);
}

.wedding-date {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--secondary-color);
    font-weight: 600;
    letter-spacing: 3px;
}

.wedding-time {
    font-size: 1.3rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

.wedding-time-note {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-top: 0.35rem;
    font-style: italic;
    font-weight: 400;
}
/* ========================================
   CALENDAR WIDGET
======================================== */

.calendar-widget {
    margin-top: 2.5rem;
    text-align: center;
}

.calendar-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--secondary-color);
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 0.8rem;
}

.calendar-month {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    color: var(--text-dark);
    font-weight: 600;
    letter-spacing: 3px;
    margin-bottom: 1rem;
}

.calendar-divider {
    width: 100%;
    height: 2px;
    background: var(--secondary-color);
    margin: 0.8rem 0;
}

.calendar-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Montserrat', sans-serif;
}

.calendar-table thead th {
    font-size: 0.85rem;
    color: var(--text-dark);
    font-weight: 500;
    padding: 0.8rem 0;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.calendar-table tbody td {
    font-size: 1rem;
    color: var(--text-light);
    padding: 0.7rem 0;
    text-align: center;
    font-weight: 400;
}

.calendar-heart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 40px;
    height: 40px;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.95rem;   
}

.calendar-heart::before {
    content: '♥';
    position: absolute;
    font-size: 2.8rem;
    color: var(--secondary-color);
    z-index: -1;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    line-height: 1;
}

/* ========================================
   COUNTDOWN
======================================== */

#countdown-section {
    padding: 4rem 2rem;
    background: var(--secondary-color);
}

#countdown-section .section-subtitle {
    color: rgba(255, 255, 255, 0.85);
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    font-weight: 300;
}

.countdown {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.time-unit {
    background: transparent;
    padding: 1rem 1.5rem;
    border-radius: 0;
    min-width: 100px;
    text-align: center;
    border: none;
    box-shadow: none;
}

.time-unit span {
    display: block;
    font-size: 3.5rem;
    font-weight: 400;
    color: #ffffff;
    font-family: 'Playfair Display', serif;
}

.time-unit p {
    font-size: 0.9rem;
    text-transform: capitalize;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 0.5rem;
    letter-spacing: 1px;
    font-weight: 300;
}

/* ========================================
   CONTAINER & SECTIONS
======================================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

section {
    position: relative;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    text-align: center;
    color: var(--secondary-color);
    margin-bottom: 3rem;
    font-weight: 600;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

/* ========================================
   BIBLE QUOTE
======================================== */

#bible-quote {
    background: var(--bg-light);
    padding: 5rem 2rem;
}

.quote-box {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    background: var(--bg-white);
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    border: 1px solid var(--border-color);
}

.quote-icon {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

blockquote {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-style: italic;
    color: var(--text-dark);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.quote-reference {
    font-size: 1.1rem;
    color: var(--text-light);
    font-weight: 500;
}

/* ========================================
   STORY
======================================== */

#story {
    background: var(--bg-white);
}

.story-timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    max-width: 900px;
    margin: 0 auto;
}

.story-item {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--bg-light);
    border-radius: 15px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.story-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

.story-icon {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
    background: var(--bg-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--primary-color);
}

.story-icon i {
    font-size: 3rem;
    color: var(--primary-color);
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(139, 157, 139, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.story-item:hover .play-overlay {
    opacity: 1;
}

.play-overlay i {
    font-size: 2.5rem;
    color: white;
}

.story-item h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.story-hint {
    color: var(--text-light);
    font-size: 0.9rem;
    font-style: italic;
}

/* ========================================
   PARENTS
======================================== */

#parents {
    background: var(--bg-light);
}

.parents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    max-width: 900px;
    margin: 0 auto;
}

.parents-card {
    background: var(--bg-white);
    padding: 3rem 2rem;
    border-radius: 15px;
    text-align: center;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.parents-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.parent-names p {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin: 0.8rem 0;
    font-weight: 400;
}

/* ========================================
   TIMELINE
======================================== */

#timeline {
    background: var(--bg-white);
}

.timeline-container {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
}

/* Línea vertical central */
.timeline-container::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
    transform: translateX(-50%);
}

.timeline-item {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1.5rem;
    margin-bottom: 3rem;
    align-items: center;
}

/* Hora siempre a la izquierda */
.timeline-time {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: var(--text-light);
    font-weight: 600;
    text-align: right;
    letter-spacing: 1px;
}

/* Icono siempre centrado */
.timeline-icon {
    width: 70px;
    height: 70px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid var(--bg-white);
    box-shadow: 0 0 0 3px var(--border-color);
    z-index: 2;
}

.timeline-icon i {
    font-size: 1.6rem;
    color: white;
}

/* Texto siempre a la derecha */
.timeline-content {
    text-align: left;
}

.timeline-content h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    color: var(--secondary-color);
    margin-bottom: 0.3rem;
}

.timeline-content p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* ELIMINAR la alternancia de los items pares */
.timeline-item:nth-child(even) .timeline-time {
    order: unset;
    text-align: right;
}

.timeline-item:nth-child(even) .timeline-content {
    order: unset;
    text-align: left;
}

/* ========================================
   LOCATION
======================================== */

#location {
    background: var(--bg-light);
}

.location-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
    align-items: start;
}

.location-card {
    background: var(--bg-white);
    padding: 3rem;
    border-radius: 15px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.location-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.location-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.location-address {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.location-details {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.location-details p {
    margin: 0.5rem 0;
    color: var(--text-dark);
}

.location-details i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

.map-btn {
    display: inline-block;
    width: 100%;
    padding: 1rem 2rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 157, 139, 0.3);
    text-decoration: none;
    text-align: center;
    box-sizing: border-box;
}

.map-btn:hover {
    background: #6b7c6b;
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(139, 157, 139, 0.5);
}

.map-btn:focus-visible {
    outline: 2px solid var(--secondary-color);
    outline-offset: 3px;
}

.map-container {
    border-radius: 15px;
    overflow: hidden;
    height: 400px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 1px solid var(--border-color);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    display: block;
}

/* ========================================
   HOTELS
======================================== */

#hotels {
    background: var(--bg-white);
}

.hotels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.hotel-card {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.hotel-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.hotel-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.hotel-icon i {
    font-size: 2.5rem;
    color: white;
}

.hotel-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.hotel-distance {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.hotel-address {
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.hotel-phone {
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.hotel-btn {
    padding: 0.8rem 2rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.hotel-btn:hover {
    background: #6b7c6b;
    transform: scale(1.05);
}

/* ========================================
   IMPORTANT INFO
======================================== */

#important-info {
    background: var(--bg-light);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.info-card {
    background: var(--bg-white);
    padding: 2.5rem 2rem;
    border-radius: 15px;
    text-align: center;
    border: 1px solid var(--border-color);
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

/* Decoración de hojas en las esquinas */
.info-card::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle at 0% 0%, rgba(139, 157, 139, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.info-card::after {
    content: '';
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle at 100% 100%, rgba(139, 157, 139, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.info-icon-svg {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
}

.info-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.info-card p {
    color: var(--text-dark);
    margin: 0.5rem 0;
    font-size: 0.95rem;
    line-height: 1.7;
}

.info-note {
    font-size: 0.9rem;
    color: var(--text-light);
    font-style: italic;
}

/* ========================================
   RSVP FORM
======================================== */

#rsvp {
    background: var(--bg-white);
}

.rsvp-form {
    max-width: 700px;
    margin: 0 auto;
    background: var(--bg-light);
    padding: 3rem;
    border-radius: 15px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.rsvp-no-guest-message{
    max-width:700px;
    margin: 0 auto;
    padding: 2.5rem 3rem;
    text-align: center;
    background: var(--bg-light);
    border-radius: 15px;
    border: 1px solid var(--border-color);
    color: var(--text-light, #6b7b6b);
    font-size: 1rem;
    line-height: 1.6;
}

.rsvp-checking-message{
    max-width:700px;
    margin: 0 auto;
    padding: 2.5rem 3rem;
    text-align: center;
    background: var(--bg-light);
    border-radius: 15px;
    border: 1px solid var(--border-color);
    color: var(--text-light, #6b7b6b);
    font-size: 1rem;
}

.rsvp-spinner {
    display: inline-block;
    width: 1em;
    height: 1em;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary-color, #4a5d4a);
    border-radius:50%;
    animation: rsvp-spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 0.5rem;
}

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

.rsvp-already-confirmed{
    max-width: 700px;
    margin: 0 auto;
    padding: 3rem;
    text-align: center;
    background: var(--bg-light);
    border-radius: 15px;
    border: 1px solid var(--border-color);
}

.rsvp-no-asiste-contactar {
    max-width: 700px;
    margin: 0 auto;
    padding: 2.5rem 3rem;
    text-align: center;
    background: var(--bg-light);
    border-radius: 15px;
    border: 1px solid var(--border-color);
    color: var(--text-light, #6b7b6b);
    font-size: 1rem;
    line-height: 1.6;
}

.rsvp-no-asiste-contactar p {
    margin: 0;
}

.rsvp-ya-dijo-no-notice {
    max-width: 700px;
    margin: 0 auto 1.25rem;
    padding: 1rem 1.25rem;
    text-align: center;
    background: rgba(74, 93, 74, 0.08);
    border-radius: 12px;
    border: 1px solid rgba(74, 93, 74, 0.2);
    color: var(--text-light, #6b7b6b);
    font-size: 0.95rem;
    line-height: 1.5;
}

.rsvp-ya-dijo-no-notice p {
    margin: 0;
}

.rsvp-link-actualizar {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: var(--primary-color, #4a5d4a);
    text-decoration: underline;
    cursor: pointer;
}

.rsvp-link-actualizar:hover {
    text-decoration: none;
}

.rsvp-already-icon{
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    line-height: 64px;
    font-size: 2rem;
    font-weight: bold;
    color: #fff;
    background: var(--primary-color, #4a5d4a);
    border-radius: 50%;
}

.rsvp-already-confirmed h3{
   font-family: 'Playfair Display', serif;
   color: var(--primary-color, #4a5d4a);
   margin-bottom: 0.5rem;
}

.rsvp-already-confirmed p{
   color: var(--text-light, #6b7b6b);
   margin: 0;
   line-height: 1.6;
}

.rsvp-update-link-wrap {
    margin-top: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
}

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

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

.form-group input:focus-visible,
.form-group select:focus-visible,
.form-group textarea:focus-visible {
    box-shadow: 0 0 0 3px rgba(139, 157, 139, 0.25);
}

.radio-label:focus-within {
    border-color: var(--primary-color);
}

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

.radio-label {
    display: flex;
    align-items: center;
    padding: 1.2rem 1.5rem;
    background: var(--bg-white);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid var(--border-color);
    position: relative;
}

.radio-label:hover {
    border-color: var(--primary-color);
    background: var(--bg-light);
    transform: translateX(5px);
}

.radio-label input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    margin-right: 1rem;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.radio-label input[type="radio"]:checked {
    border-color: var(--primary-color);
    background: var(--primary-color);
}

.radio-label input[type="radio"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.radio-label span {
    display: block;
    font-size: 1.05rem;
    color: var(--text-dark);
}

.form-note {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 0.5rem;
    font-style: italic;
}

.submit-btn {
    width: 100%;
    padding: 1.2rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
    box-shadow: 0 4px 15px rgba(139, 157, 139, 0.3);
}

.submit-btn:hover {
    background: #6b7c6b;
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(139, 157, 139, 0.5);
}

.submit-btn:focus-visible {
    outline: 2px solid var(--secondary-color);
    outline-offset: 3px;
}

.success-message {
    max-width: 500px;
    margin: 2rem auto;
    padding: 3rem 2rem;
    background: #e8f5e9;
    border: 2px solid #c8e6c9;
    border-radius: 15px;
    text-align: center;
    color: #2e7d32;
}

.success-message i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.success-message h3 {
    margin-bottom: 0.5rem;
}

/* ========================================
   GIFTS
======================================== */

#gifts {
    background: var(--bg-light);
}

.gifts-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.gift-icon {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

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

.gift-box {
    max-width: 400px;
    margin: 3rem auto;
    background: var(--bg-white);
    padding: 3rem 2rem;
    border-radius: 15px;
    border: 2px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    text-align: center;
}

.gift-detail i {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.gift-detail h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.gift-detail p {
    color: var(--text-light);
    font-size: 1.1rem;
}

.gifts-thanks {
    font-size: 1.3rem;
    color: var(--primary-color);
    font-weight: 500;
    margin-top: 2rem;
}

/* ========================================
   PHOTOS
======================================== */

#photos {
    background: var(--bg-white);
}

.qr-section {
    text-align: center;
    background: var(--bg-light);
    padding: 3rem;
    border-radius: 15px;
    max-width: 500px;
    margin: 0 auto;
    border: 1px solid var(--border-color);
}

.qr-code {
    display: inline-block;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    margin-bottom: 1.5rem;
}

.qr-text {
    margin: 1rem 0;
    color: var(--text-light);
}

.hashtag {
    font-size: 1.3rem;
    color: var(--primary-color);
    font-weight: 500;
    margin-top: 1rem;
}

/* ========================================
   FOOTER
======================================== */

footer {
    background: linear-gradient(180deg, var(--bg-light) 0%, #ffffff 100%);
    padding: 4rem 2rem;
    text-align: center;
}

.footer-message {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-style: italic;
}

.footer-line {
    width: 120px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    margin: 0.5rem auto 1rem;
}

.footer-names {
    font-family: 'Great Vibes', cursive;
    font-size: 3rem;
    color: var(--primary-color);
    margin: 1rem 0;
}

.footer-date {
    color: var(--text-light);
    font-size: 1.1rem;
}

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

.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    position: relative;
    margin: 5% auto;
    width: 90%;
    max-width: 900px;
}

.close-modal {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: var(--primary-color);
}

.close-modal:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 4px;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    background: black;
    border-radius: 10px;
}

.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Texto de la historia debajo del video: todo visible, scroll si hace falta */
.modal-story-text {
    background: var(--bg-light);
    padding: 1.25rem 1.5rem;
    margin-top: 1rem;
    border-radius: 10px;
    max-height: 36vh;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    -webkit-overflow-scrolling: touch;
}

.modal-story-text p {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--text-dark);
    margin-bottom: 0.9rem;
}

.modal-story-text p:last-child {
    margin-bottom: 0;
}

/* ========================================
   ANIMATIONS
======================================== */

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

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

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

@media (max-width: 1024px) {
    .envelope { max-width: 480px; }
    .wax-seal { width: 80px; height: 80px; }
}

@media (max-width: 768px) {
    .envelope {
        width: 85%;
    }
    .wax-seal { width: 75px; height: 75px; }
    .envelope-message { font-size: 1.05rem; top: 26%; }
    .envelope-top-text { font-size: 1rem; padding: 0 1rem; }
    .envelope-top-title { font-size: 1.8rem; }
    .envelope-bottom-names { font-size: 1.6rem; }
    
    .couple-names { font-size: 3.5rem; }
    .ampersand { font-size: 3rem; }
    .section-title { font-size: 2.2rem; }
    
    .countdown { 
       gap: 1rem; 
       flex-wrap: nowrap;
    }

    .time-unit { 
       min-width: 70px; 
       padding: 1rem 0.5rem; 
       flex: 1;
    }
    
    .time-unit span { font-size: 2rem; }

    .time-unit p { font-size: 0.85rem; }
    
    .calendar-title { font-size: 1.6rem; }
    .calendar-table tbody td { font-size: 0.95rem; padding: 0.6rem 0; }
    .calendar-heart {
        width: 30px; /* Aumenta el tamaño del corazón */
        height: 30px; /* Aumenta el tamaño del corazón */
        font-size: 1rem; /* Aumenta el tamaño del texto dentro del corazón */
    }

    .calendar-heart::before {
        font-size: 2rem; /* Aumenta el tamaño del símbolo del corazón */
    }
    
    .timeline-container::before { left: 50%; }
    .timeline-item { grid-template-columns: 1fr auto 1fr; gap: 1rem; }
    .timeline-time { font-size: 1.1rem; }
    .timeline-icon { width: 55px; height: 55px; }
    .timeline-icon i { font-size: 1.3rem; }
    .timeline-content h3 { font-size: 1.2rem; }
    .timeline-content p { font-size: 0.9rem; }
    
    blockquote { font-size: 1.5rem; }
    .rsvp-form { padding: 2rem 1.5rem; }
    .location-grid { grid-template-columns: 1fr; }
  
    .story-hint {font-size: 0.9rem;}
    .form-note {font-size: 0.9rem;}
    .info-card p {font-size: 0.9rem;}
    .info-note{font-size: 0.9rem;}

    .modal-story-text {
        padding: 1rem 1.25rem;
        max-height: 32vh;
    }
    .modal-story-text p {
        font-size: 0.9rem;
        line-height: 1.6;
        margin-bottom: 0.75rem;
    }


    .map-container {
        height: 280px;
    }


  .envelope-inner-name {
      font-size: 1.2rem;
  }

  .envelope-inner-label,
  .envelope-inner-guests {
      font-size: 0.9rem;
  }

.envelope-card-details {
        width: 75%;  /* Reduce el ancho en móvil */
        max-width: 220px;  /* Limita el ancho máximo */
        right: 0; /* Mueve a la derecha en móvil */
    }

  .envelope-details-cta {
      font-size: 0.95rem;
      letter-spacing: 1px;
  }

    @keyframes innerContentSlideOut {
        0% {
            opacity: 0;
            transform: translate(-50%, 95px) scale(0.92);
        }
        75% {
            opacity: 0;
            transform: translate(-50%, -210px) scale(1); /* un punto medio */
        }
        100% {
            opacity: 1;
            transform: translate(-50%, -240px) scale(1); /* final visible y centrado */
        }
    }
.envelope-cards-stack {
        width: 85%;
        margin: 0 auto;
    }
.envelope-inner-card {
        width: 80%;
        padding: 0.95rem 1.1rem;
        border-radius: 18px;
    }
.envelope-flap {
        height: 85%; /* Ajusta la altura en móvil */
    }
}

@media (min-width: 768px) {
  .envelope-inner-card {
        width: 85%;
        padding: 1rem 1.3rem;
        border-radius: 24px;
    }

    .envelope-card-details {
        left: 198px;
    }
.envelope-flap {
        height: 55%; /* Mantiene la altura en desktop */
    }
}

@media (max-width: 480px) {
    .envelope {
        aspect-ratio: 1.55 / 1;
    }
    .wax-seal { width: 65px; height: 65px; }
    .envelope-message { font-size: 0.95rem; top: 24%; }
    .envelope-top-title { font-size: 1.6rem; letter-spacing: 2px; }
    .envelope-bottom-names { font-size: 1.4rem; }
    
    .couple-names {
        font-size: 2.8rem;
    }

    .wedding-date { font-size: 1.5rem; }
    .container { padding: 3rem 1.5rem; }
    
    #countdown-section { padding: 2.5rem 0.5rem; }

    .countdown { 
      gap: 0.3rem; 
      flex-wrap: nowrap;
      max-width: 100%;
    }

    .time-unit { 
       min-width: 0; 
       padding: 0.8rem 0.3rem; 
       flex: 1;
    }

    .time-unit span { font-size: 1.6rem; }

    .time-unit p { 
      font-size: 0.8rem; 
      margin-top: 0.3rem;
    }
    
    .calendar-title { font-size: 1.3rem; }
    .calendar-month { font-size: 0.9rem; }
    .calendar-table thead th { font-size: 0.8rem; }
    .calendar-table tbody td { font-size: 0.875rem; padding: 0.5rem 0; }
    .calendar-heart { width: 30px; height: 30px; font-size: 0.875rem; }
    
    .timeline-item { gap: 0.8rem; }
    .timeline-time { font-size: 1rem; }
    .timeline-icon { width: 45px; height: 45px; }
    .timeline-icon i { font-size: 1.1rem; }
    .timeline-content h3 { font-size: 1.1rem; }
    .timeline-content p { font-size: 0.875rem; }

    .story-hint {font-size: 0.9rem;}
    .form-note {font-size: 0.9rem;}
    .info-card p {font-size: 0.9rem;}
    .info-note{font-size: 0.9rem;}

    blockquote { font-size: 1.35rem; }

    .modal-story-text {
        padding: 0.9rem 1rem;
        max-height: 28vh;
    }
    .modal-story-text p {
        font-size: 0.875rem;
        line-height: 1.55;
    }

.map-container {
        height: 250px;
    }

  .envelope-inner-name {
      font-size: 1.05rem;
  }

  .envelope-inner-label,
  .envelope-inner-guests {
      font-size: 0.85rem;
  }

  .envelope-details-cta {
      font-size: 0.9rem;
  }
.envelope-cards-stack {
        display: flex;
        justify-content: center;
        align-items: flex-start;
    }
.envelope-inner-card {
        width: 58%;
        padding: 0.7rem 0.85rem;
        border-radius: 14px;
    }
.envelope-wrapper {
        width: 85%;
        margin: 0 auto;
    }
.envelope-inner-card--right {
        right: -10px;  
        top: 12px;     
    }
}

@media (max-width: 360px) {
    .envelope { max-width: 300px; }
    .wax-seal { width: 55px; height: 55px; }
    .envelope-message { font-size: 0.875rem; }
}