/* ==========================================================================
   1. VARIABLES, RESET Y CONFIGURACIÓN BASE
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --color-fondo: #d2c5b3;
    --color-texto: #333;
    --fuente-titulo: 'Parisienne', cursive;
    --fuente-cuerpo: 'Montserrat', sans-serif;
    --color-papel-claro: #fcfaf5;
    --color-papel-medio: #f2ebd9;
    --color-papel-oscuro: #e6dac3;
    --color-acento: #4a4238;
}

body {
    font-family: var(--fuente-cuerpo);
    background-color: var(--color-fondo);
    color: var(--color-texto);
    line-height: 1.6;
    overflow-x: hidden;
}

html {
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

/* ==========================================================================
   2. TIPOGRAFÍA Y CLASES GLOBALES
   ========================================================================== */
h2 {
    font-family: var(--fuente-titulo);
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: var(--color-acento);
    font-weight: normal;
}

h3 {
    font-family: var(--fuente-titulo);
    font-size: 3rem;
    margin-bottom: 15px;
    color: #5a5146;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 60px 20px;
}

.text-center {
    text-align: center;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.btn {
    display: inline-block;
    padding: 15px 35px;
    border: 1px solid white;
    color: white;
    text-decoration: none;
    margin-top: 25px;
    transition: 0.3s;
    font-family: var(--fuente-cuerpo);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    cursor: pointer;
    background: transparent;
}

.btn:hover {
    background: white;
    color: var(--color-acento);
}

.btn-dark {
    border-color: var(--color-acento);
    color: var(--color-acento);
}

.btn-dark:hover {
    background: var(--color-acento);
    color: white;
}

@media (max-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* ==========================================================================
   3. ESTRUCTURA SCROLL SNAP (SECCIONES)
   ========================================================================== */
section,
.hero,
footer {
    scroll-snap-align: start;
    scroll-snap-stop: always;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 40px;
    padding-bottom: 40px;
    overflow-y: auto;
    scrollbar-width: none;
}

section::-webkit-scrollbar {
    display: none;
}

.seccion-oculta {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.seccion-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   4. EFECTO SOBRE 3D (PANTALLA INICIAL)
   ========================================================================== */
#sobre-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.8)), url('../assets/fondo_sobre.jpg') no-repeat center center;
    background-size: cover;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 1.2s ease, visibility 1.2s;
}

#sobre-wrapper.desvanecer {
    opacity: 0;
    visibility: hidden;
}

.sobre-container {
    position: relative;
    width: 85vw;
    max-width: 500px;
    aspect-ratio: 3 / 2;
    cursor: pointer;
    perspective: 1200px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.sobre-espalda {
    position: absolute;
    inset: 0;
    background-color: var(--color-papel-oscuro);
    border-radius: 4px;
    z-index: 1;
}

.tarjeta {
    position: absolute;
    bottom: 2%;
    left: 5%;
    width: 90%;
    height: 90%;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 1s ease-in-out;
    border-radius: 2px;
}

.tarjeta p {
    font-family: var(--fuente-titulo);
    font-size: 2.5rem;
    color: #4a4238;
}

.tarjeta span {
    font-family: var(--fuente-cuerpo);
    font-size: 1rem;
    letter-spacing: 3px;
    color: #8c7b65;
    margin-top: 10px;
}

.sobre-frente {
    position: absolute;
    inset: 0;
    background-color: var(--color-papel-medio);
    clip-path: polygon(0 0, 50% 45%, 100% 0, 100% 100%, 0 100%);
    border-radius: 4px;
    z-index: 3;
}

.solapa {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 60%;
    transform-origin: top;
    transition: transform 0.8s ease-in-out, z-index 0s 0.4s;
    z-index: 4;
    transform-style: preserve-3d;
}

.solapa-fondo {
    position: absolute;
    inset: 0;
    background-color: var(--color-papel-claro);
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    border-radius: 4px 4px 0 0;
}

.sello-lacre {
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 80px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: opacity 0.2s ease-out;
}

.sello-lacre img {
    width: 175%;
    height: 175%;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
}

.sobre-container.abierto .solapa {
    transform: rotateX(180deg);
    z-index: 1;
}

.sobre-container.abierto .tarjeta {
    transform: translateY(-30%);
}

.sobre-container.abierto .sello-lacre {
    opacity: 0;
}

.instruccion {
    margin-top: 30px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: palpitar 2s infinite;
}

@keyframes palpitar {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

@media (min-width: 768px) {
    .sello-lacre {
        width: 100px;
        height: 100px;
        bottom: -45px;
    }
}

/* ==========================================================================
   5. CONTROLES DE NAVEGACIÓN Y MÚSICA
   ========================================================================== */
.navegacion-puntos {
    position: fixed;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 100;
}

.punto-nav {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
    cursor: pointer;
}

.punto-nav.activo {
    background-color: var(--color-acento);
    transform: scale(1.4);
}

.music-controls {
    position: fixed;
    bottom: 20px;
    left: 20px; /* ¡Aquí lo tienes movido a la izquierda! */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 8px;
    z-index: 9998;
    
    /* Fondo súper transparente (solo un 15% de opacidad) */
    background: rgba(74, 66, 56, 0.15); 
    
    /* Blur un pelín más bajo para que no emborrone demasiado el fondo y se distinga */
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    
    /* He subido un micropunto el borde blanco para que no se pierda la forma de "píldora" */
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 40px;
    
    /* Sombra reducida para que encaje mejor con la nueva transparencia */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: opacity 1s ease, transform 1s ease;
}

.music-controls.oculto {
    opacity: 0;
    pointer-events: none;
    transform: translateY(30px);
}

.music-controls button {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #656565;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
    padding: 4px;
    transform: scale(0.85);
}

.music-controls button:hover {
    color: #ffffff;
    transform: scale(1);
    /* Crece al tamaño original al pasar el ratón */
}

#btn-play-pause {
    margin: 2px 0;
    color: #656565;
}

/* ==========================================================================
   6. SECCIONES: HERO, LUGAR, PROGRAMA Y MAPA
   ========================================================================== */
.hero {
    height: 100vh;
    padding: 0;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.7)), url('../assets/portada.jpg') no-repeat center center;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
}

