html {
    scroll-behavior: smooth;
}

body {
    font-family: "Space Grotesk", sans-serif;
    background: #FFFFFF;
    color: #111111;
    overflow-x: hidden;
}

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

/* Legacy Bootstrap-style visibility toggle still driven by page JS (preloader) */
.d-none { display: none !important; }

/* Uppercase, tracked-out mono labels used throughout for eyebrow/meta text */
.label-mono {
    font-family: "IBM Plex Mono", monospace;
    text-transform: uppercase;
    letter-spacing: .14em;
    font-size: .72rem;
}

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

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

/* Homepage / listing category filter pills */
.category-tab {
    background: #fff;
    color: #111111;
    border: 1px solid #111111;
    font-family: "IBM Plex Mono", monospace;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .75rem;
}
.category-tab.active {
    background: #111111;
    color: #fff;
}

/* Raw blog HTML content styling (fullpost.php) */
.blog-content {
    font-size: 1.02rem;
    line-height: 1.8;
    color: rgba(17, 17, 17, .8);
}
.blog-content h1, .blog-content h2, .blog-content h3,
.blog-content h4, .blog-content h5, .blog-content h6 {
    color: #111111;
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
    line-height: 1.3;
    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: #EE3E5F; text-decoration: underline; }
.blog-content strong, .blog-content b { font-weight: 700; color: #111111; }
.blog-content blockquote {
    border-left: 3px solid #EE3E5F;
    padding-left: 1em;
    margin: 1.2em 0;
    color: rgba(17, 17, 17, .65);
    font-style: italic;
}
.blog-content img { margin: 1em 0; max-width: 100%; border: 1px solid #111111; }

/*
 * Compatibility shim -- apiClass.php's ajaxList() (used by the "Load More"
 * button on listing.php) renders fixed markup with these exact class names
 * (col-md-6/businesscard/img-fluid/fs-5/fw-bold/d-flex/btn-sec/bg_none/etc).
 * The same class names are reused in the hand-written listing/index markup
 * so AJAX-appended cards look identical to the initial ones, all styled
 * here without touching the PHP/API layer.
 */
.col-md-6 { width: 100%; }
.p-2 { padding: .5rem; }
@media (min-width: 768px) {
    .col-md-6 { width: 50%; }
}

.businesscard {
    position: relative;
    background: #fff;
    border: 1px solid #111111;
    overflow: hidden;
    margin: 0 0 0 0;
    transition: box-shadow .2s ease, transform .2s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.businesscard:hover {
    box-shadow: 4px 4px 0 #111111;
    transform: translate(-2px, -2px);
}
.businesscard .img-fluid { width: 100%; height: 190px; object-fit: cover; display: block; border-bottom: 1px solid #111111; }
.businesscard .fs-5 {
    font-size: 1.05rem;
    font-weight: 700;
    font-family: "Space Grotesk", sans-serif;
    line-height: 1.3;
}
.businesscard .fw-bold { font-weight: 700; }
.businesscard .p-3 { padding: 1.1rem; flex-grow: 1; display: flex; flex-direction: column; }
.businesscard .pb-2 { padding-bottom: .5rem; }
.businesscard .opacity-75 { opacity: .68; font-size: .85rem; margin-top: .35rem; }
.businesscard .mb-2 { margin-bottom: .9rem; }
.businesscard .d-flex { display: flex; margin-top: auto; }
.businesscard .gap-2 { gap: .5rem; }
.businesscard .flex-grow-1 { flex-grow: 1; }
.businesscard .btn-sec {
    flex-grow: 1;
    background: #111111;
    color: #fff;
    text-align: center;
    padding: .65rem 1rem;
    font-weight: 600;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-family: "IBM Plex Mono", monospace;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #111111;
    transition: background .2s ease, color .2s ease;
}
.businesscard .btn-sec:hover { background: #EE3E5F; border-color: #EE3E5F; }
.businesscard .btn-sec.bg_none {
    flex-grow: 0;
    background: transparent;
    color: #111111;
    border: 1px solid #111111;
    width: 45px;
    padding: .65rem 0;
}
.businesscard .btn-sec.bg_none:hover { background: #111111; color: #fff; }
.businesscard .btn-sec.bg_none img { filter: none; width: 16px; }
.businesscard .btn-sec:hover img { filter: brightness(0) invert(1); }

/*
 * Minimal Bootstrap-modal-compatible styling. bootstrap.min.css is no
 * longer linked (replaced by Tailwind), but business-details.php and
 * pricing.php still load the Bootstrap JS bundle for their data-bs-toggle /
 * data-dismiss modals, so the .modal/.modal-dialog/.modal-content structural
 * classes still need base positioning + our theme's look.
 */
.modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 1055;
    display: none;
    overflow-x: hidden;
    overflow-y: auto;
    outline: 0;
}
.modal.show { display: block; }
.modal-dialog {
    position: relative;
    width: auto;
    margin: 1.75rem auto;
    max-width: 500px;
    padding: 0 1rem;
}
.modal-content {
    position: relative;
    background: #fff;
    border: 1px solid #111111;
    width: 100%;
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #111111;
}
.modal-title { font-family: "Space Grotesk", sans-serif; font-weight: 600; }
.modal-body { padding: 1.25rem; }
.modal-backdrop {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 1050;
    background: #111111;
}
.modal-backdrop.show { opacity: .6; }
.btn-close {
    width: 1.5rem;
    height: 1.5rem;
    background: transparent;
    border: none;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    color: #111111;
}
.btn-close::before { content: "\00d7"; }
.close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    color: #111111;
    opacity: .5;
    cursor: pointer;
}
.close:hover { opacity: 1; }

/* Blog card title/excerpt clamping (blogs.php) */
.bl_h3 {
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
}
.bl_p {
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
}

/* Premium ribbon on directory thumbnails */
.psdrs { position: relative; }
.psdrs .img-fluid { height: 190px; }
.open {
    font-family: "IBM Plex Mono", monospace;
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 4px 10px;
    position: absolute;
    top: 10px;
    left: 10px;
    background: #EE3E5F;
    color: #fff;
}

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