/*
Theme Name: Broadband4
Theme URI: https://www.broadband4.co.uk
Author: PSD Group
Author URI: https://www.psdgroup.co.uk
Description: A bold, vibrant WordPress theme for Broadband4 — education-focused ISP providing managed and direct internet access to UK schools. Features full product showcases, carrier integration, blog, and SEO-optimised page templates.
Version: 2.1.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: broadband4
Tags: education, broadband, ISP, schools, one-column, two-columns, custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ==========================================================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ========================================================================== */

:root {
    /* Primary Palette (Broadband4 Pink — logo colour) */
    --b4-primary: #FF0080;
    --b4-primary-dark: #D6006B;
    --b4-primary-light: #FF3399;
    --b4-primary-50: #FFF0F7;
    --b4-primary-100: #FFE0EF;
    --b4-primary-900: #99004D;

    /* Secondary (Charcoal — logo-complementary) */
    --b4-secondary: #334155;
    --b4-secondary-dark: #1E293B;
    --b4-secondary-light: #475569;
    --b4-secondary-50: #F1F5F9;

    /* Accent (Grey — aligned with logo palette) */
    --b4-accent: #64748B;
    --b4-accent-dark: #475569;
    --b4-accent-light: #94A3B8;
    --b4-accent-50: #F1F5F9;

    /* Success / Positive */
    --b4-success: #10B981;
    --b4-success-dark: #059669;
    --b4-success-light: #34D399;

    /* Neutrals */
    --b4-dark: #0F172A;
    --b4-dark-alt: #1E293B;
    --b4-grey-700: #334155;
    --b4-grey-600: #475569;
    --b4-grey-500: #64748B;
    --b4-grey-400: #94A3B8;
    --b4-grey-300: #CBD5E1;
    --b4-grey-200: #E2E8F0;
    --b4-grey-100: #F1F5F9;
    --b4-grey-50: #F8FAFC;
    --b4-white: #FFFFFF;

    /* Typography */
    --b4-font-heading: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --b4-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --b4-font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Font Sizes (fluid) */
    --b4-text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.8125rem);
    --b4-text-sm: clamp(0.8125rem, 0.77rem + 0.21vw, 0.875rem);
    --b4-text-base: clamp(0.9375rem, 0.88rem + 0.29vw, 1.0625rem);
    --b4-text-lg: clamp(1.0625rem, 0.98rem + 0.42vw, 1.25rem);
    --b4-text-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
    --b4-text-2xl: clamp(1.5rem, 1.3rem + 1vw, 2rem);
    --b4-text-3xl: clamp(1.875rem, 1.5rem + 1.875vw, 2.5rem);
    --b4-text-4xl: clamp(2.25rem, 1.75rem + 2.5vw, 3.25rem);
    --b4-text-5xl: clamp(2.75rem, 2rem + 3.75vw, 4.5rem);

    /* Spacing */
    --b4-space-xs: 0.25rem;
    --b4-space-sm: 0.5rem;
    --b4-space-md: 1rem;
    --b4-space-lg: 1.5rem;
    --b4-space-xl: 2rem;
    --b4-space-2xl: 3rem;
    --b4-space-3xl: 4rem;
    --b4-space-4xl: 6rem;
    --b4-space-5xl: 8rem;

    /* Layout */
    --b4-container: 1280px;
    --b4-container-narrow: 960px;
    --b4-container-wide: 1440px;
    --b4-gutter: clamp(1rem, 0.5rem + 2.5vw, 2rem);

    /* Borders & Radius */
    --b4-radius-sm: 0.375rem;
    --b4-radius-md: 0.5rem;
    --b4-radius-lg: 0.75rem;
    --b4-radius-xl: 1rem;
    --b4-radius-2xl: 1.5rem;
    --b4-radius-full: 9999px;

    /* Shadows */
    --b4-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --b4-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --b4-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --b4-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --b4-shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --b4-shadow-glow: 0 0 20px rgba(255, 0, 128, 0.3);
    --b4-shadow-glow-navy: 0 0 20px rgba(30, 58, 138, 0.3);

    /* Transitions */
    --b4-transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --b4-transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --b4-transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Z-index scale */
    --b4-z-dropdown: 100;
    --b4-z-sticky: 200;
    --b4-z-overlay: 300;
    --b4-z-modal: 400;
    --b4-z-toast: 500;
}


/* ==========================================================================
   RESET & BASE
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    font-size: 100%;
}

body {
    font-family: var(--b4-font-body);
    font-size: var(--b4-text-base);
    line-height: 1.7;
    color: var(--b4-grey-700);
    background-color: var(--b4-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--b4-secondary-light);
    text-decoration: none;
    transition: color var(--b4-transition-fast);
}

a:hover {
    color: var(--b4-primary);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--b4-font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--b4-dark);
    letter-spacing: -0.02em;
}

h1 { font-size: var(--b4-text-5xl); }
h2 { font-size: var(--b4-text-4xl); }
h3 { font-size: var(--b4-text-3xl); }
h4 { font-size: var(--b4-text-2xl); }
h5 { font-size: var(--b4-text-xl); }
h6 { font-size: var(--b4-text-lg); }

p {
    margin-bottom: var(--b4-space-lg);
}

ul, ol {
    padding-left: var(--b4-space-xl);
    margin-bottom: var(--b4-space-lg);
}

li {
    margin-bottom: var(--b4-space-sm);
}


/* ==========================================================================
   LAYOUT
   ========================================================================== */

.b4-container {
    max-width: var(--b4-container);
    margin-inline: auto;
    padding-inline: var(--b4-gutter);
}

.b4-container--narrow {
    max-width: var(--b4-container-narrow);
}

.b4-container--wide {
    max-width: var(--b4-container-wide);
}

.b4-section {
    padding-block: var(--b4-space-3xl);
}

.b4-section--lg {
    padding-block: var(--b4-space-4xl);
}

.b4-section--sm {
    padding-block: var(--b4-space-2xl);
}

.b4-section--dark {
    background-color: var(--b4-dark);
    color: var(--b4-grey-300);
}

.b4-section--dark h1,
.b4-section--dark h2,
.b4-section--dark h3,
.b4-section--dark h4 {
    color: var(--b4-white);
}

.b4-section--grey {
    background-color: var(--b4-grey-50);
}

.b4-section--primary {
    background-color: var(--b4-primary);
    color: var(--b4-white);
}

.b4-section--primary h1,
.b4-section--primary h2,
.b4-section--primary h3,
.b4-section--primary h4 {
    color: var(--b4-white);
}

.b4-section--gradient {
    background: linear-gradient(135deg, var(--b4-dark) 0%, var(--b4-primary-900) 50%, var(--b4-primary-dark) 100%);
    color: var(--b4-grey-200);
}

.b4-section--gradient h1,
.b4-section--gradient h2,
.b4-section--gradient h3,
.b4-section--gradient h4 {
    color: var(--b4-white);
}

/* Override white heading color for cards inside gradient section */
.b4-section--gradient .b4-card__title {
    color: var(--b4-dark);
}

.b4-section--gradient .b4-card__text {
    color: var(--b4-grey-600);
}

.b4-grid {
    display: grid;
    gap: var(--b4-space-xl);
}

