.footer {
    scroll-margin-top: 4.5rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    padding: 5rem 1.5rem 3rem 1.5rem;
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--surface-primary) 100%);
    border-top: 0.125rem solid var(--border-medium);
    position: relative;
    transition: var(--transition-normal);
}

body.dark .footer {
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--surface-secondary) 100%);
    border-top-color: var(--border-strong);
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 0.375rem;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary), var(--color-accent));
    background-size: 200% 100%;
    animation: waveMove 3s linear infinite;
}

@keyframes waveMove {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 200% 50%;
    }
}

.footer h4 {
    margin: 0 0 1.5rem 0;
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-bold);
    text-align: center;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    letter-spacing: -0.0625rem;
}

.footer h4::after {
    content: '📍';
    position: absolute;
    right: -2rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: var(--font-size-2xl);
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(-50%);
    }
    50% {
        transform: translateY(-70%);
    }
}

.footer iframe {
    width: 100%;
    max-width: 60rem;
    height: 22.5rem;
    border: 0.125rem solid var(--border-medium);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    justify-self: center;
}

body.dark .footer iframe {
    border-color: var(--border-strong);
}

.footer iframe:hover {
    transform: translateY(-0.625rem) scale(1.01);
    box-shadow: var(--shadow-xl), 0 0 3.125rem rgba(99, 102, 241, 0.3);
    border-color: var(--color-primary);
}

body.dark .footer iframe:hover {
    box-shadow: var(--shadow-xl), 0 0 3.125rem rgba(129, 140, 248, 0.4);
}

