.footer {
    scroll-margin-top: 6rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4rem;
    padding: 6rem 1.5rem 4rem 1.5rem;
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-tertiary) 100%);
    border-top: 0.25rem solid var(--color-primary);
    position: relative;
    transition: var(--transition-normal);
}

body.dark .footer {
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-tertiary) 100%);
    border-top-color: var(--color-secondary);
    box-shadow: inset 0 0.25rem 1.25rem rgba(56, 189, 248, 0.1);
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 0.25rem;
    background: linear-gradient(90deg, 
        var(--color-primary) 0%, 
        var(--color-secondary) 50%, 
        var(--color-accent) 100%);
}

.footer h4 {
    margin: 0 0 2rem 0;
    font-family: var(--font-display);
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-bold);
    text-align: center;
    color: var(--text-primary);
    position: relative;
    letter-spacing: -0.0625rem;
}

.footer h4::before {
    content: '📍';
    display: block;
    margin-bottom: 1rem;
    font-size: var(--font-size-3xl);
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-0.625rem);
    }
}

.footer h4::after {
    content: '';
    position: absolute;
    bottom: -0.75rem;
    left: 50%;
    transform: translateX(-50%);
    width: 5rem;
    height: 0.25rem;
    background: var(--color-accent);
    border-radius: var(--radius-full);
}

body.dark .footer h4::after {
    box-shadow: var(--glow-accent);
}

.footer iframe {
    width: 100%;
    max-width: 65rem;
    height: 25rem;
    border: 0.1875rem solid var(--border-medium);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    transition: var(--transition-normal);
}

body.dark .footer iframe {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-xl), var(--glow-primary);
}

.footer iframe:hover {
    transform: translateY(-0.5rem);
    box-shadow: var(--shadow-xl), 0 1.25rem 3.125rem rgba(14, 165, 233, 0.15);
    border-color: var(--color-primary);
}

body.dark .footer iframe:hover {
    box-shadow: var(--shadow-xl), var(--glow-primary), 0 1.25rem 3.125rem rgba(56, 189, 248, 0.2);
}

.footer > ul:first-of-type {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1.5rem;
    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: 4rem;
    height: 4rem;
    background: var(--surface-primary);
    color: var(--text-primary);
    border: 0.1875rem solid var(--border-medium);
    border-radius: var(--radius-xl);
    font-size: var(--font-size-2xl);
    text-decoration: none;
    transition: var(--transition-normal);
    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: -50%;
    background: conic-gradient(from 0deg, var(--color-primary), var(--color-secondary), var(--color-accent), var(--color-primary));
    opacity: 0;
    transition: opacity 0.5s ease;
    animation: spin 3s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.footer > ul:first-of-type a i {
    position: relative;
    z-index: 1;
    transition: var(--transition-normal);
}

.footer > ul:first-of-type a:hover {
    transform: translateY(-0.5rem) scale(1.05);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.footer > ul:first-of-type a:hover::before {
    opacity: 1;
}

.footer > ul:first-of-type a:hover i {
    color: var(--text-inverse);
    transform: scale(1.15);
}

body.dark .footer > ul:first-of-type a:hover {
    box-shadow: var(--shadow-lg), var(--glow-primary);
}

.footer > ul:first-of-type a:active {
    transform: translateY(-0.25rem) scale(1.02);
}

.footer-a-Direccion {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 0;
    padding: 1.75rem 2.5rem;
    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-lg);
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
    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-3xl);
    flex-shrink: 0;
}

.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 {
    box-shadow: var(--shadow-lg), var(--glow-accent);
}

.footer > a[href^="tel"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 0;
    padding: 1.75rem 3.5rem;
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-semibold);
    color: var(--text-inverse);
    text-decoration: none;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-lg);
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

body.dark .footer > a[href^="tel"] {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    box-shadow: var(--shadow-lg), var(--glow-primary);
}

.footer > a[href^="tel"]::before {
    content: '📞';
    font-size: var(--font-size-3xl);
    animation: ring 3s ease-in-out infinite;
}

@keyframes ring {
    0%, 100% {
        transform: rotate(0deg);
    }
    5%, 15% {
        transform: rotate(-20deg);
    }
    10%, 20% {
        transform: rotate(20deg);
    }
    25% {
        transform: rotate(0deg);
    }
}

.footer > a[href^="tel"]::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-primary) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.footer > a[href^="tel"]:hover {
    transform: translateY(-0.5rem) scale(1.05);
    box-shadow: var(--shadow-xl), 0 1.25rem 2.5rem rgba(14, 165, 233, 0.3);
}

body.dark .footer > a[href^="tel"]:hover {
    box-shadow: var(--shadow-xl), var(--glow-primary), 0 1.25rem 2.5rem rgba(56, 189, 248, 0.4);
}

