/* ── Footer Premium ───────────────────────────────── */
.main-footer {
    background-color: #1a1a1a;
    color: #f5f5f7;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    margin-top: 60px;
}

/* ── CTA Banner: Únete ─────────────────────────── */
.footer-cta-banner {
    display: block;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: #fff;
    background: linear-gradient(135deg, #0d3b1e 0%, #145a2e 35%, #1b7a3e 65%, #23944b 100%);
    padding: 0;
    border-bottom: 1px solid rgba(106, 191, 105, .15);
    cursor: pointer;
    transition: filter .3s;
}

.footer-cta-banner:hover {
    filter: brightness(1.08);
}

/* Glow de fondo */
.cta-bg-glow {
    position: absolute;
    top: -40%;
    right: -10%;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(106, 191, 105, .18) 0%, transparent 70%);
    pointer-events: none;
}

/* Layout contenido */
.cta-content {
    position: relative;
    z-index: 2;
    max-width: 1340px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 40px 40px 0;
    gap: 20px;
}

.cta-text {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 0;
    padding-bottom: 40px;
}

.cta-label {
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, .55);
}

.cta-headline {
    font-size: clamp(1.6rem, 4vw, 2.6rem);
    font-weight: 800;
    line-height: 1.15;
    background: linear-gradient(90deg, #ffffff, #a8e6a1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cta-sub {
    font-size: .95rem;
    color: rgba(255, 255, 255, .72);
    line-height: 1.5;
    max-width: 380px;
    margin-top: 4px;
}

/* Botón con shimmer */
.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    padding: 13px 30px;
    border-radius: 50px;
    background: linear-gradient(135deg, #f0a500, #f5c518);
    color: #ebebeb;
    font-family: inherit;
    font-size: .92rem;
    font-weight: 800;
    letter-spacing: .3px;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    transition: transform .2s, box-shadow .2s;
    box-shadow: 0 4px 20px rgba(240, 165, 0, .35);
    width: fit-content;
}

.footer-cta-banner:hover .cta-btn {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 30px rgba(240, 165, 0, .5);
}

/* Shimmer */
.cta-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent);
    animation: ctaShimmer 3s ease-in-out infinite;
    will-change: transform;
}

/* Antes animaba `left` (layout); ahora usa transform (composited, H-24).
   Recorrido: de left:-100% a left:120% del botón = 220% del ancho del
   botón; el pseudo mide 60% → 220/60 ≈ 366.7% de su propio ancho. */
@keyframes ctaShimmer {

    0%,
    100% {
        transform: translate3d(0, 0, 0);
    }

    50% {
        transform: translate3d(366.7%, 0, 0);
    }
}

/* Imagen */
.cta-img-wrap {
    flex-shrink: 0;
    width: 320px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.cta-img {
    width: 100%;
    height: auto;
    max-height: 280px;
    object-fit: contain;
    filter: drop-shadow(0 8px 30px rgba(0, 0, 0, .4));
    transition: transform .3s;
}

.footer-cta-banner:hover .cta-img {
    transform: scale(1.04) translateY(-4px);
}

/* Hojas flotantes decorativas */
.cta-leaf {
    position: absolute;
    color: rgba(106, 191, 105, .12);
    pointer-events: none;
    z-index: 1;
}

.cta-leaf--1 {
    font-size: 3.5rem;
    top: 15%;
    left: 55%;
    animation: leafFloat 6s ease-in-out infinite;
}

.cta-leaf--2 {
    font-size: 2rem;
    bottom: 18%;
    left: 40%;
    animation: leafFloat 8s ease-in-out infinite reverse;
}

.cta-leaf--3 {
    font-size: 2.8rem;
    top: 60%;
    right: 35%;
    animation: leafFloat 7s ease-in-out 1s infinite;
    transform: rotate(45deg);
}

@keyframes leafFloat {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-12px) rotate(8deg);
    }
}

