/* ==========================================================================
   TopWeb redesign - page styles for home.php + explore.php (home group)
   Prototype: TopWebDev-Prototype/pages/index.html (home), top-developers.html (explore).
   Loaded after inc/stylesheet.php, so it overrides theme-new.css legacy rules.
   City cards + "why trust us" live in tw-cmp-explore.css (global).
   Company cards (blocks/company_detail_block) are styled by tw-cmp-company.css.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Shared: hero reset (theme-new .hero is centred, gradient-text h1)
   -------------------------------------------------------------------------- */
.hero.tw-phero { text-align: left; background: var(--tw-bg-soft); }
.hero.tw-phero > .container { position: relative; z-index: 1; }
.hero.tw-phero h1 {
    background: none;
    -webkit-background-clip: border-box;
    background-clip: border-box;
    -webkit-text-fill-color: currentColor;
    color: var(--tw-ink);
    font-weight: 800;
    letter-spacing: -.035em;
}
.hero.tw-phero h1 .tw-hl { color: var(--tw-primary); -webkit-text-fill-color: var(--tw-primary); }
.hero.tw-phero p {
    margin: 0;
    max-width: 560px;
    font-size: 18px;
    line-height: 1.6;
    color: var(--tw-body);
}

/* section heading row (kicker / h2 / sub + action) */
.tw-home-head,
.hds-section .hds-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 44px;
}
.tw-home-head > div,
.hds-section .hds-head > div { min-width: 0; flex: 1 1 520px; }
.tw-home-head .section-title,
.hds-section .hds-head .section-title {
    text-align: left;
    font-size: 40px;
    line-height: 1.12;
    letter-spacing: -.03em;
    font-weight: 800;
    margin: 12px 0 0;
    color: var(--tw-ink);
}
.hds-section .hds-head .tw-sub { margin-top: 14px; }
.tw-home-head .section-title .tw-hl,
.hds-section .hds-head .section-title .tw-hl { white-space: nowrap; }
.tw-home-head .btn,
.hds-section .hds-head .btn { flex: 0 0 auto; }

/* --------------------------------------------------------------------------
   HOME - hero
   -------------------------------------------------------------------------- */
.hero.tw-home-hero { padding: calc(var(--tw-hdr-h) + 64px) 0 128px; }
.tw-home-ring {
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    border: 1.5px dashed var(--tw-line-hover);
    right: -120px;
    top: -60px;
    pointer-events: none;
    animation: twHomeFloat 6s ease-in-out infinite;
}
.tw-home-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
    gap: 48px;
    align-items: center;
}
.tw-home-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px 7px 8px;
    border-radius: 999px;
    background: #FFFFFF;
    border: 1px solid #E1E7F3;
    font-size: 13px;
    font-weight: 600;
    color: #3A4867;
}
.tw-home-eyebrow b {
    background: var(--tw-accent);
    color: #FFFFFF;
    border-radius: 999px;
    padding: 3px 9px;
    font-size: 11px;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.hero.tw-home-hero h1 {
    font-size: 56px;
    line-height: 1.06;
    margin: 22px 0 18px;
}
.tw-home-hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.tw-home-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 22px;
    align-items: center;
    font-size: 13px;
    color: var(--tw-muted);
}
.tw-home-tag {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: #FFFFFF;
    border: 1px solid #E1E7F3;
    color: var(--tw-ink-3);
    font-weight: 600;
    transition: border-color .2s, color .2s;
}
.tw-home-tag:hover { border-color: var(--tw-primary); color: var(--tw-primary); }
.tw-home-art { position: relative; height: 460px; }
.tw-home-art svg { position: absolute; inset: 0; overflow: visible; }
.tw-home-hero .tw-fu:nth-child(2) { animation-delay: .08s; }
.tw-home-hero .tw-fu:nth-child(3) { animation-delay: .18s; }
.tw-home-hero .tw-fu:nth-child(4) { animation-delay: .28s; }
.tw-home-hero .tw-fu:nth-child(5) { animation-delay: .38s; }

