html {
    scroll-behavior: smooth;
}

body {
    font-family: "Nunito", sans-serif;
    background: #F6F1FB;
    color: #4B4358;
    overflow-x: hidden;
}

section[id] {
    scroll-margin-top: 6.5rem;
}

h1, h2, h3, h4, h5, h6, .font-display {
    font-family: "Quicksand", sans-serif;
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* Scroll-in animation */
.animate-this {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .6s ease, transform .6s ease;
}
.animate-this.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Category select can get very tall with 300+ options */
select.category-select,
select#category {
    max-height: 300px;
}

/* Homepage / listing category pill tabs -- soft embossed toggle */
.category-tab {
    background: #F6F1FB;
    color: #4B4358;
    border-radius: 999px;
    box-shadow: 5px 5px 10px rgba(155,138,196,0.30), -5px -5px 10px rgba(255,255,255,0.9);
    font-family: "Nunito", sans-serif;
    font-weight: 700;
    transition: box-shadow .25s ease, background .25s ease, color .25s ease;
}
.category-tab.active {
    background: #9B8AC4;
    color: #fff;
    box-shadow: inset 4px 4px 8px rgba(0,0,0,0.18), inset -4px -4px 8px rgba(255,255,255,0.12);
}

/* Featured / open ribbon on directory thumbnails */
.premium-badge,
.open {
    font-size: 11px;
    font-weight: 700;
    padding: 5px 14px;
    position: absolute;
    top: 14px;
    left: 14px;
    background: #F5C7B8;
    color: #4B4358;
    border-radius: 999px;
    box-shadow: 3px 3px 6px rgba(155,138,196,0.3);
    text-transform: uppercase;
    letter-spacing: .02em;
    font-family: "Nunito", sans-serif;
}

/* Raw blog HTML content styling (fullpost.php) */
.blog-content {
    font-size: 1.02rem;
    line-height: 1.85;
    color: rgba(75, 67, 88, .82);
}
.blog-content h1, .blog-content h2, .blog-content h3,
.blog-content h4, .blog-content h5, .blog-content h6 {
    color: #4B4358;
    font-family: "Quicksand", sans-serif;
    font-weight: 700;
    line-height: 1.35;
    margin-top: 1.75em;
    margin-bottom: .6em;
}
.blog-content h1 { font-size: 1.7rem; }
.blog-content h2 { font-size: 1.45rem; }
.blog-content h3 { font-size: 1.2rem; }
.blog-content h4, .blog-content h5, .blog-content h6 { font-size: 1.05rem; }
.blog-content p { margin-bottom: 1.1em; }
.blog-content ul, .blog-content ol { margin: 1em 0 1.2em 1.4em; }
.blog-content ul { list-style: disc; }
.blog-content ol { list-style: decimal; }
.blog-content li { margin-bottom: .4em; }
.blog-content a { color: #9B8AC4; text-decoration: underline; }
.blog-content strong, .blog-content b { font-weight: 700; color: #4B4358; }
.blog-content blockquote {
    border-left: 4px solid #8FCBA6;
    padding-left: 1em;
    margin: 1.2em 0;
    color: rgba(75, 67, 88, .65);
    font-style: italic;
}
.blog-content img { margin: 1em 0; max-width: 100%; border-radius: 1.25rem; }

/*
 * Compatibility shim -- apiClass.php's ajaxList() (used by the "Load More"
 * button on listing.php) renders fixed markup with these exact class names
 * (businesscard/open/fs-5/fw-bold/btn/btn-sec/etc). Styled here to match the
 * hand-written directory cards elsewhere on the site (index.php, listing.php)
 * without touching the PHP/API layer. Soft pastel neumorphic embossed cards.
 */
.businesscard {
    position: relative;
    background: #F6F1FB;
    border: none;
    border-radius: 1.75rem;
    overflow: hidden;
    box-shadow: 9px 9px 18px rgba(155,138,196,0.32), -9px -9px 18px rgba(255,255,255,0.85);
    margin: 0 6px 1.75rem 0;
    min-height: 210px;
    display: flex;
    align-items: flex-end;
    transition: transform .3s ease, box-shadow .3s ease;
}
.businesscard:hover {
    transform: translateY(-4px);
    box-shadow: 16px 16px 32px rgba(155,138,196,0.32), -16px -16px 32px rgba(255,255,255,0.85);
}
.businesscard .img-fluid { width: 100%; height: 200px; object-fit: cover; display: block; }
.businesscard .fs-5 { font-size: 1.08rem; padding: 0; font-weight: 700; font-family: "Quicksand", sans-serif; color: #4B4358; }
.businesscard .fw-bold { font-weight: 700; }
.businesscard .mt-2 { margin-top: .75rem; display: block; }
.businesscard .p-3 { padding: 1.1rem; }
.businesscard .pb-2 { padding-bottom: .5rem; }
.businesscard .mb-3 { margin-bottom: .75rem; color: rgba(75,67,88,.62); font-size: .88rem; }
.businesscard .d-flex { display: flex; }
.businesscard .gap-2 { gap: .5rem; }
.businesscard .ds {
    width: 100%;
    background: rgba(246,241,251,0.88);
    backdrop-filter: blur(6px);
    border-radius: 1.25rem;
    margin: .6rem;
}
.businesscard .btn {
    flex-grow: 1;
    background: #9B8AC4;
    color: #fff;
    text-align: center;
    padding: .65rem 1rem;
    font-weight: 700;
    font-size: .82rem;
    border-radius: 999px;
    display: block;
    transition: background .25s ease;
}
.businesscard .btn:hover { background: #7C68A8; color: #fff; }
.businesscard .btn-sec, .businesscard .px-2 {
    padding: 0 .9rem;
    background: #8FCBA6;
    border: none;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.businesscard .flex-grow-1 { flex-grow: 1; }
.businesscard .open {
    position: absolute;
    top: 14px;
    left: 14px;
}

/* ds_nedw is the outer wrapper div apiClass.php wraps around each .businesscard */
.ds_nedw { height: 100%; }

/* Simple lightbox dialog used on business-details.php gallery (no Bootstrap) */
dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    outline: none;
    border: none;
    background: #F6F1FB;
    padding: 12px;
    border-radius: 1.5rem;
    box-shadow: 16px 16px 32px rgba(155,138,196,0.32), -16px -16px 32px rgba(255,255,255,0.85);
}
dialog::backdrop {
    background: rgba(75,67,88,.55);
    backdrop-filter: blur(3px);
}
dialog img {
    max-width: calc(100vw - 80px);
    max-height: calc(100vh - 180px);
    object-fit: contain;
    border-radius: 1.1rem;
}

/* Star rating widget on business-details.php review modal */
#ratings {
    align-items: center;
    display: flex;
    flex-flow: row-reverse;
    justify-content: center;
}
#ratings input {
    display: none;
    text-indent: -9999px;
    visibility: hidden;
}
#ratings input:checked ~ label::before { color: #9B8AC4; }
#ratings label::before {
    content: "\2605";
    color: #d8cfe6;
    font-size: 32px;
    padding: 0 5px;
    transition: 300ms ease all;
}
#ratings label:hover { cursor: pointer; }
#ratings label:hover::before,
#ratings label:hover ~ label::before { color: #9B8AC4; }

/* Quick category links (index.php hero) -- the source icon renders solid
   white, which was invisible against the bg-cloud card. */
.category-link img {
    background: #9B8AC4;
    border-radius: 999px;
    width: 40px;
    height: 40px;
    padding: 9px;
    box-sizing: border-box;
}
.category-link:hover img { background: #7C68A8; }
