/*====================================================
    MUSEO DE ELLA ❤️
    Autor: Luis + ChatGPT 😎
====================================================*/

/*==========================
    GOOGLE FONTS
==========================*/

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Poppins:wght@300;400;500;600&display=swap');

/* ==========================
   VARIABLES
========================== */
:root {
    --cream: #F7F4EF;
    --white: #FFFFFF;
    --black: #1A1A1A;
    --text: #555555;
    --text-light: #888888;
    --gold: #C8A96A;
    --gold-light: #E8D5A3;
    --gold-dark: #A8893E;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.10);
    --shadow-hover: 0 30px 80px rgba(0, 0, 0, 0.18);
    --radius: 16px;
    --radius-lg: 24px;
    --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ==========================
   RESET
========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--cream);
    font-family: 'Poppins', sans-serif;
    color: var(--black);
    overflow-x: hidden;
    line-height: 1.6;
}

/* ==========================
   SCROLLBAR
========================== */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: #ECE8DF;
    border-radius: 20px;
}
::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 20px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--gold-dark);
}

/* ==========================
   UTILITY
========================== */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 40px;
}

.subtitle {
    display: inline-block;
    color: var(--gold);
    letter-spacing: 5px;
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 12px;
}

.highlight {
    color: var(--gold);
}

.btn-primary {
    border: none;
    cursor: pointer;
    background: var(--gold);
    color: white;
    padding: 18px 50px;
    border-radius: 50px;
    font-size: 17px;
    font-weight: 500;
    transition: var(--transition);
    box-shadow: 0 15px 40px rgba(200, 169, 106, 0.35);
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 60%);
    opacity: 0;
    transition: var(--transition);
}

.btn-primary:hover {
    transform: translateY(-4px);
    background: var(--gold-dark);
    box-shadow: 0 20px 50px rgba(200, 169, 106, 0.45);
}

.btn-primary:hover::after {
    opacity: 1;
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
}

/* ==========================
   MUSIC BUTTON
========================== */
.music-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    border: 2px solid var(--gold);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    cursor: pointer;
    font-size: 24px;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.music-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 40px rgba(200, 169, 106, 0.3);
}

/* ==========================
   HERO
========================== */
.hero {
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, #f6f2ea 100%);
}

/* Luz flotante */
.hero::before {
    content: '';
    position: absolute;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(200, 169, 106, 0.08), transparent 70%);
    border-radius: 50%;
    filter: blur(100px);
    animation: float 12s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(60px, -40px) scale(1.1); }
    66% { transform: translate(-40px, 30px) scale(0.9); }
}

/* Partículas */
.hero-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, rgba(200,169,106,0.15), transparent),
        radial-gradient(2px 2px at 40% 70%, rgba(200,169,106,0.12), transparent),
        radial-gradient(2px 2px at 60% 20%, rgba(200,169,106,0.18), transparent),
        radial-gradient(2px 2px at 80% 80%, rgba(200,169,106,0.10), transparent);
    background-size: 200px 200px;
    animation: sparkle 15s linear infinite;
}

@keyframes sparkle {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

.hero-content {
    width: min(850px, 95%);
    position: relative;
    z-index: 5;
}

.hero .tag {
    font-size: 13px;
    letter-spacing: 5px;
    margin-bottom: 25px;
    color: var(--gold);
    text-transform: uppercase;
}

.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(48px, 10vw, 82px);
    margin-bottom: 30px;
    line-height: 1.1;
    font-weight: 700;
}

.hero p {
    max-width: 650px;
    margin: 0 auto 45px;
    font-size: clamp(18px, 2vw, 21px);
    line-height: 1.8;
    color: var(--text);
}

/* ==========================
   SECTION HEADER
========================== */
.section-header {
    text-align: center;
    margin-bottom: 70px;
}

.section-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(36px, 5vw, 55px);
    font-weight: 700;
}

.section-header h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    margin: 18px auto;
    border-radius: 20px;
}

.section-desc {
    color: var(--text-light);
    font-size: 17px;
    max-width: 500px;
    margin: 0 auto;
}

/* ==========================
   GALERÍA
========================== */
.gallery-section {
    padding: 100px 0 120px;
}

