/* ==========================================================================
   Huntingdonshire Business Directory - HOME PAGE
   hero + search, banner ad, category grid, pricing
   ========================================================================== */

/* Offset for sticky header when jumping to anchors */
#search-anchor, #categories { scroll-margin-top: calc(var(--top-h) + var(--nav-h) + 12px); }
@media (max-width: 900px){ #search-anchor, #categories { scroll-margin-top: calc(var(--top-h) + 12px); } }

/* ---------- HERO ---------- */
.hero {
    position: relative; color: #fff; text-align: center;
    background: linear-gradient(180deg, rgba(0,0,0,.5), rgba(0,0,0,.72)), url('/images/hbd-home-hero.jpg') center/cover no-repeat;
    padding-block: clamp(3.5rem, 9vw, 7rem);
}
.hero__inner { max-width: 1240px; margin-inline: auto; }
.hero h1 { color: #fff; font-size: clamp(2.1rem, 5.4vw, 3.8rem); font-weight: 800; margin-bottom: .6rem; margin-inline: auto; }
.hero h1 .hl { color: var(--accent); }
.hero p { color: #E4E8F0; font-size: clamp(1.08rem, 2.2vw, 1.32rem); margin: 0 auto 2.2rem; max-width: 780px; }

/* Search bar */
.searchbar {
    display: flex; gap: .5rem; background: #fff; padding: .5rem;
    border-radius: var(--radius); box-shadow: var(--shadow-md); max-width: 680px; margin: 0 auto 1rem;
}
.searchbar__field { flex: 1; display: flex; align-items: center; gap: .6rem; padding-inline: .9rem; }
.searchbar__field i { color: var(--muted); font-size: 1.05rem; }
.searchbar input {
    width: 100%; border: 0; outline: 0; font-family: var(--font-body); font-size: 1.02rem;
    color: var(--ink); background: transparent; padding: .7rem 0;
}
.searchbar .btn { flex: 0 0 auto; }

.hero__browse { display: inline-flex; margin-top: .4rem; }
.hero__browse a { color: #fff; font-weight: 600; font-family: var(--font-head); display:inline-flex; align-items:center; gap:.5rem; }
.hero__browse a:hover { color: var(--accent); }

/* ---------- BANNER AD ---------- */
.adband { background: #fff; }
.adslot {
    border: 2px dashed var(--grey-line); border-radius: var(--radius);
    background: var(--grey); min-height: 220px; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: .5rem; text-align: center; padding: 2rem;
    color: var(--muted);
}
.adslot i { font-size: 2rem; color: var(--accent); }
.adslot strong { font-family: var(--font-head); color: var(--brand); font-size: 1.15rem; }
.adband__caption { text-align: center; color: var(--muted); margin: 1rem auto 0; max-width: 640px; font-size: .98rem; }
.adband__caption a { color: var(--accent-dark); font-weight: 600; }

/* ---------- CATEGORIES ---------- */
.cats__grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem;
}
.cat-box {
    display: flex; flex-direction: column; align-items: flex-start; gap: .55rem;
    background: #fff; border: 1px solid var(--grey-line); border-radius: var(--radius);
    padding: 1.7rem 1.7rem; transition: all .18s var(--ease);
}
.cat-box:hover { border-color: var(--accent); box-shadow: var(--shadow-md); transform: translateY(-3px); color: var(--ink); }
.cat-box__icon {
    width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center;
    background: rgba(47,125,85,.13); color: var(--accent-dark); font-size: 1.5rem; flex: 0 0 auto;
    margin-bottom: .35rem;
}
.cat-box:hover .cat-box__icon { background: var(--accent); color: #fff; }
.cat-box__name { font-family: var(--font-head); font-weight: 700; color: var(--brand); font-size: 1.2rem; line-height: 1.2; }
.cat-box__intro { color: var(--muted); font-size: .95rem; line-height: 1.5; margin: 0; }
.cat-box__more { margin-top: .35rem; color: var(--accent-dark); font-weight: 700; font-family: var(--font-head); font-size: .9rem; display: inline-flex; align-items: center; gap: .4rem; }
.cat-box:hover .cat-box__more { gap: .6rem; }
.cats__browse { text-align: center; margin-top: 2.6rem; }

/* ---------- PRICING ---------- */
.pricing__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; align-items: stretch; }
.price-card {
    display: flex; flex-direction: column; height: 100%; background: #fff; border: 1px solid var(--grey-line);
    border-radius: var(--radius-lg); padding: 2.1rem 1.9rem; position: relative;
}
.price-card--feature { border: 2px solid var(--accent); box-shadow: var(--shadow-md); }
.price-card--ad { background: var(--charcoal); color: #E7EAF1; border-color: var(--charcoal); }
.price-card--ad h3, .price-card--ad .price { color: #fff; }
.price-badge {
    position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
    background: var(--accent); color: var(--on-accent); font-family: var(--font-head); font-weight: 700;
    font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; padding: .35rem .9rem; border-radius: 999px; white-space: nowrap;
}
.price-card h3 { font-size: 1.6rem; margin-bottom: .25rem; }
.price-card__sub { color: var(--muted); font-size: .97rem; margin: 0 0 1.3rem; min-height: 2.6em; }
.price-card--ad .price-card__sub { color: #A9B4C6; }
.price { font-family: var(--font-head); font-weight: 800; color: var(--brand); font-size: 2.6rem; line-height: 1; }
.price small { display: block; font-size: .83rem; font-weight: 600; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; margin-top: .45rem; }
.price-save { display: inline-flex; align-items: center; gap: .4rem; color: var(--accent-dark); font-size: .84rem; font-weight: 700; background: rgba(47,125,85,.1); padding: .32rem .7rem; border-radius: 999px; margin: .9rem 0 0; }
.price-save i { color: var(--accent); }
.price-feats li.req { color: var(--muted); }
.price-feats li.req i { color: var(--muted); }

/* Banner advertising box (below the 3 pricing cards) */
.banner-box { display: flex; align-items: center; gap: 1.5rem; margin-top: 1.6rem; background: var(--charcoal); color: #E7EAF1; border-radius: var(--radius-lg); padding: 1.8rem 2.2rem; }
.banner-box__icon { flex: 0 0 auto; width: 58px; height: 58px; border-radius: 14px; background: rgba(255,255,255,.1); color: var(--accent-2); display: grid; place-items: center; font-size: 1.55rem; }
.banner-box__body { flex: 1 1 auto; }
.banner-box__body h3 { color: #fff; font-size: 1.35rem; margin: 0 0 .3rem; }
.banner-box__body p { color: #A9B4C6; margin: 0; font-size: .97rem; line-height: 1.55; }
.banner-box .btn { flex: 0 0 auto; }
.price-card--ad .price small { color:#A9B4C6; }
.price-feats { list-style: none; margin: 1.3rem 0 1.6rem; padding: 0; display: grid; gap: .7rem; font-size: .98rem; flex: 1 0 auto; align-content: start; }
.price-feats li { display: flex; gap: .55rem; align-items: flex-start; line-height: 1.45; }
.price-feats i { color: var(--accent-dark); margin-top: .18rem; flex: 0 0 auto; }
.price-card--ad .price-feats i { color: var(--accent); }
.price-card .btn { margin-top: auto; }

@media (max-width: 980px) {
    .cats__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 840px) {
    .pricing__grid { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; }
}
@media (max-width: 620px) {
    .cats__grid { grid-template-columns: 1fr; }
    .searchbar { flex-direction: column; padding: .6rem; }
    .searchbar__field { padding-block: .35rem; }
    .searchbar input { padding: .95rem 0; }
    .searchbar .btn { width: 100%; }
    .banner-box { flex-direction: column; text-align: center; gap: 1rem; }
    .banner-box .btn { width: 100%; max-width: 320px; }
}
@media (max-width: 440px) {
    .pricing__grid { grid-template-columns: 1fr; }
}