@keyframes twHomeFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes twHomeFloatB { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(10px) rotate(2deg); } }
@keyframes twHomeSpin { to { transform: rotate(360deg); } }
@keyframes twHomeDash { to { stroke-dashoffset: 0; } }
@keyframes twHomeGrow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.tw-home-float { animation: twHomeFloat 6s ease-in-out infinite; transform-box: fill-box; }
.tw-home-floatB { animation: twHomeFloatB 7s ease-in-out infinite; transform-box: fill-box; }
.tw-home-spin { animation: twHomeSpin 30s linear infinite; transform-origin: center; transform-box: fill-box; }
.tw-home-draw { stroke-dasharray: 600; stroke-dashoffset: 600; animation: twHomeDash 2.4s ease forwards .4s; }
.tw-home-bar { transform-origin: bottom; transform-box: fill-box; animation: twHomeGrow 1.2s var(--tw-ease) both; }

/* hero additions: service search, stats row, floating cards */
.tw-home-search {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 560px;
    margin-top: 30px;
    padding: 6px;
    background: #FFFFFF;
    border: 1.5px solid var(--tw-input-line);
    border-radius: var(--tw-r-md);
    box-shadow: var(--tw-shadow);
    transition: border-color .2s, box-shadow .2s;
}
.tw-home-search:focus-within { border-color: var(--tw-primary); box-shadow: var(--tw-focus), var(--tw-shadow); }
.tw-home-search-field { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 0 10px; margin: 0; color: var(--tw-muted); }
.tw-home-search select {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 46px;
    border: 0;
    outline: 0;
    background: transparent;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    color: var(--tw-ink);
    cursor: pointer;
}
.tw-home-search .btn { flex: 0 0 auto; }
/* prototype hero search: service + location */
.tw-home-search { max-width: 600px; padding: 8px; border: 1px solid #DCE3F1; border-radius: 18px; box-shadow: 0 20px 40px -24px rgba(11, 27, 63, .3); }
.tw-home-search-field { flex: 1 1 0; padding: 0 12px; }
.tw-home-search-field > i { flex: 0 0 auto; font-size: 16px; color: #5B6782; }
.tw-home-search input {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    min-height: 44px;
    border: 0;
    outline: 0;
    background: transparent;
    font: inherit;
    font-size: 15px;
    color: var(--tw-ink);
}
.tw-home-search input::placeholder { color: #8A94AB; }
.tw-home-search select { font-weight: 500; min-height: 44px; }
.tw-home-search-div { flex: 0 0 1px; width: 1px; height: 28px; background: #E1E7F3; }
.tw-home-search .btn { min-height: 46px; padding: 0 22px; border-radius: 12px; }
.tw-home-how-foot { display: flex; flex-direction: column; align-items: center; gap: 28px; margin-top: 56px; }
.tw-home-how-foot .tw-home-stats { margin: 0; justify-content: center; }
.tw-home-how-foot .tw-home-hero-cta { margin: 0; justify-content: center; }
/* prototype (index.html) hero sizing */
.hero.tw-home-hero { padding: calc(var(--tw-hdr-h) + 72px) 0 96px; overflow: hidden; }
.tw-home-hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; }
.hero.tw-home-hero h1 { font-size: 52px; line-height: 1.08; letter-spacing: -.035em; }
.hero.tw-home-hero h1 .tw-hl { white-space: normal; }
.hero.tw-home-hero .tw-home-hero-copy > p { font-size: 18px; line-height: 1.6; max-width: 540px; }
.tw-home-search { margin-top: 32px; }
.tw-home-hero .tw-home-tags { margin-top: 18px; }
.tw-home-art { height: 500px; }
.tw-home-art-scale { position: relative; height: 100%; }
.tw-home-topco { top: 34px; left: -6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tw-home-hero .tw-home-tags { margin-top: 16px; }
.tw-home-hero .tw-home-hero-cta { margin-top: 28px; }

.tw-home-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, auto));
    justify-content: start;
    gap: 0;
    margin: 36px 0 0;
}
.tw-home-stats > div { padding: 0 26px; border-left: 1px solid var(--tw-line-strong); }
.tw-home-stats > div:first-child { padding-left: 0; border-left: 0; }
.tw-home-stats dt { font-size: 26px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; color: var(--tw-ink); }
.tw-home-stats dt small { font-size: 15px; color: var(--tw-muted); font-weight: 700; }
.tw-home-stats dd { margin: 4px 0 0; font-size: 13px; font-weight: 600; color: var(--tw-muted); }

.tw-home-topco {
    position: absolute;
    top: 30px;
    left: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px 12px 12px;
    background: #FFFFFF;
    border: 1px solid var(--tw-line);
    border-radius: var(--tw-r-md);
    box-shadow: var(--tw-shadow-pop);
    color: var(--tw-ink);
    max-width: 290px;
    animation: twHomeFloat 6s ease-in-out infinite;
}
.tw-home-topco:hover { color: var(--tw-ink); border-color: var(--tw-line-hover); }
.tw-home-topco-av {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--tw-primary);
    color: #FFFFFF;
    font-weight: 800;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.tw-home-topco > span:last-child { min-width: 0; }
.tw-home-topco b { display: block; font-size: 15px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tw-home-topco small { display: block; font-size: 12.5px; color: var(--tw-muted); font-weight: 600; margin-top: 2px; }
.tw-home-topco small i { color: var(--tw-star); }
.tw-home-verified {
    position: absolute;
    right: 0;
    bottom: 120px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--tw-r-md);
    background: var(--tw-ink);
    color: #FFFFFF;
    box-shadow: var(--tw-shadow-pop);
    font-size: 12.5px;
    animation: twHomeFloatB 7s ease-in-out infinite;
}
.tw-home-verified > i {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #16A34A;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}
.tw-home-verified b { display: block; font-size: 13px; }
.tw-home-verified span { color: var(--tw-footer-text); }
.tw-home-verified span b { color: #FFFFFF; }

/* --------------------------------------------------------------------------
   HOME - featured companies strip
   -------------------------------------------------------------------------- */
.tw-home-strip {
    padding: 34px 0 30px;
    background: #FFFFFF;
    border-bottom: 1px solid #EEF1F7;
    overflow: hidden;
}
.tw-home-strip-title {
    margin: 0 0 18px;
    text-align: center;
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--tw-muted);
}
.tw-home-marquee {
    display: flex;
    width: max-content;
    animation: twHomeMarquee 40s linear infinite;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.tw-home-strip:hover .tw-home-marquee { animation-play-state: paused; }
.tw-home-marquee-track { display: flex; align-items: center; flex-shrink: 0; }
.tw-home-marquee-track > a,
.tw-home-marquee-track > span {
    display: inline-flex;
    align-items: center;
    gap: 22px;
    padding: 0 22px 0 0;
    margin-right: 22px;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -.02em;
    color: #8A94AD;
    white-space: nowrap;
}
.tw-home-marquee-track > a::after,
.tw-home-marquee-track > span::after {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 2px;
    background: #C9D6F3;
    margin-left: 22px;
}
.tw-home-marquee-track > a:hover { color: var(--tw-ink); }
@keyframes twHomeMarquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* --------------------------------------------------------------------------
   HOME - section rhythm
   -------------------------------------------------------------------------- */
.tw-home-sec,
.hds-section { padding: 96px 0; }
.tw-home-head--center { justify-content: center; text-align: center; }
.tw-home-head--center > div { flex: 0 1 680px; }
.tw-home-head--center .section-title { text-align: center; }
.tw-home-head--center .tw-sub { margin: 14px auto 0; }
.tw-home-head .tw-sub { margin-top: 14px; }

/* services: 8 featured cards + chips */
.hds-section--services .hds-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}
.hds-section--services .hds-tile {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 26px;
    background: #FFFFFF;
    border: 1px solid var(--tw-line);
    border-radius: var(--tw-r-lg);
    color: var(--tw-ink);
    text-decoration: none;
    transition: transform .3s var(--tw-ease), box-shadow .3s ease, border-color .3s ease;
}
.hds-section--services .hds-tile:hover {
    transform: translateY(-6px);
    box-shadow: var(--tw-shadow-lg);
    border-color: var(--tw-line-hover);
    color: var(--tw-ink);
}
.hds-section .hds-ico {
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    border-radius: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--tw-primary-soft);
    color: var(--tw-primary);
    font-size: 20px;
    transition: transform .35s ease, background .3s, color .3s;
}
.hds-section--services .hds-tile:hover .hds-ico { transform: rotate(-8deg) scale(1.08); background: var(--tw-primary); color: #FFFFFF; }
.hds-tile-name { display: block; font-size: 18px; font-weight: 800; line-height: 1.3; margin: 18px 0 8px; }
.hds-tile-desc { display: block; font-size: 14.5px; line-height: 1.6; color: var(--tw-muted); flex: 1 1 auto; }
.hds-tile-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    font-size: 14px;
    font-weight: 700;
    color: var(--tw-primary);
}
.hds-tile-more i { font-size: 11px; transition: transform .25s; }
.hds-tile:hover .hds-tile-more i { transform: translateX(4px); }
.hds-more-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 32px; }
.hds-more-chips > span { font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--tw-muted); margin-right: 6px; }
.hds-more-chips a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 999px;
    background: #FFFFFF;
    border: 1.5px solid #E1E7F3;
    font-weight: 700;
    font-size: 14px;
    color: var(--tw-ink);
    transition: all .2s;
}
.hds-more-chips a:hover { border-color: var(--tw-primary); color: var(--tw-primary); transform: translateY(-2px); }