#gallery {
    column-count: 3;
    column-gap: 25px;
}

/* ==========================
   TARJETAS
========================== */
/* ==========================
   MARCO 3D DE MUSEO
========================== */

/* Contenedor principal con perspectiva 3D */
.gallery-item {
    position: relative;
    display: inline-block;
    width: 100%;
    margin-bottom: 25px;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--white);
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    break-inside: avoid;
    
    /* EFECTO 3D */
    transform: perspective(1200px) rotateX(0deg) rotateY(0deg) scale(1);
    transform-style: preserve-3d;
    will-change: transform;
}

/* Efecto hover 3D con rotación y elevación */
.gallery-item:hover {
    transform: perspective(1200px) 
               rotateX(2deg) 
               rotateY(3deg) 
               translateY(-12px) 
               scale(1.03);
    box-shadow: 
        0 30px 80px rgba(0, 0, 0, 0.25),
        0 0 60px rgba(200, 169, 106, 0.12),
        0 0 120px rgba(200, 169, 106, 0.06);
    z-index: 10;
}

/* Imagen dentro del marco 3D */
.gallery-item img {
    width: 100%;
    display: block;
    transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.gallery-item:hover img {
    transform: scale(1.08) translateZ(20px);
}

/* ==========================
   MARCO FÍSICO (BORDE DE CUADRO)
========================== */

/* Marco exterior */
.gallery-item::after {
    content: '';
    position: absolute;
    inset: 6px;
    border: 2px solid rgba(200, 169, 106, 0.25);
    border-radius: calc(var(--radius) - 6px);
    pointer-events: none;
    z-index: 3;
    transition: all 0.6s ease;
    box-shadow: 
        inset 0 0 30px rgba(200, 169, 106, 0.05);
}

.gallery-item:hover::after {
    border-color: rgba(200, 169, 106, 0.6);
    box-shadow: 
        inset 0 0 40px rgba(200, 169, 106, 0.1),
        0 0 30px rgba(200, 169, 106, 0.1);
}

/* ==========================
   SOMBRA DE MARCO (PROFUNDIDAD)
========================== */

/* Sombra que da profundidad al marco */
.gallery-item .frame-shadow {
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    pointer-events: none;
    z-index: 2;
    background: linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.2) 0%,
        transparent 40%,
        transparent 60%,
        rgba(0, 0, 0, 0.1) 100%
    );
    opacity: 0;
    transition: opacity 0.6s ease;
}

.gallery-item:hover .frame-shadow {
    opacity: 1;
}

/* ==========================
   ESQUINAS DORADAS (ESTILO MUSEO)
========================== */

/* Esquinas decorativas como cuadro antiguo */
.gallery-item .corner-decoration {
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: rgba(200, 169, 106, 0.3);
    border-style: solid;
    border-width: 0;
    z-index: 4;
    pointer-events: none;
    transition: all 0.6s ease;
    opacity: 0.6;
}

.gallery-item:hover .corner-decoration {
    border-color: rgba(200, 169, 106, 0.8);
    opacity: 1;
}

.gallery-item .corner-decoration.top-left {
    top: 10px;
    left: 10px;
    border-top-width: 2px;
    border-left-width: 2px;
}

.gallery-item .corner-decoration.top-right {
    top: 10px;
    right: 10px;
    border-top-width: 2px;
    border-right-width: 2px;
}

.gallery-item .corner-decoration.bottom-left {
    bottom: 10px;
    left: 10px;
    border-bottom-width: 2px;
    border-left-width: 2px;
}

.gallery-item .corner-decoration.bottom-right {
    bottom: 10px;
    right: 10px;
    border-bottom-width: 2px;
    border-right-width: 2px;
}

.gallery-item:hover .corner-decoration.top-left {
    top: 8px;
    left: 8px;
    border-color: var(--gold);
}

.gallery-item:hover .corner-decoration.top-right {
    top: 8px;
    right: 8px;
    border-color: var(--gold);
}

.gallery-item:hover .corner-decoration.bottom-left {
    bottom: 8px;
    left: 8px;
    border-color: var(--gold);
}