.b4-grid--2 { grid-template-columns: repeat(2, 1fr); }
.b4-grid--3 { grid-template-columns: repeat(3, 1fr); }
.b4-grid--4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
    .b4-grid--3,
    .b4-grid--4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .b4-grid--2,
    .b4-grid--3,
    .b4-grid--4 { grid-template-columns: 1fr; }
}

.b4-flex {
    display: flex;
    gap: var(--b4-space-lg);
}

.b4-flex--center {
    align-items: center;
    justify-content: center;
}

.b4-flex--between {
    align-items: center;
    justify-content: space-between;
}


/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */

.b4-header {
    position: sticky;
    top: 0;
    z-index: var(--b4-z-sticky);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--b4-grey-200);
    transition: all var(--b4-transition-base);
}

.b4-header.scrolled {
    box-shadow: var(--b4-shadow-lg);
}

.b4-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--b4-container-wide);
    margin-inline: auto;
    padding: var(--b4-space-md) var(--b4-gutter);
}

.b4-header__logo img {
    height: 42px;
    width: auto;
}

.b4-header__logo a {
    display: flex;
    align-items: center;
    gap: var(--b4-space-sm);
    font-family: var(--b4-font-heading);
    font-size: var(--b4-text-xl);
    font-weight: 800;
    color: var(--b4-dark);
    text-decoration: none;
}

.b4-header__logo .logo-text-bold {
    color: var(--b4-primary);
}

.b4-nav {
    display: flex;
    align-items: center;
    gap: var(--b4-space-xs);
}

.b4-nav__item {
    position: relative;
}

.b4-nav__link {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.875rem;
    font-size: var(--b4-text-sm);
    font-weight: 500;
    color: var(--b4-grey-700);
    border-radius: var(--b4-radius-md);
    transition: all var(--b4-transition-fast);
    white-space: nowrap;
}

.b4-nav__link:hover,
.b4-nav__link.current {
    color: var(--b4-primary);
    background-color: var(--b4-primary-50);
}

.b4-nav__link svg {
    width: 14px;
    height: 14px;
    transition: transform var(--b4-transition-fast);
}

.b4-nav__item:hover .b4-nav__link svg {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.b4-nav__dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    min-width: 240px;
    background: var(--b4-white);
    border: 1px solid var(--b4-grey-200);
    border-radius: var(--b4-radius-lg);
    box-shadow: var(--b4-shadow-xl);
    padding: var(--b4-space-sm);
    opacity: 0;
    visibility: hidden;
    transition: all var(--b4-transition-fast);
}

.b4-nav__item:hover .b4-nav__dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.b4-nav__dropdown a {
    display: block;
    padding: 0.625rem 1rem;
    font-size: var(--b4-text-sm);
    color: var(--b4-grey-700);
    border-radius: var(--b4-radius-md);
    transition: all var(--b4-transition-fast);
}

.b4-nav__dropdown a:hover {
    color: var(--b4-primary);
    background-color: var(--b4-primary-50);
}

.b4-nav__dropdown a .dropdown-label {
    font-weight: 600;
    display: block;
}

.b4-nav__dropdown a .dropdown-desc {
    font-size: var(--b4-text-xs);
    color: var(--b4-grey-500);
    margin-top: 0.125rem;
}

/* Header CTA */
.b4-header__cta {
    display: flex;
    align-items: center;
    gap: var(--b4-space-md);
}

/* Mobile CTA hidden on desktop */
.b4-header__cta--mobile {
    display: none !important;
}

/* Mobile Menu Toggle */
.b4-mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.b4-mobile-toggle span {
    width: 26px;
    height: 3px;
    background-color: var(--b4-primary);
    border-radius: 2px;
    transition: all var(--b4-transition-fast);
}

.b4-mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.b4-mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.b4-mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 1024px) {
    .b4-mobile-toggle {
        display: flex;
    }

    /* Remove backdrop-filter on mobile — it creates a containing block
       that prevents fixed-position children from being viewport-relative */
    .b4-header {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: #FFFFFF;
    }

    .b4-nav {
        display: flex !important;
        position: fixed;
        top: 0;
        right: 0;
        width: 320px;
        max-width: 85vw;
        height: 100vh;
        height: 100dvh;
        background: #FFFFFF;
        flex-direction: column;
        align-items: stretch;
        padding: 5rem 1.5rem 1.5rem;
        box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        z-index: 9999;
    }

    .b4-nav.open {
        transform: translateX(0);
    }

    .b4-nav__item {
        display: block;
        width: 100%;
    }

    .b4-nav__link,
    .b4-nav .b4-nav__link,
    .b4-header .b4-nav__link,
    html body .b4-header .b4-nav .b4-nav__item .b4-nav__link,
    html body .b4-header .b4-nav .b4-nav__item > a {
        display: flex;
        padding: 0.75rem 1rem;
        font-size: 1rem;
        color: #334155 !important;
        border-bottom: 1px solid #F1F5F9;
        background: transparent !important;
    }

    .b4-nav__link svg,
    html body .b4-header .b4-nav .b4-nav__link svg {
        color: #334155 !important;
    }

    .b4-nav__dropdown,
    .b4-nav .b4-nav__dropdown,
    .b4-header .b4-nav__dropdown,
    html body .b4-header .b4-nav .b4-nav__item .b4-nav__dropdown {
        position: static !important;
        transform: none !important;
        box-shadow: none !important;
        border: none !important;
        border-radius: 0 !important;
        opacity: 1 !important;
        visibility: visible !important;
        padding-left: 1rem !important;
        min-width: auto !important;
        display: none !important;
        background: #F8FAFC !important;
        left: auto !important;
        top: auto !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .b4-nav__item.open .b4-nav__dropdown,
    html body .b4-header .b4-nav .b4-nav__item.open .b4-nav__dropdown {
        display: block !important;
    }

    .b4-nav__dropdown a,
    .b4-nav .b4-nav__dropdown a,
    html body .b4-header .b4-nav .b4-nav__dropdown a,
    html body .b4-header .b4-nav .b4-nav__item .b4-nav__dropdown a {
        display: block !important;
        padding: 0.6rem 1rem !important;
        border-bottom: 1px solid #F1F5F9 !important;
        color: #334155 !important;
        background: transparent !important;
    }

    .b4-nav__dropdown a .dropdown-label,
    html body .b4-header .b4-nav .b4-nav__dropdown a .dropdown-label {
        color: #334155 !important;
    }

    .b4-nav__dropdown a .dropdown-desc,
    html body .b4-header .b4-nav .b4-nav__dropdown a .dropdown-desc {
        color: #64748B !important;
    }

    /* On mobile: show mobile CTA inside nav drawer, hide desktop CTA */
    .b4-header__cta--mobile {
        display: flex !important;
        flex-direction: column;
        gap: 0.75rem;
        padding-top: 1.5rem;
        border-top: 1px solid #E2E8F0;
        margin-top: auto;
    }

    .b4-header__cta:not(.b4-header__cta--mobile) {
        display: none !important;
    }

    .b4-header__cta .b4-btn {
        width: 100%;
        justify-content: center;
    }
}

.b4-mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    z-index: calc(var(--b4-z-overlay) - 1);
}

.b4-mobile-overlay.active {
    display: block;
}