.hero h2 {
    color: white;
}

.hero h1 {
    font-family: var(--fuente-titulo);
    font-size: 6rem;
    margin-bottom: 10px;
}

.hero p {
    letter-spacing: 3px;
    font-weight: 300;
}

.scroll-indicador {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.85);
    z-index: 10;
    animation: botarScroll 2s infinite ease-in-out;
}

.scroll-indicador p {
    font-size: 0.75rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin: 0;
}

@keyframes botarScroll {

    0%,
    100% {
        transform: translate(-50%, 0);
        opacity: 0.6;
    }

    50% {
        transform: translate(-50%, 12px);
        opacity: 1;
    }
}

.info-basica {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.7)), url('../assets/giralda.webp') no-repeat center center;
    background-size: cover;
    color: white;
}

.info-basica h2 {
    color: white;
}

.detalles-lugar p {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.tarjeta-info-bus {
    background: rgba(255, 255, 255, 0.85);
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: left;
    border-left: 4px solid var(--color-acento);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
}

.tarjeta-info-bus h3 {
    color: var(--color-acento);
    font-family: var(--fuente-titulo);
    font-size: 2.2rem;
    margin-top: 0;
    margin-bottom: 10px;
    line-height: 1.1;
}

.tarjeta-info-bus .icono-bus {
    font-style: normal;
    font-size: 1.8rem;
    margin-right: 5px;
}

.tarjeta-info-bus p {
    font-size: 0.95rem;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.4;
}

.tarjeta-info-bus p.mb-0 {
    margin-bottom: 0;
}

.mapa-contenedor {
    margin-top: 30px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 3rem;
    }

    .info-basica {
        height: auto !important;
        min-height: auto !important;
        scroll-snap-align: start !important;
        padding-top: 40px !important;
        padding-bottom: 40px !important;
    }

    .mapa-contenedor {
        position: relative;
    }

    .mapa-contenedor iframe {
        touch-action: pan-y;
    }

    .tarjeta-info-bus {
        padding: 12px 15px;
        margin: 15px 0;
    }

    .tarjeta-info-bus h3 {
        font-size: 1.8rem;
    }

    .tarjeta-info-bus p {
        font-size: 0.85rem;
    }
}

