/* ============================================
   MatelooKids — Parks Section — "Voyage Marin"
   An immersive maritime journey between ports
   ============================================ */

@keyframes driftBoat {
    0%, 100% { transform: translateY(0) rotate(-1deg); }
    50% { transform: translateY(-10px) rotate(1deg); }
}
@keyframes compassSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@keyframes waveLoop {
    0% { background-position: 0 0; }
    100% { background-position: 200px 0; }
}
@keyframes anchorDrop {
    0%, 80% { transform: translateY(-8px); opacity: 0.6; }
    90% { transform: translateY(2px); opacity: 1; }
    100% { transform: translateY(0); opacity: 1; }
}

/* ===== Section wrapper ===== */
.parks {
    background: linear-gradient(180deg, var(--white) 0%, #E8F4FD 30%, #D0EAFB 60%, var(--white) 100%);
    position: relative;
    overflow: hidden;
    padding-bottom: 60px;
}

/* Ocean texture behind the section */
.parks::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 15% 60%, rgba(38,198,160,0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 85% 40%, rgba(129,212,250,0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(171,71,188,0.05) 0%, transparent 40%);
    pointer-events: none;
}

/* ===== Journey Layout ===== */
.parks-journey {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

/* Centre route line — the ship route  */
.journey-route {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    transform: translateX(-50%);
    z-index: 1;
}
.journey-route::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        to bottom,
        var(--ocean-surface) 0px,
        var(--ocean-surface) 12px,
        transparent 12px,
        transparent 24px
    );
    border-radius: 2px;
    opacity: 0.5;
}

/* ===== Port stop (each park) ===== */
.port-stop {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 80px 1fr;
    align-items: start;
    gap: 0;
    margin-bottom: 80px;
    z-index: 2;
}
.port-stop:last-child { margin-bottom: 0; }

/* Centre anchor marker */
.port-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-self: center;
    position: relative;
    z-index: 3;
}
.port-anchor {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--ocean-deep);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow:
        0 0 0 6px rgba(11,61,107,0.15),
        0 0 0 12px rgba(11,61,107,0.06),
        var(--shadow-lg);
    animation: anchorDrop 3s ease-in-out infinite;
    position: relative;
}
.port-anchor-label {
    margin-top: 8px;
    font-family: 'Baloo 2', cursive;
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--ocean-mid);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    white-space: nowrap;
}

/* ===== Photo side (the port image) ===== */
.port-photo-wrap {
    position: relative;
}
.port-photo {
    width: 100%;
    height: 320px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    position: relative;
}
.port-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}
.port-photo:hover img {
    transform: scale(1.05);
}
/* Wave-cut shape on the side facing center */
.port-photo::after {
    content: '';
    position: absolute;
    top: 0;
    width: 40px;
    height: 100%;
    z-index: 2;
}
/* Left port: wave on right side */
.port-stop:nth-child(odd) .port-photo::after {
    right: -1px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 320'%3E%3Cpath d='M40,0 C20,40 40,80 20,120 C0,160 40,200 20,240 C0,280 40,320 40,320 L40,0Z' fill='%23E8F4FD'/%3E%3C/svg%3E") no-repeat center/cover;
}
/* Right port (even): wave on left side */
.port-stop:nth-child(even) .port-photo::after {
    left: -1px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 320'%3E%3Cpath d='M0,0 C20,40 0,80 20,120 C40,160 0,200 20,240 C40,280 0,320 0,320 L0,0Z' fill='%23E8F4FD'/%3E%3C/svg%3E") no-repeat center/cover;
}

/* Nouveau badge over photo */
.port-badge-new {
    position: absolute;
    top: 16px;
    z-index: 3;
    background: var(--coral);
    color: var(--white);
    padding: 8px 22px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    box-shadow: 0 4px 20px rgba(255,112,67,0.4);
    animation: pulse 2s ease-in-out infinite;
}
.port-stop:nth-child(odd) .port-badge-new { right: 20px; }
.port-stop:nth-child(even) .port-badge-new { left: 20px; }

/* ===== Info side (the port details) ===== */
.port-info {
    padding: 20px 0;
}
/* Align info to be closer to center */
.port-stop:nth-child(odd) .port-info { padding-left: 20px; }
.port-stop:nth-child(even) .port-info { padding-right: 20px; }

.port-info-header {
    margin-bottom: 16px;
}
.port-city {
    font-family: 'Baloo 2', cursive;
    font-size: 2rem;
    font-weight: 800;
    color: var(--ocean-deep);
    line-height: 1.1;
    margin-bottom: 4px;
}
.port-address {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 600;
}
.port-address .pin { font-size: 1.1rem; }