/* industries - dark navy band */
.hds-section--industries {
    position: relative;
    overflow: hidden;
    background: var(--tw-ink);
    color: #FFFFFF;
}
.hds-section--industries::before {
    content: "";
    position: absolute;
    width: 520px;
    height: 520px;
    right: -160px;
    top: -160px;
    border-radius: 50%;
    border: 1.2px dashed #2A4380;
    box-shadow: 0 0 0 70px rgba(255, 255, 255, .015);
    pointer-events: none;
}
.hds-section--industries > .container { position: relative; }
.hds-section--industries .tw-kicker { color: var(--tw-accent-light); }
.hds-section--industries .hds-head .section-title { color: #FFFFFF; }
.hds-section--industries .tw-sub { color: var(--tw-footer-text); }
.hds-section--industries .hds-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}
.hds-section--industries .hds-tile {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    border-radius: var(--tw-r-md);
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .12);
    color: #FFFFFF;
    font-weight: 700;
    text-decoration: none;
    transition: background .25s, transform .25s, border-color .25s;
}
.hds-section--industries .hds-tile:hover {
    background: rgba(255, 255, 255, .12);
    border-color: rgba(255, 255, 255, .3);
    transform: translateY(-3px);
    color: #FFFFFF;
}
.hds-section--industries .hds-ico {
    width: 46px;
    height: 46px;
    border-radius: var(--tw-r);
    background: rgba(96, 165, 250, .16);
    color: #93C5FD;
    font-size: 18px;
}
.hds-section--industries .hds-tile > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.hds-section--industries .hds-tile small { display: block; margin-top: 2px; font-weight: 500; font-size: 12.5px; color: var(--tw-footer-text); }

