/* Variables CSS - Mejoradas */
:root {
    --cream: #FFF8F3;
    --rose-pastel: #F8D4D4;
    --rose-powder: #E8C5D8;
    --rose-wine: #8B4A6D;
    --gold-light: #D4AF8F;
    --white-warm: #FFFBF7;
    --rose-dark: #A84860;
    --shadow-sm: 0 2px 8px rgba(139, 74, 109, 0.08);
    --shadow-md: 0 8px 24px rgba(139, 74, 109, 0.12);
    --shadow-lg: 0 16px 48px rgba(139, 74, 109, 0.15);
    --shadow-xl: 0 24px 64px rgba(139, 74, 109, 0.2);
}

/* Reset y estilos generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
}

body {
    font-family: 'Crimson Text', Georgia, serif;
    background: linear-gradient(135deg, #FFF8F3 0%, #F9E7DD 100%);
    background-attachment: fixed;
    color: #333;
    position: relative;
    font-size: 16px;
    line-height: 1.7;
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><g opacity="0.08"><path d="M50 10 Q 60 20, 55 35 Q 65 30, 70 40 Q 60 45, 65 55 Q 50 50, 45 60 Q 45 45, 35 50 Q 40 40, 30 35 Q 45 30, 50 20 Z" fill="%23C75B7A" stroke="%23A84860" stroke-width="0.5"/><circle cx="50" cy="40" r="3" fill="%23D4AF8F"/></g></svg>'),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><g opacity="0.08"><ellipse cx="50" cy="50" rx="15" ry="18" fill="none" stroke="%23A84860" stroke-width="1"/><ellipse cx="40" cy="40" rx="8" ry="10" fill="%23F8D4D4" opacity="0.5"/><ellipse cx="60" cy="40" rx="8" ry="10" fill="%23F8D4D4" opacity="0.5"/><ellipse cx="50" cy="60" rx="8" ry="10" fill="%23E8C5D8" opacity="0.5"/><circle cx="50" cy="50" r="4" fill="%23D4AF8F"/></g></svg>');
    background-size: 300px 300px, 250px 250px;
    background-position: 0 0, 50px 50px;
    background-repeat: repeat;
    pointer-events: none;
    z-index: 1;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><defs><style>.rose{opacity:0.12;}</style></defs><g class="rose"><path d="M100 20 Q110 30, 105 45 Q120 40, 130 55 Q115 60, 125 75 Q100 70, 90 85 Q90 60, 75 65 Q85 50, 70 40 Q90 35, 100 25 Z" fill="%23C75B7A" stroke="%23A84860" stroke-width="1"/><circle cx="100" cy="55" r="5" fill="%23D4AF8F"/></g></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
    opacity: 0.6;
}


/* Tipografía - MEJORADA */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', Georgia, serif;
    color: #5D3A3A;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-shadow: 0 2px 4px rgba(93, 58, 58, 0.1);
}

h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: 0.8px;
}

h2 {
    font-size: 2.75rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    letter-spacing: 0.7px;
}

h3 {
    font-size: 1.875rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.5px;
}

p {
    font-family: 'Crimson Text', Georgia, serif;
    font-size: 1.1rem;
    line-height: 1.85;
    font-weight: 400;
    color: #444;
}

/* Animaciones personalizadas */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeIn {
    animation: fadeIn 1s ease-out forwards;
}

/* Scroll reveal - elementos que aparecen al scroll */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Botones personalizados - MEJORADOS */
button {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 600;
    letter-spacing: 0.4px;
    position: relative;
    overflow: hidden;
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.3s ease;
    z-index: -1;
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(139, 74, 109, 0.25);
}

button:hover::before {
    left: 100%;
}

button:active {
    transform: translateY(-1px);
}

/* Bordes redondeados */
.rounded-3xl {
    border-radius: 24px;
}

.rounded-2xl {
    border-radius: 16px;
}

/* Navbar - MEJORADA */
nav {
    box-shadow: 0 4px 20px rgba(139, 74, 109, 0.1);
    position: relative;
    z-index: 40;
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.75)) !important;
    backdrop-filter: blur(12px) !important;
}