/* Responsive CTA */
@media (max-width: 700px) {
    .cta-content {
        flex-direction: column-reverse;
        padding: 0 24px;
        text-align: center;
        align-items: center;
    }

    .cta-text {
        align-items: center;
        padding-bottom: 32px;
    }

    .cta-sub {
        max-width: 100%;
    }

    .cta-img-wrap {
        width: 220px;
        padding-top: 24px;
    }

    .cta-btn {
        align-self: center;
    }

    .cta-label {
        letter-spacing: 2px;
    }
}

/* Contenido principal en columnas */
.footer-inner {
    max-width: 1340px;
    margin: 0 auto;
    padding: 52px 28px 40px;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.6fr;
    gap: 32px;
}

/* Columna marca */
.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .95rem;
    font-weight: 600;
    color: #f5f5f7;
    letter-spacing: -.1px;
}

.footer-logo-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    filter: brightness(0) invert(1) opacity(0.9);
}

.footer-tagline {
    font-size: .82rem;
    color: #86868b;
    line-height: 1.5;
    max-width: 220px;
}

/* Columnas de links */
.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col-title {
    font-size: .7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #86868b;
    margin-bottom: 4px;
}

.footer-links a {
    font-size: .85rem;
    color: #d1d1d6;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: color .2s;
}

.footer-links a:hover {
    color: #6abf69;
}

.footer-links a i {
    font-size: .8rem;
}

.footer-location {
    font-size: .85rem;
    color: #d1d1d6;
    line-height: 1.7;
    display: flex;
    gap: 7px;
}

.footer-location i {
    color: #6abf69;
    margin-top: 4px;
    flex-shrink: 0;
}

.footer-info-text {
    font-size: .85rem;
    color: #d1d1d6;
    line-height: 1.6;
    display: flex;
    gap: 7px;
    margin-top: 4px;
}

/* ── Mini mapa ── */
.footer-mini-mapa {
    position: relative;
    width: 100%;
    height: 250px;
    /* altura cómoda para el footer */
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #2e2e2e;
    margin-top: 2px;
    flex-shrink: 0;
    box-shadow: 0 4px 18px rgba(0, 0, 0, .35);
    /* placeholder mientras el iframe se carga de forma diferida */
    background: linear-gradient(135deg, #0a2e0e, #1a4a1f);
}

/* Botón flotante "Ver mapa completo" sobre el mapa */
.footer-mapa-link {
    position: absolute !important;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;

    /* override footer-links a */
    display: inline-flex !important;
    align-items: center;
    gap: 5px;
    padding: 5px 13px;
    border-radius: 20px;
    background: rgba(27, 67, 50, 0.92) !important;
    backdrop-filter: blur(6px);
    color: #fff !important;
    font-size: .68rem !important;
    font-weight: 500;
    white-space: nowrap;
    text-decoration: none !important;
    border: 1px solid rgba(82, 183, 136, 0.35);
    transition: background .2s, opacity .2s !important;
    letter-spacing: .02em;
}

.footer-mapa-link:hover {
    background: rgba(45, 106, 79, 0.97) !important;
    color: #fff !important;
    opacity: 1 !important;
}

.footer-mapa-link i {
    font-size: .62rem !important;
}

/* Barra inferior */
.footer-bottom {
    border-top: 1px solid #2a2a2a;
    padding: 16px 28px;
    max-width: 1340px;
    margin: 0 auto;
}

.footer-bottom p {
    font-size: .75rem;
    color: #636366;
    text-align: center;
}

/* Responsive */
@media (max-width: 840px) {
    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .footer-inner {
        grid-template-columns: 1fr;
        padding: 36px 20px 28px;
    }

    .footer-mini-mapa {
        height: 200px;
        /* más alto en móvil porque hay espacio */
    }
}

/* ── Accesibilidad: sin animaciones si el usuario lo pide ── */
@media (prefers-reduced-motion: reduce) {

    .cta-btn::after,
    .cta-leaf,
    .footer-cta-banner,
    .cta-img,
    .cta-btn,
    .footer-links a,
    .footer-mapa-link {
        animation: none !important;
        transition: none !important;
    }
}