.gallery-item:hover .corner-decoration.bottom-right {
    bottom: 8px;
    right: 8px;
    border-color: var(--gold);
}

/* ==========================
   LUZ DE MUSEO (REFLUJO)
========================== */

.gallery-item .museum-spotlight {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        ellipse at 30% 30%,
        rgba(255, 230, 180, 0.12) 0%,
        transparent 60%
    );
    opacity: 0;
    transition: opacity 0.8s ease;
    pointer-events: none;
    z-index: 1;
    transform: rotate(-15deg);
}

.gallery-item:hover .museum-spotlight {
    opacity: 1;
}

/* ==========================
   BADGE CON SOMBRA 3D
========================== */

.gallery-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 6px 16px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    color: var(--gold);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
    z-index: 5;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    transition: all 0.4s ease;
    transform: translateZ(0);
}

.gallery-item:hover .gallery-badge {
    transform: translateZ(30px) scale(1.05);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.98);
}

/* ==========================
   OVERLAY CON PROFUNDIDAD
========================== */

.gallery-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 35px 25px 25px;
    background: linear-gradient(
        transparent,
        rgba(0, 0, 0, 0.7) 50%,
        rgba(0, 0, 0, 0.85) 100%
    );
    color: white;
    opacity: 0;
    transition: all 0.5s ease;
    z-index: 2;
    transform: translateY(10px);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
    transform: translateY(0);
}

.gallery-overlay h3 {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    margin-bottom: 6px;
    font-weight: 600;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(5px);
    transition: all 0.5s ease;
    transition-delay: 0.05s;
}

.gallery-item:hover .gallery-overlay h3 {
    transform: translateY(0);
}

.gallery-overlay p {
    font-size: 13px;
    opacity: 0.8;
    font-weight: 300;
    transform: translateY(5px);
    transition: all 0.5s ease;
    transition-delay: 0.1s;
}

.gallery-item:hover .gallery-overlay p {
    transform: translateY(0);
}

/* ==========================
   EFECTO DE BRILLO AL HOVER
========================== */

.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -120%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255, 255, 255, 0.25),
        transparent
    );
    transition: 0.8s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 3;
    pointer-events: none;
    transform: skewX(-15deg);
}

.gallery-item:hover::before {
    left: 140%;
}

/* ==========================
   ANIMACIÓN DE ENTRADA 3D
========================== */

.gallery-item {
    opacity: 0;
    transform: perspective(1200px) 
               rotateX(5deg) 
               translateY(50px) 
               scale(0.95);
    animation: appear3D 0.9s forwards;
}

@keyframes appear3D {
    from {
        opacity: 0;
        transform: perspective(1200px) 
                   rotateX(5deg) 
                   translateY(50px) 
                   scale(0.95);
    }
    to {
        opacity: 1;
        transform: perspective(1200px) 
                   rotateX(0deg) 
                   translateY(0) 
                   scale(1);
    }
}

.gallery-item:nth-child(1) { animation-delay: 0.05s; }
.gallery-item:nth-child(2) { animation-delay: 0.10s; }
.gallery-item:nth-child(3) { animation-delay: 0.15s; }
.gallery-item:nth-child(4) { animation-delay: 0.20s; }
.gallery-item:nth-child(5) { animation-delay: 0.25s; }
.gallery-item:nth-child(6) { animation-delay: 0.30s; }
.gallery-item:nth-child(7) { animation-delay: 0.35s; }
.gallery-item:nth-child(8) { animation-delay: 0.40s; }
.gallery-item:nth-child(9) { animation-delay: 0.45s; }
.gallery-item:nth-child(10) { animation-delay: 0.50s; }
.gallery-item:nth-child(11) { animation-delay: 0.55s; }
.gallery-item:nth-child(12) { animation-delay: 0.60s; }
.gallery-item:nth-child(13) { animation-delay: 0.65s; }
.gallery-item:nth-child(14) { animation-delay: 0.70s; }
.gallery-item:nth-child(15) { animation-delay: 0.75s; }

/* ==========================
   EFECTO DE PROFUNDIDAD ADICIONAL
========================== */