.footer > ul:first-of-type {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1.25rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer > ul:first-of-type li {
    margin: 0;
}

.footer > ul:first-of-type a {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.75rem;
    height: 3.75rem;
    background: var(--surface-primary);
    color: var(--text-primary);
    border: 0.125rem solid var(--border-medium);
    border-radius: var(--radius-lg);
    font-size: var(--font-size-2xl);
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

body.dark .footer > ul:first-of-type a {
    background: var(--surface-secondary);
    border-color: var(--border-strong);
}

.footer > ul:first-of-type a::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.footer > ul:first-of-type a i {
    position: relative;
    z-index: 1;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer > ul:first-of-type a:hover {
    transform: translateY(-0.625rem) rotate(5deg);
    box-shadow: var(--shadow-xl), 0 0 1.875rem rgba(99, 102, 241, 0.4);
    border-color: transparent;
}

.footer > ul:first-of-type a:hover::before {
    opacity: 1;
}

.footer > ul:first-of-type a:hover i {
    transform: scale(1.2);
    color: var(--text-inverse);
}

.footer > ul:first-of-type a:active {
    transform: translateY(-0.375rem) rotate(0deg) scale(0.95);
}

.footer > ul:first-of-type a[aria-label="Facebook"]:hover::before {
    background: linear-gradient(135deg, #1877f2, #0c63d4);
}

.footer > ul:first-of-type a[aria-label="Instagram"]:hover::before {
    background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.footer > ul:first-of-type a[aria-label="X/Twitter"]:hover::before {
    background: linear-gradient(135deg, #000000, #333333);
}

.footer > ul:first-of-type a[aria-label="Tik Tok"]:hover::before {
    background: linear-gradient(135deg, #000000, #fe2c55);
}

.footer-a-Direccion {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin: 0;
    padding: 1.5rem 2rem;
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-medium);
    color: var(--text-primary);
    text-decoration: none;
    text-align: center;
    background: var(--surface-primary);
    border: 0.125rem solid var(--border-medium);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    justify-self: center;
    max-width: 90%;
}

body.dark .footer-a-Direccion {
    background: var(--surface-secondary);
    border-color: var(--border-strong);
}

.footer-a-Direccion::before {
    content: '🏠';
    font-size: var(--font-size-2xl);
}

.footer-a-Direccion:hover {
    transform: translateY(-0.375rem);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-accent);
    color: var(--color-accent);
}

body.dark .footer-a-Direccion:hover {
    color: var(--color-accent-light);
}

.footer > a[href^="tel"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin: 0;
    padding: 1.5rem 3rem;
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
    color: var(--text-inverse);
    text-decoration: none;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    background-size: 200% 100%;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-lg);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    justify-self: center;
}

.footer > a[href^="tel"]::before {
    content: '📞';
    font-size: var(--font-size-2xl);
    animation: ring 2s ease-in-out infinite;
}

@keyframes ring {
    0%, 100% {
        transform: rotate(0deg);
    }
    10%, 30% {
        transform: rotate(-15deg);
    }
    20%, 40% {
        transform: rotate(15deg);
    }
    50% {
        transform: rotate(0deg);
    }
}

.footer > a[href^="tel"]:hover {
    transform: translateY(-0.5rem) scale(1.05);
    box-shadow: var(--shadow-xl), 0 0 2.5rem rgba(99, 102, 241, 0.5);
    background-position: 100% 0;
}

.footer > a[href^="tel"]:active {
    transform: translateY(-0.25rem) scale(1.02);
}

.footer h3 {
    margin: 2rem 0 2rem 0;
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-bold);
    text-align: center;
    background: linear-gradient(135deg, var(--color-secondary), var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    letter-spacing: -0.0625rem;
}

.footer h3::before {
    content: '🕐';
    position: absolute;
    left: 50%;
    top: -2.5rem;
    transform: translateX(-50%);
    font-size: var(--font-size-3xl);
}

.footer-ul-horario {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    max-width: 35rem;
    justify-self: center;
}

.footer-ul-horario li {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.5rem 2rem;
    background: var(--surface-primary);
    border: 0.125rem solid var(--border-medium);
    border-left: 0.375rem solid var(--color-accent);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

body.dark .footer-ul-horario li {
    background: var(--surface-secondary);
    border-color: var(--border-strong);
    border-left-color: var(--color-accent-light);
}

.footer-ul-horario li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-ul-horario li:hover {
    transform: translateX(1rem);
    box-shadow: var(--shadow-lg);
    border-left-width: 0.5rem;
}

.footer-ul-horario li:hover::before {
    width: 0.5rem;
}

.footer-ul-horario strong {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    position: relative;
    z-index: 1;
}

.footer-ul-horario li {
    font-size: var(--font-size-base);
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
}

.footer > p {
    margin: 3rem 0 0 0;
    padding: 2rem 0 0 0;
    width: 100%;
    text-align: center;
    font-size: var(--font-size-sm);
    color: var(--text-tertiary);
    border-top: 0.0625rem solid var(--border-medium);
    grid-column: 1 / -1;
}

body.dark .footer > p {
    border-top-color: var(--border-strong);
}

@media (min-width: 48rem) {
    .footer {
        padding: 6rem 2.5rem 3.5rem 2.5rem;
        gap: 3.5rem;
    }

    .footer h4 {
        font-size: var(--font-size-4xl);
    }

    .footer iframe {
        height: 25rem;
    }

    .footer > ul:first-of-type {
        gap: 1.5rem;
    }

    .footer > ul:first-of-type a {
        width: 4rem;
        height: 4rem;
    }

    .footer-a-Direccion {
        font-size: var(--font-size-xl);
        padding: 1.75rem 2.5rem;
        max-width: 80%;
    }

    .footer > a[href^="tel"] {
        font-size: var(--font-size-2xl);
        padding: 1.75rem 3.5rem;
    }

    .footer h3 {
        font-size: var(--font-size-4xl);
    }

    .footer-ul-horario {
        max-width: 40rem;
        gap: 1.25rem;
    }

    .footer-ul-horario li {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .footer-ul-horario strong {
        font-size: var(--font-size-xl);
    }

    .footer-ul-horario li {
        font-size: var(--font-size-lg);
    }
}

@media (min-width: 64rem) {
    .footer {
        padding: 7rem 4rem 4rem 4rem;
        gap: 4rem;
        grid-template-columns: repeat(2, 1fr);
    }

    .footer h4 {
        grid-column: 1 / -1;
    }

    .footer iframe {
        grid-column: 1 / -1;
        height: 28.125rem;
    }

    .footer > ul:first-of-type {
        grid-column: 1 / -1;
        gap: 2rem;
    }

    .footer > ul:first-of-type a {
        width: 4.5rem;
        height: 4.5rem;
    }

    .footer-a-Direccion {
        grid-column: 1 / -1;
    }

    .footer > a[href^="tel"] {
        grid-column: 1 / -1;
    }

    .footer h3 {
        grid-column: 1 / -1;
    }

    .footer-ul-horario {
        grid-column: 1 / -1;
        max-width: 50rem;
    }

    .footer-ul-horario li {
        padding: 2rem 2.5rem;
    }

    .footer > p {
        font-size: var(--font-size-base);
    }
}

@media (min-width: 90rem) {
    .footer {
        padding: 8rem 6rem 5rem 6rem;
        max-width: 120rem;
        margin: 0 auto;
        gap: 5rem;
    }

    .footer iframe {
        height: 31.25rem;
    }

    .footer-ul-horario {
        max-width: 55rem;
    }

    .footer-a-Direccion {
        font-size: var(--font-size-2xl);
    }

    .footer > a[href^="tel"] {
        font-size: var(--font-size-3xl);
        padding: 2rem 4rem;
    }
}