/* ==========================================================================
   BUTTONS
   ========================================================================== */

.b4-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    font-family: var(--b4-font-heading);
    font-size: var(--b4-text-sm);
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: var(--b4-radius-lg);
    cursor: pointer;
    transition: all var(--b4-transition-fast);
    white-space: nowrap;
}

.b4-btn svg {
    width: 18px;
    height: 18px;
    transition: transform var(--b4-transition-fast);
}

.b4-btn:hover svg {
    transform: translateX(3px);
}

.b4-btn--primary {
    background-color: var(--b4-primary);
    color: var(--b4-white);
    border-color: var(--b4-primary);
}

.b4-btn--primary:hover {
    background-color: var(--b4-primary-dark);
    border-color: var(--b4-primary-dark);
    color: var(--b4-white);
    box-shadow: var(--b4-shadow-glow);
    transform: translateY(-1px);
}

.b4-btn--secondary {
    background-color: var(--b4-secondary);
    color: var(--b4-white);
    border-color: var(--b4-secondary);
}

.b4-btn--secondary:hover {
    background-color: var(--b4-secondary-dark);
    border-color: var(--b4-secondary-dark);
    color: var(--b4-white);
    box-shadow: var(--b4-shadow-glow-navy);
    transform: translateY(-1px);
}

.b4-btn--outline {
    background-color: transparent;
    color: var(--b4-primary);
    border-color: var(--b4-primary);
}

.b4-btn--outline:hover {
    background-color: var(--b4-primary);
    color: var(--b4-white);
    transform: translateY(-1px);
}

.b4-btn--outline-white {
    background-color: transparent;
    color: var(--b4-white);
    border-color: rgba(255, 255, 255, 0.4);
}

.b4-btn--outline-white:hover {
    background-color: var(--b4-white);
    color: var(--b4-primary);
    border-color: var(--b4-white);
    transform: translateY(-1px);
}

.b4-btn--white {
    background-color: var(--b4-white);
    color: var(--b4-primary);
    border-color: var(--b4-white);
}

.b4-btn--white:hover {
    background-color: var(--b4-grey-50);
    box-shadow: var(--b4-shadow-lg);
    transform: translateY(-1px);
}

.b4-btn--ghost {
    background-color: transparent;
    color: var(--b4-grey-700);
    border-color: transparent;
}

.b4-btn--ghost:hover {
    background-color: var(--b4-grey-100);
    color: var(--b4-primary);
}

.b4-btn--lg {
    padding: 1rem 2.25rem;
    font-size: var(--b4-text-base);
    border-radius: var(--b4-radius-xl);
}

.b4-btn--sm {
    padding: 0.5rem 1.25rem;
    font-size: var(--b4-text-xs);
}

.b4-btn--full {
    width: 100%;
}


/* ==========================================================================
   HERO SECTIONS
   ========================================================================== */

.b4-hero {
    position: relative;
    min-height: auto;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding-top: 7rem;
    padding-bottom: 4rem;
    background: linear-gradient(135deg, var(--b4-dark) 0%, #0D1B3E 40%, var(--b4-primary-900) 70%, var(--b4-primary-dark) 100%);
    color: var(--b4-white);
}

.b4-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(37, 99, 235, 0.15) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(6, 182, 212, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 80%, rgba(255, 0, 128, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

/* Animated grid pattern */
.b4-hero__grid-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

.b4-hero__content {
    position: relative;
    z-index: 1;
    max-width: 700px;
}

.b4-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--b4-radius-full);
    font-size: var(--b4-text-xs);
    font-weight: 500;
    color: var(--b4-accent-light);
    margin-bottom: var(--b4-space-xl);
    backdrop-filter: blur(8px);
}

.b4-hero__badge svg {
    width: 16px;
    height: 16px;
}

.b4-hero__title {
    font-size: var(--b4-text-5xl);
    font-weight: 800;
    color: var(--b4-white);
    margin-bottom: var(--b4-space-lg);
    letter-spacing: -0.03em;
}

.b4-hero__title span {
    background: linear-gradient(135deg, var(--b4-secondary) 0%, var(--b4-secondary-light) 40%, var(--b4-accent-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.b4-hero__subtitle {
    font-size: var(--b4-text-lg);
    color: var(--b4-grey-400);
    margin-bottom: var(--b4-space-2xl);
    max-width: 560px;
    line-height: 1.7;
}

.b4-hero__actions {
    display: flex;
    gap: var(--b4-space-md);
    flex-wrap: wrap;
}

.b4-hero__stats {
    display: flex;
    gap: var(--b4-space-3xl);
    margin-top: var(--b4-space-3xl);
    padding-top: var(--b4-space-2xl);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.b4-hero__stat-value {
    font-family: var(--b4-font-heading);
    font-size: var(--b4-text-3xl);
    font-weight: 800;
    color: var(--b4-white);
    line-height: 1;
}

.b4-hero__stat-label {
    font-size: var(--b4-text-xs);
    color: var(--b4-grey-400);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 0.375rem;
}

/* Floating element on right */
.b4-hero__visual {
    position: absolute;
    right: -5%;
    top: 50%;
    transform: translateY(-50%);
    width: 45%;
    max-width: 600px;
    opacity: 0.9;
}

@media (max-width: 1024px) {
    .b4-hero {
        min-height: auto;
        padding-block: var(--b4-space-4xl);
    }

    .b4-hero__visual {
        display: none;
    }

    .b4-hero__stats {
        gap: var(--b4-space-xl);
    }
}

@media (max-width: 640px) {
    .b4-hero__actions {
        flex-direction: column;
    }

    .b4-hero__stats {
        flex-direction: column;
        gap: var(--b4-space-lg);
    }
}

/* Page Hero (smaller, for inner pages) */
.b4-page-hero {
    position: relative;
    padding: 7rem 0 4rem;
    background: linear-gradient(135deg, var(--b4-dark) 0%, var(--b4-primary-900) 100%);
    color: var(--b4-white);
    overflow: hidden;
}

.b4-page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 50%, rgba(37, 99, 235, 0.15) 0%, transparent 60%);
    pointer-events: none;
}

.b4-page-hero__content {
    position: relative;
    z-index: 1;
    max-width: 700px;
}

.b4-page-hero__breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--b4-text-sm);
    color: var(--b4-grey-400);
    margin-bottom: var(--b4-space-lg);
}

.b4-page-hero__breadcrumb a {
    color: var(--b4-grey-400);
}

.b4-page-hero__breadcrumb a:hover {
    color: var(--b4-white);
}

.b4-page-hero__breadcrumb svg {
    width: 14px;
    height: 14px;
    opacity: 0.5;
}

.b4-page-hero__title {
    font-size: var(--b4-text-4xl);
    font-weight: 800;
    color: var(--b4-white);
    margin-bottom: var(--b4-space-md);
}

.b4-page-hero__desc {
    font-size: var(--b4-text-lg);
    color: var(--b4-grey-300);
    max-width: 600px;
}


/* ==========================================================================
   CARDS
   ========================================================================== */

.b4-card {
    background: var(--b4-white);
    border: 1px solid var(--b4-grey-200);
    border-radius: var(--b4-radius-xl);
    padding: var(--b4-space-2xl);
    transition: all var(--b4-transition-base);
}

.b4-card:hover {
    border-color: var(--b4-primary-100);
    box-shadow: var(--b4-shadow-lg);
    transform: translateY(-4px);
}

.b4-card__icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--b4-radius-lg);
    margin-bottom: var(--b4-space-lg);
    font-size: 1.5rem;
}