/* --------------------------------------------------------------------------
   HOME - ranked company cards (blocks/home_company_card.php)
   -------------------------------------------------------------------------- */
.companies-section.tw-home-companies { background: var(--tw-bg-soft); }
.tw-hc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.tw-hc {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
    padding: 24px;
    background: #FFFFFF;
    border: 1px solid var(--tw-line);
    border-radius: var(--tw-r-lg);
    transition: transform .3s var(--tw-ease), box-shadow .3s ease, border-color .3s ease;
}
.tw-hc:hover { transform: translateY(-6px); box-shadow: var(--tw-shadow-lg); border-color: var(--tw-line-hover); }
.tw-hc-top { display: flex; gap: 14px; align-items: flex-start; min-width: 0; }
.tw-hc-logo {
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    border-radius: 15px;
    border: 1px solid var(--tw-line);
    background: #FFFFFF;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tw-hc-logo img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.tw-hc-logo .company-logo-placeholder { width: 100%; height: 100%; border-radius: 0; font-size: 17px; }
.tw-hc-id { min-width: 0; flex: 1 1 auto; }
.tw-hc-rankrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 22px; }
.tw-hc-rank { font-size: 12.5px; font-weight: 800; color: var(--tw-muted); letter-spacing: .02em; }
.tw-hc-badge { font-size: 10.5px; padding: 3px 8px; margin: 0; }
.tw-hc-badge--pending { background: var(--tw-warning-soft); color: var(--tw-warning); }
.tw-hc-name { margin: 2px 0 6px; font-size: 18px; font-weight: 800; line-height: 1.25; letter-spacing: -.02em; overflow-wrap: anywhere; }
.tw-hc-name a { color: var(--tw-ink); }
.tw-hc-name a:hover { color: var(--tw-primary); }
.tw-hc-rating { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--tw-muted); }
.tw-hc-stars { color: var(--tw-star); font-size: 13px; letter-spacing: 1px; white-space: nowrap; }
.tw-hc-rating b { color: var(--tw-ink); font-weight: 800; }
.tw-hc-rating a { color: var(--tw-muted); }
.tw-hc-rating a:hover { color: var(--tw-primary); }
.tw-hc-norev { font-weight: 600; }
.tw-hc-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
    margin: 0;
    padding: 16px;
    background: var(--tw-bg-soft);
    border-radius: var(--tw-r-md);
}
.tw-hc-facts > div { min-width: 0; }
.tw-hc-facts dt { font-size: 12px; font-weight: 600; color: var(--tw-muted); }
.tw-hc-facts dd { margin: 3px 0 0; font-size: 14.5px; font-weight: 800; color: var(--tw-ink); overflow-wrap: anywhere; }
.tw-hc-services { display: flex; flex-wrap: wrap; gap: 6px; }
.tw-hc-svc {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    border: 1px solid var(--tw-line);
    background: #FFFFFF;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11.5px;
    font-weight: 800;
    color: var(--tw-muted);
}
.tw-hc-svc img { width: 18px; height: 18px; object-fit: contain; }
.tw-hc-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 10px; margin-top: auto; }
.tw-hc-actions .btn { min-height: 44px; padding: 0 12px; font-size: 14px; }

