/* =========================================================
   FOOTER — CHIAVE DEL MARE
   ========================================================= */

.cdm-footer {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    color: #fff;
    background-image: var(--cdm-footer-bg);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.cdm-footer-overlay {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(110deg, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.66) 48%, rgba(0, 0, 0, 0.76) 100%),
        linear-gradient(to top, rgba(0, 0, 0, 0.38), transparent 58%);
}

.cdm-footer-container {
    width: min(92%, 1380px);
    margin: 0 auto;
    padding: 78px 0 24px;
}

.cdm-footer-grid {
    display: grid;
    grid-template-columns: minmax(190px, 0.8fr) minmax(250px, 1fr) minmax(340px, 1.25fr);
    align-items: center;
    gap: clamp(38px, 5vw, 86px);
}

.cdm-footer-brand {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
}

.cdm-footer-brand .custom-logo-link {
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

.cdm-footer-brand .custom-logo {
    width: min(250px, 100%) !important;
    height: auto !important;
    max-height: 180px;
    object-fit: contain;
    filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.28));
}

.cdm-footer-site-name {
    color: #fff;
    font-size: clamp(1.7rem, 3vw, 2.7rem);
    font-weight: 800;
    text-decoration: none;
}

.cdm-footer-eyebrow {
    margin: 0 0 14px;
    color: #9eefff;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.cdm-footer-info h2 {
    margin: 0 0 22px;
    color: #fff;
    font-size: clamp(1.45rem, 2.2vw, 2rem);
    line-height: 1.15;
}

.cdm-footer-info address {
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    font-style: normal;
}

.cdm-footer-info address p {
    margin: 0 0 11px;
    line-height: 1.65;
}

.cdm-footer-info address span {
    color: rgba(255, 255, 255, 0.62);
    font-weight: 600;
}

.cdm-footer-info a,
.cdm-footer-legal a,
.cdm-footer-powered a {
    color: #fff;
    text-decoration: none;
    transition: color 180ms ease, opacity 180ms ease;
}

.cdm-footer-info a:hover,
.cdm-footer-info a:focus-visible,
.cdm-footer-legal a:hover,
.cdm-footer-legal a:focus-visible,
.cdm-footer-powered a:hover,
.cdm-footer-powered a:focus-visible {
    color: #9eefff;
}

.cdm-footer-map-frame {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 22px 55px rgba(0, 0, 0, 0.25);
}

.cdm-footer-map-frame iframe {
    display: block;
    width: 100%;
    height: 260px;
    border: 0;
    filter: saturate(0.85) contrast(1.04);
}

.cdm-footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 58px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.88rem;
}

.cdm-footer-legal {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.cdm-footer-powered {
    margin: 0;
    white-space: nowrap;
}

.cdm-footer-powered a {
    font-weight: 700;
}

@media (max-width: 980px) {
    .cdm-footer-container {
        padding-top: 64px;
    }

    .cdm-footer-grid {
        grid-template-columns: 0.8fr 1.2fr;
        align-items: start;
    }

    .cdm-footer-map {
        grid-column: 1 / -1;
    }

    .cdm-footer-map-frame iframe {
        height: 300px;
    }
}

@media (max-width: 680px) {
    .cdm-footer-container {
        width: min(90%, 560px);
        padding: 54px 0 22px;
    }

    .cdm-footer-grid {
        grid-template-columns: 1fr;
        gap: 38px;
        text-align: center;
    }

    .cdm-footer-brand {
        justify-content: center;
    }

    .cdm-footer-brand .custom-logo {
        width: min(220px, 76vw) !important;
        max-height: 145px;
    }

    .cdm-footer-map {
        grid-column: auto;
        text-align: left;
    }

    .cdm-footer-map .cdm-footer-eyebrow {
        text-align: center;
    }

    .cdm-footer-map-frame {
        border-radius: 18px;
    }

    .cdm-footer-map-frame iframe {
        height: 250px;
    }

    .cdm-footer-bottom {
        flex-direction: column;
        justify-content: center;
        margin-top: 42px;
        text-align: center;
    }

    .cdm-footer-legal {
        justify-content: center;
    }
}