nav a {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, #E8C5D8, #D4AF8F);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

nav a:hover::after {
    width: 100%;
}

.hero-heading {
    text-wrap: balance;
}

.hero-subtitle {
    text-wrap: pretty;
}

.hero-love-mobile {
    display: none;
}

/* Tarjeta de mensaje con borde decorativo - MEJORADO */
.message-card {
    background: linear-gradient(135deg, #9B5D7F 0%, #8B4A6D 50%, #A84860 100%);
    border: 3px solid #D4AF8F;
    border-radius: 32px;
    padding: 4rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(139, 74, 109, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.message-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 80px rgba(139, 74, 109, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: #E8C5D8;
}

.message-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M10 10 Q 25 5, 40 10" fill="none" stroke="rgba(212, 175, 143, 0.15)" stroke-width="0.5"/><path d="M60 10 Q 75 5, 90 10" fill="none" stroke="rgba(212, 175, 143, 0.15)" stroke-width="0.5"/></svg>');
    pointer-events: none;
    opacity: 0.8;
}

.message-card::after {
    content: '';
    position: absolute;
    top: -25px;
    left: -25px;
    width: 50px;
    height: 50px;
    border: 3px solid rgba(212, 175, 143, 0.4);
    border-radius: 0 0 30px 0;
    transition: all 0.4s ease;
}

.message-card:hover::after {
    border-color: rgba(212, 175, 143, 0.7);
}

/* Galería de imágenes con corazones - MEJORADO */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    box-shadow: 0 15px 35px rgba(139, 74, 109, 0.2);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, #FFF8F3, #F9E7DD);
}

.gallery-item:hover {
    transform: scale(1.03);
    box-shadow: 0 25px 50px rgba(139, 74, 109, 0.3);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-photo,
.memory-photo {
    object-position: center;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.audio-toggle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(232, 197, 216, 0.45);
}

.heart-icon {
    filter: drop-shadow(3px 3px 8px rgba(0, 0, 0, 0.25));
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), filter 0.4s ease;
}

.gallery-item:hover .heart-icon {
    transform: scale(1.15) rotate(8deg);
    filter: drop-shadow(4px 4px 12px rgba(0, 0, 0, 0.35));
}

/* Sección de cualidades con íconos - MEJORADO */
.quality-card {
    background: linear-gradient(135deg, #FFFBF7 0%, rgba(248, 212, 212, 0.15) 100%);
    border: 2px solid #E8C5D8;
    border-radius: 20px;
    padding: 2.5rem 2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.quality-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to right, transparent, #D4AF8F, transparent);
    opacity: 0.6;
}

.quality-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(212, 175, 143, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    transition: all 0.6s ease;
    pointer-events: none;
}

.quality-card:hover {
    border-color: #D4AF8F;
    transform: translateY(-12px);
    box-shadow: var(--shadow-xl);
    background: linear-gradient(135deg, #FFFBF7 0%, rgba(248, 212, 212, 0.4) 100%);
}

.quality-card:hover::after {
    top: -30%;
    right: -30%;
}

.quality-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #F8D4D4, #E8C5D8);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(139, 74, 109, 0.1);
    position: relative;
    z-index: 1;
}

.quality-card:hover .quality-icon {
    transform: scale(1.15) rotate(-8deg);
    box-shadow: 0 8px 24px rgba(139, 74, 109, 0.2);
}

/* Modal styles */
#image-modal {
    animation: fadeIn 0.2s ease-out;
}

#image-modal.hidden {
    display: none;
}

#image-modal img {
    max-height: calc(90vh - 200px);
}

/* Hacer clickeable las imágenes de galería */
#galeria [role="button"] {
    cursor: pointer;
}

#galeria [role="button"]:focus {
    outline: 3px solid #E8C5D8;
    outline-offset: 2px;
}

/* Mobile menu styles */
#mobile-menu {
    max-height: 300px;
    overflow-y: auto;
    animation: slideDown 0.3s ease-out;
}

#mobile-menu.hidden {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

#mobile-menu-toggle span {
    display: block;
    width: 100%;
}

/* Secciones con gradiente suave */
section {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
}

section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 160px;
    height: 160px;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><defs><style>.lotus{opacity:0.08;}</style></defs><g class="lotus"><circle cx="100" cy="100" r="30" fill="none" stroke="%23E8C5D8" stroke-width="2"/><ellipse cx="80" cy="80" rx="12" ry="18" fill="%23F8D4D4"/><ellipse cx="120" cy="80" rx="12" ry="18" fill="%23F8D4D4"/><ellipse cx="70" cy="110" rx="12" ry="18" fill="%23E8C5D8"/><ellipse cx="130" cy="110" rx="12" ry="18" fill="%23E8C5D8"/><ellipse cx="100" cy="130" rx="12" ry="18" fill="%23D4AF8F"/><circle cx="100" cy="100" r="8" fill="%23D4AF8F"/></g></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 0;
}

section:nth-child(odd)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 180px;
    height: 180px;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><defs><style>.rose{opacity:0.08;}</style></defs><g class="rose"><path d="M100 30 Q115 45, 110 65 Q130 55, 145 75 Q125 85, 135 105 Q100 95, 85 115 Q85 85, 65 90 Q80 70, 60 55 Q85 45, 100 35 Z" fill="%23C75B7A" stroke="%238B4A6D" stroke-width="1"/><ellipse cx="100" cy="70" rx="8" ry="6" fill="%23F8D4D4" opacity="0.6"/><circle cx="100" cy="75" r="6" fill="%23D4AF8F"/></g></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 0;
}