/* --------------------------------------------------------------------------
   HOME - reviews (no prototype equivalent: featured quote + stacked list)
   -------------------------------------------------------------------------- */
.hds-section--reviews { background: #FFFFFF; }
.hds-rv-layout { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); gap: 56px; align-items: start; }
.hds-rv-intro { position: sticky; top: calc(var(--tw-hdr-h) + 32px); }
.hds-rv-intro .section-title { text-align: left; font-size: 40px; line-height: 1.12; font-weight: 800; letter-spacing: -.03em; margin: 12px 0 14px; color: var(--tw-ink); }
.hds-rv-intro .section-title .tw-hl { white-space: nowrap; }
.hds-rv-score {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 28px 0;
    padding: 18px 20px;
    border-radius: var(--tw-r-md);
    background: var(--tw-bg-soft);
    border: 1px solid var(--tw-line);
}
.hds-rv-score > b { font-size: 44px; line-height: 1; font-weight: 800; letter-spacing: -.04em; color: var(--tw-ink); }
.hds-rv-score small { display: block; margin-top: 4px; font-size: 13px; font-weight: 600; color: var(--tw-muted); }
.hds-section--reviews .hds-reviews {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}
.hds-section--reviews .hds-review {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    padding: 24px;
    background: #FFFFFF;
    border: 1px solid var(--tw-line);
    border-radius: var(--tw-r-lg);
    transition: box-shadow .3s ease, border-color .3s ease;
}
.hds-section--reviews .hds-review:hover { box-shadow: var(--tw-shadow); border-color: var(--tw-line-hover); }
.hds-section--reviews .hds-review--featured {
    grid-column: 1 / -1;
    padding: 36px 36px 30px;
    background: var(--tw-ink);
    border-color: var(--tw-ink);
    color: #FFFFFF;
    overflow: hidden;
}
.hds-review-quote {
    position: absolute;
    right: 28px;
    top: -18px;
    font-size: 160px;
    line-height: 1;
    font-weight: 800;
    color: rgba(255, 255, 255, .08);
    pointer-events: none;
}
.hds-stars { display: flex; align-items: center; gap: 2px; color: var(--tw-star); font-size: 13px; white-space: nowrap; }
.hds-stars b { margin-left: 6px; color: var(--tw-ink); font-size: 13.5px; }
.hds-review--featured .hds-stars b { color: #FFFFFF; }
.hds-review h3 { margin: 4px 0 0; font-size: 17px; font-weight: 800; line-height: 1.35; color: var(--tw-ink); overflow-wrap: anywhere; }
.hds-review--featured h3 { font-size: 24px; letter-spacing: -.02em; color: #FFFFFF; max-width: 640px; }
.hds-review p { margin: 0; color: var(--tw-muted); font-size: 14.5px; line-height: 1.6; overflow-wrap: anywhere; }
.hds-review--featured p { color: var(--tw-footer-text); font-size: 16px; line-height: 1.65; }
.hds-review-foot {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--tw-line-2);
    min-width: 0;
}
.hds-review--featured .hds-review-foot { border-top-color: rgba(255, 255, 255, .12); margin-top: 8px; }
.hds-review-logo {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--tw-line);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FFFFFF;
}
.hds-review-logo img { width: 100%; height: 100%; object-fit: contain; }
.hds-review-meta { min-width: 0; }
.hds-review-company { display: block; font-weight: 800; font-size: 14.5px; color: var(--tw-ink); overflow-wrap: anywhere; }
.hds-review-company:hover { color: var(--tw-primary); }
.hds-review--featured .hds-review-company { color: #FFFFFF; }
.hds-review--featured .hds-review-company:hover { color: var(--tw-accent-light); }
.hds-review-by { font-size: 12.5px; font-weight: 600; color: var(--tw-muted); overflow-wrap: anywhere; }
.hds-review--featured .hds-review-by { color: var(--tw-footer-text); }

/* --------------------------------------------------------------------------
   HOME - how it works
   -------------------------------------------------------------------------- */
.tw-home-how { background: var(--tw-bg-soft); border-top: 1px solid var(--tw-line-2); }
.tw-home-steps {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.tw-home-steps::before {
    content: "";
    position: absolute;
    top: 28px;
    left: 56px;
    right: calc(33.33% - 24px);
    border-top: 2px dashed var(--tw-line-hover);
}
.tw-home-steps li { position: relative; min-width: 0; }
.tw-home-step-num {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: #FFFFFF;
    border: 1.5px solid var(--tw-line-strong);
    color: var(--tw-primary);
    font-size: 18px;
    font-weight: 800;
}
.tw-home-step-num--on { background: var(--tw-primary); border-color: var(--tw-primary); color: #FFFFFF; box-shadow: var(--tw-shadow-btn); }
.tw-home-steps h3 { margin: 22px 0 8px; font-size: 19px; font-weight: 800; color: var(--tw-ink); }
.tw-home-steps p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--tw-muted); }
.tw-home-steps p a { font-weight: 700; }

/* --------------------------------------------------------------------------
   HOME - locations (split: intro + map / tile list)
   -------------------------------------------------------------------------- */
.tw-home-locs-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 56px; align-items: center; }
.tw-home-locs-intro .section-title { text-align: left; font-size: 40px; line-height: 1.12; font-weight: 800; letter-spacing: -.03em; margin: 12px 0 14px; color: var(--tw-ink); }
.tw-home-locs-intro .btn { margin-top: 26px; }
.tw-home-map { display: block; width: 100%; max-width: 380px; margin-top: 36px; }
.tw-home-loc-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tw-home-loc {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 10px 14px 10px 10px;
    background: #FFFFFF;
    border: 1px solid var(--tw-line);
    border-radius: var(--tw-r-md);
    color: var(--tw-ink);
    transition: transform .25s var(--tw-ease), border-color .25s, box-shadow .25s;
}
.tw-home-loc:hover { transform: translateY(-3px); border-color: var(--tw-line-hover); box-shadow: var(--tw-shadow); color: var(--tw-ink); }
.tw-home-loc img { flex: 0 0 52px; width: 52px; height: 52px; border-radius: 11px; object-fit: cover; background: var(--tw-bg-mute); }
.tw-home-loc span { flex: 1 1 auto; min-width: 0; font-size: 14px; font-weight: 700; line-height: 1.35; }
.tw-home-loc i { flex: 0 0 auto; font-size: 13px; color: var(--tw-primary); transition: transform .25s; }
.tw-home-loc:hover i { transform: translateX(4px); }