.b4-card__icon--blue {
    background: var(--b4-primary-50);
    color: var(--b4-primary);
}

.b4-card__icon--pink {
    background: var(--b4-secondary-50);
    color: var(--b4-secondary);
}

.b4-card__icon--cyan {
    background: var(--b4-accent-50);
    color: var(--b4-accent);
}

.b4-card__title {
    font-size: var(--b4-text-xl);
    margin-bottom: var(--b4-space-sm);
}

.b4-card__text {
    font-size: var(--b4-text-sm);
    color: var(--b4-grey-600);
    margin-bottom: 0;
}

.b4-card__link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: var(--b4-text-sm);
    font-weight: 600;
    color: var(--b4-primary);
    margin-top: var(--b4-space-lg);
}

.b4-card__link svg {
    width: 16px;
    height: 16px;
    transition: transform var(--b4-transition-fast);
}

.b4-card__link:hover svg {
    transform: translateX(4px);
}

/* Feature Card (horizontal) */
.b4-feature-card {
    display: flex;
    gap: var(--b4-space-xl);
    align-items: flex-start;
    padding: var(--b4-space-xl);
    background: var(--b4-white);
    border: 1px solid var(--b4-grey-200);
    border-radius: var(--b4-radius-xl);
    transition: all var(--b4-transition-base);
}

.b4-feature-card:hover {
    border-color: var(--b4-primary-100);
    box-shadow: var(--b4-shadow-md);
}

.b4-feature-card__icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--b4-primary-50);
    color: var(--b4-primary);
    border-radius: var(--b4-radius-md);
    font-size: 1.25rem;
}

.b4-feature-card__title {
    font-size: var(--b4-text-lg);
    margin-bottom: var(--b4-space-xs);
}

.b4-feature-card__text {
    font-size: var(--b4-text-sm);
    color: var(--b4-grey-600);
    margin-bottom: 0;
}

/* Product Card */
.b4-product-card {
    position: relative;
    background: var(--b4-white);
    border: 2px solid var(--b4-grey-200);
    border-radius: var(--b4-radius-2xl);
    padding: var(--b4-space-3xl);
    transition: all var(--b4-transition-base);
    overflow: hidden;
}

.b4-product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--b4-primary) 0%, var(--b4-accent) 100%);
}

.b4-product-card--pink::before {
    background: linear-gradient(90deg, var(--b4-secondary) 0%, var(--b4-secondary-light) 100%);
}

.b4-product-card:hover {
    border-color: var(--b4-primary-100);
    box-shadow: var(--b4-shadow-xl);
    transform: translateY(-6px);
}

.b4-product-card__label {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    font-size: var(--b4-text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: var(--b4-radius-full);
    margin-bottom: var(--b4-space-lg);
}

.b4-product-card__label--blue {
    background: var(--b4-primary-50);
    color: var(--b4-primary);
}

.b4-product-card__label--pink {
    background: var(--b4-secondary-50);
    color: var(--b4-secondary);
}

.b4-product-card__title {
    font-size: var(--b4-text-2xl);
    margin-bottom: var(--b4-space-md);
}

.b4-product-card__desc {
    color: var(--b4-grey-600);
    margin-bottom: var(--b4-space-xl);
}

.b4-product-card__features {
    list-style: none;
    padding: 0;
    margin-bottom: var(--b4-space-xl);
}

.b4-product-card__features li {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    padding: 0.5rem 0;
    font-size: var(--b4-text-sm);
    color: var(--b4-grey-700);
}

.b4-product-card__features li svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: var(--b4-success);
    margin-top: 0.1rem;
}


/* ==========================================================================
   CARRIER LOGOS
   ========================================================================== */

.b4-carriers {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--b4-space-2xl) var(--b4-space-3xl);
    padding: var(--b4-space-xl) 0;
}

.b4-carriers img {
    height: 48px;
    width: auto;
    opacity: 0.5;
    filter: grayscale(100%);
    transition: all var(--b4-transition-base);
}

.b4-carriers img:hover {
    opacity: 1;
    filter: grayscale(0);
}

.b4-carriers--dark img {
    filter: grayscale(100%) brightness(2);
    opacity: 0.4;
}

.b4-carriers--dark img:hover {
    filter: grayscale(0) brightness(1);
    opacity: 1;
}


/* ==========================================================================
   TESTIMONIALS
   ========================================================================== */

.b4-testimonial {
    background: var(--b4-white);
    border: 1px solid var(--b4-grey-200);
    border-radius: var(--b4-radius-xl);
    padding: var(--b4-space-2xl);
    position: relative;
}

.b4-testimonial__quote {
    font-size: var(--b4-text-lg);
    font-style: italic;
    color: var(--b4-grey-700);
    margin-bottom: var(--b4-space-lg);
    line-height: 1.8;
}

.b4-testimonial__quote::before {
    content: '\201C';
    font-size: 4rem;
    font-family: Georgia, serif;
    color: var(--b4-primary-100);
    line-height: 0;
    position: relative;
    top: 0.5rem;
    margin-right: 0.25rem;
}

.b4-testimonial__author {
    display: flex;
    align-items: center;
    gap: var(--b4-space-md);
}

.b4-testimonial__avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--b4-radius-full);
    background: var(--b4-primary-50);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--b4-primary);
    font-weight: 700;
    font-size: var(--b4-text-sm);
}

.b4-testimonial__name {
    font-weight: 600;
    color: var(--b4-dark);
    font-size: var(--b4-text-sm);
}

.b4-testimonial__role {
    font-size: var(--b4-text-xs);
    color: var(--b4-grey-500);
}


/* ==========================================================================
   SECTION HEADERS
   ========================================================================== */

.b4-section-header {
    text-align: center;
    max-width: 700px;
    margin-inline: auto;
    margin-bottom: var(--b4-space-3xl);
}

.b4-section-header__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--b4-text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--b4-primary);
    margin-bottom: var(--b4-space-md);
}

.b4-section--dark .b4-section-header__eyebrow,
.b4-section--gradient .b4-section-header__eyebrow {
    color: var(--b4-accent-light);
}

.b4-section-header__title {
    margin-bottom: var(--b4-space-md);
}

.b4-section-header__desc {
    font-size: var(--b4-text-lg);
    color: var(--b4-grey-600);
    margin-bottom: 0;
}

.b4-section--dark .b4-section-header__desc,
.b4-section--gradient .b4-section-header__desc {
    color: var(--b4-grey-400);
}

.b4-section-header--left {
    text-align: left;
    margin-inline: 0;
}


/* ==========================================================================
   CTA SECTIONS
   ========================================================================== */

.b4-cta {
    position: relative;
    padding: var(--b4-space-4xl) 0;
    background: linear-gradient(135deg, var(--b4-primary) 0%, var(--b4-primary-dark) 100%);
    color: var(--b4-white);
    overflow: hidden;
}