/* Decoraciones en esquinas del documento */
html::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    height: 250px;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><defs><style>.lotus{opacity:0.1;}</style></defs><g class="lotus"><circle cx="100" cy="100" r="35" fill="none" stroke="%23E8C5D8" stroke-width="2"/><ellipse cx="75" cy="75" rx="14" ry="20" fill="%23F8D4D4"/><ellipse cx="125" cy="75" rx="14" ry="20" fill="%23F8D4D4"/><ellipse cx="65" cy="110" rx="14" ry="20" fill="%23E8C5D8"/><ellipse cx="135" cy="110" rx="14" ry="20" fill="%23E8C5D8"/><ellipse cx="100" cy="135" rx="14" ry="20" fill="%23D4AF8F"/><circle cx="100" cy="100" r="10" fill="%23D4AF8F"/></g></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 0;
}

html::after {
    content: '';
    position: fixed;
    bottom: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><defs><style>.rose{opacity:0.1;}</style></defs><g class="rose"><path d="M100 20 Q120 40, 115 65 Q140 50, 160 75 Q135 90, 150 120 Q100 105, 80 135 Q80 100, 55 105 Q75 75, 50 50 Q80 40, 100 25 Z" fill="%23C75B7A" stroke="%238B4A6D" stroke-width="1.5"/><ellipse cx="100" cy="65" rx="10" ry="8" fill="%23F8D4D4" opacity="0.7"/><circle cx="100" cy="72" r="7" fill="%23D4AF8F"/></g></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 0;
}

/* Mobile optimizations mejoradas */
@media (max-width: 640px) {
    #btn-send-love-mobile {
        width: 100%;
    }

    body::after,
    html::before,
    html::after {
        width: 160px;
        height: 160px;
    }

    section::before,
    section:nth-child(odd)::after {
        width: 96px;
        height: 96px;
    }

    .gallery-item-photo {
        height: auto !important;
        min-height: 0;
        overflow: visible;
    }

    .gallery-photo {
        display: block;
        height: auto !important;
        max-height: none;
        object-fit: contain !important;
        object-position: center;
        background: #fff8f3;
    }

    .memory-photo {
        display: block;
        height: auto !important;
        max-height: none;
        object-fit: contain !important;
        object-position: center;
        background: #fff8f3;
    }

    #galeria .gallery-item {
        padding: 0;
    }

    #galeria .absolute.inset-0.flex.items-end,
    #galeria .absolute.bottom-0.left-0.right-0,
    #galeria .absolute.inset-0.bg-black\\/10 {
        inset: 0;
    }

    .hero-content {
        max-width: 100%;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .hero-content > div:first-child {
        margin-bottom: 1.25rem;
    }

    .hero-content > div:first-child svg {
        width: 4rem;
        height: 4rem;
    }

    .hero-heading {
        font-size: 2.85rem !important;
        line-height: 1.05;
        margin-bottom: 1.25rem;
        letter-spacing: 0;
    }

    .hero-heading span {
        display: inline-block;
        margin-top: 0.2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem !important;
        line-height: 1.55;
        margin-bottom: 1.75rem;
        max-width: 20rem;
    }

    .hero-cta {
        width: 100%;
        max-width: 20rem;
        padding: 0.95rem 1.25rem;
        font-size: 1rem !important;
        line-height: 1.2;
        white-space: normal;
    }

    .hero-love-mobile {
        display: inline-flex;
        width: 100%;
        max-width: 20rem;
        min-height: 3.25rem;
        padding: 0.9rem 1.25rem;
        font-size: 1rem;
        line-height: 1.2;
    }

    button {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }

    h2 {
        font-size: 1.875rem;
    }

    p {
        font-size: 0.95rem;
    }

    section {
        padding: 1rem;
    }

    .message-card {
        padding: 2rem;
    }
}

/* Accesibilidad */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Estilos para impresión */
@media print {
    nav,
    #btn-back-to-top {
        display: none;
    }

    body {
        background: white;
    }

    section {
        page-break-inside: avoid;
    }
}

/* Text selection */
::selection {
    background-color: #E8C5D8;
    color: #8B4A6D;
}

::-moz-selection {
    background-color: #E8C5D8;
    color: #8B4A6D;
}

/* Scrollbar personalizado */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #FFF8F3;
}

::-webkit-scrollbar-thumb {
    background: #D4AF8F;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #8B4A6D;
}

/* Links */
a {
    color: #8B4A6D;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #F8D4D4;
}

.secret-footer {
    background: transparent;
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
}

.secret-footer p {
    margin: 0;
    font-size: 0.75rem;
    color: rgba(139, 74, 109, 0.24);
    letter-spacing: 0;
    user-select: none;
}