/* --------------------------------------------------------------------------
   HOME - resources (latest blog posts)
   -------------------------------------------------------------------------- */
.tw-home-res { background: var(--tw-bg-soft); }
.tw-home-res-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.tw-home-post {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 8px;
    background: #FFFFFF;
    border: 1px solid var(--tw-line);
    border-radius: var(--tw-r-lg);
    color: var(--tw-ink);
    transition: transform .3s var(--tw-ease), box-shadow .3s ease, border-color .3s ease;
}
.tw-home-post:hover { transform: translateY(-6px); box-shadow: var(--tw-shadow-lg); border-color: var(--tw-line-hover); color: var(--tw-ink); }
.tw-home-post-img {
    display: block;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--tw-primary-soft), var(--tw-accent-soft));
}
.tw-home-post-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s var(--tw-ease); }
.tw-home-post:hover .tw-home-post-img img { transform: scale(1.04); }
.tw-home-post-body { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px 14px 14px; flex: 1 1 auto; }
.tw-home-post-title { font-size: 17px; font-weight: 800; line-height: 1.35; letter-spacing: -.01em; overflow-wrap: anywhere; }
.tw-home-post-date { margin-top: auto; font-size: 13px; font-weight: 600; color: var(--tw-muted); }

/* --------------------------------------------------------------------------
   HOME - closing CTA (dark card + white panel)
   -------------------------------------------------------------------------- */
