/* Link Building Agency page: provider-selection and campaign-operations layout */
.agency-intro-grid { align-items: start; }

.agency-responsibility-stack {
    display: grid;
    gap: 12px;
}
.agency-responsibility-stack article,
.agency-proof-list article {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 16px;
    padding: 22px;
    border: 1px solid var(--bw-border);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--bw-shadow-soft);
}
.agency-responsibility-stack article > span,
.agency-proof-list article > span {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 7px;
    background: var(--bw-soft-orange);
    color: var(--bw-orange);
    font-size: 16px;
    font-weight: 700;
}
.agency-responsibility-stack h3,
.agency-proof-list h3 { margin: 0 0 5px; font-size: 21px; }
.agency-responsibility-stack p,
.agency-proof-list p { margin: 0; color: var(--bw-muted); font-size: 16px; }

.agency-criteria-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0,1fr));
    gap: 14px;
}
.agency-criteria-card {
    min-height: 270px;
    padding: 24px 20px;
    border: 1px solid var(--bw-border);
    border-top: 3px solid var(--bw-orange);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--bw-shadow-soft);
}
.agency-criteria-card > span {
    display: block;
    color: var(--bw-orange);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .04em;
}
.agency-criteria-card h3 { margin: 12px 0 10px; font-size: 21px; }
.agency-criteria-card p { margin: 0; color: var(--bw-muted); font-size: 16px; line-height: 1.6; }

