/* --- FONDO ESTELAR --- */
#bg-fixed {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: url('IMAGENES/fondo.webp') center/cover;
    z-index: -1;
    transition: filter .8s ease;
}

.blur-active {
    filter: blur(8px) brightness(.7);
    transform: scale(1.05);
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Lato', sans-serif;
    color: #fff;
    overflow-x: hidden;
}

section, .hero {
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 80px 20px;
    box-sizing: border-box;
    border-bottom: 1px solid rgba(255,255,255,.05);
}

h1 {
    font-family: 'Playfair Display', serif;
    font-size: 5rem;
    margin: 0;
    text-shadow: 0 0 20px rgba(255,255,255,.6);
    text-align: center;
}

h2 {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    margin-bottom: 35px;
    color: #e0d8ff;
    text-shadow: 0 4px 10px rgba(0,0,0,.5);
    text-align: center;
}

.subtitle {
    font-size: 1.5rem;
    margin-top: 10px;
    letter-spacing: 3px;
    background: rgba(0,0,0,.3);
    padding: 5px 15px;
    border-radius: 20px;
    text-transform: uppercase;
}

.btn-main {
    margin-top: 12px;
    padding: 14px 32px;
    font-size: 1.05rem;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.4);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    backdrop-filter: blur(5px);
    transition: .3s;
    cursor: pointer;
    display: inline-block;
}

.btn-main:hover {
    background: rgba(255,255,255,.3);
    box-shadow: 0 0 20px rgba(255,192,203,.4);
}

/* --- GALERÍA --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 1100px;
    margin-bottom: 30px;
}

.gallery-item, .gallery-item-old {
    --tilt-x: 0deg;
    --tilt-y: 0deg;
    --tilt-scale: 1;
    background: rgba(0,0,0,.6);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.15);
    aspect-ratio: 3 / 4;
    transform: perspective(900px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) scale(var(--tilt-scale));
    transform-style: preserve-3d;
    transition: transform .16s ease-out, border-color .3s;
    will-change: transform;
}

.gallery-item { display: none; }
.gallery-item-old { display: block; }

.gallery-item img, .gallery-item-old img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    cursor: zoom-in;
}

@media (hover: hover) and (pointer: fine) {
    .gallery-item:hover {
        --tilt-scale: 1.02;
        border-color: rgba(255,192,203,.5);
    }

    .gallery-item-old:hover {
        --tilt-scale: 1.02;
        border-color: rgba(169,169,169,.5);
    }
}

/* --- LIGHTBOX --- */
#lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,.95);
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
    overflow: hidden;
    overscroll-behavior: contain;
}

#lightbox img {
    max-width: calc(100% - 112px);
    max-height: calc(100% - 112px);
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0,0,0,.8);
    cursor: zoom-in;
    transform-origin: center center;
    touch-action: none;
    user-select: none;
    transition: none;
}

.lightbox-close {
    position: absolute;
    top: 25px;
    right: 35px;
    font-size: 48px;
    color: white;
    cursor: pointer;
    transition: color .2s;
    z-index: 10000;
}

#lightbox button {
    border: 0;
    background: rgba(0,0,0,.55);
    color: white;
    cursor: pointer;
    padding: 0;
    width: 48px;
    height: 48px;
    line-height: 1;
    border-radius: 50%;
    z-index: 10000;
}

#lightbox button:hover { color: #ff8fab; }

#lightbox button:focus-visible {
    outline: 2px solid #ff8fab;
    outline-offset: 3px;
}

.lightbox-prev, .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 40px;
}

.lightbox-prev { left: 8px; }
.lightbox-next { right: 8px; }

/* --- SECCIONES --- */
#galeria { padding-bottom: 40px; }

#redes {
    padding: 10px 0;
    border-bottom: none;
    min-height: auto;
}

#contacto {
    padding-top: 15px;
    padding-bottom: 60px;
    min-height: auto;
}

.contacto-content {
    text-align: center;
    max-width: 620px;
}

.contacto-content p {
    font-size: 1.1rem;
    margin-bottom: 18px;
    opacity: .9;
}

.email-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 20px 0;
}

.email-btn {
    font-size: 1rem;
    padding: 13px 30px;
}

.gmail-btn {
    background: rgba(234,67,53,.15);
    border-color: #ea4335;
}

.gmail-btn:hover { background: rgba(234,67,53,.25); }

/* --- FOOTER --- */
footer {
    background: rgba(0,0,0,.85);
    padding: 22px 20px;
    text-align: center;
}

.footer-content p {
    margin: 5px 0;
    font-size: .9rem;
    opacity: .6;
}

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
    section, .hero { padding: 60px 24px; }
    h1 { font-size: 4rem; }
    h2 { font-size: 2.75rem; }
    .gallery-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
    #galeria h3 { text-align: center; }
    .social-container { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
    #redes { padding-left: 24px; padding-right: 24px; }
}

@media (max-width: 540px) {
    section, .hero { padding: 48px 16px; }
    .hero { min-height: 100svh; }
    h1 { font-size: clamp(2.5rem,11vw,3.5rem); }
    h2 { font-size: 2.25rem; margin-bottom: 24px; }
    #galeria h3 { font-size: 1.5rem !important; }
    .subtitle { font-size: 1.15rem; letter-spacing: 2px; }

    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0,1fr));
        gap: 10px;
    }

    .btn-main { padding: 12px 22px; font-size: 1rem; }
    .contacto-content p { font-size: 1rem; line-height: 1.6; }
    #redes { padding-left: 16px; padding-right: 16px; }
    #lightbox img { max-width: calc(100% - 32px); max-height: calc(100% - 144px); }
    .lightbox-close { top: 12px; right: 12px; }
    .lightbox-prev, .lightbox-next { top: auto; bottom: 16px; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .gallery-item, .gallery-item-old {
        transform: none !important;
        transition: border-color .2s;
    }
}