.tw-home-cta-sec { padding-top: 96px; padding-bottom: 0; }
.tw-home-cta { align-items: center; gap: 48px; padding: 56px; }
.tw-home-cta-copy { flex: 1 1 460px; min-width: 0; position: relative; z-index: 1; }
.tw-home-cta-copy .tw-h2 { margin: 12px 0 12px; }
.tw-home-ticks { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 12px; }
.tw-home-ticks li { display: flex; align-items: center; gap: 12px; font-size: 15.5px; font-weight: 600; color: #FFFFFF; }
.tw-home-ticks i { color: var(--tw-accent-light); }
.tw-home-cta-panel {
    flex: 0 1 400px;
    min-width: 0;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 30px;
    background: #FFFFFF;
    border-radius: var(--tw-r-lg);
    box-shadow: var(--tw-shadow-pop);
    color: var(--tw-ink);
}
.tw-home-cta-panel h3 { margin: 0; font-size: 22px; font-weight: 800; color: var(--tw-ink); }
.tw-home-cta-panel p { margin: 0 0 8px; font-size: 14.5px; line-height: 1.6; color: var(--tw-muted); }
.tw-home-cta-sec .tw-cta::before {
    content: "";
    position: absolute;
    width: 360px;
    height: 360px;
    left: -140px;
    bottom: -200px;
    border-radius: 50%;
    border: 1.4px dashed #2A4380;
    pointer-events: none;
}

/* --------------------------------------------------------------------------
   EXPLORE (explore-web-developers)
   -------------------------------------------------------------------------- */
.hero.tw-explore-hero { padding: calc(var(--tw-hdr-h) + 48px) 0 64px; }
.tw-explore-hero .tw-crumbs { margin: 0 0 22px; }
.tw-explore-hero .tw-crumbs-cur { color: var(--tw-ink); font-weight: 700; }
.hero.tw-explore-hero h1 { font-size: 54px; line-height: 1.06; margin: 14px 0 16px; max-width: 900px; }
.hero.tw-explore-hero p { font-size: 17px; }
.categories-section.tw-explore-list { padding: 64px 0 24px; overflow: visible; }
.explore-page #explore_list.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    padding: 0;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
    .tw-home-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .tw-home-art { display: none; }
    .hds-section--services .hds-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hds-section--industries .hds-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tw-hc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hds-rv-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
    .hds-rv-intro { position: static; }
    .tw-home-locs-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
    .tw-home-map { display: none; }
    .tw-home-res-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tw-home-res-grid > :nth-child(3) { display: none; }
    .tw-home-cta { padding: 44px; }
    .explore-page #explore_list.categories-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .tw-home-steps { grid-template-columns: minmax(0, 1fr); gap: 28px; }
    .tw-home-steps::before { top: 28px; bottom: 28px; left: 27px; right: auto; border-top: 0; border-left: 2px dashed var(--tw-line-hover); }
    .tw-home-steps li { display: grid; grid-template-columns: 56px minmax(0, 1fr); column-gap: 18px; }
    .tw-home-step-num { grid-row: 1 / span 2; }
    .tw-home-steps h3 { margin: 4px 0 6px; }
    .tw-home-cta-panel { flex-basis: 100%; }
}
@media (max-width: 767px) {
    .hero.tw-home-hero { padding: calc(var(--tw-hdr-h) + 40px) 0 72px; }
    .tw-home-ring { width: 260px; height: 260px; right: -110px; top: -40px; }
    .tw-home-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 0; }
    .tw-home-stats > div:nth-child(3) { padding-left: 0; border-left: 0; }
    .tw-hc-grid { grid-template-columns: minmax(0, 1fr); }
    .hds-section--reviews .hds-reviews { grid-template-columns: minmax(0, 1fr); }
    .tw-home-loc-list { grid-template-columns: minmax(0, 1fr); }
    .tw-home-res-grid { grid-template-columns: minmax(0, 1fr); }
    .tw-home-res-grid > :nth-child(3) { display: flex; }
    .explore-page #explore_list.categories-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}