.b4-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 0% 100%, rgba(255, 0, 128, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 100% 0%, rgba(6, 182, 212, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.b4-cta__inner {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 700px;
    margin-inline: auto;
}

.b4-cta__title {
    font-size: var(--b4-text-3xl);
    color: var(--b4-white);
    margin-bottom: var(--b4-space-md);
}

.b4-cta__text {
    font-size: var(--b4-text-lg);
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--b4-space-2xl);
}

.b4-cta__actions {
    display: flex;
    gap: var(--b4-space-md);
    justify-content: center;
    flex-wrap: wrap;
}


/* ==========================================================================
   COMPARISON TABLE
   ========================================================================== */

.b4-comparison {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--b4-text-sm);
}

.b4-comparison thead {
    background: var(--b4-dark);
    color: var(--b4-white);
}

.b4-comparison th {
    padding: 1rem 1.25rem;
    text-align: left;
    font-weight: 600;
    font-size: var(--b4-text-sm);
}

.b4-comparison td {
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid var(--b4-grey-200);
}

.b4-comparison tbody tr:hover {
    background-color: var(--b4-primary-50);
}

.b4-comparison .check {
    color: var(--b4-success);
    font-weight: 700;
}

.b4-comparison .cross {
    color: var(--b4-grey-400);
}


/* ==========================================================================
   FAQ / ACCORDION
   ========================================================================== */

.b4-accordion {
    border: 1px solid var(--b4-grey-200);
    border-radius: var(--b4-radius-xl);
    overflow: hidden;
}

.b4-accordion__item {
    border-bottom: 1px solid var(--b4-grey-200);
}

.b4-accordion__item:last-child {
    border-bottom: none;
}

.b4-accordion__trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    background: none;
    border: none;
    font-family: var(--b4-font-heading);
    font-size: var(--b4-text-base);
    font-weight: 600;
    color: var(--b4-dark);
    text-align: left;
    cursor: pointer;
    transition: all var(--b4-transition-fast);
}

.b4-accordion__trigger:hover {
    background-color: var(--b4-grey-50);
    color: var(--b4-primary);
}

.b4-accordion__trigger svg {
    width: 20px;
    height: 20px;
    color: var(--b4-grey-500);
    transition: transform var(--b4-transition-fast);
    flex-shrink: 0;
}

.b4-accordion__item.open .b4-accordion__trigger svg {
    transform: rotate(180deg);
    color: var(--b4-primary);
}

.b4-accordion__content {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--b4-transition-base);
}

.b4-accordion__item.open .b4-accordion__content {
    max-height: 500px;
}

.b4-accordion__body {
    padding: 0 1.5rem 1.25rem;
    color: var(--b4-grey-600);
    font-size: var(--b4-text-sm);
    line-height: 1.8;
}


/* ==========================================================================
   BLOG
   ========================================================================== */

.b4-post-card {
    background: var(--b4-white);
    border: 1px solid var(--b4-grey-200);
    border-radius: var(--b4-radius-xl);
    overflow: hidden;
    transition: all var(--b4-transition-base);
}

.b4-post-card:hover {
    box-shadow: var(--b4-shadow-lg);
    transform: translateY(-4px);
}

.b4-post-card__image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.b4-post-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--b4-transition-slow);
}

.b4-post-card:hover .b4-post-card__image img {
    transform: scale(1.05);
}

.b4-post-card__body {
    padding: var(--b4-space-xl);
}

.b4-post-card__category {
    display: inline-block;
    font-size: var(--b4-text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--b4-primary);
    margin-bottom: var(--b4-space-sm);
}

.b4-post-card__title {
    font-size: var(--b4-text-xl);
    margin-bottom: var(--b4-space-sm);
}

.b4-post-card__title a {
    color: var(--b4-dark);
}

.b4-post-card__title a:hover {
    color: var(--b4-primary);
}

.b4-post-card__excerpt {
    font-size: var(--b4-text-sm);
    color: var(--b4-grey-600);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: var(--b4-space-lg);
}

.b4-post-card__meta {
    display: flex;
    align-items: center;
    gap: var(--b4-space-md);
    font-size: var(--b4-text-xs);
    color: var(--b4-grey-500);
}


/* Single Post */
.b4-post-single {
    max-width: var(--b4-container-narrow);
    margin-inline: auto;
    padding: var(--b4-space-3xl) var(--b4-gutter);
}

.b4-post-single__header {
    margin-bottom: var(--b4-space-2xl);
}

.b4-post-single__category {
    display: inline-block;
    font-size: var(--b4-text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--b4-primary);
    margin-bottom: var(--b4-space-md);
}

.b4-post-single__title {
    font-size: var(--b4-text-4xl);
    margin-bottom: var(--b4-space-lg);
}

.b4-post-single__meta {
    display: flex;
    align-items: center;
    gap: var(--b4-space-lg);
    font-size: var(--b4-text-sm);
    color: var(--b4-grey-500);
}

.b4-post-single__featured {
    border-radius: var(--b4-radius-xl);
    overflow: hidden;
    margin-bottom: var(--b4-space-2xl);
}

.b4-post-single__content {
    font-size: var(--b4-text-base);
    line-height: 1.8;
}

.b4-post-single__content h2 {
    margin-top: var(--b4-space-2xl);
    margin-bottom: var(--b4-space-md);
}

.b4-post-single__content h3 {
    margin-top: var(--b4-space-xl);
    margin-bottom: var(--b4-space-md);
}

.b4-post-single__content blockquote {
    border-left: 4px solid var(--b4-primary);
    padding: var(--b4-space-lg) var(--b4-space-xl);
    background: var(--b4-primary-50);
    border-radius: 0 var(--b4-radius-md) var(--b4-radius-md) 0;
    margin: var(--b4-space-xl) 0;
    font-style: italic;
    color: var(--b4-grey-700);
}

.b4-post-single__content pre {
    background: var(--b4-dark);
    color: var(--b4-grey-300);
    padding: var(--b4-space-xl);
    border-radius: var(--b4-radius-lg);
    overflow-x: auto;
    margin: var(--b4-space-xl) 0;
}

.b4-post-single__content code {
    font-family: var(--b4-font-mono);
    font-size: 0.9em;
}

.b4-post-single__content img {
    border-radius: var(--b4-radius-lg);
    margin: var(--b4-space-xl) 0;
}


/* ==========================================================================
   CONTACT FORM
   ========================================================================== */

.b4-form__group {
    margin-bottom: var(--b4-space-lg);
}

.b4-form__label {
    display: block;
    font-size: var(--b4-text-sm);
    font-weight: 600;
    color: var(--b4-dark);
    margin-bottom: var(--b4-space-sm);
}

.b4-form__input,
.b4-form__textarea,
.b4-form__select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: var(--b4-font-body);
    font-size: var(--b4-text-base);
    color: var(--b4-grey-700);
    background: var(--b4-white);
    border: 2px solid var(--b4-grey-200);
    border-radius: var(--b4-radius-lg);
    transition: all var(--b4-transition-fast);
}