.footer > a[href^="tel"]:active {
    transform: translateY(-0.25rem) scale(1.02);
}

.footer h3 {
    margin: 2rem 0 2.5rem 0;
    font-family: var(--font-display);
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-bold);
    text-align: center;
    color: var(--text-primary);
    position: relative;
    letter-spacing: -0.0625rem;
}

.footer h3::before {
    content: '🕐';
    display: block;
    margin-bottom: 1rem;
    font-size: var(--font-size-3xl);
}

.footer h3::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 5rem;
    height: 0.25rem;
    background: var(--color-secondary);
    border-radius: var(--radius-full);
}

body.dark .footer h3::after {
    box-shadow: var(--glow-secondary);
}

.footer-ul-horario {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
    max-width: 40rem;
}

.footer-ul-horario li {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.75rem 2rem;
    background: var(--surface-primary);
    border: 0.125rem solid var(--border-medium);
    border-left: 0.5rem solid var(--color-accent);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
}

body.dark .footer-ul-horario li {
    background: var(--surface-secondary);
    border-color: var(--border-strong);
    border-left-color: var(--color-accent);
}

body.dark .footer-ul-horario li {
    box-shadow: var(--shadow-sm), inset 0.5rem 0 0.625rem rgba(74, 222, 128, 0.1);
}

.footer-ul-horario li:hover {
    transform: translateX(0.75rem);
    box-shadow: var(--shadow-md);
    border-left-width: 0.75rem;
}

body.dark .footer-ul-horario li:hover {
    box-shadow: var(--shadow-md), var(--glow-accent);
}

.footer-ul-horario strong {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
}

.footer-ul-horario li {
    font-size: var(--font-size-base);
    color: var(--text-secondary);
}

.footer > p {
    margin: 3rem 0 0 0;
    padding: 2.5rem 0 0 0;
    width: 100%;
    text-align: center;
    font-size: var(--font-size-sm);
    color: var(--text-tertiary);
    border-top: 0.125rem solid var(--border-medium);
}

body.dark .footer > p {
    border-top-color: var(--border-strong);
}

@media (min-width: 48rem) {
    .footer {
        padding: 7rem 2.5rem 4.5rem 2.5rem;
        gap: 4.5rem;
    }

    .footer h4 {
        font-size: 3rem;
    }

    .footer iframe {
        height: 28.125rem;
    }

    .footer > ul:first-of-type {
        gap: 2rem;
    }

    .footer > ul:first-of-type a {
        width: 4.5rem;
        height: 4.5rem;
    }

    .footer-a-Direccion {
        font-size: var(--font-size-xl);
        padding: 2rem 3rem;
        max-width: 80%;
    }

    .footer > a[href^="tel"] {
        font-size: var(--font-size-3xl);
        padding: 2rem 4rem;
    }

    .footer h3 {
        font-size: 3rem;
    }

    .footer-ul-horario {
        max-width: 45rem;
    }

    .footer-ul-horario li {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 2rem 2.5rem;
    }

    .footer-ul-horario strong {
        font-size: var(--font-size-2xl);
    }

    .footer-ul-horario li {
        font-size: var(--font-size-lg);
    }
}


@media (min-width: 64rem) {
    .footer {
        padding: 8rem 4rem 5rem 4rem;
        gap: 5rem;
    }

    .footer h4 {
        font-size: 3.5rem;
    }

    .footer iframe {
        height: 31.25rem;
    }

    .footer > ul:first-of-type {
        gap: 2.5rem;
    }

    .footer > ul:first-of-type a {
        width: 5rem;
        height: 5rem;
    }

    .footer-a-Direccion {
        font-size: var(--font-size-2xl);
        padding: 2.25rem 3.5rem;
    }

    .footer > a[href^="tel"] {
        font-size: var(--font-size-4xl);
        padding: 2.25rem 4.5rem;
    }

    .footer h3 {
        font-size: 3.5rem;
    }

    .footer-ul-horario {
        max-width: 50rem;
        gap: 1.5rem;
    }

    .footer-ul-horario li {
        padding: 2.25rem 3rem;
    }

    .footer > p {
        font-size: var(--font-size-base);
    }
}

@media (min-width: 90rem) {
    .footer {
        padding: 10rem 6rem 6rem 6rem;
        max-width: 120rem;
        margin: 0 auto;
        gap: 6rem;
    }

    .footer h4 {
        font-size: 4rem;
    }

    .footer iframe {
        height: 34.375rem;
    }

    .footer-ul-horario {
        max-width: 55rem;
    }

    .footer-a-Direccion {
        font-size: var(--font-size-3xl);
    }

    .footer > a[href^="tel"] {
        padding: 2.5rem 5rem;
    }
}