/* ============================================
   Pride History Timeline
   ============================================ */
.pht-timeline {
    --purple: #7500CC;
    --purple-light: #a78bfa;
    --purple-bg: #f5f3ff;
    --dark: #1f2937;
    --muted: #6b7280;
    --border: #e5e7eb;
    --card: #ffffff;
    --rainbow: linear-gradient(90deg, #E40303, #FF8C00, #FFED00, #008026, #24408E, #732982);
    max-width: 1080px;
    margin: 0 auto;
    padding: 40px 20px 60px;
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* Header */
.pht-header {
    text-align: center;
    margin-bottom: 50px;
}
.pht-title {
    font-size: 36px;
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -0.03em;
    margin: 0 0 8px;
}
.pht-subtitle {
    font-size: 16px;
    color: var(--muted);
    font-weight: 400;
    margin-bottom: 16px;
}
.pht-rainbow-rule {
    width: 80px;
    height: 4px;
    background: var(--rainbow);
    border-radius: 2px;
    margin: 0 auto;
}

/* Timeline container */
.pht-line-wrap {
    position: relative;
    padding: 20px 0;
}

/* Vertical line */
.pht-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--border);
    transform: translateX(-50%);
    border-radius: 2px;
}

/* Animated progress line */
.pht-line-progress {
    position: absolute;
    left: 50%;
    top: 0;
    width: 3px;
    height: 0;
    background: linear-gradient(180deg, var(--purple), var(--purple-light));
    transform: translateX(-50%);
    border-radius: 2px;
    transition: height 0.3s ease-out;
}

/* Milestone */
.pht-milestone {
    position: relative;
    display: flex;
    align-items: flex-start;
    margin-bottom: 40px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.pht-milestone.pht-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Left/Right positioning */
.pht-left {
    flex-direction: row-reverse;
    padding-right: calc(50% + 30px);
    padding-left: 0;
}
.pht-right {
    padding-left: calc(50% + 30px);
    padding-right: 0;
}

/* Timeline node */
.pht-node {
    position: absolute;
    left: 50%;
    top: 16px;
    transform: translateX(-50%);
    z-index: 2;
}
.pht-node-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple), var(--purple-light));
    position: relative;
    z-index: 2;
}
.pht-node-ring {
    position: absolute;
    top: -4px;
    left: -4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--purple);
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.4s ease, transform 0.4s ease;
}
.pht-visible .pht-node-ring {
    opacity: 0.3;
    transform: scale(1);
}

/* Pulse animation on the active node */
.pht-milestone:last-child .pht-node-dot::after {
    content: '';
    position: absolute;
    top: -6px;
    left: -6px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--purple);
    animation: pht-pulse 2s ease-in-out infinite;
}
@keyframes pht-pulse {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50% { transform: scale(1.4); opacity: 0; }
}

/* Card */
.pht-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px 28px;
    position: relative;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    width: 100%;
}
.pht-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    border-color: var(--purple-light);
}

/* Card arrow pointing to timeline line */
.pht-left .pht-card::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 20px;
    width: 14px;
    height: 14px;
    background: var(--card);
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    transform: rotate(-45deg);
}
.pht-right .pht-card::after {
    content: '';
    position: absolute;
    left: -8px;
    top: 20px;
    width: 14px;
    height: 14px;
    background: var(--card);
    border-left: 1px solid var(--border);
    border-top: 1px solid var(--border);
    transform: rotate(-45deg);
}

/* Card image/logo */
.pht-card-image {
    margin-bottom: 8px;
    line-height: 0;
}
.pht-card-image img {
    display: block;
    max-width: 380px;
    width: auto;
    height: auto;
}
.pht-card-image a,
.pht-card-video a {
    pointer-events: none;
    cursor: default;
    text-decoration: none;
}
/* Only remove h3 padding when a logo image is directly above the title */
.pht-card-image + h3.pht-card-title,
.hentry .wpb_text_column .pht-card-image + h3 {
    padding-top: 0 !important;
}

/* Year badge */
.pht-card-year {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    color: var(--purple);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: var(--purple-bg);
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 10px;
}

/* Card title */
.pht-card-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--dark);
    margin: 0 0 10px;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

/* Card body */
.pht-card-body {
    font-size: 15px;
    color: var(--muted);
    line-height: 1.65;
    margin: 0 0 12px;
}
.pht-card-body a {
    color: var(--purple);
    text-decoration: none;
    font-weight: 600;
}
.pht-card-body a:hover {
    text-decoration: underline;
}
.pht-card-body strong {
    color: var(--dark);
}

/* Video */
.pht-card-video {
    margin: 12px 0 14px;
    border-radius: 8px;
    overflow: hidden;
    line-height: 0;
}
.pht-card-video video {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
    background: #000;
}

/* Tags */
.pht-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.pht-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: var(--purple);
    background: var(--purple-bg);
    padding: 3px 10px;
    border-radius: 12px;
    letter-spacing: 0.02em;
}

/* ── Stagger animation delays ── */
.pht-milestone:nth-child(1) { transition-delay: 0s; }
.pht-milestone:nth-child(2) { transition-delay: 0.05s; }
.pht-milestone:nth-child(3) { transition-delay: 0.1s; }
.pht-milestone:nth-child(4) { transition-delay: 0.15s; }
.pht-milestone:nth-child(5) { transition-delay: 0.2s; }
.pht-milestone:nth-child(6) { transition-delay: 0.25s; }

/* ── Responsive: single column ── */
@media (max-width: 768px) {
    .pht-title {
        font-size: 28px;
    }
    .pht-line {
        left: 20px;
    }
    .pht-line-progress {
        left: 20px;
    }
    .pht-milestone {
        flex-direction: row !important;
        padding-left: 50px !important;
        padding-right: 0 !important;
    }
    .pht-node {
        left: 20px;
    }
    .pht-left .pht-card::after,
    .pht-right .pht-card::after {
        left: -8px;
        right: auto;
        border-right: none;
        border-bottom: none;
        border-left: 1px solid var(--border);
        border-top: 1px solid var(--border);
    }
    .pht-card {
        padding: 20px;
    }
    .pht-card-title {
        font-size: 18px;
    }
    .pht-card-body {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .pht-timeline {
        padding: 20px 12px 40px;
    }
    .pht-header {
        margin-bottom: 30px;
    }
    .pht-milestone {
        padding-left: 44px !important;
        margin-bottom: 28px;
    }
    .pht-card {
        padding: 16px;
    }
}
