/**
 * Public site — custom layer on Bootstrap 5 + Font Awesome.
 * Theme colors/spacing: :root in resources/views/layouts/app.blade.php (Laravel/DB-driven).
 * This file: layout, components, and responsive rules. Order matches DOM usage roughly top→bottom.
 *
 * 1) Base and page shell
 * 2) Main + .container / .content-surface
 * 3) Header, nav, footer
 * 4) Home hero, download hero, blog, posts, category, account pages
 * 5) Error page
 * 6) print + reduced-motion
 */

/* --- Static public tokens (complement app :root) --- */
:root {
    color-scheme: light;
}

html, body {
    height: 100%;
}

::selection {
    background: color-mix(in srgb, var(--primary-color) 22%, transparent);
    color: var(--ink, #0b1220);
}

/* Page canvas: soft shapes + light wash (keeps white cards reading clearly) */
body.site-body {
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(1200px 520px at 12% -8%, color-mix(in srgb, var(--primary-color) 7%, #ffffff) 0%, transparent 55%),
        radial-gradient(900px 480px at 90% 12%, rgba(99, 102, 241, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse 70% 45% at 50% 100%, #dde3ed 0%, transparent 58%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.65) 0%, transparent 42%),
        linear-gradient(168deg, #e8ecf2 0%, #eef0f5 50%, #f3f4f8 100%) !important;
    color: var(--text-color);
    font-family: var(--font-family) !important;
    font-size: var(--text-base, 1.0625rem);
    line-height: var(--leading-body, 1.65);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
    margin: 0;
    padding: 0;
}

.site-body :is(
    .navbar, .nav-link, .btn, .form-control, .form-select,
    input, textarea, select, button, .card, .table, table
) {
    font-family: var(--font-family) !important;
}

/* Font Awesome icons - preserve their font-family */
.fa, .fas, .far, .fab, .fa-solid, .fa-regular, .fa-brands,
.fa:before, .fas:before, .far:before, .fab:before,
.fa-solid:before, .fa-regular:before, .fa-brands:before,
i.fa, i.fas, i.far, i.fab, i[class*="fa-"] {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands", "Font Awesome 6 Pro" !important;
}

main {
    flex: 1 0 auto;
    background: transparent !important;
    /* No top padding — hero bands stay flush under the header; only pad bottom above footer */
    padding-top: 0;
    padding-bottom: var(--space-main-footer, clamp(1.5rem, 3vw, 2.5rem));
}

/* Bootstrap’s .img-fluid is max-width only — fill the column in main layout */
main .img-fluid {
    width: 100%;
    max-width: 100%;
    height: auto;
}

/* Main content: vertical rhythm on direct .container; wrapper stays flush for full-width heroes */
.main-content-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 0;
    background: transparent !important;
    min-height: calc(100vh - 130px);
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    overflow: visible;
}

/* Only non-surface containers stay transparent (do not override .content-surface white) */
main > .container:not(.content-surface),
main > div > .container:not(.content-surface) {
    background: transparent !important;
}

/* Space below header when the first block is a content container (not a full-bleed hero) */
main .main-content-wrapper > .container:first-child {
    margin-top: clamp(1.1rem, 2.3vw, 1.6rem) !important;
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
    .main-content-wrapper {
        margin: 0;
    }
    
    /* Prose + surface headings (don’t override hero, download, or page title components) */
    main .page-content h1,
    main .post-content h1,
    .content-surface h1:not(.page-body__title) {
        font-size: 1.5rem !important;
        line-height: 1.3 !important;
    }

    main .page-content h2,
    main .post-content h2,
    .content-surface h2 {
        font-size: 1.3rem !important;
        line-height: 1.3 !important;
    }

    main .page-content h3,
    main .post-content h3,
    .content-surface h3 {
        font-size: 1.12rem !important;
        line-height: 1.4 !important;
    }

    main .page-content h4,
    main .post-content h4,
    .content-surface h4 {
        font-size: 1.05rem !important;
        line-height: 1.4 !important;
    }

    main .page-content h5,
    main .post-content h5,
    main .page-content h6,
    main .post-content h6,
    .content-surface h5,
    .content-surface h6 {
        font-size: 0.9375rem !important;
    }

    main .page-content p,
    main .post-content p,
    .content-surface p,
    .content-surface li {
        font-size: var(--text-sm, 0.9375rem) !important;
        line-height: 1.65 !important;
    }
    
    /* Navigation improvements */
    .navbar-nav {
        text-align: center;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem !important;
        font-size: 0.9375rem !important;
    }
    
    /* Buttons */
    .btn {
        padding: 0.625rem 1.25rem !important;
        font-size: 0.9375rem !important;
        width: auto !important;
        margin-bottom: 0.75rem;
    }
    
    .btn:last-child {
        margin-bottom: 0;
    }
    
    /* Cards */
    .card {
        margin-bottom: 1rem;
    }
    
    .card-body {
        padding: 1rem !important;
    }
    
    /* Tables */
    .table {
        font-size: 0.875rem !important;
    }
    
    .table th,
    .table td {
        padding: 0.625rem 0.5rem !important;
    }
    
    /* Forms */
    .form-control,
    .form-select {
        font-size: 1rem !important; /* Prevents zoom on iOS */
        padding: 0.625rem 0.875rem !important;
    }
    
    /* Images */
    img {
        max-width: 100% !important;
        height: auto !important;
    }

    /* Keep hero / download primary CTAs larger than global .btn mobile tweak */
    main .homepage-banner__cta,
    main .download-hero__cta {
        font-size: 1.02rem !important;
        padding: 0.88rem 1.65rem !important;
    }
    
    /* Container padding */
    .container,
    .container-fluid {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

/* Extra small devices (phones, less than 576px) */
@media (max-width: 575.98px) {
    .main-content-wrapper {
        margin: 0;
        border-radius: 0;
    }
    
    main .page-content h1,
    main .post-content h1,
    .content-surface h1:not(.page-body__title) {
        font-size: 1.35rem !important;
    }

    main .page-content h2,
    main .post-content h2,
    .content-surface h2 {
        font-size: 1.2rem !important;
    }

    main .page-content h3,
    main .post-content h3,
    .content-surface h3 {
        font-size: 1.08rem !important;
    }
}

.homepage-banner-wrapper,
.blog-section,
.download-hero {
    margin-left: 0;
    margin-right: 0;
}

/* Breathing room after full-width hero bands (to page body / next section) */
.homepage-banner-wrapper {
    margin-bottom: var(--space-hero-below, clamp(1.25rem, 2.4vw, 1.9rem));
}
section.post-hero,
section.category-hero,
.download-hero {
    margin-bottom: var(--space-hero-below, clamp(1.25rem, 2.4vw, 1.9rem));
}

.homepage-banner-wrapper > .container-fluid,
.blog-section > .container,
.download-hero .container {
    padding-left: clamp(1rem, 4vw, 2rem);
    padding-right: clamp(1rem, 4vw, 2rem);
}

footer {
    flex-shrink: 0;
}

/* --- Site header & primary nav --- */
.custom-navbar {
    min-height: 0;
    padding-top: 0.35rem !important;
    padding-bottom: 0.35rem !important;
    background: color-mix(in srgb, #ffffff 88%, transparent) !important;
    -webkit-backdrop-filter: blur(12px) saturate(1.2);
    backdrop-filter: blur(12px) saturate(1.2);
    border-bottom: 1px solid rgba(15, 23, 42, 0.06) !important;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 2px 16px rgba(15, 23, 42, 0.04);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .custom-navbar {
        background: #ffffff !important;
    }
}

.custom-navbar .container {
    min-height: 52px;
    align-content: center;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1030;
}

.navbar .navbar-collapse {
    flex-grow: 1;
}

@media (min-width: 992px) {
    .navbar .navbar-nav {
        align-items: center;
        gap: 0.12rem;
    }
}

.nav-item .nav-logout-form {
    display: flex;
    align-items: center;
    height: 100%;
}

.btn-nav-logout {
    background: #fff !important;
    border: 1px solid rgba(15, 23, 42, 0.12) !important;
    color: #334155 !important;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    line-height: 1.2;
}

.btn-nav-logout:hover {
    background: #f8fafc !important;
    border-color: rgba(15, 23, 42, 0.2) !important;
    color: #0f172a !important;
}

.custom-navbar .navbar-brand {
    color: var(--ink, #0b1220) !important;
    font-weight: 700;
    letter-spacing: normal;
}

.navbar-brand .site-name {
    color: var(--ink, #0b1220) !important;
    font-size: 1.1rem;
}

.custom-navbar .nav-link {
    color: var(--muted-foreground, #5c667a) !important;
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: 999px;
    padding: 0.4rem 0.8rem !important;
    border: 1px solid transparent;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.custom-navbar .nav-link:hover,
.custom-navbar .nav-link:focus {
    color: var(--ink, #0b1220) !important;
    background: var(--primary-color-weak) !important;
    border-color: color-mix(in srgb, var(--primary-color) 20%, #e2e8f0);
}

.custom-navbar .nav-link.active {
    color: var(--ink, #0b1220) !important;
    background: var(--primary-color-soft) !important;
    font-weight: 600;
    border: 1px solid var(--primary-color-border) !important;
    box-shadow: none !important;
}

#navbarNav {
    transition: all 0.2s ease;
}

.custom-navbar .navbar-toggler {
    border: 1px solid var(--primary-color-border) !important;
    border-radius: 10px;
    padding: 0.4rem 0.55rem;
    box-shadow: none !important;
    background: color-mix(in srgb, var(--primary-color) 8%, #ffffff);
}

.navbar-brand .navbar-logo,
.navbar-brand img {
    height: 32px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
}

@media (max-width: 768px) {
    .navbar-brand .navbar-logo,
    .navbar-brand img {
        height: 28px !important;
        max-width: 150px;
    }

    #navbarNav {
        margin-top: 0.6rem;
        padding: 0.5rem;
        border-radius: 14px;
        background: color-mix(in srgb, var(--primary-color) 10%, #ffffff);
        border: 1px solid var(--primary-color-border);
    }

    .custom-navbar .nav-link {
        justify-content: center;
        text-align: center;
    }
}

@media (max-width: 575.98px) {
    .navbar-brand .navbar-logo,
    .navbar-brand img {
        height: 24px !important;
        max-width: 120px;
    }
}

/* Footer: structured layout, clear columns, refined typography */
.site-footer.custom-footer,
.custom-footer.site-footer {
    position: relative;
    margin-top: 0;
    background: #ffffff !important;
    color: var(--ink, #0b1220) !important;
    border-top: 1px solid color-mix(in srgb, var(--primary-color) 20%, #dbe4ef);
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    box-shadow: 0 -8px 22px -24px color-mix(in srgb, var(--primary-color) 30%, transparent);
    overflow: hidden;
}

.site-footer__inner {
    padding-top: clamp(1.25rem, 2vw, 1.75rem);
    padding-bottom: clamp(1rem, 1.8vw, 1.4rem);
}

.site-footer__container {
    position: relative;
    z-index: 1;
}

.site-footer__col {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.site-footer__brand {
    margin-bottom: 0.35rem;
}

.site-footer__brand-link {
    color: inherit !important;
    text-decoration: none !important;
    opacity: 1;
    transition: opacity 0.2s ease;
}

.site-footer__brand-link:hover {
    opacity: 0.92;
}

.site-footer__brand-text .site-footer__title {
    font-size: clamp(1.15rem, 0.5vw + 1.05rem, 1.35rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin: 0;
}

.site-footer__brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 10px;
    background: color-mix(in srgb, var(--primary-color) 14%, #ffffff);
    font-size: 1rem;
    color: color-mix(in srgb, var(--primary-color) 64%, #0f172a);
}

.site-footer__description {
    margin: 0.35rem 0 0;
    max-width: 38ch;
    font-size: 0.9rem;
    line-height: 1.5;
    color: color-mix(in srgb, var(--ink, #0b1220) 88%, #64748b) !important;
    opacity: 1;
}

.site-footer__heading {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-transform: none;
    margin: 0 0 0.65rem;
    padding-bottom: 0;
    border-bottom: none;
    color: color-mix(in srgb, var(--ink, #0b1220) 88%, #475569) !important;
    opacity: 1;
}

.site-footer__social-lead {
    margin: 0 0 0.6rem;
    font-size: 0.84rem;
    line-height: 1.4;
    color: color-mix(in srgb, var(--ink, #0b1220) 82%, #64748b) !important;
    opacity: 1;
    max-width: 36ch;
}

.site-footer__muted {
    opacity: 1;
    font-size: 0.875rem;
    color: #64748b;
}

.site-footer__social-icons {
    margin-top: 0;
}

.site-footer__link {
    display: inline-block;
    padding: 0.2rem 0;
    color: inherit !important;
    text-decoration: none !important;
    opacity: 1;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    line-height: 1.2;
    border-bottom: 1px solid transparent;
}

.site-footer__link:hover {
    border-bottom-color: color-mix(in srgb, var(--primary-color) 32%, #cbd5e1);
    transform: translateX(2px);
    color: color-mix(in srgb, var(--primary-color) 65%, #0f172a) !important;
}

.site-footer__rule {
    height: 1px;
    margin: 1rem 0 0.7rem;
    background: linear-gradient(
        90deg,
        transparent,
        color-mix(in srgb, var(--primary-color) 26%, #dbe4ef) 20%,
        color-mix(in srgb, var(--primary-color) 26%, #dbe4ef) 80%,
        transparent
    );
    border: 0;
}

.site-footer__copyright {
    text-align: center;
    font-size: 0.8125rem;
    letter-spacing: 0.02em;
    opacity: 1;
    padding-top: 0;
    border-top: none;
    color: #64748b;
}

.site-footer__copy-symbol {
    margin-right: 0.2em;
    font-size: 0.95em;
}

.site-footer .social-icons {
    gap: 0.5rem;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.site-footer .footer-links {
    margin: 0;
    display: block;
}

.site-footer .footer-links li {
    margin-bottom: 0.4rem;
    padding-left: 0.95rem;
    position: relative;
}

.site-footer .footer-links li::before {
    display: block;
    content: "→";
    position: absolute;
    left: 0;
    opacity: 0.55;
    color: color-mix(in srgb, var(--primary-color) 60%, #64748b);
}

.site-footer .footer-links li:last-child {
    margin-bottom: 0;
}

.site-footer .social-icon:hover {
    transform: translateY(-3px);
}

.site-footer .social-icon {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
    background: color-mix(in srgb, var(--primary-color) 8%, #ffffff);
    border-color: color-mix(in srgb, var(--primary-color) 22%, #dbe4ef);
    color: color-mix(in srgb, var(--primary-color) 68%, #0f172a) !important;
}

/* Additional footers using .custom-footer only (no .site-footer) */
.custom-footer:not(.site-footer) {
    position: relative;
    margin-top: 0;
    background: var(--primary-background) !important;
    color: var(--footer-text-color) !important;
    border-top: 1px solid color-mix(in srgb, var(--primary-color) 25%, rgba(255, 255, 255, 0.2));
    padding-top: 2.8rem !important;
    padding-bottom: 1.8rem !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.custom-footer:not(.site-footer) h5 {
    color: var(--footer-text-color) !important;
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    letter-spacing: 0.5px;
}

.custom-footer:not(.site-footer) h6 {
    color: var(--footer-text-color) !important;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.95;
}

.custom-footer:not(.site-footer) p {
    color: var(--footer-text-color) !important;
    opacity: 0.9;
    line-height: 1.6;
}

.custom-footer:not(.site-footer) a {
    color: var(--footer-text-color) !important;
    text-decoration: none;
    transition: all 0.3s ease;
    opacity: 0.92;
}

.custom-footer:not(.site-footer) a:hover {
    color: var(--footer-text-color) !important;
    opacity: 1;
    transform: translateX(4px);
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
    padding-left: 0.95rem;
    position: relative;
}

.footer-links li::before {
    content: "→";
    position: absolute;
    left: 0;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.footer-links li:hover::before {
    opacity: 1;
    transform: translateX(3px);
}

.footer-links a {
    display: inline-block;
    padding: 0.25rem 0;
}

.social-icons {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

.social-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--footer-text-color) !important;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.social-icon:hover {
    background: rgba(255, 255, 255, 0.28);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.45);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.footer-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin: 2rem 0 1.5rem 0;
}

.footer-copyright {
    text-align: center;
    opacity: 0.9;
    font-size: 0.9rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.site-footer.custom-footer .footer-copyright.site-footer__copyright {
    border-top: none;
    padding-top: 0;
    opacity: 0.78;
    font-size: 0.8125rem;
}

.footer-top-row {
    align-items: flex-start;
    row-gap: 1rem;
}

.footer-tagline {
    opacity: 0.85;
    max-width: 34ch;
}

/* Footer logo sizing */
.footer-logo {
    height: 36px;
    width: auto;
    max-width: 100%;
}

@media (max-width: 768px) {
    .site-footer .site-footer__col--brand,
    .site-footer .site-footer__col--social {
        text-align: center;
    }

    .site-footer .site-footer__description,
    .site-footer .site-footer__social-lead {
        margin-left: auto;
        margin-right: auto;
    }

    .site-footer .site-footer__nav {
        text-align: center;
    }

    .site-footer .footer-links {
        display: inline-block;
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .site-footer .social-icons {
        justify-content: center;
    }

    .custom-footer:not(.site-footer) {
        padding-top: 2rem !important;
        padding-bottom: 1.5rem !important;
        text-align: center;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 2rem;
    }
    
    .footer-column {
        width: 100% !important;
        margin-bottom: 1.5rem;
    }
    
    .footer-logo {
        height: 28px !important;
        max-width: 150px;
    }
    
    .social-icons {
        justify-content: center;
        margin-top: 1.5rem;
        flex-wrap: wrap;
    }
    
    .social-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .footer-links li {
        padding-left: 0;
        margin-bottom: 0.5rem;
    }
    
    .footer-links li::before {
        display: none;
    }
    
    .footer-copyright {
        font-size: 0.875rem;
        padding-top: 1rem;
    }
}

@media (max-width: 575.98px) {
    .footer-logo {
        height: 24px !important;
        max-width: 120px;
    }
}

/* Use primary color for buttons and links */
.btn-primary {
    background: var(--primary-background);
    border-color: var(--primary-color);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 4px 14px color-mix(in srgb, var(--primary-color) 28%, transparent);
}

.btn-primary:hover {
    background: var(--primary-background);
    border-color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.08), 0 8px 22px color-mix(in srgb, var(--primary-color) 32%, transparent);
    filter: brightness(0.99);
    opacity: 1;
}

a {
    color: var(--primary-color);
    text-underline-offset: 0.15em;
    transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
    color: color-mix(in srgb, var(--primary-color) 88%, #000);
}

/* Secondary color usage */
.badge.bg-secondary {
    background-color: var(--secondary-color) !important;
}

.text-secondary {
    color: var(--secondary-color) !important;
}

/* Headings: theme vars from settings; keep nested markup from inheriting block backgrounds */
main :is(h1, h2, h3, h4, h5, h6) * {
    background-color: transparent !important;
}

main h1 { background: var(--h1-background-color) !important; color: var(--h1-text-color) !important; }
main h2 { background: var(--h2-background-color) !important; color: var(--h2-text-color) !important; }
main h3 { background: var(--h3-background-color) !important; color: var(--h3-text-color) !important; }
main h4 { background: var(--h4-background-color) !important; color: var(--h4-text-color) !important; }
main h5 { background: var(--h5-background-color) !important; color: var(--h5-text-color) !important; }
main h6 { background: var(--h6-background-color) !important; color: var(--h6-text-color) !important; }

main :is(h1, h2, h3, h4, h5, h6):is(:has(> p), :has(> ul), :has(> ol), :has(> div)) {
    background: transparent !important;
}

.custom-footer h1, .custom-footer h2, .custom-footer h3, .custom-footer h4, .custom-footer h5, .custom-footer h6,
footer h1, footer h2, footer h3, footer h4, footer h5, footer h6 {
    background: transparent !important;
}

/* Hero sections: no admin heading background blocks */
main .post-hero :is(h1, h2, h3),
main .category-hero :is(h1, h2, h3),
main .homepage-banner :is(h1, h2, h3),
.homepage-banner .banner-title,
.homepage-banner__title,
.download-hero :is(h1, h2, h3),
main .page-body__title,
main .faqs-section__title,
main .blog-section__title,
main .related-section__title,
main .faqs-section h4 {
    background: transparent !important;
}
main .faqs-section__title,
main .blog-section__title,
main .related-section__title {
    color: var(--ink, #0b1220) !important;
}

/* First heading in HTML body: no extra gap or inset at the start */
main .page-content > :is(h1, h2, h3, h4, h5, h6):first-child,
main .post-content > :is(h1, h2, h3, h4, h5, h6):first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* H1–H6 in .page-content / .post-content: tight padding for admin-colored blocks; no “start” gap */
main .page-content :is(h1, h2, h3, h4, h5, h6),
main .post-content :is(h1, h2, h3, h4, h5, h6) {
    padding: 0.4rem 0.5rem 0.45rem !important;
    box-sizing: border-box !important;
    border-radius: 6px;
    overflow: hidden;
    letter-spacing: normal;
    text-indent: 0;
}

/* Unified frontend layout system */
.container {
    max-width: 1140px;
}

/* All nested containers: horizontal inset. Direct child only: vertical padding (keeps hero inner containers unchanged). */
main .main-content-wrapper .container {
    padding-left: clamp(1.1rem, 4vw, 2.25rem) !important;
    padding-right: clamp(1.1rem, 4vw, 2.25rem) !important;
}

main .main-content-wrapper > .container {
    padding-top: clamp(1.1rem, 2.4vw, 1.75rem) !important;
    padding-bottom: clamp(1.25rem, 2.8vw, 2.25rem) !important;
}

/* --- Content card (CMS pages) --- */
.content-surface {
    position: relative;
    background: #ffffff !important;
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
    border-radius: var(--surface-radius, 20px);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    padding: clamp(1.75rem, 3.5vw, 2.75rem) clamp(1.5rem, 3.5vw, 2.5rem);
}

/* Soft top highlight on elevated surfaces */
.content-surface::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.85), transparent);
    pointer-events: none;
    opacity: 0.55;
}

.page-body__title {
    font-size: clamp(1.5rem, 0.2rem + 1.4vw, 1.9rem) !important;
    font-weight: 700;
    line-height: var(--leading-tight, 1.2);
    letter-spacing: normal;
    color: var(--ink, #0b1220) !important;
    margin-bottom: 1.5rem;
    margin-top: 0;
    padding-bottom: 1.05rem;
    border-bottom: 1px solid color-mix(in srgb, var(--primary-color) 16%, #e2e8f0);
}

.page-block {
    margin-top: 2.75rem;
}

.section-kicker {
    font-family: var(--font-family) !important;
    font-size: var(--text-xs, 0.8125rem);
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--primary-color, #2563eb);
    margin-bottom: 0.5rem;
}

.section-title {
    font-size: clamp(1.5rem, 2.2vw, 2.2rem);
    font-weight: 800;
    letter-spacing: normal;
    color: var(--ink, #0b1220);
}

.section-description {
    color: var(--muted-foreground, #5c667a);
    line-height: 1.75;
}

.btn,
.btn-primary,
.btn-secondary {
    border-radius: 12px !important;
    font-weight: 700 !important;
    letter-spacing: normal;
    box-shadow: none !important;
}

.btn-primary {
    border: 2px solid var(--primary-color) !important;
    color: var(--header-text-color) !important;
}

.btn-primary:hover {
    transform: translateY(-1px);
    filter: brightness(0.98);
}

.card {
    border: 1px solid var(--surface-border, rgba(100, 116, 139, 0.2));
    border-radius: var(--surface-radius, 20px);
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.03), 0 10px 28px -6px rgba(15, 23, 42, 0.08);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
    border-color: color-mix(in srgb, var(--primary-color) 14%, var(--surface-border, #e2e8f0));
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.04), 0 16px 36px -8px rgba(15, 23, 42, 0.1);
}

.pagination {
    gap: 0.35rem;
}

.pagination .page-link {
    border-radius: 10px !important;
    border: 1px solid #dbe3ed;
    color: #334155;
    padding: 0.5rem 0.85rem;
}

.pagination .page-item.active .page-link {
    background: var(--primary-background) !important;
    border-color: var(--primary-color) !important;
    color: var(--header-text-color) !important;
}

.pagination .page-link:hover {
    background: #f1f5f9;
}

.content-surface > h1:first-child,
.content-surface > h2:first-child,
.content-surface > h3:first-child {
    margin-top: 0;
}

.page-content,
.post-content {
    color: var(--muted-foreground, #3d4a5c);
    line-height: var(--leading-relaxed, 1.75);
    font-size: var(--text-base, 1.0625rem);
}

/* Balanced type scale for CMS / article (first heading: no top margin—see :first-child above) */
main .page-content h1,
main .post-content h1 {
    font-size: clamp(1.5rem, 0.2rem + 1.8vw, 1.9rem);
    line-height: var(--leading-tight, 1.2);
    font-weight: 700;
    letter-spacing: normal;
    margin-top: 1.5rem;
    margin-bottom: 0.6rem;
}
main .page-content > h1:first-child,
main .post-content > h1:first-child {
    margin-top: 0;
}
main .page-content h2,
main .post-content h2 {
    font-size: clamp(1.3rem, 0.1rem + 1.1vw, 1.5rem);
    line-height: 1.3;
    font-weight: 700;
    margin-top: 1.4rem;
    margin-bottom: 0.5rem;
    letter-spacing: normal;
}
main .page-content > h2:first-child,
main .post-content > h2:first-child {
    margin-top: 0;
}
main .page-content h3,
main .post-content h3 {
    font-size: clamp(1.12rem, 0.1rem + 0.65vw, 1.3rem);
    line-height: 1.35;
    font-weight: 600;
    margin-top: 1.2rem;
    margin-bottom: 0.45rem;
    letter-spacing: normal;
}
main .page-content > h3:first-child,
main .post-content > h3:first-child {
    margin-top: 0;
}
main .page-content h4,
main .post-content h4 {
    font-size: 1.08rem;
    line-height: 1.4;
    font-weight: 600;
    margin-top: 1.1rem;
    margin-bottom: 0.4rem;
    letter-spacing: normal;
}
main .page-content > h4:first-child,
main .post-content > h4:first-child {
    margin-top: 0;
}
main .page-content h5,
main .post-content h5,
main .page-content h6,
main .post-content h6 {
    font-size: var(--text-sm, 0.9375rem);
    line-height: 1.45;
    font-weight: 600;
    margin-top: 1rem;
    margin-bottom: 0.35rem;
    letter-spacing: normal;
}
main .page-content > h5:first-child,
main .post-content > h5:first-child,
main .page-content > h6:first-child,
main .post-content > h6:first-child {
    margin-top: 0;
}

.page-body .page-content > p:first-of-type {
    font-size: 1.04rem;
    line-height: 1.8;
    color: var(--text-color);
    opacity: 0.95;
}

.page-content p,
.post-content p,
.page-content ul,
.post-content ul,
.page-content ol,
.post-content ol {
    margin-bottom: 1.2rem;
}

.page-content ul,
.page-content ol,
.post-content ul,
.post-content ol {
    padding-left: 1.35rem;
}

.page-content li + li,
.post-content li + li {
    margin-top: 0.35rem;
}

.page-content :is(h2, h3, h4, h5, h6) + p,
.post-content :is(h2, h3, h4, h5, h6) + p {
    margin-top: 0.5rem;
}

/* Breathing room before section headings in CMS HTML */
.page-content > * + :is(h1, h2, h3, h4, h5, h6),
.post-content > * + :is(h1, h2, h3, h4, h5, h6) {
    margin-top: 1.5rem;
}

.page-content a,
.post-content a {
    text-underline-offset: 0.14em;
    text-decoration-thickness: 1.5px;
}

/* CMS / article images: fill the content column, keep aspect ratio */
.page-content img,
.post-content img,
.page-content figure img,
.post-content figure img {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain;
    object-position: center;
    margin: 1.25rem auto;
    border-radius: 12px;
}

.page-content figure,
.post-content figure {
    margin: 1.5rem 0;
    text-align: center;
    max-width: 100%;
}

.page-content figure img,
.post-content figure img {
    margin-left: auto;
    margin-right: auto;
}

.form-control,
.form-select {
    border: 1px solid #d9e2ec;
    border-radius: 12px;
    min-height: 44px;
}

.form-control:focus,
.form-select:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.16);
}

.table {
    border-color: #e2e8f0 !important;
}

.table > :not(caption) > * > * {
    padding: 0.85rem 0.9rem;
}

@media (max-width: 991.98px) {
    .content-surface {
        border-radius: 12px;
        padding: 1.7rem 1.45rem 1.75rem !important;
    }
}

.old-versions-section {
    margin-bottom: 1.25rem;
}

.old-version-card {
    border: 1px solid #e6ecf5;
    border-radius: 16px;
    padding: 1rem 1rem 0.9rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    min-height: 188px;
    transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.old-version-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.1);
    border-color: #d6e1ef;
}

.old-version-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    margin-bottom: 0.55rem;
}

.old-version-card__pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: #2563eb;
    background: rgba(59, 130, 246, 0.12);
}

.old-version-card__body {
    flex: 1;
}

.old-version-card__title {
    font-size: 1.12rem;
    line-height: 1.3;
    color: #0f172a;
}

.old-version-card__desc {
    color: #475569;
    line-height: 1.55;
}

.old-version-card__footer {
    margin-top: 0.95rem;
    padding-top: 0.7rem;
    border-top: 1px solid #eef2f7;
}

.old-version-card__btn {
    align-self: flex-start;
    border-radius: 999px;
    padding: 0.44rem 0.95rem;
    background: var(--primary-color, #0d6efd);
    color: #fff !important;
    border: 1px solid var(--primary-color, #0d6efd);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: transform 0.16s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.old-version-card__btn::before {
    content: "\f019";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.8rem;
}

.old-version-card__btn:hover,
.old-version-card__btn:focus {
    background: color-mix(in srgb, var(--primary-color, #0d6efd) 86%, #000 14%);
    color: #fff !important;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(13, 110, 253, 0.25);
}

@media (max-width: 767.98px) {
    .old-version-card {
        min-height: auto;
    }
}

/* --- Home hero, download section hero --- */
.homepage-banner {
    overflow: hidden;
    position: relative;
}
.homepage-banner.hero-full {
    min-height: clamp(300px, 46vh, 540px);
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(15, 23, 42, 0.1);
    isolation: isolate;
}
.homepage-banner.hero-full::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        linear-gradient(104deg, rgba(9, 13, 24, 0.48) 0%, rgba(9, 13, 24, 0.2) 50%, rgba(9, 13, 24, 0) 78%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, transparent 56%);
}
.homepage-banner--modern.hero-full::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(920px 540px at -10% 112%, color-mix(in srgb, var(--banner-bg-3, #334155) 52%, transparent) 0%, transparent 58%),
        radial-gradient(700px 460px at 102% 0%, rgba(255, 255, 255, 0.14) 0%, transparent 58%),
        radial-gradient(820px 500px at 76% 46%, color-mix(in srgb, var(--banner-bg-1, #0f172a) 26%, transparent) 0%, transparent 50%);
    opacity: 0.9;
}
.homepage-banner__noise {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 200px 200px;
    mix-blend-mode: overlay;
}
.homepage-banner--pc.hero-full::after {
    background:
        linear-gradient(120deg, rgba(148, 163, 184, 0.08) 0%, transparent 34%),
        radial-gradient(780px 440px at 0% 100%, color-mix(in srgb, var(--banner-bg-3, #334155) 64%, transparent) 0%, transparent 58%),
        radial-gradient(640px 360px at 96% 8%, rgba(255, 255, 255, 0.16) 0%, transparent 54%),
        linear-gradient(130deg, transparent 0 58%, rgba(255, 255, 255, 0.08) 58% 60%, transparent 60% 100%);
    opacity: 0.93;
}

.homepage-banner--pc .homepage-banner__noise {
    opacity: 0.03;
}

.homepage-banner--iphone.hero-full::after {
    background:
        radial-gradient(760px 500px at 16% 96%, color-mix(in srgb, var(--banner-bg-2, #312e81) 52%, transparent) 0%, transparent 60%),
        radial-gradient(540px 380px at 86% 6%, rgba(255, 255, 255, 0.2) 0%, transparent 62%),
        radial-gradient(520px 320px at 70% 42%, color-mix(in srgb, var(--banner-bg-1, #111827) 30%, transparent) 0%, transparent 62%);
    opacity: 0.92;
}

.homepage-banner--iphone .homepage-banner__noise {
    opacity: 0.02;
    mix-blend-mode: soft-light;
}
.homepage-banner .hero-content {
    position: relative;
    z-index: 1;
}
.hero-content {
    width: 100%;
    padding-top: clamp(2rem, 4vw, 3.25rem);
    padding-bottom: clamp(2rem, 4vw, 3.25rem);
}
.homepage-banner .banner-title,
.homepage-banner__title {
    font-size: clamp(2rem, 1rem + 2.6vw, 3.3rem) !important;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.025em;
    text-wrap: balance;
    max-width: 22ch;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.12), 0 8px 24px rgba(2, 8, 23, 0.2);
}
.banner-title {
    font-size: clamp(2rem, 4vw, 3.35rem) !important;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: normal;
}
.homepage-banner .banner-description,
.homepage-banner__lead {
    color: rgba(248, 250, 252, 0.95) !important;
    font-size: clamp(1rem, 0.35vw + 0.96rem, 1.14rem) !important;
    line-height: 1.72;
    max-width: 54ch;
    font-weight: 400;
    letter-spacing: 0.005em;
    opacity: 0.97;
}

/* Pasted rich text in settings must not use dark inline colours on the dark hero */
.homepage-banner__lead :is(p, span, strong, b, li, i, em) {
    color: inherit !important;
}

.homepage-banner__lead a {
    color: #f1f5f9 !important;
    text-decoration: underline;
    text-underline-offset: 0.12em;
}
.banner-description {
    color: #e2e8f0 !important;
    font-size: clamp(1rem, 1.3vw, 1.2rem);
    line-height: 1.75;
    max-width: 62ch;
}
.homepage-banner__cta-wrap {
    display: flex;
    width: 100%;
    justify-content: center;
}
@media (min-width: 768px) {
    .homepage-banner__cta-wrap {
        justify-content: flex-start;
    }
}
.homepage-banner .banner-button,
.homepage-banner__cta {
    border-radius: 999px;
    padding: 0.95rem 2.1rem 0.95rem 1.8rem;
    font-weight: 700;
    font-size: 1.06rem;
    min-width: min(100%, 13.25rem);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.62rem;
    border: 1px solid var(--hp-cta-border, rgba(255, 255, 255, 0.2));
    background: var(--hp-cta-bg, var(--primary-background)) !important;
    color: var(--hp-cta-fg, var(--header-text-color)) !important;
    text-decoration: none;
    transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease, border-color 0.22s ease;
}
@media (min-width: 768px) {
    .homepage-banner__cta {
        min-width: 14rem;
        padding: 1rem 2.2rem 1rem 1.9rem;
        font-size: 1.08rem;
    }
}
.homepage-banner__cta:hover {
    color: var(--hp-cta-fg, var(--header-text-color)) !important;
    filter: brightness(1.03);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
}
.homepage-banner__cta i {
    font-size: 0.85em;
    opacity: 0.95;
    transition: transform 0.2s ease;
}
.homepage-banner__cta:hover i {
    transform: translateX(3px);
}
.homepage-banner__cta-text {
    line-height: 1.2;
}
.banner-button {
    background: var(--primary-background) !important;
    border: 2px solid var(--primary-color) !important;
    color: var(--header-text-color) !important;
    display: inline-flex;
    align-items: center;
    border-radius: 12px;
    padding: 0.85rem 1.6rem;
    font-weight: 700;
}
/* Hero image: no frame — icon sits on the banner gradient */
.homepage-banner__media {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
    border-radius: 0;
}
.homepage-banner__media::before {
    content: "";
    position: absolute;
    width: min(86%, 420px);
    height: clamp(34px, 6.8vw, 56px);
    border-radius: 999px;
    background: radial-gradient(ellipse, rgba(15, 23, 42, 0.44) 0%, rgba(15, 23, 42, 0) 72%);
    filter: blur(7px);
    transform: translateY(125%);
    z-index: 0;
    pointer-events: none;
}
.homepage-banner__media::after {
    content: "";
    position: absolute;
    width: min(80%, 380px);
    height: clamp(26px, 5vw, 42px);
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(148, 163, 184, 0.22) 0%, rgba(148, 163, 184, 0.06) 45%, rgba(148, 163, 184, 0.22) 100%);
    transform: translateY(150%);
    filter: blur(1px);
    z-index: 0;
    pointer-events: none;
}
.homepage-banner .banner-image {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: min(43vh, 370px);
    object-fit: contain;
    object-position: center;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    filter: drop-shadow(0 16px 34px rgba(2, 8, 23, 0.4));
    transition: transform 0.25s ease, filter 0.25s ease;
}
.homepage-banner:hover .banner-image {
    transform: translateY(-1px);
    filter: drop-shadow(0 20px 40px rgba(2, 8, 23, 0.44));
}
.homepage-banner:not(.homepage-banner--modern) .banner-image {
    max-height: min(34vh, 260px);
}
.banner-image {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: min(58vh, 430px);
    object-fit: contain;
    object-position: center;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent !important;
    filter: none;
}

/* Homepage hero layout v3 (full layout refresh) */
.homepage-banner__grid {
    align-items: center;
}

.homepage-banner__copy {
    max-width: 640px;
}

.homepage-banner__subheading {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: rgba(226, 232, 240, 0.94);
    font-size: 0.84rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.homepage-banner__subheading::before {
    content: "";
    width: 1.35rem;
    height: 2px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.65);
}

.homepage-banner__subheading--below {
    opacity: 0.95;
}

.homepage-banner__title {
    max-width: 16ch;
}

.homepage-banner__lead {
    max-width: 50ch;
}


.homepage-banner__mockup-stage {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: clamp(210px, 34vw, 360px);
}

.homepage-banner__mockup-stage::before,
.homepage-banner__mockup-stage::after {
    content: "";
    position: absolute;
    border-radius: 18px;
    pointer-events: none;
    z-index: 0;
}

.homepage-banner__mockup-stage::before {
    width: clamp(180px, 28vw, 290px);
    height: clamp(210px, 38vw, 380px);
    transform: translate(16px, 16px) rotate(5deg);
    background: linear-gradient(145deg, rgba(148, 163, 184, 0.18) 0%, rgba(30, 41, 59, 0.08) 100%);
    border: 1px solid rgba(148, 163, 184, 0.24);
}

.homepage-banner__mockup-stage::after {
    width: clamp(180px, 28vw, 290px);
    height: clamp(210px, 38vw, 380px);
    transform: translate(-14px, 10px) rotate(-5deg);
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.3) 0%, rgba(15, 23, 42, 0.12) 100%);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.homepage-banner__media {
    z-index: 2;
}

.homepage-banner .banner-image {
    max-height: clamp(220px, 35vw, 390px);
    filter: drop-shadow(0 18px 36px rgba(2, 8, 23, 0.46));
}

.homepage-banner:hover .banner-image {
    transform: translateY(-2px);
    filter: drop-shadow(0 22px 44px rgba(2, 8, 23, 0.52));
}
/* Download page: light, card layout — distinct from homepage gradient hero */
.download-hero {
    background:
        radial-gradient(ellipse 100% 80% at 100% 0%, color-mix(in srgb, var(--primary-color) 12%, transparent) 0%, transparent 55%),
        linear-gradient(168deg, #f2f4fa 0%, #e9edf6 50%, #e2e7f0 100%);
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    padding: clamp(2rem, 4vw, 2.75rem) 0;
}
/* No raised card around the block—only the section background shows */
.download-hero__panel {
    background: transparent !important;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
}
.download-hero__kicker {
    color: var(--primary-color, #2563eb) !important;
    margin-bottom: 0.4rem;
}
.download-hero__title {
    color: var(--ink, #0b1220) !important;
    font-size: clamp(1.6rem, 2.4vw, 2.1rem) !important;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: normal;
}
.download-hero__lead {
    color: var(--muted-foreground, #5c667a);
    font-size: 1.02rem;
    line-height: 1.7;
    max-width: 42ch;
}

.download-hero__lead--center {
    max-width: 52ch;
}
@media (min-width: 992px) {
    .download-hero__lead--center {
        margin-left: 0;
        margin-right: 0;
    }
}
/* Image sits flush—no inner “tile” (was gradient + border + padding) */
.download-hero__visual {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    border-radius: 0;
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
}
.download-hero__visual--empty {
    min-height: 180px;
}
.download-hero__placeholder-icon {
    font-size: 3.5rem;
    color: #a5b4fc;
    opacity: 0.9;
}
.download-hero__visual img,
.download-hero__img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: min(38vh, 300px);
    object-fit: contain;
    object-position: center;
    border: none;
    border-radius: 0;
    box-shadow: none;
    filter: none;
    background: transparent;
}
.download-hero__cta-wrap {
    display: flex;
    width: 100%;
    justify-content: center;
}
@media (min-width: 992px) {
    .download-hero__cta-wrap {
        justify-content: flex-start;
    }
}
.download-hero__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--dl-cta-bg, var(--primary-background)) !important;
    color: var(--dl-cta-fg, var(--header-text-color)) !important;
    border: 2px solid var(--dl-cta-border, var(--primary-color)) !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
    padding: 0.8rem 1.5rem !important;
    max-width: min(100%, 22rem);
    width: 100%;
}
@media (min-width: 992px) {
    .download-hero__cta {
        width: auto;
        max-width: none;
    }
}
.download-hero__cta:hover {
    color: var(--dl-cta-fg, var(--header-text-color)) !important;
    filter: brightness(0.98);
}
@media (max-width: 991.98px) {
    .download-hero__visual img,
    .download-hero__img { max-height: 220px; }
    .download-hero__lead { max-width: none; }
    .download-hero__cta { justify-content: center; }
}

.faqs-section {
    margin-top: 3rem;
    padding-top: 2.25rem;
    border-top: 1px solid #e8edf2;
}
.faqs-section__head {
    margin-bottom: 1.65rem;
}
.faqs-section__title {
    font-size: clamp(1.25rem, 1.8vw, 1.5rem);
    font-weight: 700;
    letter-spacing: normal;
    color: #0f172a;
    margin-bottom: 0.4rem;
}
.faqs-section__lead {
    color: #64748b;
    font-size: 0.95rem;
    margin-bottom: 0;
}
.accordion.faqs-accordion {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    --bs-accordion-border-width: 0;
}
.faqs-section .accordion-item {
    border: 1px solid var(--surface-border, #e2e8f0) !important;
    border-radius: 12px !important;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.faqs-section .accordion-button {
    background-color: #fafbfc !important;
    color: var(--ink, #0b1220) !important;
    font-weight: 600;
    font-size: 0.98rem;
    box-shadow: none !important;
    padding: 1.15rem 1.4rem 1.15rem 1.35rem;
}
.faqs-section .accordion-button:not(.collapsed) {
    background: #fff !important;
    color: var(--primary-color, #2563eb) !important;
}
.faqs-section .accordion-button:focus {
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2) !important;
}
.faqs-section .accordion-body {
    color: #475569;
    font-size: 0.96rem;
    line-height: 1.75;
    background: #fff;
    padding: 1.15rem 1.4rem 1.35rem 1.35rem !important;
}

.blog-section {
    position: relative;
    margin-top: var(--space-section-y, clamp(1.5rem, 2.5vw, 2.25rem));
    background: var(--background-background, #f8fafc);
    padding: clamp(2.5rem, 5vw, 3.5rem) 0;
    border-top: 1px solid rgba(15, 23, 42, 0.05);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.blog-section__head {
    text-align: center;
    max-width: 40rem;
    margin: 0 auto 2.25rem;
}
.blog-section__title {
    font-size: clamp(1.45rem, 2.2vw, 1.85rem);
    font-weight: 800;
    letter-spacing: normal;
    color: var(--ink, #0b1220);
    margin-bottom: 0.4rem;
}
.blog-section__lead {
    color: var(--muted-foreground, #5c667a);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}
.blog-card {
    display: flex;
    flex-direction: column;
    background: var(--content-surface-bg);
    border-radius: var(--surface-radius, 20px);
    overflow: hidden;
    border: 1px solid #dbe4ef;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.blog-card:hover {
    transform: translateY(-4px);
    border-color: #bfdbfe;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.1);
}
.blog-card-image { height: 220px; overflow: hidden; background: #f1f5f9; }
.blog-card-image img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.35s ease;
}
.blog-card:hover .blog-card-image img { transform: scale(1.04); }
.blog-card-body { padding: 1.05rem 1rem 1.2rem; }
.blog-card-title {
    font-size: 1.06rem;
    font-weight: 700;
    line-height: 1.45;
    margin-bottom: .65rem;
}
.blog-card-title a { color: var(--ink, #0b1220); text-decoration: none; }
.blog-card-title a:hover { color: var(--primary-color, #2563eb); }
.blog-card-meta {
    font-size: 0.81rem;
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}
.blog-card-meta a,
.blog-section .blog-category { color: #64748b; text-decoration: none; }
.blog-section .blog-category:hover { color: var(--primary-color, #2563eb); }
.blog-section .blog-date { color: #94a3b8; }
.blog-card-excerpt { color: #475569; line-height: 1.6; font-size: 0.93rem; margin-bottom: 0; }
.blog-card .btn { align-self: flex-start; }
@media (max-width: 991.98px) {
    .homepage-banner.hero-full { min-height: auto; }
    .homepage-banner .hero-content { padding-top: 2rem; padding-bottom: 2.35rem; }
    .homepage-banner__media { margin-top: 0.55rem; }
    .homepage-banner .banner-image,
    .homepage-banner:not(.homepage-banner--modern) .banner-image {
        max-height: 280px;
    }
    .homepage-banner--modern .banner-image { margin-top: 0.1rem; }
    .hero-content { padding-top: 2.1rem; padding-bottom: 2.4rem; }
    .banner-image { max-height: 300px; margin-top: 0.4rem; }
    .homepage-banner .banner-button,
    .homepage-banner__cta {
        max-width: min(100%, 22rem);
    }
    .homepage-banner__mockup-stage {
        min-height: 250px;
        margin-top: 0.35rem;
    }
    .homepage-banner__mockup-stage::before {
        transform: translate(12px, 14px) rotate(4deg);
    }
    .homepage-banner__mockup-stage::after {
        transform: translate(-10px, 8px) rotate(-4deg);
    }
}

@media (max-width: 767.98px) {
    .homepage-banner__title {
        max-width: 18ch;
    }
    .homepage-banner__lead {
        max-width: none;
    }
    .homepage-banner__copy {
        text-align: center;
    }
    .homepage-banner .banner-image {
        max-height: 240px;
    }
}

.category-hero,
.post-hero {
    position: relative;
    background:
        radial-gradient(ellipse 80% 60% at 100% 0%, color-mix(in srgb, var(--primary-color) 25%, transparent) 0%, transparent 55%),
        linear-gradient(168deg, #060a12 0%, #0f172a 38%, #1a2638 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.category-hero .container,
.post-hero .container {
    max-width: 1100px;
}
.category-hero::after,
.post-hero::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
    pointer-events: none;
}
.category-kicker {
    color: #93c5fd;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.78rem;
}
.category-title {
    color: #f8fafc !important;
    font-size: clamp(2rem, 3vw, 2.9rem);
    font-weight: 800;
    letter-spacing: normal;
}
.category-description {
    color: #cbd5e1;
    max-width: 68ch;
    font-size: 1.05rem;
    line-height: 1.75;
}
.category-post-card {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.category-post-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
}
.category-post-card .post-image-link { display: block; overflow: hidden; }
.category-post-card img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}
.category-post-card:hover img { transform: scale(1.03); }
.category-post-card .card-body { padding: 1.15rem 1.15rem 1.25rem; }
.category-post-card .card-title { font-size: 1.1rem; line-height: 1.4; font-weight: 700; }
.category-post-card .card-title a { color: #0f172a; text-decoration: none; }
.category-post-card .card-text { color: #475569; line-height: 1.7; font-size: 0.95rem; }
.empty-state {
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 2rem 1.5rem;
    color: #475569;
    background: linear-gradient(180deg, #fafbfc 0%, #f8fafc 100%);
    text-align: center;
}
.empty-state h3 { color: #0f172a; font-size: 1.1rem; }
.pagination-wrap nav { display: flex; justify-content: center; }

.post-category-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(147, 197, 253, 0.2);
    border: 1px solid rgba(147, 197, 253, 0.35);
    color: #bfdbfe;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.post-title {
    color: #f8fafc !important;
    font-size: clamp(2rem, 3.5vw, 3.1rem);
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: normal;
    max-width: 24ch;
}
.post-meta { color: #cbd5e1; font-size: 0.95rem; }
.article-feature-image {
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}
.post-content {
    max-width: 100%;
    width: 100%;
    margin-inline: 0;
    font-size: var(--text-base, 1.0625rem);
    line-height: var(--leading-relaxed, 1.75);
    color: var(--muted-foreground, #3d4a5c);
}
.post-content > * {
    max-width: 100%;
}
/* Pasted content often carries fixed widths; normalize to fluid layout. */
.post-content [style*="width"] {
    width: auto !important;
    max-width: 100% !important;
}
.post-content :is(h1, h2, h3, h4, h5, h6) {
    width: 100%;
}
.post-content [style*="font-family"] {
    font-family: var(--font-family) !important;
}
/* Featured image above post body: uses column width, capped height */
.page-body article > img.article-feature-image {
    width: 100% !important;
    max-width: 100% !important;
    max-height: min(520px, 62vh) !important;
    height: auto !important;
    object-fit: contain;
    display: block;
    margin-inline: auto;
}
.post-content p,
.post-content ul,
.post-content ol,
.post-content blockquote {
    margin-bottom: 1.1rem;
}
.post-content blockquote {
    border-inline-start: 4px solid var(--primary-color);
    background: #f8fafc;
    border-radius: 8px;
    padding: 0.85rem 1rem;
}
.related-section {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid #e8edf2;
}
.related-section__title {
    color: #0f172a !important;
    font-weight: 700;
    letter-spacing: normal;
}
.related-post-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
    overflow: hidden;
    background: #fff;
}
.related-post-card .card-img-top {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 150px;
    object-fit: cover;
    object-position: center;
}
.related-post-card .card-body { padding: 1rem; }
@media (max-width: 991.98px) {
    .related-post-card .btn { width: 100%; justify-content: center; }
    .category-post-card .btn { width: 100%; justify-content: center; }
}

.error-wrapper {
    min-height: 65vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
}
.error-card {
    max-width: 520px;
    width: 100%;
    text-align: center;
    background: var(--content-surface-bg, #fff);
    padding: 3rem 2rem;
    border-radius: var(--surface-radius, 20px);
    border: 1px solid var(--surface-border, rgba(100, 116, 139, 0.2));
    box-shadow: var(--surface-shadow);
}
.error-code {
    font-size: clamp(3rem, 12vw, 6rem);
    font-weight: 800;
    letter-spacing: normal;
    color: var(--primary-color, #2563eb);
    margin-bottom: 0.5rem;
}
.error-card h1 { font-size: 1.75rem; margin-bottom: 1rem; color: var(--ink, #0b1220); }
.error-card p { margin-bottom: 2rem; color: var(--text-color, #475569); }
.back-home-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--primary-background);
    color: var(--header-text-color) !important;
    font-weight: 600;
    padding: 0.9rem 2.2rem;
    border-radius: 999px;
    text-decoration: none;
    border: 2px solid var(--primary-color);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.back-home-btn:hover {
    transform: translateY(-2px);
    color: var(--header-text-color) !important;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.16);
}

/* --- Print (keep pages usable when saved/PDF) --- */
@media print {
    .site-header,
    .custom-footer,
    .sticky-save-btn,
    .admin-sidebar {
        display: none !important;
    }

    body.site-body {
        background: #fff !important;
    }

    .content-surface,
    .post-content,
    .page-content {
        box-shadow: none !important;
    }
}

/* --- Accessibility & motion (Core Web Vitals: less main-thread animation work when requested) --- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