.port-desc {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

/* Stats in a 2-column grid */
/* ===== Stats — Ocean Bubble Path ===== */
.port-stats-path {
    position: relative;
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    padding: 30px 0 16px;
    margin-bottom: 24px;
}
.port-stats-path .path-wave {
    position: absolute;
    top: 52px;
    left: 5%;
    width: 90%;
    height: 8px;
    z-index: 0;
}
.port-bubble {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 1;
    cursor: default;
}
.bubble-orb {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: linear-gradient(145deg, #e3f2fd, var(--white));
    border: 3px solid var(--ocean-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 18px rgba(11,61,107,0.1), inset 0 -3px 6px rgba(11,61,107,0.06);
    transition: var(--transition);
    position: relative;
}
.bubble-orb::after {
    content: '';
    position: absolute;
    top: 7px;
    left: 12px;
    width: 12px;
    height: 8px;
    background: rgba(255,255,255,0.7);
    border-radius: 50%;
    transform: rotate(-30deg);
}
.port-bubble:hover .bubble-orb {
    transform: translateY(-6px) scale(1.12);
    border-color: var(--coral);
    box-shadow: 0 10px 30px rgba(255,112,67,0.2), inset 0 -3px 6px rgba(255,112,67,0.08);
}
.bubble-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--ocean-mid);
    text-align: center;
    max-width: 90px;
    line-height: 1.2;
    transition: var(--transition);
}
.port-bubble:hover .bubble-label {
    color: var(--coral);
}

/* CTA button */
.port-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 36px;
    border-radius: 50px;
    font-family: 'Baloo 2', cursive;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-align: center;
    background: linear-gradient(135deg, var(--coral), #ff5722);
    color: var(--white);
    box-shadow: 0 6px 25px rgba(255,112,67,0.3);
    margin-bottom: 20px;
}
.port-cta:hover {
    background: linear-gradient(135deg, #ff5722, var(--coral-dark));
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 10px 35px rgba(255,112,67,0.4);
}

/* Alternation: even port stop reverses column order */
.port-stop:nth-child(even) {
    direction: rtl;
}
.port-stop:nth-child(even) > * {
    direction: ltr;
}
.port-stop:nth-child(even) .port-info {
    text-align: right;
}
.port-stop:nth-child(even) .port-stats-path {
    justify-content: space-around;
}
.port-stop:nth-child(even) .port-cta {
    float: right;
}

/* ===== Maps integrated into the journey ===== */
.port-map {
    position: relative;
    margin-top: 8px;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(11,61,107,0.12);
    border: 3px solid var(--sand-dark);
    background: var(--sand);
    transition: var(--transition);
}
.port-map:hover {
    border-color: var(--ocean-surface);
    box-shadow: 0 12px 40px rgba(11,61,107,0.18);
}
.port-map iframe {
    width: 100%;
    height: 220px;
    border: none;
    display: block;
}
.port-map-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 5;
    background: var(--white);
    color: var(--ocean-deep);
    font-size: 0.82rem;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 10px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.15);
    transition: var(--transition);
    text-decoration: none;
}
.port-map-link:hover {
    background: var(--ocean-deep);
    color: var(--white);
    transform: translateY(-2px);
}

/* ===== Decorative elements ===== */
/* Floating boat between the two ports */
.journey-boat {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2.5rem;
    z-index: 4;
    animation: driftBoat 4s ease-in-out infinite;
    filter: drop-shadow(0 4px 12px rgba(11,61,107,0.2));
}

/* Compass at the top of the route */
.journey-compass {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    z-index: 2;
}
.compass-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    font-size: 2.5rem;
    margin-bottom: 12px;
    border: 3px solid var(--sand-dark);
}
.journey-compass h3 {
    font-size: 1.1rem;
    color: var(--ocean-mid);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Small wave separator between ports */
.journey-wave-sep {
    text-align: center;
    padding: 10px 0 10px;
    position: relative;
    z-index: 2;
    margin-bottom: 20px;
}
.journey-wave-sep svg {
    width: 200px;
    height: 30px;
    opacity: 0.3;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .port-stop {
        grid-template-columns: 1fr;
        gap: 0;
        margin-bottom: 60px;
    }
    .journey-route { display: none; }
    .port-marker {
        order: 1;
        flex-direction: row;
        gap: 12px;
        margin-bottom: 16px;
    }
    .port-anchor {
        width: 50px;
        height: 50px;
        font-size: 1.4rem;
    }
    .port-anchor-label { margin-top: 0; }
    .port-photo-wrap {
        order: 2;
    }
    .port-photo {
        height: 220px;
        border-radius: var(--radius);
    }
    .port-photo::after { display: none; }
    .port-info {
        order: 3;
        padding: 20px 0 0 !important;
    }
    /* Reset even reversal on mobile */
    .port-stop:nth-child(even) {
        direction: ltr;
    }
    .port-stop:nth-child(even) .port-info {
        text-align: left;
    }
    .port-stop:nth-child(even) .port-stats-path {
        justify-content: space-around;
    }
    .port-stop:nth-child(even) .port-cta {
        float: none;
    }
    .port-stats-path {
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
        padding: 20px 0 12px;
    }
    .port-stats-path .path-wave {
        display: none;
    }
    .bubble-orb {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
    .bubble-label {
        font-size: 0.72rem;
    }
    .port-badge-new { top: 12px; }
    .port-stop:nth-child(even) .port-badge-new { left: auto; right: 16px; }
    .journey-boat { display: none; }
}
