/**
 * What Happens Block Styles
 * 
 * Styles for the circular walking path and educational stations
 * Desktop: Circular layout with dotted path
 * Mobile: Vertical stack with curved path
 *
 * @package CA_UPK_What_Happens
 */

/* ==========================================================================
   Base Section Styles
   ========================================================================== */

.ca-upk-what-happens-block {
    background-color: #ffffff;
    padding: 50px 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Wide and Full Width Alignment */
.ca-upk-what-happens-block.alignwide {
    max-width: 1200px;
    margin: 0 auto;
}

.ca-upk-what-happens-block.alignfull {
    max-width: 100%;
    padding-left: 40px;
    padding-right: 40px;
}

/* ==========================================================================
   Section Header
   ========================================================================== */

.what-happens-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 50px;
}

.what-happens-headline {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 16px;
    color: var(--yak-color-black, #003a5d);
}

.what-happens-subhead {
    font-size: 1.125rem;
    line-height: 1.5;
    margin: 0;
    color: var(--yak-color-black, #003a5d);
    font-weight: 400;
}

/* ==========================================================================
   Journey Container (Desktop: Circular Layout)
   ========================================================================== */

.what-happens-journey {
    position: relative;
    max-width: 820px;
    margin: 0 auto;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Decorative Winding Path - SVG background */
.journey-path {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 580px;
    height: 580px;
    pointer-events: none;
    z-index: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cpath d='M 100,20 C 150,25 165,50 165,85 C 165,120 150,145 115,155 C 80,165 45,150 35,115 C 25,80 40,45 75,35 C 95,30 105,32 100,20' fill='none' stroke='%23d0d0d0' stroke-width='2' stroke-dasharray='8,6' stroke-linecap='round'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Stations Container */
.journey-stations {
    position: relative;
    width: 100%;
    height: 600px;
    z-index: 10;
}

/* ==========================================================================
   Individual Station Styles (Card-based)
   ========================================================================== */

.journey-station {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 240px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(8px);
    padding: 16px 18px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease, background 0.3s ease;
}

.journey-station:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.5);
    border-color: rgba(0, 0, 0, 0.1);
}

/* Station Positioning (12, 3, 6, 9 o'clock) */
.station-position-top {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.station-position-right {
    top: 50%;
    right: 0;
    transform: translateY(-50%);
}

.station-position-bottom {
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.station-position-left {
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}

/* ==========================================================================
   Station Icon Circle
   ========================================================================== */

.station-icon-wrapper {
    margin-bottom: 12px;
}

.station-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    transition: transform 0.3s ease;
}

.station-emoji {
    font-size: 2.5rem;
    line-height: 1;
    display: block;
}

/* Hover Effect (Subtle Scale) */
.journey-station:hover .station-icon {
    transform: scale(1.08);
}

/* Station-specific Colors */
.station-color-soft-blue {
    background-color: #A8D5E2;
}

.station-color-soft-salmon {
    background-color: #ee907b;
}

.station-color-soft-yellow {
    background-color: #FFF4A3;
}

.station-color-soft-green {
    background-color: #B8E6B8;
}

/* ==========================================================================
   Station Content (Text)
   ========================================================================== */

.station-content {
    max-width: 100%;
}

.station-headline {
    font-size: 1.375rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 8px;
    color: var(--yak-color-black, #003a5d);
}

.station-description {
    font-size: 1rem;
    line-height: 1.4;
    margin: 0;
    color: var(--yak-color-black, #003a5d);
    font-weight: 400;
}

/* ==========================================================================
   Tablet Adjustments (768px - 1024px)
   ========================================================================== */

@media (max-width: 1024px) and (min-width: 768px) {
    .ca-upk-what-happens-block {
        padding: 50px 30px;
    }

    .what-happens-headline {
        font-size: 2.25rem;
    }

    .what-happens-subhead {
        font-size: 1.125rem;
    }

    .what-happens-journey {
        min-height: 520px;
        max-width: 720px;
    }

    .journey-path {
        width: 480px;
        height: 480px;
    }

    .journey-stations {
        height: 520px;
    }

    .journey-station {
        max-width: 200px;
        padding: 14px 16px;
    }

    .station-icon {
        width: 70px;
        height: 70px;
    }

    .station-emoji {
        font-size: 2.25rem;
    }

    .station-headline {
        font-size: 1.25rem;
    }

    .station-description {
        font-size: 0.9375rem;
    }
}

/* ==========================================================================
   Mobile Layout (< 768px) - Vertical Path
   ========================================================================== */

@media (max-width: 767px) {
    .ca-upk-what-happens-block {
        padding: 40px 20px;
    }

    .what-happens-header {
        margin-bottom: 50px;
    }

    .what-happens-headline {
        font-size: 1.875rem;
    }

    .what-happens-subhead {
        font-size: 1.125rem;
    }

    /* Mobile: Vertical Layout */
    .what-happens-journey {
        min-height: auto;
        flex-direction: column;
        padding: 0 20px;
    }

    /* Hide circular path on mobile */
    .journey-path {
        display: none;
    }

    /* Mobile: Vertical path down the center */
    .journey-stations::before {
        content: '';
        position: absolute;
        top: 80px;
        bottom: 80px;
        left: 50%;
        transform: translateX(-50%);
        width: 2px;
        background: linear-gradient(
            to bottom,
            #d0d0d0 0%,
            #d0d0d0 25%,
            transparent 25%,
            transparent 50%,
            #d0d0d0 50%,
            #d0d0d0 75%,
            transparent 75%,
            transparent 100%
        );
        background-size: 2px 20px;
        z-index: 1;
    }

    /* Mobile: Vertical stack layout */
    .journey-stations {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        height: auto;
        gap: 60px;
    }

    /* Reset positioning for mobile */
    .journey-station {
        position: relative;
        transform: none;
        top: auto;
        left: auto;
        right: auto;
        bottom: auto;
        max-width: 100%;
        width: 100%;
    }

    /* Station icon and content */
    .station-icon {
        width: 80px;
        height: 80px;
    }

    .station-emoji {
        font-size: 2.5rem;
    }

    .station-headline {
        font-size: 1.25rem;
    }

    .station-description {
        font-size: 1rem;
        max-width: 400px;
        margin: 0 auto;
    }
}

/* ==========================================================================
   Small Mobile (< 480px)
   ========================================================================== */

@media (max-width: 479px) {
    .ca-upk-what-happens-block {
        padding: 30px 15px;
    }

    .what-happens-header {
        margin-bottom: 40px;
    }

    .what-happens-headline {
        font-size: 1.625rem;
    }

    .what-happens-subhead {
        font-size: 1rem;
    }

    .journey-stations {
        gap: 50px;
    }

    .station-icon {
        width: 70px;
        height: 70px;
    }

    .station-emoji {
        font-size: 2.25rem;
    }

    .station-headline {
        font-size: 1.125rem;
    }

    .station-description {
        font-size: 0.9375rem;
    }
}

/* ==========================================================================
   Accessibility & Print Styles
   ========================================================================== */

/* Focus states for keyboard navigation */
.journey-station:focus-within {
    outline: 3px solid #0073aa;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .journey-path {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cpath d='M 100,20 C 150,25 165,50 165,85 C 165,120 150,145 115,155 C 80,165 45,150 35,115 C 25,80 40,45 75,35 C 95,30 105,32 100,20' fill='none' stroke='%23000000' stroke-width='3' stroke-dasharray='8,6' stroke-linecap='round'/%3E%3C/svg%3E");
    }

    .journey-station {
        background: rgba(255, 255, 255, 0.95);
        border: 2px solid var(--yak-color-black, #003a5d);
    }

    .station-icon {
        border: 2px solid var(--yak-color-black, #003a5d);
    }

    .what-happens-headline,
    .station-headline {
        color: var(--yak-color-black, #003a5d);
    }

    .what-happens-subhead,
    .station-description {
        color: var(--yak-color-black, #003a5d);
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .station-icon,
    .journey-station {
        transition: none;
    }

    .journey-station:hover .station-icon {
        transform: none;
    }
}

/* Print styles */
@media print {
    .ca-upk-what-happens-block {
        padding: 20px 0;
    }

    .journey-path {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cpath d='M 100,20 C 150,25 165,50 165,85 C 165,120 150,145 115,155 C 80,165 45,150 35,115 C 25,80 40,45 75,35 C 95,30 105,32 100,20' fill='none' stroke='%23000000' stroke-width='2' stroke-dasharray='8,6' stroke-linecap='round'/%3E%3C/svg%3E");
    }

    .journey-station {
        box-shadow: none;
        border: 1px solid #cccccc;
    }

    .station-icon {
        box-shadow: none;
        border: 1px solid var(--yak-color-black, #003a5d);
    }
}

