/* =============================================================================
   SEO Roadmap – Frontend Styles
   Matches competitor layout: plain header, left-line track, text-link buttons
   ============================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ── CSS Custom Properties ──────────────────────────────────────────────────── */
.seo-roadmap-wrapper {
    --srm-accent: #7c3aed;

    font-family: 'Inter', sans-serif;
    max-width: 100%;
    margin: 0 auto;
    padding: 40px; /* overall padding for the background */
    background: #f4f5f7; /* light gray overall plugin background */
    border-radius: 16px;
    color: #303030;
    box-sizing: border-box;
}

.seo-roadmap-wrapper *,
.seo-roadmap-wrapper *::before,
.seo-roadmap-wrapper *::after {
    box-sizing: border-box;
}

/* ── Top Header (aligned with accordion track) ───────────────────────────────── */
.seo-roadmap-top {
    position: relative;
    display: flex;
    flex-direction: column;
    /* Same left padding as accordion items so text lines up */
    padding-left: 64px;
    padding-bottom: 36px;
    padding-top: 36px;
    padding-right: 24px;
    margin-bottom: 0;
    background: linear-gradient(0deg, #F0F0FF -32.47%, #FAFAFF 75.54%);
    border-radius: 12px;
}

/* Diamond icon — sits on the vertical line, same position as number circles */
.seo-roadmap-top__diamond {
    position: absolute;
    left: 0;
    top: 36px; /* align with padding-top of .seo-roadmap-top */
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    /* white ring masks the vertical line cleanly */
    box-shadow: 0 0 0 5px #FAFAFF; /* match gradient end color to blend */
    background: transparent;
    border-radius: 0;
}

.seo-roadmap-top__diamond svg {
    display: block;
    width: 38px; /* increased size */
    height: 38px;
}

.seo-roadmap-top h2 {
    font-size: 2rem;
    font-weight: 800;
    color: #000036;
    line-height: 1.2;
    margin: 0 0 10px 0;
    padding: 0;
}

.seo-roadmap-top p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #606060;
    margin: 0;
    padding: 0;
    max-width: 680px;
}

/* ── Track container: wraps header + items so line runs through both ─────────── */
.seo-roadmap-timeline {
    position: relative;
}

/* Continuous vertical line spanning header + all items */
.seo-roadmap-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    /* 3px wide, left:20px → center at 21.5px ≈ center of 42px icon column */
    left: 20px;
    width: 3px;
    background-color: var(--srm-accent);
    opacity: 0.4;
    z-index: 1;
}

/* ── Track ──────────────────────────────────────────────────────────────────── */
.seo-roadmap-track {
    position: relative;
    display: flex;
    flex-direction: column;
}

/* ── Individual Item ────────────────────────────────────────────────────────── */
.seo-roadmap-item {
    position: relative;
    display: flex;
    flex-direction: column;
    /* Start background exactly at the vertical line (left: 20px) */
    margin-left: 20px;
    margin-bottom: 16px;
    background: #ffffff;
    /* Remove left border radius so it's flush with the vertical line */
    border-radius: 0 12px 12px 0;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.seo-roadmap-item:hover {
    background: #ffffff;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.seo-roadmap-item:last-child {
    margin-bottom: 0;
}

/* ── Number Circle ──────────────────────────────────────────────────────────── */
.seo-roadmap-item__number {
    position: absolute;
    /* Keep circle on the line: since item is at 20px, move circle back 20px */
    left: -20px;
    /* Vertically center exactly within the relative title row parent */
    top: 50%;
    margin-top: -21px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--srm-accent);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    flex-shrink: 0;
    box-shadow: 0 0 0 4px #fff;
    transition: transform 0.2s ease;
}

.seo-roadmap-item.is-open .seo-roadmap-item__number {
    transform: scale(1.06);
}

/* ── Title Row ──────────────────────────────────────────────────────────────── */
.seo-roadmap-item__title-row {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* 44px left padding so text remains at 64px total offset (20 margin + 44 padding) */
    padding: 24px 32px 24px 44px;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.seo-roadmap-item__title {
    font-size: 1rem; /* increased font size */
    font-weight: 700;
    color: #000036;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    flex: 1;
    line-height: 1.3;
    margin: 0 !important;
    padding: 0 !important;
}

/* ── Toggle Button (+/-) ────────────────────────────────────────────────────── */
.seo-roadmap-item__toggle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1.5px solid var(--srm-accent);
    background: transparent;
    color: var(--srm-accent);
    font-size: 24px;
    font-weight: 300;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.18s ease, color 0.18s ease;
    padding: 0;
    outline: none;
}

.seo-roadmap-item.is-open .seo-roadmap-item__toggle {
    background: var(--srm-accent);
    color: #fff;
}

/* ── Content Panel ──────────────────────────────────────────────────────────── */
.seo-roadmap-item__content {
    /* 44px left padding to match title row */
    padding: 0 32px 24px 44px;
    animation: srmFadeIn 0.25s ease;
}

.seo-roadmap-item__content[hidden] {
    display: none;
}

@keyframes srmFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.seo-roadmap-item__description {
    font-size: 0.9rem;
    line-height: 1.65;
    color: #606060;
    margin: 0 0 18px;
}

/* ── Links Grid (bordered pill boxes — competitor style) ─────────────────────── */
.seo-roadmap-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

/* Each button is a bordered pill/box with an arrow */
.seo-roadmap-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    font-size: 0.85rem;
    font-weight: 400;
    color: #303030;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

span.seo-roadmap-btn {
    cursor: default;
    opacity: 0.8; /* slightly faded for items without links */
}

a.seo-roadmap-btn:hover {
    border-color: var(--srm-accent);
    color: var(--srm-accent);
    background: #f5f3ff;
    text-decoration: none;
}

/* The SVG arrow icon */
.seo-roadmap-btn .srm-arrow {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    margin-left: auto;
}

.seo-roadmap-btn .srm-arrow svg path {
    fill: var(--srm-accent);
}

@media (max-width: 640px) {
    .seo-roadmap-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 400px) {
    .seo-roadmap-buttons {
        grid-template-columns: 1fr;
    }
}

/* ── Empty state ────────────────────────────────────────────────────────────── */
.seo-roadmap-empty {
    text-align: center;
    color: #6b7280;
    font-size: 15px;
    padding: 32px;
    border: 2px dashed #e5e7eb;
    border-radius: 12px;
}

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 500px) {
    .seo-roadmap-top h2 {
        font-size: 1.5rem;
    }
    .seo-roadmap-top {
        padding-left: 56px;
    }
    .seo-roadmap-item {
        padding-left: 56px;
    }
    .seo-roadmap-item__title {
        font-size: 0.8rem;
    }
}