.b4-form__input:focus,
.b4-form__textarea:focus,
.b4-form__select:focus {
    outline: none;
    border-color: var(--b4-primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.b4-form__textarea {
    resize: vertical;
    min-height: 140px;
}

.b4-form__hint {
    font-size: var(--b4-text-xs);
    color: var(--b4-grey-500);
    margin-top: var(--b4-space-xs);
}


/* ==========================================================================
   FOOTER
   ========================================================================== */

.b4-footer {
    background-color: var(--b4-dark);
    color: var(--b4-grey-400);
    padding-top: var(--b4-space-4xl);
}

.b4-footer__grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: var(--b4-space-3xl);
    padding-bottom: var(--b4-space-3xl);
}

@media (max-width: 1024px) {
    .b4-footer__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .b4-footer__grid {
        grid-template-columns: 1fr;
    }
}

.b4-footer__brand p {
    font-size: var(--b4-text-sm);
    color: var(--b4-grey-500);
    max-width: 300px;
    margin-top: var(--b4-space-md);
}

.b4-footer__logo {
    display: inline-block;
    gap: 0;
    font-family: var(--b4-font-heading);
    font-size: var(--b4-text-lg);
    font-weight: 800;
    color: var(--b4-white);
    text-decoration: none;
    margin-bottom: var(--b4-space-md);
}

.b4-footer__logo span {
    color: var(--b4-primary-light);
}

.b4-footer__social {
    display: flex;
    gap: var(--b4-space-sm);
    margin-top: var(--b4-space-lg);
}

.b4-footer__social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--b4-radius-md);
    background: var(--b4-dark-alt);
    color: var(--b4-grey-400);
    transition: all var(--b4-transition-fast);
}

.b4-footer__social a:hover {
    background: var(--b4-primary);
    color: var(--b4-white);
}

.b4-footer__heading {
    font-family: var(--b4-font-heading);
    font-size: var(--b4-text-sm);
    font-weight: 700;
    color: var(--b4-white);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--b4-space-lg);
}

.b4-footer__links {
    list-style: none;
    padding: 0;
}

.b4-footer__links li {
    margin-bottom: var(--b4-space-sm);
}

.b4-footer__links a {
    font-size: var(--b4-text-sm);
    color: var(--b4-grey-500);
    transition: color var(--b4-transition-fast);
}

.b4-footer__links a:hover {
    color: var(--b4-white);
}

.b4-footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--b4-space-xl) 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--b4-space-md);
}

.b4-footer__bottom p {
    font-size: var(--b4-text-xs);
    color: var(--b4-grey-500);
    margin: 0;
}

.b4-footer__bottom-links {
    display: flex;
    gap: var(--b4-space-lg);
}

.b4-footer__bottom-links a {
    font-size: var(--b4-text-xs);
    color: var(--b4-grey-500);
}

.b4-footer__bottom-links a:hover {
    color: var(--b4-white);
}


/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */

.b4-text-center { text-align: center; }
.b4-text-left { text-align: left; }
.b4-text-right { text-align: right; }

.b4-mt-0 { margin-top: 0; }
.b4-mt-sm { margin-top: var(--b4-space-sm); }
.b4-mt-md { margin-top: var(--b4-space-md); }
.b4-mt-lg { margin-top: var(--b4-space-lg); }
.b4-mt-xl { margin-top: var(--b4-space-xl); }
.b4-mt-2xl { margin-top: var(--b4-space-2xl); }
.b4-mt-3xl { margin-top: var(--b4-space-3xl); }

.b4-mb-0 { margin-bottom: 0; }
.b4-mb-sm { margin-bottom: var(--b4-space-sm); }
.b4-mb-md { margin-bottom: var(--b4-space-md); }
.b4-mb-lg { margin-bottom: var(--b4-space-lg); }
.b4-mb-xl { margin-bottom: var(--b4-space-xl); }
.b4-mb-2xl { margin-bottom: var(--b4-space-2xl); }

.b4-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.b4-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: var(--b4-text-xs);
    font-weight: 600;
    border-radius: var(--b4-radius-full);
}

.b4-badge--blue {
    background: var(--b4-primary-50);
    color: var(--b4-primary);
}

.b4-badge--pink {
    background: var(--b4-secondary-50);
    color: var(--b4-secondary);
}

.b4-badge--green {
    background: rgba(16, 185, 129, 0.1);
    color: var(--b4-success-dark);
}

.b4-badge--cyan {
    background: rgba(6, 182, 212, 0.1);
    color: var(--b4-accent);
}

.b4-divider {
    height: 1px;
    background: var(--b4-grey-200);
    border: none;
    margin: var(--b4-space-3xl) 0;
}


/* ==========================================================================
   ANIMATIONS
   ========================================================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.b4-animate {
    opacity: 0;
}

.b4-animate--visible {
    animation: fadeInUp 0.6s ease-out forwards;
}

.b4-animate--delay-1 { animation-delay: 0.1s; }
.b4-animate--delay-2 { animation-delay: 0.2s; }
.b4-animate--delay-3 { animation-delay: 0.3s; }
.b4-animate--delay-4 { animation-delay: 0.4s; }


/* ==========================================================================
   WORDPRESS SPECIFIC
   ========================================================================== */

/* Alignment classes */
.alignleft {
    float: left;
    margin: 0 var(--b4-space-xl) var(--b4-space-lg) 0;
}

.alignright {
    float: right;
    margin: 0 0 var(--b4-space-lg) var(--b4-space-xl);
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: var(--b4-space-lg);
}

.alignwide {
    max-width: var(--b4-container);
    margin-inline: auto;
}

.alignfull {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

/* WordPress navigation */
.navigation .nav-links {
    display: flex;
    justify-content: center;
    gap: var(--b4-space-sm);
    padding: var(--b4-space-xl) 0;
}

.navigation .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    font-size: var(--b4-text-sm);
    font-weight: 500;
    color: var(--b4-grey-700);
    background: var(--b4-white);
    border: 1px solid var(--b4-grey-200);
    border-radius: var(--b4-radius-md);
    transition: all var(--b4-transition-fast);
}

.navigation .page-numbers:hover {
    border-color: var(--b4-primary);
    color: var(--b4-primary);
}

.navigation .page-numbers.current {
    background: var(--b4-primary);
    border-color: var(--b4-primary);
    color: var(--b4-white);
}

/* Comments */
.comment-list {
    list-style: none;
    padding: 0;
}

.comment-body {
    padding: var(--b4-space-xl);
    margin-bottom: var(--b4-space-lg);
    background: var(--b4-grey-50);
    border-radius: var(--b4-radius-lg);
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: var(--b4-space-md);
    margin-bottom: var(--b4-space-md);
}

.comment-author img {
    border-radius: var(--b4-radius-full);
}

/* Screen reader text */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

/* WP Block styles */
.wp-block-image img {
    border-radius: var(--b4-radius-lg);
}

.wp-block-quote {
    border-left: 4px solid var(--b4-primary);
    padding: var(--b4-space-lg) var(--b4-space-xl);
    background: var(--b4-primary-50);
    border-radius: 0 var(--b4-radius-md) var(--b4-radius-md) 0;
}

.wp-block-button__link {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.75rem;
    font-family: var(--b4-font-heading);
    font-size: var(--b4-text-sm);
    font-weight: 600;
    background: var(--b4-primary);
    color: var(--b4-white);
    border-radius: var(--b4-radius-lg);
    transition: all var(--b4-transition-fast);
}

.wp-block-button__link:hover {
    background: var(--b4-primary-dark);
    color: var(--b4-white);
}