@media (max-width: 680px) {
    .hero.tw-home-hero h1 { font-size: 38px; }
    .hero.tw-explore-hero h1 { font-size: 36px; }
    .hero.tw-phero p { font-size: 16px; }
    .hero.tw-explore-hero { padding: calc(var(--tw-hdr-h) + 32px) 0 48px; }
    .tw-home-search { flex-direction: column; align-items: stretch; padding: 10px; }
    .tw-home-search-div { display: none; }
    .tw-home-search-field { flex: 0 0 auto; border: 1px solid var(--tw-line); border-radius: 12px; }
    .tw-home-search .btn { width: 100%; }
    .tw-home-how-foot { margin-top: 40px; align-items: stretch; }
    .tw-home-how-foot .tw-home-stats { justify-content: stretch; }
    .tw-home-hero-cta .btn { flex: 1 1 220px; }
    .tw-home-stats > div { padding: 0 16px; }
    .tw-home-stats dt { font-size: 22px; }
    .tw-home-strip { padding: 26px 0 22px; }
    .tw-home-marquee-track > a, .tw-home-marquee-track > span { font-size: 17px; }
    .tw-home-sec,
    .hds-section { padding: 64px 0; }
    .tw-home-cta-sec { padding: 64px 0 0; }
    .categories-section.tw-explore-list { padding: 40px 0 8px; }
    .tw-home-head,
    .hds-section .hds-head { margin-bottom: 28px; gap: 18px; }
    .tw-home-head > div,
    .hds-section .hds-head > div { flex-basis: 100%; }
    .tw-home-head .section-title,
    .hds-section .hds-head .section-title,
    .hds-rv-intro .section-title,
    .tw-home-locs-intro .section-title { font-size: 28px; }
    .hds-section--services .hds-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .hds-section--services .hds-tile { padding: 20px; }
    .hds-tile-name { font-size: 17px; margin-top: 14px; }
    .hds-section .hds-ico { width: 44px; height: 44px; border-radius: 12px; font-size: 17px; }
    .hds-more-chips a { min-height: 38px; font-size: 13.5px; }
    .hds-section--industries .hds-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .hds-section--industries .hds-tile { padding: 14px 16px; }
    .tw-hc { padding: 20px; }
    .hds-section--reviews .hds-review { padding: 20px; }
    .hds-section--reviews .hds-review--featured { padding: 26px 22px 22px; }
    .hds-review--featured h3 { font-size: 20px; }
    .hds-rv-score > b { font-size: 36px; }
    .tw-home-cta { padding: 28px 20px; gap: 28px; }
    .tw-home-cta-panel { padding: 22px; }
}
@media (max-width: 360px) {
    .hero.tw-home-hero h1 { font-size: 32px; }
    .hero.tw-explore-hero h1 { font-size: 30px; }
    .tw-home-stats > div { padding: 0 10px; }
    .tw-hc-actions { grid-template-columns: minmax(0, 1fr); }
    .tw-hc-facts { gap: 12px 10px; padding: 14px; }
}
@media (prefers-reduced-motion: reduce) {
    .tw-home-marquee { animation: none; }
}

/* prototype (index.html) hero - responsive (kept last so it wins over the generic rules above) */
@media (max-width: 1100px) {
    .tw-home-art { display: block; height: 440px; max-width: 560px; width: 100%; margin: 0 auto; }
}
@media (max-width: 680px) {
    .hero.tw-home-hero { padding: calc(var(--tw-hdr-h) + 44px) 0 64px; }
    .hero.tw-home-hero h1 { font-size: 38px; }
    .hero.tw-home-hero h1 .tw-hl { white-space: normal; }
    .hero.tw-home-hero .tw-home-hero-copy > p { font-size: 16px; }
    .tw-home-art { height: 360px; }
    .tw-home-art-scale { transform: scale(.72); transform-origin: top left; width: 139%; }
}
@media (max-width: 360px) {
    .hero.tw-home-hero h1 { font-size: 32px; }
}
