/* =========================================================
   SEZIONI GENERALI
   ========================================================= */

.cdm-section {
    position: relative;
    width: 100%;
    min-height: 82vh;
    margin: 0;
    padding: 150px 20px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cdm-section-video {
    background: #042f3f;
}

.cdm-section-video-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center center;
}

.cdm-section-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: rgba(0, 25, 40, 0.12);
    pointer-events: none;
}

.cdm-section-container {
    position: relative;
    z-index: 3;
    width: min(92%, 1180px);
    margin: 0 auto;
    color: #ffffff;
    text-align: center;
}

.cdm-section-title {
    max-width: 1050px;
    margin: 0 auto 22px;
    color: #102033;
    font-size: clamp(42px, 5.5vw, 76px);
    line-height: 1.02;
    text-shadow: 0 6px 24px rgba(255, 255, 255, 0.08);
}

.cdm-section-text {
    max-width: 850px;
    margin: 0 auto;
    color: #ffffff;
    font-size: clamp(18px, 1.6vw, 22px);
    line-height: 1.7;
    text-shadow: 0 3px 14px rgba(0, 0, 0, 0.4);
}

/* =========================================================
   PANORAMICA
   ========================================================= */

.cdm-panorama-section {
    min-height: 84vh;
}

.cdm-panorama-section .cdm-section-video-bg {
    object-position: center center;
}

/* =========================================================
   SEZIONE DIVING
   ========================================================= */

.cdm-diving-section {
    min-height: 92vh;
}

.cdm-diving-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
    align-items: center;
    gap: 70px;
    text-align: left;
}

.cdm-diving-copy {
    max-width: 680px;
}

.cdm-diving-copy .cdm-section-title {
    margin: 0 0 24px;
    text-align: left;
}

.cdm-diving-copy .cdm-section-text {
    margin: 0 0 34px;
    text-align: left;
}

/* =========================================================
   TARTARUGA INTERATTIVA
   Reset completo dello stile button di Astra/browser.
   Lo zoom viene applicato al pulsante, non all'immagine,
   così non entra in conflitto con l'animazione di galleggiamento.
   ========================================================= */

.cdm-turtle-btn,
button.cdm-turtle-btn {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    width: auto;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 0 !important;

    border: 0 !important;
    border-radius: 0 !important;
    outline: 0 !important;

    color: inherit !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;

    font: inherit;
    line-height: normal;
    text-align: center;
    text-transform: none;

    appearance: none;
    -webkit-appearance: none;

    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;

    transform: scale(1);
    transform-origin: center center;
    transition: transform 0.22s ease;
}

.cdm-turtle-btn:hover,
.cdm-turtle-btn:focus,
.cdm-turtle-btn:focus-visible,
.cdm-turtle-btn:active {
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
}

.cdm-turtle-btn:hover,
.cdm-turtle-btn:focus-visible {
    transform: scale(1.035);
}

.cdm-turtle-btn:active {
    transform: scale(1.07);
}

.cdm-turtle-btn::-moz-focus-inner {
    padding: 0;
    border: 0;
}

.cdm-turtle-img {
    display: block;
    width: min(100%, 470px);
    height: auto;
    filter: drop-shadow(0 24px 42px rgba(0, 0, 0, 0.4));
    animation: cdmTurtleFloat 3.6s ease-in-out infinite;
    will-change: transform;
    pointer-events: none;
}

.cdm-turtle-label {
    margin-top: 12px;
    color: #ffffff;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 1.3px;
    text-transform: uppercase;
    text-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
    transition:
        color 0.25s ease,
        transform 0.25s ease,
        opacity 0.2s ease;
    pointer-events: none;
}

.cdm-turtle-btn:hover .cdm-turtle-label,
.cdm-turtle-btn:focus-visible .cdm-turtle-label {
    color: #b0348c;
    transform: translateY(-2px);
}

.cdm-turtle-btn.is-swimming-away {
    pointer-events: none;
    transform: scale(1);
}

.cdm-turtle-btn.is-swimming-away .cdm-turtle-img {
    animation: cdmTurtleSwimAway 0.95s ease-in forwards;
}

.cdm-turtle-btn.is-swimming-away .cdm-turtle-label {
    opacity: 0;
}

/* =========================================================
   ANIMAZIONI
   ========================================================= */

@keyframes cdmTurtleFloat {
    0%,
    100% {
        transform: translateY(0) rotate(-2deg);
    }

    50% {
        transform: translateY(-14px) rotate(2deg);
    }
}

@keyframes cdmTurtleSwimAway {
    from {
        opacity: 1;
        transform: translate(0, 0) rotate(0deg) scale(1);
    }

    to {
        opacity: 0;
        transform: translate(360px, -80px) rotate(12deg) scale(0.45);
    }
}

