:root {
    --primary-color-bcd: #2d3748;
    --accent-color-bcd: #faf089;
    --hover-color-bcd: #f6e05e;
    --shadow-color-bcd: rgba(250, 240, 137, 0.3);
    --text-shadow-bcd: 0 2px 4px rgba(0, 0, 0, 0.1);
    --font-serif-bcd: "Noto Serif", serif;
    --font-sans-bcd: "Noto Sans", sans-serif;
}


/* Reset và style chung */

* {
    box-sizing: border-box;
}

.eightfold-path {
    margin: 1rem auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 500px;
}


/* Tiêu đề */

.eightfold-path__title {
    font: 700 36px var(--font-serif-bcd);
    color: var(--primary-color-bcd);
    margin-bottom: 50px;
    text-shadow: var(--text-shadow-bcd);
    animation: titleGlow 4s ease-in-out infinite;
}

@keyframes titleGlow {
    0%,
    100% {
        text-shadow: var(--text-shadow-bcd), 0 0 20px var(--shadow-color-bcd);
    }
    50% {
        text-shadow: var(--text-shadow-bcd), 0 0 30px rgba(250, 240, 137, 0.6);
    }
}


/* Bánh xe */

.eightfold-path__wheel {
    position: relative;
    width: 500px;
    height: 500px;
    filter: drop-shadow(0 0 30px var(--shadow-color-bcd));
    animation: wheelFloat 6s ease-in-out infinite;
}

@keyframes wheelFloat {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.eightfold-path__wheel-border {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border: 12px solid transparent;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    background: url("/wp-content/uploads/bat-chanh-dao.webp") no-repeat center/cover;
}

.eightfold-path__wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 21%;
    height: 21%;
    background: radial-gradient(circle, #fff6f6 0%, #ffec99 50%, #f9ac19 100%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.1), 0 0 20px rgba(190, 227, 248, 0.5);
    animation: centerPulse 4s ease-in-out infinite;
}

@keyframes centerPulse {
    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.05);
    }
}

.eightfold-path__wheel-center-text {
    font: 700 18px var(--font-serif-bcd);
    color: var(--primary-color-bcd);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    text-transform: uppercase;
    animation: textGlow 3s ease-in-out infinite alternate;
}

@keyframes textGlow {
    0% {
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    }
    100% {
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 0 10px var(--shadow-color-bcd);
    }
}


/* Segment */