/* ==========================================================================
   PAGE CONTENT STYLES (WordPress Editor Output)
   ========================================================================== */
.b4-page-content {
    padding-block: var(--b4-space-3xl);
}

.b4-page-content > .wp-block-group,
.b4-page-content > .wp-block-columns,
.b4-page-content > .wp-block-cover,
.b4-page-content > .alignfull {
    max-width: 100%;
    margin-inline: 0;
}

.b4-page-content > *:not(.alignfull):not(.alignwide):not(.wp-block-cover) {
    max-width: var(--b4-container);
    margin-inline: auto;
    padding-inline: var(--b4-gutter);
}

.b4-page-content > .alignwide {
    max-width: var(--b4-container-wide);
    margin-inline: auto;
    padding-inline: var(--b4-gutter);
}

/* ── Headings with decorative accent underline ── */
.b4-page-content h2 {
    margin-top: var(--b4-space-3xl);
    margin-bottom: var(--b4-space-lg);
    font-size: var(--b4-text-3xl);
    position: relative;
    padding-bottom: var(--b4-space-md);
}

.b4-page-content h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--b4-primary), var(--b4-accent-light));
    border-radius: var(--b4-radius-full);
}

.b4-page-content h3 {
    margin-top: var(--b4-space-2xl);
    margin-bottom: var(--b4-space-md);
    font-size: var(--b4-text-2xl);
}

.b4-page-content h4 {
    margin-top: var(--b4-space-xl);
    margin-bottom: var(--b4-space-sm);
    font-size: var(--b4-text-xl);
}

.b4-page-content img {
    border-radius: var(--b4-radius-lg);
}

/* ── Column blocks as styled cards ── */
.b4-page-content .wp-block-columns {
    gap: var(--b4-space-xl);
    margin-bottom: var(--b4-space-2xl);
}

.b4-page-content .wp-block-columns .wp-block-column {
    background: var(--b4-white);
    border: 1px solid var(--b4-grey-200);
    border-radius: var(--b4-radius-xl);
    padding: var(--b4-space-2xl);
    transition: all var(--b4-transition-base);
    border-top: 3px solid transparent;
    box-shadow: var(--b4-shadow-sm);
}

.b4-page-content .wp-block-columns .wp-block-column:nth-child(3n+1) {
    border-top-color: var(--b4-primary);
}

.b4-page-content .wp-block-columns .wp-block-column:nth-child(3n+2) {
    border-top-color: var(--b4-accent-dark);
}

.b4-page-content .wp-block-columns .wp-block-column:nth-child(3n) {
    border-top-color: var(--b4-accent);
}

.b4-page-content .wp-block-columns .wp-block-column:hover {
    transform: translateY(-3px);
    box-shadow: var(--b4-shadow-lg);
}

.b4-page-content .wp-block-columns .wp-block-column:nth-child(3n+1):hover {
    border-top-color: var(--b4-primary);
    border-color: var(--b4-primary-100);
}

.b4-page-content .wp-block-columns .wp-block-column:nth-child(3n+2):hover {
    border-top-color: var(--b4-accent-dark);
    border-color: var(--b4-accent-50);
}

.b4-page-content .wp-block-columns .wp-block-column:nth-child(3n):hover {
    border-top-color: var(--b4-accent);
    border-color: var(--b4-accent-50);
}

/* Card heading inside columns — dark grey (logo palette) */
.b4-page-content .wp-block-columns .wp-block-column h4 {
    font-size: var(--b4-text-lg);
    margin-top: 0;
    margin-bottom: var(--b4-space-sm);
    color: #334155;
}

/* Last paragraph in card has no bottom margin */
.b4-page-content .wp-block-columns .wp-block-column p:last-child {
    margin-bottom: 0;
}

/* Card paragraph text */
.b4-page-content .wp-block-columns .wp-block-column p {
    font-size: var(--b4-text-sm);
    color: var(--b4-grey-600);
    line-height: 1.7;
}

/* All cards have consistent styling — no alternating backgrounds */

/* ── Enhanced list styling with checkmark icons ── */
.b4-page-content ul:not(.wp-block-list) li,
.b4-page-content .wp-block-list li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: var(--b4-space-md);
    list-style: none;
    line-height: 1.7;
}

.b4-page-content ul {
    list-style: none;
    padding-left: 0;
}

.b4-page-content ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.35em;
    width: 20px;
    height: 20px;
    background: var(--b4-success);
    border-radius: var(--b4-radius-full);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 12px;
}

/* ── Table styling ── */
.b4-page-content .wp-block-table {
    margin-block: var(--b4-space-2xl);
    overflow: hidden;
    border-radius: var(--b4-radius-xl);
    border: 1px solid var(--b4-grey-200);
}

.b4-page-content .wp-block-table table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
}

.b4-page-content .wp-block-table th,
.b4-page-content .wp-block-table td {
    padding: var(--b4-space-md) var(--b4-space-lg);
    border: 1px solid var(--b4-grey-200);
    text-align: left;
}

.b4-page-content .wp-block-table th {
    background: var(--b4-secondary);
    color: var(--b4-white);
    font-weight: 600;
    border-color: rgba(255, 255, 255, 0.15);
}

.b4-page-content .wp-block-table tr:nth-child(even) td {
    background: var(--b4-grey-50);
}

.b4-page-content .wp-block-table tr:hover td {
    background: var(--b4-primary-50);
}

/* ── Separator / divider ── */
.b4-page-content .wp-block-separator {
    border: none;
    height: 3px;
    background: linear-gradient(90deg, var(--b4-primary), var(--b4-accent-light));
    border-radius: var(--b4-radius-full);
    margin-block: var(--b4-space-3xl);
    max-width: 120px;
}

/* ── Block quote ── */
.b4-page-content .wp-block-quote {
    border-left: 4px solid var(--b4-primary);
    padding: var(--b4-space-xl) var(--b4-space-2xl);
    margin-block: var(--b4-space-xl);
    font-style: italic;
    color: var(--b4-grey-600);
    background: var(--b4-primary-50);
    border-radius: 0 var(--b4-radius-lg) var(--b4-radius-lg) 0;
}

.b4-page-content .wp-block-quote cite {
    color: var(--b4-primary);
    font-weight: 600;
}

/* ── Buttons ── */
.b4-page-content .wp-block-buttons {
    margin-block: var(--b4-space-xl);
}