/* Riduce le animazioni per chi lo richiede nelle preferenze di sistema. */
@media (prefers-reduced-motion: reduce) {
    .cdm-turtle-btn {
        transition: none;
    }

    .cdm-turtle-img {
        animation: none;
    }

    .cdm-turtle-btn.is-swimming-away .cdm-turtle-img {
        animation-duration: 0.01ms;
    }
}

/* =========================================================
   SEZIONE GITA NEL DESERTO
   ========================================================= */

.cdm-desert-section {
    min-height: 92vh;
}

.cdm-desert-content {
    display: grid;
    grid-template-columns: minmax(320px, 540px) minmax(0, 1fr);
    align-items: center;
    gap: 70px;
    text-align: right;
}

.cdm-desert-copy {
    max-width: 680px;
    margin-left: auto;
}

.cdm-desert-copy .cdm-section-title {
    margin: 0 0 24px;
    text-align: right;
}

.cdm-desert-copy .cdm-section-text {
    margin: 0 0 34px auto;
    text-align: right;
}

/* JEEP INTERATTIVA */

.cdm-jeep-btn,
button.cdm-jeep-btn {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    width: auto;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 0 !important;

    border: 0 !important;
    border-radius: 0 !important;
    outline: 0 !important;

    color: inherit !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;

    appearance: none;
    -webkit-appearance: none;

    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;

    transform: scale(1);
    transform-origin: center center;
    transition: transform 0.22s ease;
}

.cdm-jeep-btn:hover,
.cdm-jeep-btn:focus-visible {
    transform: scale(1.035);
}

.cdm-jeep-btn:active {
    transform: scale(1.07);
}

.cdm-jeep-btn:focus,
.cdm-jeep-btn:focus-visible,
.cdm-jeep-btn:active {
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.cdm-jeep-btn::-moz-focus-inner {
    padding: 0;
    border: 0;
}

.cdm-jeep-img {
    display: block;
    width: min(100%, 500px);
    height: auto;
    filter: drop-shadow(0 24px 42px rgba(0, 0, 0, 0.45));
    animation: cdmJeepFloat 3.8s ease-in-out infinite;
    will-change: transform;
    pointer-events: none;
}

.cdm-jeep-label {
    margin-top: 12px;
    color: #ffffff;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 1.3px;
    text-transform: uppercase;
    text-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
    transition:
        color 0.25s ease,
        transform 0.25s ease,
        opacity 0.2s ease;
    pointer-events: none;
}

.cdm-jeep-btn:hover .cdm-jeep-label,
.cdm-jeep-btn:focus-visible .cdm-jeep-label {
    color: #b0348c;
    transform: translateY(-2px);
}

.cdm-jeep-btn.is-driving-away {
    pointer-events: none;
    transform: scale(1);
}

.cdm-jeep-btn.is-driving-away .cdm-jeep-img {
    animation: cdmJeepDriveAway 0.95s ease-in forwards;
}

.cdm-jeep-btn.is-driving-away .cdm-jeep-label {
    opacity: 0;
}

@keyframes cdmJeepFloat {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes cdmJeepDriveAway {
    from {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }

    to {
        opacity: 0;
        transform: translate(-360px, 25px) scale(0.55);
    }
}





























/* =========================================================
   SFONDI STATICI DELLE SEZIONI
   Le sezioni interne usano immagini WebP responsive al posto
   dei video per alleggerire memoria, GPU e traffico mobile.
   ========================================================= */

.cdm-section-media {
    background: #042f3f;
}

.cdm-section-picture,
.cdm-section-image-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    max-width: none;
}

.cdm-section-picture {
    display: block;
    overflow: hidden;
    pointer-events: none;
}

.cdm-section-image-bg {
    display: block;
    object-fit: cover;
    object-position: center center;
    user-select: none;
    -webkit-user-drag: none;
}

.cdm-panorama-section .cdm-section-image-bg {
    object-position: center center;
}

.cdm-diving-section .cdm-section-image-bg {
    object-position: center center;
}

.cdm-desert-section .cdm-section-image-bg {
    object-position: center center;
}

/* Pagine interne multilingua */
.cdm-inner-page { min-height: 100vh; background: #fff; }
.cdm-page-hero { min-height: 48vh; display: flex; align-items: center; padding-top: 130px; background: linear-gradient(135deg, #0c2947, #12678c); color: #fff; }
.cdm-page-hero .cdm-section-title,
.cdm-page-hero .cdm-section-text { color: #fff; }
.cdm-page-content { padding: 70px 0; }