.eightfold-path__segment-wrapper {
    position: absolute;
    width: 60px;
    height: 60px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.eightfold-path__segment-dot {
    position: absolute;
    width: 16px;
    height: 16px;
    background: radial-gradient( circle, var(--primary-color-bcd) 0%, #f9f9f9 50%, var(--primary-color-bcd) 100%);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 10px rgba(45, 55, 72, 0.3);
    transition: background 0.25s, box-shadow 0.25s;
}

.eightfold-path__segment-text {
    font: 600 16px var(--font-serif-bcd);
    color: var(--primary-color-bcd);
    white-space: nowrap;
    text-shadow: var(--text-shadow-bcd);
    opacity: 0.8;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.eightfold-path__segment-wrapper:hover .eightfold-path__segment-text,
.eightfold-path__segment-dot:hover+.eightfold-path__segment-text,
.eightfold-path__segment-text:hover {
    color: #3d4859;
    transform: translate(-50%, 0) scale(1.1);
    text-shadow: 0 0 10px var(--accent-color-bcd), 0 0 20px rgba(250, 240, 137, 0.7);
}

.eightfold-path__segment-wrapper.is-hovered .eightfold-path__segment-dot {
    background: radial-gradient(circle, #ffe066 0%, #fffbe6 60%, #f9ac19 100%);
    box-shadow: 0 0 16px 4px #ffe066, 0 0 0 2px #f9ac19;
}

.eightfold-path__segment-wrapper.is-hovered .eightfold-path__segment-text {
    color: #b7791f;
    opacity: 1;
}


/* CTA */

.eightfold-path__cta {
    margin-top: 50px;
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
}

.eightfold-path__link {
    color: var(--primary-color-bcd);
    text-decoration: none;
    font: 600 18px var(--font-sans-bcd);
    padding: 12px 24px;
    border: 2px solid var(--accent-color-bcd);
    border-radius: 25px;
    background: rgba(250, 240, 137, 0.1);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.eightfold-path__link:hover {
    background: var(--accent-color-bcd);
    box-shadow: 0 0 20px var(--shadow-color-bcd);
    transform: translateY(-2px);
}

.eightfold-path__btn {
    background: linear-gradient( 45deg, var(--accent-color-bcd), var(--hover-color-bcd));
    color: var(--primary-color-bcd);
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font: 600 18px var(--font-sans-bcd);
    cursor: pointer;
    box-shadow: 0 4px 15px var(--shadow-color-bcd);
    transition: all 0.3s ease;
}

.eightfold-path__btn:hover {
    background: linear-gradient(45deg, var(--hover-color-bcd), #ecc94b);
    box-shadow: 0 6px 25px var(--shadow-color-bcd);
    transform: translateY(-3px);
}


/* Tooltip */

.eightfold-path__tooltip {
    position: fixed;
    background: linear-gradient(135deg, var(--primary-color-bcd), #4a5568);
    color: #fff;
    padding: 12px 18px;
    border-radius: 8px;
    font: 14px var(--font-sans-bcd);
    max-width: 280px;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.eightfold-path__tooltip--visible {
    opacity: 1;
    transform: translateY(-5px);
}


/* Modal */

.eightfold-path__modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.eightfold-path__modal--visible {
    display: flex;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(5px);
    }
}

.eightfold-path__modal-content {
    background: linear-gradient(135deg, #fff, #f7fafc);
    padding: 40px 40px 10px;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--shadow-color-bcd);
    position: relative;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.eightfold-path__modal-close {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 32px;
    color: var(--primary-color-bcd);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.eightfold-path__modal-close:hover {
    color: var(--accent-color-bcd);
    background: rgba(250, 240, 137, 0.1);
    transform: rotate(90deg);
}

.eightfold-path__modal-title {
    font: 700 28px var(--font-serif-bcd);
    color: var(--primary-color-bcd);
    margin-bottom: 25px;
    text-shadow: 0 2px 4px var(--shadow-color-bcd);
    border-bottom: 2px solid var(--accent-color-bcd);
    padding-bottom: 15px;
}

.eightfold-path__modal-description {
    font: 16px var(--font-sans-bcd);
    color: #4a5568;
    margin-bottom: 25px;
    line-height: 1.7;
}

.eightfold-path__modal-quote {
    font-style: italic;
    font: 16px var(--font-sans-bcd);
    color: var(--primary-color-bcd);
    text-align: right;
    padding: 20px;
    border-right: 3px solid var(--accent-color-bcd);
    background: rgba(250, 240, 137, 0.05);
    border-radius: 0 8px 8px 0;
    position: relative;
}

.eightfold-path__modal-quote::before {
    content: '"';
    font-size: 48px;
    color: var(--accent-color-bcd);
    position: absolute;
    top: -10px;
    left: 10px;
    font-family: serif;
}

.eightfold-path__modal-btn {
    background: #7c4d13;
    color: #fff;
    border: none;
    border-radius: 6px;
    font: 16px var(--font-sans-bcd);
    padding: 8px 24px;
    cursor: pointer;
    /* margin-top: 18px; */
    display: inline-block;
    transition: background 0.2s;
    text-transform: capitalize;
}

.eightfold-path__modal-btn:hover {
    background: #a97c3f;
    color: white;
}


/* Responsive cho mobile */

@media (max-width: 768px) {
    .eightfold-path {
        background: #f7fafc;
        border-radius: 18px;
        padding: 18px 12px 30px;
        margin: 0 auto;
        max-width: 95%;
    }
    .eightfold-path__title {
        font-size: 22px;
        margin-bottom: 18px;
        color: #b7791f;
        text-shadow: 0 2px 8px #fffbe6;
        text-align: center;
    }
    .eightfold-path__wheel {
        width: 100%;
        max-width: 420px;
        height: auto;
        position: static;
        margin: 0 auto 20px;
        background: none;
        box-shadow: none;
        filter: none;
        padding: 0;
        display: block;
        animation: none;
    }
    .eightfold-path__wheel-border {
        display: none;
    }
    .eightfold-path__wheel-center {
        position: relative;
        background: none;
        box-shadow: none;
        width: 100%;
        height: auto;
        margin: 0 0 20px;
        padding: 0;
        display: flex;
        justify-content: center;
        animation: none;
        margin-bottom: 0px;
        left: 0px !important;
        transform: none;
    }
    .eightfold-path__wheel-center-text {
        font-size: 2rem;
        font-weight: 800;
        color: #b7791f;
        text-shadow: 0 2px 8px #fffbe6;
        text-align: center;
        margin: 0 auto;
        text-transform: uppercase;
    }
    .eightfold-path__segment {
        background: #2d3748;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(250, 240, 137, 0.15);
        margin: 10px 0;
        padding: 10px 16px;
        display: flex;
        align-items: center;
        width: 100%;
        transition: box-shadow 0.2s, background 0.2s;
        min-height: 44px;
    }
    .eightfold-path__segment:hover {
        box-shadow: 0 4px 16px rgba(250, 240, 137, 0.25);
        background: #fffde4;
    }
    .eightfold-path__segment-wrapper {
        margin-right: 12px;
        width: 28px;
        height: 28px;
        background: var(--accent-color-bcd);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 8px var(--shadow-color-bcd);
        flex-shrink: 0;
    }
    .eightfold-path__segment-dot {
        width: 16px;
        height: 16px;
        background: radial-gradient(circle, #b7791f 0%, #ffe066 70%, #f9ac19 100%);
        border-radius: 50%;
        box-shadow: 0 0 6px #ffe066;
    }
    .eightfold-path__segment-text {
        font-size: 16px;
        font-weight: 700;
        color: #b7791f;
        text-shadow: none;
        opacity: 1;
        margin: 0;
        white-space: normal;
        word-break: break-word;
        line-height: 1.2;
        display: flex;
        align-items: center;
        min-height: 28px;
        text-align: center !important;
        margin: 0 auto !important;
    }
}

@media (max-width: 480px) {
    .eightfold-path {
        padding: 12px;
        max-width: 100%;
    }
    .eightfold-path__title {
        font-size: 20px;
        margin-bottom: 12px;
    }
    .eightfold-path__wheel-center-text {
        font-size: 1.5rem;
    }
    .eightfold-path__segment {
        padding: 10px;
        margin: 8px 0;
        border-radius: 10px;
    }
    .eightfold-path__segment-wrapper {
        width: 30px;
        height: 30px;
        margin-right: 8px;
    }
    .eightfold-path__segment-dot {
        width: 12px;
        /* Giảm thêm trên màn hình nhỏ */
        height: 12px;
        background: radial-gradient(circle, #b7791f 0%, #ffe066 70%, #f9ac19 100%);
        box-shadow: 0 0 4px #ffe066;
    }
    .eightfold-path__segment-text {
        font-size: 14px;
        margin-left: 6px;
    }
}