/* Sombra proyectada en la pared (efecto museo) */
.gallery-item .wall-shadow {
    position: absolute;
    bottom: -10px;
    left: 10%;
    width: 80%;
    height: 30px;
    background: radial-gradient(
        ellipse at center,
        rgba(0, 0, 0, 0.15) 0%,
        transparent 80%
    );
    filter: blur(15px);
    opacity: 0;
    transition: all 0.6s ease;
    z-index: 0;
    pointer-events: none;
}

.gallery-item:hover .wall-shadow {
    opacity: 1;
    bottom: -15px;
    transform: scale(1.1);
}

/* ==========================
   MODAL
========================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(20px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 30px;
    animation: fadeIn 0.4s ease;
}

.modal.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.modal-content {
    width: min(1100px, 95%);
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    font-size: 40px;
    color: white;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
    line-height: 1;
}

.modal-close:hover {
    transform: rotate(90deg);
    color: var(--gold);
}

.modal-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 50px 120px rgba(0, 0, 0, 0.4);
}

.modal-image-container {
    position: relative;
    overflow: hidden;
    background: #f0ece4;
}

.modal-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    min-height: 400px;
}

.modal-counter {
    position: absolute;
    bottom: 20px;
    right: 20px;
    padding: 8px 18px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    color: white;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 1px;
}

.modal-info {
    padding: 50px 45px 45px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.modal-tag {
    display: inline-block;
    color: var(--gold);
    letter-spacing: 4px;
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 500;
    margin-bottom: 8px;
}

.modal-date {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 15px;
}

.modal-info h2 {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    margin-bottom: 20px;
    line-height: 1.2;
}

.modal-message {
    color: var(--text);
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 30px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: auto;
}

.btn-nav {
    flex: 1;
    padding: 14px 25px;
    border: 2px solid var(--gold);
    background: transparent;
    color: var(--black);
    border-radius: 50px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.btn-nav:hover {
    background: var(--gold);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(200, 169, 106, 0.3);
}

/* ==========================
   ENDING (CARTA)
========================== */
.ending {
    padding: 120px 0;
    background: linear-gradient(135deg, #f6f2ea 0%, #ece8df 100%);
    text-align: center;
}

.ending-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(32px, 4vw, 48px);
    margin-bottom: 20px;
}

.ending-content p {
    color: var(--text);
    font-size: 18px;
    max-width: 500px;
    margin: 0 auto 40px;
}

/* ==========================
   LETTER MODAL
========================== */
.letter-modal .modal-content {
    max-width: 650px;
}

.letter-container {
    background: var(--white);
    padding: 50px 55px;
    border-radius: var(--radius-lg);
    box-shadow: 0 50px 120px rgba(0, 0, 0, 0.3);
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
}

.letter-container::-webkit-scrollbar {
    width: 6px;
}

.letter-container::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 20px;
}

.letter-header {
    text-align: center;
    margin-bottom: 30px;
}

.letter-icon {
    font-size: 50px;
    display: block;
    margin-bottom: 10px;
}

.letter-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 30px;
}

.letter-content {
    font-size: 17px;
    line-height: 2;
    color: var(--text);
    white-space: pre-wrap;
    font-family: 'Poppins', sans-serif;
    min-height: 200px;
}