/* ==========================================================================
   7. TIMELINE (PROGRAMA) Y FAMILIA
   ========================================================================== */
.seccion-programa {
    padding: 40px 20px;
}

.seccion-programa h2 {
    font-size: 3rem;
    margin-bottom: 40px;
    text-align: center;
}

.timeline {
    position: relative;
    max-width: 400px;
    margin: 0 auto;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 10px;
    bottom: 10px;
    width: 2px;
    background-color: rgba(0, 0, 0, 0.15);
}

.timeline-item {
    position: relative;
    margin-bottom: 35px;
    text-align: left;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -30.5px;
    top: 6px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background-color: var(--color-acento);
    box-shadow: 0 0 0 5px var(--color-papel-claro, #fff);
}

.timeline-time {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #888;
    margin-bottom: 4px;
}

.timeline-content h3 {
    font-size: 1.6rem;
    color: #2c2825;
    margin: 0 0 5px 0;
    line-height: 1.1;
}

.timeline-content p {
    font-size: 0.95rem;
    color: #666;
    margin: 0;
    font-style: italic;
}

.historia {
    background-color: var(--color-papel-claro);
    padding-top: 80px;
    padding-bottom: 80px;
}

.texto-historia h2 {
    white-space: nowrap;
    font-size: clamp(1.5rem, 7vw, 3.5rem);
    display: flex;
    justify-content: center;
    width: 100%;
}

.foto-marco img {
    width: 100%;
    border-radius: 8px;
    filter: sepia(0.2) contrast(1.1);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   8. GALERÍA DE FOTOS Y LIGHTBOX
   ========================================================================== */
.galeria-novios {
    background: #e5ddd3;
    padding: 60px 0 100px 0;
    overflow: hidden;
}

.galeria-novios .container {
    width: 100%;
    max-width: 100vw;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.galeria-novios h2 {
    text-align: center;
    width: 100%;
    padding: 0 20px;
    margin-bottom: 20px;
}

.carrusel-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.carrusel-contenedor {
    width: 100%;
    display: flex;
    align-items: center;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 30px;
    padding: 20px 20px 40px 20px;
    scrollbar-width: none;
}

.carrusel-contenedor::-webkit-scrollbar {
    display: none;
}

.slide {
    flex: 0 0 75%;
    max-width: 320px;
    height: 45vh;
    max-height: 380px;
    background-color: white;
    padding: 12px 12px 60px 12px;
    border-radius: 2px;
    scroll-snap-align: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    transition: transform 0.4s ease;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 2px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.slide:nth-child(odd) {
    transform: rotate(-3deg);
}

.slide:nth-child(even) {
    transform: rotate(4deg);
}

.slide:hover {
    transform: rotate(0deg) scale(1.05);
    z-index: 10;
}

.btn-carrusel {
    display: none;
}

.hint-galeria {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 25px;
    color: #7a7571;
    opacity: 0.8;
}

.hint-galeria p {
    font-size: 0.9rem;
    font-style: italic;
    margin: 0;
}

@media (min-width: 768px) {
    .btn-carrusel {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 45px;
        height: 45px;
        border-radius: 50%;
        background: rgba(252, 250, 245, 0.85);
        border: 1px solid rgba(74, 66, 56, 0.1);
        color: var(--color-acento);
        cursor: pointer;
        z-index: 20;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        transition: all 0.3s ease;
        backdrop-filter: blur(5px);
    }

    .btn-carrusel:hover {
        background: white;
        transform: translateY(-50%) scale(1.1);
        color: #000;
    }

    .btn-prev {
        left: 10px;
    }

    .btn-next {
        right: 10px;
    }

    .carrusel-contenedor {
        padding-left: 50px;
        padding-right: 50px;
    }

    .galeria-novios {
        padding-bottom: 60px;
    }

    .slide {
        flex: 0 0 320px;
        height: 55vh;
        max-height: 450px;
    }
}

.foto-galeria {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.foto-galeria:hover {
    transform: scale(1.03);
}

.modal-lightbox {
    display: none;
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.modal-lightbox.mostrar {
    display: flex;
}

.modal-contenido {
    margin: auto;
    display: block;
    max-width: 85%;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
    animation-name: zoom;
    animation-duration: 0.4s;
}

.cerrar-modal {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 60px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    line-height: 1;
    z-index: 1000;
}

.cerrar-modal:hover {
    color: var(--color-acento, #fff);
    transform: scale(1.1);
}

/* --- FLECHAS DEL MODAL --- */
.modal-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    /* Botón semitransparente */
    color: white;
    border: none;
    font-size: 35px;
    padding: 15px 20px;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    border-radius: 8px;
    backdrop-filter: blur(5px);
}

.modal-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    color: var(--color-papel-claro);
    transform: translateY(-50%) scale(1.1);
}

.modal-prev {
    left: 25px;
}

.modal-next {
    right: 25px;
}

/* Ajustes de las flechas para móviles */
@media (max-width: 768px) {
    .modal-btn {
        padding: 10px 15px;
        font-size: 25px;
        /* En móvil las pegamos un poco más a los bordes */
    }

    .modal-prev {
        left: 10px;
    }

    .modal-next {
        right: 10px;
    }
}

@keyframes zoom {
    from {
        transform: scale(0.7);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .modal-contenido {
        max-width: 95%;
        max-height: 80vh;
    }

    .cerrar-modal {
        font-size: 50px;
        right: 20px;
        top: 10px;
    }
}

.compartir-fotos {
    background: #bcaf9e;
    padding: 60px 20px;
}

/* ==========================================================================
   9. RSVP Y CONTADOR
   ========================================================================== */
.seccion-rsvp {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px 0;
}

.seccion-rsvp .container {
    max-width: 600px;
    width: 90%;
    background: white;
    padding: 30px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    max-height: 85vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.seccion-rsvp .container::-webkit-scrollbar {
    width: 6px;
}

.seccion-rsvp .container::-webkit-scrollbar-track {
    background: transparent;
}

.seccion-rsvp .container::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.grupo-form {
    margin-bottom: 20px;
    text-align: left;
}

.grupo-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--color-acento);
}

.grupo-form input,
.grupo-form select,
.grupo-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    font-family: var(--fuente-cuerpo);
    font-size: 1rem;
}

.seccion-contador {
    padding: 80px 20px;
    background-color: var(--color-papel-claro, #f9f8f6);
    display: flex;
    justify-content: center;
}

.seccion-contador h2 {
    font-size: 2.5rem;
    margin-bottom: 40px;
}

.cuenta-atras {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.tiempo-bloque {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    padding: 20px 15px;
    min-width: 90px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tiempo-bloque .numero {
    font-family: var(--fuente-titulo);
    font-size: 2.8rem;
    color: var(--color-acento, #2c2825);
    line-height: 1;
    margin-bottom: 5px;
}

.tiempo-bloque .etiqueta {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #888;
}

@media (max-width: 768px) {
    .seccion-rsvp h2 {
        font-size: 1.6rem;
        white-space: nowrap;
        margin-bottom: 5px;
        letter-spacing: -0.5px;
    }

    .seccion-rsvp p {
        font-size: 0.85rem;
        margin-bottom: 15px;
    }

    .grupo-form {
        margin-bottom: 15px;
    }

    .grupo-form label {
        font-size: 0.85rem;
        margin-bottom: 4px;
    }

    .grupo-form input,
    .grupo-form select,
    .grupo-form textarea {
        padding: 8px 10px;
        font-size: 0.9rem;
    }

    .cuenta-atras {
        gap: 12px;
    }

    .tiempo-bloque {
        min-width: 70px;
        padding: 15px 10px;
    }

    .tiempo-bloque .numero {
        font-size: 2rem;
    }

    .tiempo-bloque .etiqueta {
        font-size: 0.65rem;
        letter-spacing: 1px;
    }
}

@media (max-width: 480px) {
    .cuenta-atras {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 15px;
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
    }

    .tiempo-bloque {
        min-width: 0;
        width: 100%;
        box-sizing: border-box;
    }
}

/* ==========================================================================
   10. FOOTER, CONTACTO Y LEGAL
   ========================================================================== */
.botones-contacto {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 25px;
}

.tarjeta-contacto {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: var(--color-acento, #2c2825);
    background: rgba(255, 255, 255, 0.4);
    padding: 12px 20px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    max-width: 300px;
}

.tarjeta-contacto:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
}

.icono-tel {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 50%;
    color: #555;
    transition: all 0.3s ease;
}

.tarjeta-contacto:hover .icono-tel {
    background: #2c2825;
    color: #fff;
}

.datos-tel {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.nombre-tel {
    font-weight: 600;
    font-size: 1.05rem;
    line-height: 1.2;
}

.num-tel {
    font-size: 0.85rem;
    color: #777;
    letter-spacing: 0.5px;
}

.footer-legal {
    position: absolute;
    bottom: 15px;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 0.75rem;
    color: #888;
}

.linea-separadora {
    width: 60px;
    height: 1px;
    background-color: rgba(0, 0, 0, 0.1);
    margin: 0 auto 20px auto;
}

.enlace-autor {
    color: #555;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s ease;
}

.enlace-autor:hover {
    color: #0077b5;
}

.svg-linkedin {
    margin-top: -2px;
}

.corazon {
    color: #e25555;
    display: inline-block;
    animation: latido 1.5s infinite;
}

.copyright-texto {
    margin-top: 5px;
    opacity: 0.7;
}

footer.contacto {
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-snap-align: start;
    padding: 0 20px;
    box-sizing: border-box;
}

footer.contacto .container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 50px;
    width: 100%;
    max-width: 1000px;
}

footer.contacto img {
    max-height: 75vh;
    width: auto;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

footer.contacto h2 {
    color: #333;
}

/* ============================================================
   FIX DEFINITIVO FOOTER MÓVIL (Tu idea: Flujo natural sin anclas)
   ============================================================ */
@media (max-width: 768px) {

    /* 1. Quitamos los límites de la pantalla. Que la caja mida lo que tenga que medir. */
    footer.contacto {
        height: auto !important;
        min-height: auto !important;
        /* Fuera el 100vh */
        max-height: none !important;
        overflow: visible !important;
        display: flex !important;
        flex-direction: column !important;
        padding: 60px 20px 40px 20px !important;
    }

    /* 2. Columna normal para que los elementos caigan uno debajo del otro */
    footer.contacto .container.grid-2 {
        display: flex !important;
        flex-direction: column !important;
        gap: 30px !important;
        width: 100%;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* 3. La foto libre: se ajusta al ancho del móvil y calcula su alto sola */
    footer.contacto .foto-marco {
        width: 100%;
        margin: 0 !important;
    }

    footer.contacto img {
        width: 70% !important;
        height: auto !important;
        max-height: none !important;
        object-fit: contain !important;
        display: block !important;
        margin: 0 auto !important;
    }


    /* 4. ¡Tu solución! Copyright como un elemento normal al final del todo */
    .footer-legal {
        position: static !important;
        /* Vuelve al flujo normal, sin estar anclado a nada */
        margin-top: 40px !important;
        /* Espacio con la foto de arriba */
        padding-bottom: 20px !important;
        /* Un poco de aire por abajo del todo */
        width: 100% !important;
        display: block !important;
    }

    /* 5. Mantenemos el título en una sola línea */
    .telefonos h2 {
        white-space: nowrap !important;
        /* Subimos el valor mínimo y el ideal (7.5vw) para que sea más grande */
        font-size: clamp(1.5rem, 7.5vw, 3rem) !important;
        margin-bottom: 15px;
        text-align: center;
        width: 100%;
        overflow: hidden;
    }

}