.damirica-route-section {
    position: relative;
    width: 100%;
    min-height: var(--route-total-height, 1200px);
    padding: 100px 0;
    background-color: transparent !important;
    overflow: visible !important;
}

/* Force all Elementor containers to be transparent */
.elementor-widget-damirica_about_route,
.elementor-widget-container {
    background: transparent !important;
}

.route-section-backgrounds {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.route-bg-item {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 1;
    background-color: #ff0000; /* DEBUG RED */
    display: block !important;
}

.route-bg-item.active {
    opacity: 1;
    z-index: 2;
}

.route-background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
}

.damirica-route-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    height: var(--route-total-height, 1200px);
    margin: 0 auto;
    z-index: 10;
}

.damirica-route-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.damirica-route-path {
    stroke-dasharray: none;
}

.damirica-route-boat {
    position: absolute;
    width: 120px;
    height: 120px;
    z-index: 5;
    pointer-events: none;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: left 0.1s linear, top 0.1s linear, transform 0.1s linear, opacity 0.5s ease;
}

.damirica-route-boat svg,
.damirica-boat-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 12px 24px rgba(0,0,0,0.3));
}

.damirica-route-nodes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.route-node {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translate(-50%, -50%);
}

.route-point {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    z-index: 3;
    transition: all 0.3s ease;
}

.route-label-left,
.route-label-right {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--font-display);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
    font-weight: 600;
    transition: all 0.5s ease;
}

.route-label-left {
    right: 50px;
    text-align: right;
}

.route-label-right {
    left: 50px;
    text-align: left;
}

.route-node.active-node .route-label-left,
.route-node.active-node .route-label-right {
    opacity: 1;
}

.route-cards-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    pointer-events: none;
}

.route-legacy-card {
    position: absolute;
    background-color: var(--color-surface, #FFFFFF);
    opacity: 0;
    visibility: hidden;
    transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    z-index: 100;
    border-radius: 24px;
    overflow: hidden;
    border-style: solid;
    display: flex;
    flex-direction: column;
    --card-scale: 1;
}

.route-card-left {
    right: 80px;
    transform: translateY(-50%) translateX(-30px) scale(calc(var(--card-scale) * 0.95));
}

.route-card-right {
    left: 80px;
    transform: translateY(-50%) translateX(30px) scale(calc(var(--card-scale) * 0.95));
}

.route-legacy-card.active-card {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0) scale(var(--card-scale));
    pointer-events: auto;
}

.route-legacy-card .card-content {
    padding: 32px;
}

.route-legacy-card h4 {
    font-family: "Playfair Display", serif;
    font-size: 24px;
    margin: 0 0 12px 0;
    font-weight: 500;
}

.route-legacy-card p {
    font-family: "Inter", sans-serif;
    font-size: 15px;
    line-height: 1.7;
    margin: 0;
}

.route-node.active-node .route-point {
    /* Active state styles (background-color, box-shadow) are controlled via Elementor widget controls */
    transition: all 0.3s ease;
}

@media (max-width: 1024px) {
    .damirica-route-section {
        padding: 60px 0;
    }

    .damirica-route-container {
        max-width: 100%;
        height: 1000px;
    }

    .route-legacy-card {
        position: fixed;
        left: 50% !important;
        right: auto !important;
        top: auto !important;
        bottom: 30px !important;
        width: calc(100% - 40px) !important;
        max-width: 400px; /* Slightly wider for tablets */
        transform: translate(-50%, 20px) scale(0.9) !important;
        margin: 0;
        box-shadow: 0 20px 50px rgba(16, 30, 54, 0.25);
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        border: 1px solid rgba(212, 175, 55, 0.2);
        display: block !important;
        min-height: auto !important;
    }

    .route-legacy-card.active-card {
        opacity: 1;
        visibility: visible;
        transform: translate(-50%, 0) scale(1) !important;
    }

    .route-legacy-card .card-content {
        padding: 24px;
    }

    .route-legacy-card h4 {
        font-size: 22px;
        margin-bottom: 8px;
    }

    .route-legacy-card p {
        font-size: 15px;
        line-height: 1.6;
    }

    .route-label-left,
    .route-label-right {
        font-size: 14px;
    }

    .route-label-left {
        right: 30px;
    }

    .route-label-right {
        left: 30px;
    }
}

/* Remove 768px and 480px duplicate card logic as it's merged into 1024px */
@media (max-width: 768px) {
    .damirica-route-container {
        height: 900px;
    }
}

@media (max-width: 480px) {
    .route-legacy-card {
        max-width: 360px;
    }
}