.letter-content::after {
    content: '▊';
    display: inline-block;
    animation: blink 0.8s step-end infinite;
    color: var(--gold);
    font-weight: 300;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.letter-footer {
    margin-top: 35px;
    text-align: right;
    border-top: 2px solid var(--gold-light);
    padding-top: 25px;
}

.letter-signature {
    font-size: 14px;
    color: var(--text-light);
}

.letter-name {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    color: var(--gold);
    font-weight: 600;
}

/* ==========================
   FOOTER
========================== */
.footer {
    text-align: center;
    padding: 40px 20px;
    background: var(--black);
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

.footer .footer-year {
    font-size: 12px;
    margin-top: 6px;
    color: rgba(255, 255, 255, 0.3);
}

/* ==========================
   RESPONSIVE
========================== */
@media (max-width: 1024px) {
    .modal-box {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .modal-image-container img {
        min-height: 300px;
        max-height: 400px;
    }

    .modal-info {
        padding: 30px 35px;
    }
}

@media (max-width: 768px) {
    #gallery {
        column-count: 2;
        column-gap: 18px;
    }

    .gallery-item {
        margin-bottom: 18px;
    }

    .hero h1 {
        font-size: 42px;
    }

    .hero p {
        font-size: 17px;
    }

    .btn-primary {
        padding: 16px 35px;
        font-size: 15px;
    }

    .container {
        padding: 0 20px;
    }

    .modal-content {
        padding: 0;
    }

    .modal-info h2 {
        font-size: 26px;
    }

    .letter-container {
        padding: 30px 25px;
    }

    .music-btn {
        width: 45px;
        height: 45px;
        font-size: 20px;
        bottom: 20px;
        right: 20px;
    }
}

@media (max-width: 480px) {
    #gallery {
        column-count: 1;
    }

    .gallery-item {
        max-width: 400px;
        margin: 0 auto 20px;
    }

    .hero {
        padding: 20px;
    }

    .hero h1 {
        font-size: 32px;
    }

    .modal-close {
        top: 10px;
        right: 20px;
        font-size: 30px;
        color: var(--black);
    }

    .modal-info {
        padding: 25px 20px;
    }

    .modal-actions {
        flex-direction: column;
    }

    .letter-container {
        padding: 25px 18px;
    }
}

/* ==========================
   CARTA DE PERGAMINO ANTIGUO
========================== */
.letter-parchment {
    position: relative;
    background: #f4e9d8;
    background-image: 
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23d4c4a8' fill-opacity='0.3'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    padding: 50px 45px 40px;
    border-radius: 8px;
    box-shadow: 
        0 0 20px rgba(0, 0, 0, 0.15),
        inset 0 0 60px rgba(180, 150, 100, 0.15),
        inset 0 0 30px rgba(160, 130, 80, 0.1);
    border: 1px solid rgba(180, 150, 100, 0.3);
    max-height: 85vh;
    overflow-y: auto;
    transition: all 0.3s ease;
}

/* Efecto de borde quemado */
.letter-parchment::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(135deg, 
        rgba(140, 110, 70, 0.2) 0%, 
        rgba(200, 170, 120, 0.1) 30%, 
        rgba(140, 110, 70, 0.2) 60%,
        rgba(200, 170, 120, 0.1) 80%,
        rgba(140, 110, 70, 0.2) 100%
    );
    border-radius: 10px;
    z-index: -1;
    filter: blur(2px);
}

/* Borde decorativo superior */
.letter-decoration-top {
    text-align: center;
    margin-bottom: 20px;
    color: #b8956a;
    font-size: 18px;
    letter-spacing: 2px;
}

.ornament {
    display: inline-block;
    margin: 0 8px;
    color: #b8956a;
}

.ornament-line {
    display: inline-block;
    color: #b8956a;
    opacity: 0.5;
    letter-spacing: 3px;
}