.b4-page-content .wp-block-button__link {
    background-color: var(--b4-primary);
    color: var(--b4-white);
    padding: 0.875rem 2rem;
    border-radius: var(--b4-radius-md);
    font-weight: 600;
    font-size: var(--b4-text-base);
    transition: all var(--b4-transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.b4-page-content .wp-block-button__link:hover {
    background-color: var(--b4-primary-dark);
    color: var(--b4-white);
    transform: translateY(-1px);
    box-shadow: var(--b4-shadow-md);
}

.b4-page-content .is-style-outline .wp-block-button__link {
    background: transparent;
    border: 2px solid var(--b4-primary);
    color: var(--b4-primary);
}

.b4-page-content .is-style-outline .wp-block-button__link:hover {
    background: var(--b4-primary);
    color: var(--b4-white);
}

/* ── Highlight Box (use wp:group with className b4-highlight-box) ── */
.b4-page-content .b4-highlight-box {
    background: linear-gradient(135deg, var(--b4-primary-50) 0%, rgba(6, 182, 212, 0.06) 100%);
    border-radius: var(--b4-radius-2xl);
    padding: var(--b4-space-2xl) var(--b4-space-3xl);
    margin-block: var(--b4-space-2xl);
    border-left: 4px solid var(--b4-primary);
}

.b4-page-content .b4-highlight-box h2,
.b4-page-content .b4-highlight-box h3,
.b4-page-content .b4-highlight-box h4 {
    color: var(--b4-primary-dark);
    margin-top: 0;
}

.b4-page-content .b4-highlight-box h2::after {
    display: none;
}

.b4-page-content .b4-highlight-box ul li::before {
    background: var(--b4-primary);
}

/* ── CTA Banner (use wp:group with className b4-cta-banner) ── */
.b4-page-content .b4-cta-banner {
    background: linear-gradient(135deg, var(--b4-secondary) 0%, var(--b4-secondary-dark) 50%, var(--b4-dark) 100%);
    border-radius: var(--b4-radius-2xl);
    padding: var(--b4-space-3xl);
    text-align: center;
    margin-top: var(--b4-space-3xl);
}

.b4-page-content .b4-cta-banner h2,
.b4-page-content .b4-cta-banner h3 {
    color: var(--b4-white);
    margin-top: 0;
}

.b4-page-content .b4-cta-banner h2::after {
    display: none;
}

.b4-page-content .b4-cta-banner p {
    color: rgba(255, 255, 255, 0.85);
    max-width: 600px;
    margin-inline: auto;
}

.b4-page-content .b4-cta-banner .wp-block-button__link {
    background: var(--b4-primary);
    font-size: var(--b4-text-lg);
    padding: 1rem 2.5rem;
}

.b4-page-content .b4-cta-banner .wp-block-button__link:hover {
    background: var(--b4-primary-dark);
}

/* ── Gradient Dark Section (use wp:group with className b4-gradient-section) ── */
.b4-page-content .b4-gradient-section {
    background: linear-gradient(135deg, var(--b4-dark) 0%, var(--b4-primary-900) 100%);
    border-radius: var(--b4-radius-2xl);
    padding: var(--b4-space-3xl);
    margin-block: var(--b4-space-2xl);
    color: var(--b4-grey-200);
}

.b4-page-content .b4-gradient-section h2,
.b4-page-content .b4-gradient-section h3,
.b4-page-content .b4-gradient-section h4 {
    color: var(--b4-white);
}

.b4-page-content .b4-gradient-section h2::after {
    background: linear-gradient(90deg, var(--b4-primary), var(--b4-accent-light));
}

.b4-page-content .b4-gradient-section p {
    color: var(--b4-grey-300);
}

.b4-page-content .b4-gradient-section .wp-block-columns .wp-block-column {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    border-top-color: var(--b4-primary);
}

.b4-page-content .b4-gradient-section .wp-block-columns .wp-block-column h4 {
    color: var(--b4-white);
}

.b4-page-content .b4-gradient-section .wp-block-columns .wp-block-column p {
    color: var(--b4-grey-300);
}

/* ── Feature grid from block patterns ── */
.b4-page-content .b4-feature-grid {
    gap: var(--b4-space-xl);
}

.b4-page-content .b4-feature-grid .wp-block-column {
    background: var(--b4-white);
    border: 1px solid var(--b4-grey-200);
    border-radius: var(--b4-radius-xl);
    padding: var(--b4-space-xl);
    transition: transform var(--b4-transition-base), box-shadow var(--b4-transition-base);
}

.b4-page-content .b4-feature-grid .wp-block-column:hover {
    transform: translateY(-2px);
    box-shadow: var(--b4-shadow-lg);
}

/* ── Responsive adjustments ── */
@media (max-width: 768px) {
    .b4-page-content .wp-block-columns .wp-block-column {
        padding: var(--b4-space-xl);
    }

    .b4-page-content .b4-highlight-box,
    .b4-page-content .b4-cta-banner,
    .b4-page-content .b4-gradient-section {
        padding: var(--b4-space-xl);
    }

}


/* ==========================================================================
   PRINT
   ========================================================================== */

@media print {
    .b4-header,
    .b4-footer,
    .b4-cta,
    .b4-mobile-toggle {
        display: none !important;
    }

    body {
        color: #000;
        background: #fff;
        font-size: 12pt;
    }

    a {
        color: #000;
        text-decoration: underline;
    }

    .b4-container {
        max-width: none;
    }
}


/* ── Legal Pages ──────────────────────────────────────────── */

.b4-legal-content {
    padding: var(--b4-space-3xl) 0;
}

.b4-container--narrow {
    max-width: 800px;
    margin: 0 auto;
}

.b4-legal-content h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--b4-charcoal, #334155);
    margin: 2rem 0 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid #E2E8F0;
}

.b4-legal-content h2:first-of-type {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
}

.b4-legal-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--b4-charcoal, #334155);
    margin: 1.5rem 0 0.5rem;
}

.b4-legal-content p {
    color: #475569;
    line-height: 1.75;
    margin-bottom: 1rem;
}

.b4-legal-content ul {
    color: #475569;
    line-height: 1.75;
    margin: 0.5rem 0 1.25rem 1.5rem;
    list-style: disc;
}

.b4-legal-content ul li {
    margin-bottom: 0.35rem;
}

.b4-legal-content a {
    color: var(--b4-pink, #FF0080);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.b4-legal-content a:hover {
    color: #CC0066;
}

.b4-legal-updated {
    background: #F8FAFC;
    border-left: 3px solid var(--b4-pink, #FF0080);
    padding: 0.75rem 1rem;
    margin-bottom: 2rem;
    border-radius: 0 6px 6px 0;
    font-size: 0.9rem;
}

.b4-legal-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0 1.5rem;
    font-size: 0.9rem;
}

.b4-legal-table th,
.b4-legal-table td {
    border: 1px solid #E2E8F0;
    padding: 0.6rem 0.85rem;
    text-align: left;
}

.b4-legal-table th {
    background: #F1F5F9;
    font-weight: 600;
    color: var(--b4-charcoal, #334155);
}

.b4-legal-table td {
    color: #475569;
}

.b4-page-hero--compact {
    padding: var(--b4-space-xl) 0;
}

.b4-page-hero--compact .b4-page-hero__title {
    font-size: 2rem;
}

.b4-page-hero--compact .b4-page-hero__desc {
    font-size: 1rem;
    max-width: 600px;
}


/* ========================================
   ABOUT PAGE STATS BAR
   ======================================== */
.b4-about-stats {
    background: linear-gradient(135deg, #1a1f36 0%, #2d3561 100%);
    padding: 3rem 0;
}

.b4-about-stats__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: center;
}

.b4-about-stats__item {
    padding: 1.5rem 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.b4-about-stats__number {
    font-size: 2.25rem;
    font-weight: 700;
    color: #ff0066;
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

.b4-about-stats__label {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

@media (max-width: 768px) {
    .b4-about-stats__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    .b4-about-stats__number {
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    .b4-about-stats__grid {
        grid-template-columns: 1fr 1fr;
    }
}