/* Desktop provider comparison */
.agency-compare-section { background: #fff; }
.provider-compare {
    overflow: hidden;
    border: 1px solid var(--bw-border);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(44,38,71,.07);
}
.provider-compare__row {
    display: grid;
    grid-template-columns: .8fr 1.25fr 1fr 1fr;
}
.provider-compare__row > div {
    padding: 18px 20px;
    border-right: 1px solid var(--bw-border);
    border-bottom: 1px solid var(--bw-border);
    font-size: 16px;
    line-height: 1.55;
}
.provider-compare__row > div:last-child { border-right: 0; }
.provider-compare__row:last-child > div { border-bottom: 0; }
.provider-compare__head > div {
    background: var(--bw-navy);
    color: #fff;
    font-weight: 700;
}
.provider-compare__row:not(.provider-compare__head) > div:first-child {
    background: #FFF8F4;
    color: var(--bw-navy);
}
.provider-compare__row:not(.provider-compare__head):hover > div { background-color: #FFFCFA; }
.provider-compare__row:not(.provider-compare__head):hover > div:first-child { background-color: #FFF3EC; }

/* Campaign architecture cards */
.agency-structure-lanes {
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 16px;
}
.agency-structure-lanes article {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 410px;
    padding: 28px 24px 24px;
    overflow: hidden;
    border: 1px solid var(--bw-border);
    border-radius: 9px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(44,38,71,.07);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.agency-structure-lanes article:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 38px rgba(44,38,71,.11);
}
.agency-structure-lanes article::before {
    position: absolute;
    top: 22px;
    right: 22px;
    display: grid;
    place-items: center;
    min-width: 42px;
    height: 40px;
    padding: 0 9px;
    border: 1px solid rgba(255,79,1,.24);
    border-radius: 7px;
    background: #FFF5EF;
    color: var(--bw-orange);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .02em;
}
.agency-structure-lanes article:nth-child(1)::before { content: "01"; }
.agency-structure-lanes article:nth-child(2)::before { content: "02"; }
.agency-structure-lanes article:nth-child(3)::before { content: "03"; }
.agency-structure-lanes article:nth-child(4)::before { content: "50K"; }
.agency-structure-lanes article.is-accent {
    border-color: rgba(255,79,1,.50);
    background: linear-gradient(180deg, #FFF9F5 0%, #FFFDFC 100%);
}
.agency-structure-lanes article.is-dark {
    border-color: var(--bw-navy);
    background: linear-gradient(145deg, #2C2647 0%, #342C55 100%);
    color: #fff;
    box-shadow: 0 16px 36px rgba(44,38,71,.20);
}
.agency-structure-lanes article.is-dark::before {
    border-color: rgba(255,255,255,.16);
    background: rgba(255,255,255,.09);
    color: #FFB18D;
}
.agency-structure-lanes article.is-dark h3,
.agency-structure-lanes article.is-dark a { color: #fff; }
.agency-structure-lanes article.is-dark p { color: rgba(255,255,255,.80); }
.agency-structure-lanes__label {
    max-width: calc(100% - 58px);
    margin-bottom: 10px;
    color: var(--bw-orange);
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .045em;
}
.agency-structure-lanes article.is-dark .agency-structure-lanes__label { color: #FFB18D; }
.agency-structure-lanes h3 {
    margin: 2px 0 14px;
    font-size: 23px;
    line-height: 1.22;
}
.agency-structure-lanes p {
    margin: 0;
    color: var(--bw-muted);
    font-size: 16px;
    line-height: 1.62;
}
.agency-structure-lanes a {
    margin-top: auto;
    padding-top: 18px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
}

/* Professional icon-based campaign flow. SVGs are embedded to avoid an external icon-font request. */
.agency-flow {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 6px;
    margin: 24px 0 4px;
    padding: 18px 12px 14px;
    border: 1px solid #E5E1EA;
    border-radius: 8px;
    background: linear-gradient(180deg,#FAF9FB 0%,#F6F4F8 100%);
}
.agency-flow::before {
    content: "";
    position: absolute;
    top: 41px;
    left: 36px;
    right: 36px;
    height: 2px;
    background: linear-gradient(90deg,#D9D4DF 0%,#CFC8D8 100%);
}
.agency-flow b { display: none; }
.agency-flow span {
    position: relative;
    z-index: 2;
    display: flex;
    flex: 1 1 0;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--bw-navy);
    font-size: 14px;
    font-weight: 650;
    line-height: 1.2;
    text-align: center;
}
.agency-flow span::before {
    content: "";
    display: block;
    width: 48px;
    height: 48px;
    border: 1px solid #DDD7E5;
    border-radius: 12px;
    background-color: #fff;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 24px 24px;
    box-shadow: 0 4px 12px rgba(44,38,71,.08), 0 0 0 5px #F8F7FA;
}
.agency-flow span:not(:last-of-type)::after {
    content: "›";
    position: absolute;
    top: 13px;
    right: -8px;
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #F8F7FA;
    color: var(--bw-orange);
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
}
/* Link icon */
.agency-structure-lanes article:nth-child(1) .agency-flow span:first-of-type::before,
.agency-structure-lanes article:nth-child(2) .agency-flow span:nth-of-type(2)::before,
.agency-structure-lanes article:nth-child(3) .agency-flow span:nth-of-type(3)::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FF4F01' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.5 13.5a4 4 0 0 0 5.66 0l2.34-2.34a4 4 0 0 0-5.66-5.66L11.5 6.84'/%3E%3Cpath d='M13.5 10.5a4 4 0 0 0-5.66 0L5.5 12.84a4 4 0 0 0 5.66 5.66l1.34-1.34'/%3E%3C/svg%3E");
}
/* Layer icon */
.agency-structure-lanes article:nth-child(2) .agency-flow span:first-of-type::before,
.agency-structure-lanes article:nth-child(3) .agency-flow span:nth-of-type(2)::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FF4F01' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m12 3 8 4-8 4-8-4 8-4Z'/%3E%3Cpath d='m4 12 8 4 8-4'/%3E%3Cpath d='m4 17 8 4 8-4'/%3E%3C/svg%3E");
}
/* Deep/network icon */
.agency-structure-lanes article:nth-child(3) .agency-flow span:first-of-type::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FF4F01' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='3' width='6' height='5' rx='1.5'/%3E%3Crect x='3' y='16' width='6' height='5' rx='1.5'/%3E%3Crect x='15' y='16' width='6' height='5' rx='1.5'/%3E%3Cpath d='M12 8v4M6 16v-4h12v4'/%3E%3C/svg%3E");
}
/* Volume/database icon */
.agency-structure-lanes article:nth-child(4) .agency-flow span:first-of-type::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FF9A6B' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cellipse cx='12' cy='5' rx='7' ry='3'/%3E%3Cpath d='M5 5v6c0 1.7 3.1 3 7 3s7-1.3 7-3V5'/%3E%3Cpath d='M5 11v6c0 1.7 3.1 3 7 3s7-1.3 7-3v-6'/%3E%3C/svg%3E");
}
/* Target icon for every final node */
.agency-flow span:last-of-type::before {
    border-color: rgba(255,79,1,.35);
    background-color: #FFF2EB;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FF4F01' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M12 2v3M12 19v3M2 12h3M19 12h3'/%3E%3C/svg%3E");
    box-shadow: 0 5px 14px rgba(255,79,1,.12), 0 0 0 5px #F8F7FA;
}
.agency-flow span:last-of-type { color: var(--bw-orange); font-weight: 700; }

.agency-structure-lanes article.is-accent .agency-flow {
    border-color: rgba(255,79,1,.18);
    background: linear-gradient(180deg,#FFF7F2 0%,#FFF1E8 100%);
}
.agency-structure-lanes article.is-accent .agency-flow::before { background: #FFC5AA; }
.agency-structure-lanes article.is-accent .agency-flow span::before { box-shadow: 0 4px 12px rgba(255,79,1,.08), 0 0 0 5px #FFF4ED; }
.agency-structure-lanes article.is-accent .agency-flow span:not(:last-of-type)::after { background: #FFF4ED; }

.agency-structure-lanes article.is-dark .agency-flow {
    border-color: rgba(255,255,255,.13);
    background: rgba(255,255,255,.065);
}
.agency-structure-lanes article.is-dark .agency-flow::before { background: rgba(255,255,255,.22); }
.agency-structure-lanes article.is-dark .agency-flow span { color: rgba(255,255,255,.92); }
.agency-structure-lanes article.is-dark .agency-flow span::before {
    border-color: rgba(255,255,255,.16);
    background-color: #40375F;
    box-shadow: 0 4px 12px rgba(0,0,0,.12), 0 0 0 5px #39315A;
}
.agency-structure-lanes article.is-dark .agency-flow span:not(:last-of-type)::after { background: #39315A; color: #FFB18D; }
.agency-structure-lanes article.is-dark .agency-flow span:last-of-type { color: #FFB18D; }
.agency-structure-lanes article.is-dark .agency-flow span:last-of-type::before {
    border-color: rgba(255,154,107,.48);
    background-color: rgba(255,79,1,.12);
    box-shadow: 0 5px 14px rgba(0,0,0,.14), 0 0 0 5px #39315A;
}

.agency-proof-split { align-items: center; }
.agency-proof-list { display: grid; gap: 12px; }

@media (max-width: 1050px) {
    .agency-criteria-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
    .agency-structure-lanes { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

/* Modern responsive comparison: each area becomes a self-contained mobile card. */
@media (max-width: 900px) {
    .provider-compare {
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }
    .provider-compare__head { display: none; }
    .provider-compare__row:not(.provider-compare__head) {
        display: block;
        margin-bottom: 16px;
        overflow: hidden;
        border: 1px solid var(--bw-border);
        border-radius: 9px;
        background: #fff;
        box-shadow: 0 8px 24px rgba(44,38,71,.07);
    }
    .provider-compare__row:not(.provider-compare__head) > div {
        display: grid;
        grid-template-columns: 138px minmax(0,1fr);
        gap: 14px;
        align-items: center;
        padding: 16px 18px;
        border-right: 0;
        border-bottom: 1px solid var(--bw-border);
        background: #fff;
        font-size: 16px;
        line-height: 1.5;
    }
    .provider-compare__row:not(.provider-compare__head) > div:last-child { border-bottom: 0; }
    .provider-compare__row:not(.provider-compare__head) > div:first-child {
        position: relative;
        display: flex;
        align-items: center;
        min-height: 58px;
        padding: 16px 18px 16px 56px;
        border-bottom: 0;
        background: linear-gradient(135deg,#2C2647 0%,#352D55 100%);
        color: #fff !important;
        font-size: 18px;
        font-weight: 700;
        letter-spacing: -.01em;
    }
    .provider-compare__row:not(.provider-compare__head) > div:first-child strong { display: none !important; }
    .provider-compare__row:not(.provider-compare__head) > div:first-child::after {
        content: "";
        position: absolute;
        left: 18px;
        top: 50%;
        width: 26px;
        height: 26px;
        transform: translateY(-50%);
        border-radius: 7px;
        background-color: rgba(255,255,255,.10);
        background-repeat: no-repeat;
        background-position: center;
        background-size: 16px 16px;
    }
    .provider-compare__row:nth-child(2) > div:first-child::before { content: "Campaign setup"; }
    .provider-compare__row:nth-child(3) > div:first-child::before { content: "Backlink depth"; }
    .provider-compare__row:nth-child(4) > div:first-child::before { content: "Indexing workflow"; }
    .provider-compare__row:nth-child(5) > div:first-child::before { content: "Reporting"; }
    .provider-compare__row:nth-child(6) > div:first-child::before { content: "Best suited to"; }
    .provider-compare__row:nth-child(2) > div:first-child::after {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFB18D' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16M7 4v6M17 4v6M5 12h14v8H5z'/%3E%3C/svg%3E");
    }
    .provider-compare__row:nth-child(3) > div:first-child::after {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFB18D' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m12 3 8 4-8 4-8-4 8-4Z'/%3E%3Cpath d='m4 12 8 4 8-4M4 17l8 4 8-4'/%3E%3C/svg%3E");
    }
    .provider-compare__row:nth-child(4) > div:first-child::after {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFB18D' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v4M5.6 5.6l2.8 2.8M3 12h4M5.6 18.4l2.8-2.8M12 21v-4M18.4 18.4l-2.8-2.8M21 12h-4M18.4 5.6l-2.8 2.8'/%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3C/svg%3E");
    }
    .provider-compare__row:nth-child(5) > div:first-child::after {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFB18D' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3h9l3 3v15H6z'/%3E%3Cpath d='M15 3v4h4M9 11h6M9 15h6'/%3E%3C/svg%3E");
    }
    .provider-compare__row:nth-child(6) > div:first-child::after {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFB18D' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='3'/%3E%3Ccircle cx='17' cy='9' r='2.5'/%3E%3Cpath d='M3 20c.4-4 2.5-6 6-6s5.6 2 6 6M14 15c2.8-.3 5 1.2 6 4'/%3E%3C/svg%3E");
    }
    .provider-compare__row:not(.provider-compare__head) > div:nth-child(2)::before,
    .provider-compare__row:not(.provider-compare__head) > div:nth-child(3)::before,
    .provider-compare__row:not(.provider-compare__head) > div:nth-child(4)::before {
        display: inline-flex;
        align-items: center;
        min-height: 30px;
        font-size: 13px;
        font-weight: 700;
        line-height: 1.3;
        text-transform: uppercase;
        letter-spacing: .035em;
    }
    .provider-compare__row:not(.provider-compare__head) > div:nth-child(2)::before {
        content: "Backlink Works";
        color: var(--bw-orange);
    }
    .provider-compare__row:not(.provider-compare__head) > div:nth-child(3)::before {
        content: "In-House Team";
        color: var(--bw-navy);
    }
    .provider-compare__row:not(.provider-compare__head) > div:nth-child(4)::before {
        content: "Freelance";
        color: var(--bw-navy);
    }
    .provider-compare__row:not(.provider-compare__head) > div:nth-child(2) { background: #FFF9F5; }
    .provider-compare__row:not(.provider-compare__head):hover > div { background: inherit; }
    .provider-compare__row:not(.provider-compare__head):hover > div:first-child { background: linear-gradient(135deg,#2C2647 0%,#352D55 100%); }
}

@media (max-width: 700px) {
    .agency-criteria-grid,
    .agency-structure-lanes { grid-template-columns: 1fr; }
    .agency-criteria-card,
    .agency-structure-lanes article { min-height: 0; }
    .agency-responsibility-stack article,
    .agency-proof-list article { grid-template-columns: 42px 1fr; padding: 20px; }
    .agency-structure-lanes article { padding: 24px 20px 22px; }
    .agency-flow { margin-top: 20px; padding: 16px 8px 13px; }
    .agency-flow::before { top: 39px; left: 32px; right: 32px; }
    .agency-flow span { gap: 7px; font-size: 14px; }
    .agency-flow span::before { width: 44px; height: 44px; background-size: 22px 22px; }
    .provider-compare__row:not(.provider-compare__head) > div {
        grid-template-columns: 122px minmax(0,1fr);
        gap: 12px;
        padding: 14px 15px;
    }
}

@media (max-width: 430px) {
    .provider-compare__row:not(.provider-compare__head) > div:not(:first-child) {
        grid-template-columns: 1fr;
        gap: 4px;
    }
    .provider-compare__row:not(.provider-compare__head) > div:first-child {
        padding-left: 52px;
        font-size: 17px;
    }
    .provider-compare__row:not(.provider-compare__head) > div:first-child::after { left: 15px; }
    .agency-flow { gap: 3px; }
    .agency-flow span { font-size: 13px; }
    .agency-flow span::before { width: 40px; height: 40px; background-size: 20px 20px; }
    .agency-flow span:not(:last-of-type)::after { right: -6px; }
}

/* 3 Tier stepped architecture: T3 -> T2 -> T1 -> Target. */
.agency-structure-lanes article:nth-child(3) .agency-flow {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, auto);
    column-gap: 46px;
    row-gap: 28px;
    padding: 18px 20px 16px;
}
.agency-structure-lanes article:nth-child(3) .agency-flow::before { display: none; }
.agency-structure-lanes article:nth-child(3) .agency-flow span {
    flex: none;
    width: 100%;
}
.agency-structure-lanes article:nth-child(3) .agency-flow span:nth-of-type(1) { grid-column: 1; grid-row: 1; }
.agency-structure-lanes article:nth-child(3) .agency-flow span:nth-of-type(2) { grid-column: 2; grid-row: 1; }
.agency-structure-lanes article:nth-child(3) .agency-flow span:nth-of-type(3) { grid-column: 2; grid-row: 2; }
.agency-structure-lanes article:nth-child(3) .agency-flow span:nth-of-type(4) { grid-column: 1; grid-row: 2; }
.agency-structure-lanes article:nth-child(3) .agency-flow span::after {
    background: transparent;
    border-radius: 0;
    width: auto;
    height: auto;
    font-size: 23px;
    line-height: 1;
    color: var(--bw-orange);
}
.agency-structure-lanes article:nth-child(3) .agency-flow span:nth-of-type(1)::after {
    content: "→";
    top: 12px;
    right: -35px;
}
.agency-structure-lanes article:nth-child(3) .agency-flow span:nth-of-type(2)::after {
    content: "↓";
    top: auto;
    right: 50%;
    bottom: -31px;
    transform: translateX(50%);
}
.agency-structure-lanes article:nth-child(3) .agency-flow span:nth-of-type(3)::after {
    content: "←";
    top: 12px;
    right: auto;
    left: -35px;
}
.agency-structure-lanes article:nth-child(3) .agency-flow span:nth-of-type(4)::after { display: none; }

@media (max-width: 430px) {
    .agency-structure-lanes article:nth-child(3) .agency-flow {
        column-gap: 38px;
        row-gap: 25px;
        padding-left: 14px;
        padding-right: 14px;
    }
    .agency-structure-lanes article:nth-child(3) .agency-flow span:nth-of-type(1)::after { right: -30px; }
    .agency-structure-lanes article:nth-child(3) .agency-flow span:nth-of-type(3)::after { left: -30px; }
}