/* Sello de cera */
.letter-seal {
    width: 50px;
    height: 50px;
    margin: 15px auto 20px;
    background: radial-gradient(ellipse at 30% 30%, #8B0000, #5c0000);
    border-radius: 50%;
    box-shadow: 
        0 4px 15px rgba(139, 0, 0, 0.4),
        inset 0 -3px 10px rgba(0, 0, 0, 0.3),
        inset 0 3px 10px rgba(255, 200, 150, 0.3);
    border: 2px solid #4a0000;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.letter-seal::after {
    content: '✦';
    color: rgba(255, 215, 0, 0.6);
    font-size: 22px;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

/* Sello de cera inferior */
.letter-wax-seal {
    width: 45px;
    height: 45px;
    margin: 15px auto 0;
    background: radial-gradient(ellipse at 30% 30%, #8B0000, #5c0000);
    border-radius: 50%;
    box-shadow: 
        0 4px 15px rgba(139, 0, 0, 0.4),
        inset 0 -3px 10px rgba(0, 0, 0, 0.3),
        inset 0 3px 10px rgba(255, 200, 150, 0.3);
    border: 2px solid #4a0000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: rgba(255, 215, 0, 0.5);
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
}

/* Header de la carta */
.letter-header {
    text-align: center;
    margin-bottom: 25px;
}

.letter-icon {
    font-size: 45px;
    display: block;
    margin-bottom: 10px;
}

.letter-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    color: #4a3520;
    font-weight: 700;
    letter-spacing: 2px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.05);
}

/* Contenido de la carta */
.letter-content {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    line-height: 1.9;
    color: #3d2e1e;
    white-space: pre-wrap;
    min-height: 200px;
    padding: 10px 5px;
    text-align: justify;
    font-weight: 400;
}

.letter-content::after {
    content: '▊';
    display: inline-block;
    animation: blink 0.8s step-end infinite;
    color: #b8956a;
    font-weight: 300;
    font-size: 14px;
}

/* Decoración inferior */
.letter-decoration-bottom {
    text-align: center;
    margin: 20px 0 15px;
    color: #b8956a;
    font-size: 16px;
    letter-spacing: 2px;
}

.letter-decoration-bottom .ornament-line {
    color: #b8956a;
    opacity: 0.4;
}

/* Footer de la carta */
.letter-footer {
    margin-top: 20px;
    text-align: right;
}

.letter-signature {
    font-size: 14px;
    color: #6b5a45;
    font-weight: 300;
    letter-spacing: 1px;
    margin-bottom: 2px;
}

.letter-name {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    color: #8B0000;
    font-weight: 700;
    letter-spacing: 2px;
    text-shadow: 0 1px 2px rgba(139, 0, 0, 0.1);
}

/* Scroll personalizado para la carta */
.letter-parchment::-webkit-scrollbar {
    width: 8px;
}

.letter-parchment::-webkit-scrollbar-track {
    background: #e8dcc8;
    border-radius: 20px;
}

.letter-parchment::-webkit-scrollbar-thumb {
    background: #b8956a;
    border-radius: 20px;
    border: 1px solid #d4c4a8;
}

.letter-parchment::-webkit-scrollbar-thumb:hover {
    background: #a07d55;
}

/* Efecto de brillo en el pergamino */
.letter-parchment::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        145deg,
        rgba(255, 248, 235, 0.2) 0%,
        transparent 40%,
        transparent 60%,
        rgba(255, 248, 235, 0.1) 100%
    );
    border-radius: 8px;
    pointer-events: none;
    z-index: 0;
}

/* Ajustes del modal para la carta */
.letter-modal .modal-content {
    max-width: 700px;
}

.letter-modal .modal-close {
    position: absolute;
    top: -45px;
    right: 0;
    font-size: 35px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.letter-modal .modal-close:hover {
    transform: rotate(90deg);
    color: var(--gold);
}

/* ==========================
   RESPONSIVE PARA LA CARTA
========================== */
@media (max-width: 768px) {
    .letter-parchment {
        padding: 35px 25px 30px;
        max-height: 80vh;
    }

    .letter-header h2 {
        font-size: 26px;
    }

    .letter-content {
        font-size: 15px;
        line-height: 1.8;
    }

    .letter-seal {
        width: 40px;
        height: 40px;
    }

    .letter-wax-seal {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }

    .letter-name {
        font-size: 20px;
    }

    .letter-decoration-top .ornament {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .letter-parchment {
        padding: 25px 18px 20px;
        border-radius: 6px;
    }

    .letter-header h2 {
        font-size: 22px;
    }

    .letter-content {
        font-size: 14px;
        line-height: 1.7;
    }

    .letter-seal {
        width: 35px;
        height: 35px;
    }

    .letter-wax-seal {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }

    .letter-name {
        font-size: 18px;
    }

    .letter-icon {
        font-size: 35px;
    }

    .letter-modal .modal-close {
        top: 10px;
        right: 15px;
        color: #4a3520;
        font-size: 28px;
    }
}
/* ==========================
   EFECTO DE LUZ DE MUSEO
========================== */
.gallery-item .museum-light {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at center, 
        rgba(255, 215, 150, 0.15) 0%, 
        transparent 70%);
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
    z-index: 1;
}

.gallery-item:hover .museum-light {
    opacity: 1;
}

.gallery-item:hover {
    box-shadow: 
        0 30px 80px rgba(0, 0, 0, 0.25),
        0 0 40px rgba(200, 169, 106, 0.15);
}