/**
 * Dagora Design System - Clean Edition
 *
 * Modern, minimal design foundation inspired by TED/NASA aesthetic
 * Brand colors derived from official 2025 palette
 *
 * @package Dagora_Theme
 * @version 2.1.0
 */

/* ==========================================================================
   CSS VARIABLES - Design Tokens
   ========================================================================== */

:root {
    /* =========================================================================
       COLOR VARIABLES - NOW MANAGED BY GENERATEPRESS
       =========================================================================
       Colors are now defined in: /includes/config/colors.php
       They are injected into GP's global colors system, which outputs them
       as CSS custom properties automatically.

       FALLBACK: If GP changes how it handles colors, uncomment this section.
       =========================================================================

    --brand-blue: #007CC5;
    --brand-blue-dark: #005A8F;
    --brand-blue-light: rgba(0, 124, 197, 0.1);

    --brand-green: #9CBF4A;
    --brand-green-dark: #7A9A3B;
    --brand-green-light: rgba(156, 191, 74, 0.12);

    --accent-purple: #924EAC;
    --accent-purple-dark: #753A8A;
    --accent-purple-light: rgba(146, 78, 172, 0.1);

    --color-black: #000000;
    --color-dark: #161C31;
    --color-dark-2: #1E2640;
    --color-dark-3: #2A3352;

    --color-gray: #3A3A3A;
    --color-gray-2: #6B6B6B;
    --color-gray-3: #9B9B9B;

    --color-light: #E8E8E8;
    --color-light-2: #F5F5F7;
    --color-light-3: #FFFFFF;

    --color-primary: var(--brand-blue);
    --color-primary-dark: var(--brand-blue-dark);
    --color-primary-light: var(--brand-blue-light);

    --color-secondary: var(--brand-green);
    --color-secondary-dark: var(--brand-green-dark);
    --color-secondary-light: var(--brand-green-light);

    --color-success: #9CBF4A;
    --color-warning: #C4944A;
    --color-danger: #DC3545;
    --color-info: #007CC5;

    --color-brutalist-purple: #924EAC;
    --color-brutalist-teal: #006C8A;
    --color-brutalist-gold: #C4944A;
    --color-brutalist-indigo: #423F84;
    --color-brutalist-olive: #6E8C2F;
    --color-brutalist-navy: #161C31;
    --color-brutalist-slate: #2A3352;

    END FALLBACK ========================================================== */

    /* =========================================================================
       EXTENDED VARIABLES - Not output by GP, we still need these
       ========================================================================= */

    /* Light/alpha variants (GP doesn't do rgba) */
    --brand-blue-light: rgba(0, 124, 197, 0.1);
    --brand-green-light: rgba(156, 191, 74, 0.12);
    --accent-purple-light: rgba(146, 78, 172, 0.1);

    /* Semantic mappings (reference GP's output vars) */
    --color-primary: var(--brand-blue);
    --color-primary-dark: var(--brand-blue-dark);
    --color-primary-light: var(--brand-blue-light);

    --color-secondary: var(--brand-green);
    --color-secondary-dark: var(--brand-green-dark);
    --color-secondary-light: var(--brand-green-light);

    /* Layout System */
    --max-width: 1400px;
    --max-width-narrow: 900px;
    --max-width-wide: 1600px;
    --max-width-text: 800px;
    
    /* Spacing Scale - Consistent rhythm */
    --space-xs: 0.25rem;    /* 4px */
    --space-sm: 0.5rem;     /* 8px */
    --space-md: 1rem;       /* 16px */
    --space-lg: 1.5rem;     /* 24px */
    --space-xl: 2rem;       /* 32px */
    --space-2xl: 3rem;      /* 48px */
    --space-3xl: 4rem;      /* 64px */
    --space-4xl: 6rem;      /* 96px */
    
    /* Typography Scale */
    --text-xs: 0.75rem;     /* 12px */
    --text-sm: 0.875rem;    /* 14px */
    --text-base: 1rem;      /* 16px */
    --text-lg: 1.125rem;    /* 18px */
    --text-xl: 1.25rem;     /* 20px */
    --text-2xl: 1.5rem;     /* 24px */
    --text-3xl: 1.875rem;   /* 30px */
    --text-4xl: 2.25rem;    /* 36px */
    --text-5xl: 3rem;       /* 48px */
    --text-6xl: 3.75rem;    /* 60px */
    --text-7xl: 4.5rem;     /* 72px */
    --text-8xl: 6rem;       /* 96px */
    
    /* Font Weights */
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    --font-extrabold: 800;
    --font-black: 900;
    
    /* Line Heights */
    --leading-tight: 1.25;
    --leading-snug: 1.375;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;
    --leading-loose: 2;
    
    /* Border Radius - Minimal and intentional */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-full: 9999px;
    
    /* Shadows - Subtle only */
    --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-border: 0 0 0 1px rgba(0, 0, 0, 0.05);
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Z-index Scale */
    --z-base: 1;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal: 400;
    --z-popover: 500;
}

/* ==========================================================================
   GLOBAL RESETS & BASE STYLES
   ========================================================================== */

* {
    box-sizing: border-box;
}

body {
    font-family: 'Source Sans 3', 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--color-gray);
    line-height: var(--leading-normal);
    font-size: var(--text-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: var(--color-light-3);
}

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

.container {
    max-width: var(--max-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--space-lg);
    padding-right: var(--space-lg);
}

.container-narrow {
    max-width: var(--max-width-narrow);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--space-lg);
    padding-right: var(--space-lg);
}

.container-text {
    max-width: var(--max-width-text);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--space-lg);
    padding-right: var(--space-lg);
}

/* ==========================================================================
   Hero Wrappers - Consistent hero sections across CPTs
   ========================================================================== */

/* Outer wrapper - for extensibility via hooks */
.custom-hero-wrapper {
    background: var(--color-light-3);
}

/* Inner content box - white with HR lines */
.page-hero-wrapper {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--space-3xl) var(--space-lg);
    background: var(--color-light-3);
    border-top: 2px solid var(--color-gray-2);
    border-bottom: 2px solid var(--color-gray-2);
}

/* Hero content spacing */
.page-hero-wrapper > *:first-child {
    margin-top: 0;
}

.page-hero-wrapper > *:last-child {
    margin-bottom: 0;
}

/* Hero with Image Background - Brutalist style */
.hero-image {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    isolation: isolate;
}

.hero-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.5) 100%);
    z-index: -1;
}

.hero-image__content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--space-4xl) var(--space-lg);
    width: 100%;
}

.hero-image__title {
    font-size: var(--text-8xl);
    font-weight: var(--font-black);
    color: var(--color-light-3);
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: var(--space-xl);
    text-transform: uppercase;
}

.hero-image__subtitle {
    font-size: var(--text-2xl);
    font-weight: var(--font-medium);
    color: var(--color-light-3);
    max-width: 600px;
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-2xl);
}

.hero-image__divider {
    width: 100px;
    height: 4px;
    background: var(--color-primary);
    margin-bottom: var(--space-2xl);
}

/* Responsive */
@media (max-width: 768px) {
    .page-hero-wrapper {
        padding: var(--space-2xl) var(--space-md);
    }

    .hero-image {
        min-height: 50vh;
    }

    .hero-image__content {
        padding: var(--space-3xl) var(--space-md);
    }

    .hero-image__title {
        font-size: var(--text-6xl);
    }

    .hero-image__subtitle {
        font-size: var(--text-lg);
    }
}

/* Hero with Bold Color Block - Brutalist style (full-width) */
.hero-colorblock {
    position: relative;
    display: flex;
    align-items: center;
    padding: 6rem 48px;
    width: 100%;
    isolation: isolate;
}

.hero-colorblock__content {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    z-index: 1;
}

/* Inner content constrained to 75% on desktop (matches Gutenberg) */
.hero-colorblock__content > * {
    max-width: 75%;
}

/* Back link - navigation above tagline */
.hero-back-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    margin-bottom: var(--space-md);
    transition: color 0.2s ease;
}
.single-company .hero-back-link {
    transform: translateY(-30px);
}

.hero-back-link:hover {
    color: var(--color-light-3);
}

.hero-back-link ion-icon {
    font-size: 18px;
}

/* Tagline - appears above the title */
.hero-colorblock__tagline {
    display: inline-flex;
    align-items: center;
    gap: var(--space-md);
    font-size: 1rem;
    font-weight: 800;
    color: var(--color-light-3);
    text-transform: uppercase;
    letter-spacing: 4px;
    line-height: 1.3;
    margin-bottom: 24px;
}

.hero-colorblock__tagline svg {
    width: 32px;
    height: 32px;
    fill: currentColor;
}

.hero-colorblock__title {
    font-size: clamp(2.5rem, 6vw, var(--text-7xl));
    font-weight: var(--font-bold);
    color: var(--color-light-3);
    letter-spacing: -0.02em;
    line-height: var(--leading-tight);
    margin-bottom: var(--space-xl);
}

.hero-colorblock__subtitle {
    font-size: var(--text-lg);
    font-weight: var(--font-normal);
    color: rgba(255, 255, 255, 0.9);
    line-height: var(--leading-relaxed);
    margin-bottom: 0;
}

@media (max-width: 767px) {
    .hero-colorblock {
        min-height: auto;
        padding: 6rem 24px;
    }

    /* Full width on mobile */
    .hero-colorblock__content > * {
        max-width: 100%;
    }

    .hero-colorblock__title {
        font-size: var(--text-4xl);
    }

    .hero-colorblock__subtitle {
        font-size: var(--text-base);
    }

    .hero-colorblock__tagline {
        font-size: 0.875rem;
        letter-spacing: 3px;
    }
}

/* Expandable below-the-line content */
.hero-colorblock__expand {
    margin-top: var(--space-xl);
}

.hero-colorblock__expand-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    list-style: none;
    color: var(--color-light-3);
}

.hero-colorblock__expand-trigger::-webkit-details-marker {
    display: none;
}

.hero-colorblock__expand-label {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.85;
}

.hero-colorblock__expand-chevron {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
}

details[open] .hero-colorblock__expand-chevron {
    transform: rotate(180deg);
}

.hero-colorblock__expand-content {
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
    color: rgba(255, 255, 255, 0.85);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding-top 0.4s ease-out;
    padding-top: 0;
}

details[open] .hero-colorblock__expand-content {
    max-height: 800px;
    padding-top: var(--space-lg);
}

.hero-colorblock__expand-content p {
    margin-bottom: var(--space-md);
    color: rgba(255, 255, 255, 0.85);
}

.hero-colorblock__expand-content p:last-child {
    margin-bottom: 0;
}

.hero-colorblock__expand-content h1,
.hero-colorblock__expand-content h2,
.hero-colorblock__expand-content h3,
.hero-colorblock__expand-content h4,
.hero-colorblock__expand-content h5,
.hero-colorblock__expand-content h6 {
    color: var(--color-light-3);
}

.hero-colorblock__expand-content a {
    color: var(--color-light-3);
    text-decoration: underline;
}

.hero-colorblock__expand-content a:hover {
    opacity: 0.8;
}

/* ==========================================================================
   TYPOGRAPHY SYSTEM
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: 'Source Sans 3', 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--color-dark);
    font-weight: var(--font-bold);
    line-height: var(--leading-tight);
    margin-top: 0;
    margin-bottom: var(--space-lg);
}

h1 {
    font-size: var(--text-7xl);
    font-weight: var(--font-black);
    letter-spacing: -0.03em;
}

h2 {
    font-size: var(--text-5xl);
    font-weight: var(--font-extrabold);
    letter-spacing: -0.02em;
}

h3 { 
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
}

h4 { 
    font-size: var(--text-2xl);
    font-weight: var(--font-semibold);
}

h5 { 
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
}

h6 { 
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
}

p {
    margin-top: 0;
    margin-bottom: var(--space-lg);
    line-height: var(--leading-relaxed);
}

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

a:hover {
    color: var(--color-secondary-dark);
}

strong, b {
    font-weight: var(--font-semibold);
}

/* Small caps for labels */
.label-text {
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-gray-2);
}

/* ==========================================================================
   BADGE SYSTEM - Clean and minimal
   ========================================================================== */

.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-md);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--radius-md);
    line-height: 1;
}

.badge--primary {
    background: var(--color-primary);
    color: var(--color-light-3);
}

.badge--secondary {
    background: var(--color-secondary);
    color: var(--color-light-3);
}

.badge--info {
    background: var(--color-info);
    color: var(--color-light-3);
}

.badge--success {
    background: var(--color-success);
    color: var(--color-light-3);
}

.badge--warning {
    background: var(--color-warning);
    color: var(--color-dark);
}

.badge--danger {
    background: var(--color-danger);
    color: var(--color-light-3);
}

.badge--outline {
    background: transparent;
    border: 1px solid currentColor;
}

.badge--subtle {
    background: var(--color-light-2);
    color: var(--color-dark);
    border: 1px solid var(--color-light);
}

/* ==========================================================================
   BUTTON SYSTEM
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    line-height: 1;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.btn--primary {
    background: var(--color-primary);
    color: var(--color-light-3);
}

.btn--primary:hover {
    background: var(--color-primary-dark);
}

.btn--secondary {
    background: var(--color-secondary);
    color: var(--color-light-3);
}

.btn--secondary:hover {
    background: var(--color-secondary-dark);
}

.btn--outline {
    background: transparent;
    color: var(--color-dark);
    border: 2px solid var(--color-dark);
}

.btn--outline:hover {
    background: var(--color-dark);
    color: var(--color-light-3);
}

.btn--ghost {
    background: transparent;
    color: var(--color-secondary);
}

.btn--ghost:hover {
    background: var(--color-secondary-light);
}

.btn--large {
    padding: var(--space-lg) var(--space-2xl);
    font-size: var(--text-lg);
}

.btn--small {
    padding: var(--space-sm) var(--space-lg);
    font-size: var(--text-sm);
}

/* ==========================================================================
   CARD SYSTEM - Minimal and clean
   ========================================================================== */

.card {
    background: var(--color-light-3);
    border: 1px solid var(--color-light);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
}

.card--hover {
    transition: border-color var(--transition-fast);
}

.card--hover:hover {
    border-color: var(--color-primary);
}

.card--secondary {
    background: var(--color-light-2);
}

/* ==========================================================================
   SECTION HEADERS - Typography-driven
   ========================================================================== */

.section-header {
    font-size: var(--text-4xl);
    font-weight: var(--font-extrabold);
    color: var(--color-dark);
    margin-bottom: var(--space-2xl);
    letter-spacing: -0.02em;
}

.section-header--large {
    font-size: var(--text-6xl);
    font-weight: var(--font-black);
    letter-spacing: -0.03em;
}

.section-header--caps {
    text-transform: uppercase;
    letter-spacing: -0.01em;
}

.section-subheader {
    font-size: var(--text-lg);
    font-weight: var(--font-medium);
    color: var(--color-gray-2);
    margin-top: calc(var(--space-sm) * -1);
    margin-bottom: var(--space-xl);
}

/* ==========================================================================
   META INFO DISPLAY
   ========================================================================== */

.meta-row {
    display: flex;
    gap: var(--space-xl);
    flex-wrap: wrap;
    padding: var(--space-lg) 0;
    border-top: 1px solid var(--color-light);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-gray);
}

.meta-item__label {
    font-weight: var(--font-semibold);
    color: var(--color-dark);
}

/* ==========================================================================
   FILTER BAR SYSTEM
   ========================================================================== */

.filter-bar {
    background: var(--color-light-2);
    padding: var(--space-xl);
    margin-bottom: var(--space-2xl);
    border-radius: var(--radius-md);
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-lg);
    align-items: flex-end;
    border: 1px solid var(--color-light);
}

.filter-bar--sticky {
    position: sticky;
    top: var(--space-lg);
    z-index: var(--z-sticky);
}

.filter-group {
    display: flex;
    flex-direction: column;
    min-width: 160px;
    flex: 1;
}

.filter-label {
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    color: var(--color-gray-2);
    margin-bottom: var(--space-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-select {
    background: var(--color-light-3);
    border: 1px solid var(--color-light);
    border-radius: var(--radius-sm);
    padding: var(--space-md) var(--space-lg);
    font-size: var(--text-sm);
    color: var(--color-dark);
    cursor: pointer;
    transition: all var(--transition-fast);
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23505066' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right var(--space-md) center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
    font-weight: var(--font-medium);
}

.filter-select:hover {
    border-color: var(--color-primary);
}

.filter-select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-light);
}

/* ==========================================================================
   GRID SYSTEMS
   ========================================================================== */

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

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

.grid--auto {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

/* ==========================================================================
   DIVIDERS
   ========================================================================== */

.divider {
    height: 1px;
    background: var(--color-light);
    border: none;
    margin: var(--space-2xl) 0;
}

.divider--dark {
    background: var(--color-dark-3);
}

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

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

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

.py-sm { padding-top: var(--space-sm); padding-bottom: var(--space-sm); }
.py-md { padding-top: var(--space-md); padding-bottom: var(--space-md); }
.py-lg { padding-top: var(--space-lg); padding-bottom: var(--space-lg); }
.py-xl { padding-top: var(--space-xl); padding-bottom: var(--space-xl); }

.px-sm { padding-left: var(--space-sm); padding-right: var(--space-sm); }
.px-md { padding-left: var(--space-md); padding-right: var(--space-md); }
.px-lg { padding-left: var(--space-lg); padding-right: var(--space-lg); }
.px-xl { padding-left: var(--space-xl); padding-right: var(--space-xl); }

/* Text utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-black { color: var(--color-black); }
.text-dark { color: var(--color-dark); }
.text-gray { color: var(--color-gray); }
.text-muted { color: var(--color-gray-3); }
.text-primary { color: var(--color-primary); }
.text-secondary { color: var(--color-secondary); }
.text-white { color: var(--color-light-3); }

.font-bold { font-weight: var(--font-bold); }
.font-semibold { font-weight: var(--font-semibold); }
.font-medium { font-weight: var(--font-medium); }
.font-normal { font-weight: var(--font-normal); }

.uppercase { text-transform: uppercase; }
.capitalize { text-transform: capitalize; }

/* Display utilities */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }

.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }

.flex-1 { flex: 1; }
.flex-none { flex: none; }

/* Border utilities */
.border { border: 1px solid var(--color-light); }
.border-t { border-top: 1px solid var(--color-light); }
.border-b { border-bottom: 1px solid var(--color-light); }
.border-l { border-left: 1px solid var(--color-light); }
.border-r { border-right: 1px solid var(--color-light); }

.rounded { border-radius: var(--radius-md); }
.rounded-sm { border-radius: var(--radius-sm); }
.rounded-full { border-radius: var(--radius-full); }

/* Background utilities */
.bg-white { background: var(--color-light-3); }
.bg-light { background: var(--color-light-2); }
.bg-dark { background: var(--color-dark); }
.bg-black { background: var(--color-black); }
.bg-primary { background: var(--color-primary); }
.bg-secondary { background: var(--color-secondary); }

/* Brutalist color backgrounds with texture and gradient */
.bg-brutalist-purple {
    background: linear-gradient(135deg, #924EAC 0%, #753A8A 100%);
}
.bg-brutalist-teal {
    background: linear-gradient(135deg, #006C8A 0%, #005570 100%);
}
.bg-brutalist-gold {
    background: linear-gradient(135deg, #C4944A 0%, #A67A3A 100%);
}
.bg-brutalist-indigo {
    background: linear-gradient(135deg, #423F84 0%, #332F6A 100%);
}
.bg-brutalist-olive {
    background: linear-gradient(135deg, #6E8C2F 0%, #567024 100%);
}
.bg-brutalist-slate {
    background: linear-gradient(135deg, #2A3352 0%, #1E2640 100%);
}
.bg-brutalist-navy {
    background: linear-gradient(135deg, #161C31 0%, #0A0E18 100%);
}

/* Brutalist backgrounds - clean flat style with subtle gradient */

/* ==========================================================================
   HEADER SYSTEM FOR DARK CPT PAGES
   Single CPT templates with colored hero backgrounds
   ========================================================================== */

/* Define which pages use dark/colored backgrounds */
.single-event,
.single-company,
.single-report,
.single-insight,
.single-space {
    --header-text-color: var(--color-light-3);
    --header-text-hover: rgba(255, 255, 255, 0.8);
    --header-border-color: rgba(255, 255, 255, 0.2);
}

/* Top bar - blend with dark background */
.single-event .dagora-top-bar,
.single-company .dagora-top-bar,
.single-report .dagora-top-bar,
.single-insight .dagora-top-bar,
.single-space .dagora-top-bar {
    background: transparent;
    border-bottom-color: var(--header-border-color);
}

.single-event .dagora-top-bar__menu a,
.single-company .dagora-top-bar__menu a,
.single-report .dagora-top-bar__menu a,
.single-insight .dagora-top-bar__menu a,
.single-space .dagora-top-bar__menu a {
    color: rgba(255, 255, 255, 0.8);
}

.single-event .dagora-top-bar__menu a:hover,
.single-company .dagora-top-bar__menu a:hover,
.single-report .dagora-top-bar__menu a:hover,
.single-insight .dagora-top-bar__menu a:hover,
.single-space .dagora-top-bar__menu a:hover {
    color: var(--color-light-3);
}

/* Innovation Booster link - use yellow accent on dark backgrounds (visible contrast) */
.single-event .dagora-top-bar__menu li.innoboost a,
.single-company .dagora-top-bar__menu li.innoboost a,
.single-report .dagora-top-bar__menu li.innoboost a,
.single-insight .dagora-top-bar__menu li.innoboost a,
.single-space .dagora-top-bar__menu li.innoboost a {
    color: var(--accent-yellow) !important;
}

.single-event .dagora-top-bar__menu li.innoboost a:hover,
.single-company .dagora-top-bar__menu li.innoboost a:hover,
.single-report .dagora-top-bar__menu li.innoboost a:hover,
.single-insight .dagora-top-bar__menu li.innoboost a:hover,
.single-space .dagora-top-bar__menu li.innoboost a:hover {
    color: var(--color-light-3) !important;
}

/* User widget in top bar */
.single-event .dagora-user-widget__trigger,
.single-company .dagora-user-widget__trigger,
.single-report .dagora-user-widget__trigger,
.single-insight .dagora-user-widget__trigger,
.single-space .dagora-user-widget__trigger {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.single-event .dagora-user-widget__trigger:hover,
.single-company .dagora-user-widget__trigger:hover,
.single-report .dagora-user-widget__trigger:hover,
.single-insight .dagora-user-widget__trigger:hover,
.single-space .dagora-user-widget__trigger:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.single-event .dagora-user-widget__icon--user svg,
.single-company .dagora-user-widget__icon--user svg,
.single-report .dagora-user-widget__icon--user svg,
.single-insight .dagora-user-widget__icon--user svg,
.single-space .dagora-user-widget__icon--user svg {
    fill: rgba(255, 255, 255, 0.8);
}

.single-event .dagora-user-widget__icon--menu svg path,
.single-company .dagora-user-widget__icon--menu svg path,
.single-report .dagora-user-widget__icon--menu svg path,
.single-insight .dagora-user-widget__icon--menu svg path,
.single-space .dagora-user-widget__icon--menu svg path {
    stroke: rgba(255, 255, 255, 0.8);
}

/* Main header - transparent background */
.single-event .site-header,
.single-company .site-header,
.single-report .site-header,
.single-insight .site-header,
.single-space .site-header {
    background: transparent !important;
}

/* Header text and links - white */
.single-event .inside-header,
.single-company .inside-header,
.single-report .inside-header,
.single-insight .inside-header,
.single-space .inside-header {
    color: var(--header-text-color) !important;
}

/* CRITICAL: Preserve header centering alignment from style.css
   Individual CPT stylesheets may reset .grid-container which breaks header padding */
@media screen and (min-width: 900px) {
    .single-event .inside-header.grid-container,
    .single-company .inside-header.grid-container,
    .single-report .inside-header.grid-container,
    .single-insight .inside-header.grid-container,
    .single-space .inside-header.grid-container {
        max-width: unset !important;
        padding-left: 104px !important;
        padding-right: calc(104px + 210px) !important;
    }
}

.single-event .inside-header a,
.single-company .inside-header a,
.single-report .inside-header a,
.single-insight .inside-header a,
.single-space .inside-header a,
.single-event .main-navigation a,
.single-company .main-navigation a,
.single-report .main-navigation a,
.single-insight .main-navigation a,
.single-space .main-navigation a {
    color: var(--header-text-color) !important;
}

.single-event .inside-header a:hover,
.single-company .inside-header a:hover,
.single-report .inside-header a:hover,
.single-insight .inside-header a:hover,
.single-space .inside-header a:hover,
.single-event .main-navigation a:hover,
.single-company .main-navigation a:hover,
.single-report .main-navigation a:hover,
.single-insight .main-navigation a:hover,
.single-space .main-navigation a:hover {
    color: var(--header-text-hover) !important;
}

.single-event .inside-header .menu-toggle,
.single-company .inside-header .menu-toggle,
.single-report .inside-header .menu-toggle,
.single-insight .inside-header .menu-toggle,
.single-space .inside-header .menu-toggle {
    color: var(--header-text-color) !important;
}

.wp-singular.single .main-navigation .sub-menu.toggled-on {
    margin-top: 10px;
}

/* Override white text for sub-menu items on single pages (dropdown has white background) */
.single-event .main-navigation .sub-menu a,
.single-company .main-navigation .sub-menu a,
.single-report .main-navigation .sub-menu a,
.single-insight .main-navigation .sub-menu a,
.single-space .main-navigation .sub-menu a {
    color: var(--color-dark) !important;
}

.single-event .main-navigation .sub-menu a:hover,
.single-company .main-navigation .sub-menu a:hover,
.single-report .main-navigation .sub-menu a:hover,
.single-insight .main-navigation .sub-menu a:hover,
.single-space .main-navigation .sub-menu a:hover {
    color: var(--color-dark) !important;
    opacity: 0.7;
}

/* Invert logo to white for dark backgrounds */
.single-event .site-logo img,
.single-company .site-logo img,
.single-report .site-logo img,
.single-insight .site-logo img,
.single-space .site-logo img {
    filter: brightness(0) invert(1);
}

/* SVG icons in nav */
.single-event .inside-header svg,
.single-company .inside-header svg,
.single-report .inside-header svg,
.single-insight .inside-header svg,
.single-space .inside-header svg {
    fill: var(--header-text-color) !important;
    stroke: var(--header-text-color) !important;
}

/* Nav login menu wrap (user icon button in main nav) */
.single-event .nav-login-menu-wrap,
.single-company .nav-login-menu-wrap,
.single-report .nav-login-menu-wrap,
.single-insight .nav-login-menu-wrap,
.single-space .nav-login-menu-wrap {
    border-color: var(--header-border-color);
    background: rgba(255, 255, 255, 0.1);
}

.single-event .nav-login-menu-wrap svg,
.single-company .nav-login-menu-wrap svg,
.single-report .nav-login-menu-wrap svg,
.single-insight .nav-login-menu-wrap svg,
.single-space .nav-login-menu-wrap svg {
    fill: var(--header-text-color) !important;
    color: var(--header-text-color) !important;
}

/* ==========================================================================
   MEMBERSHIP TABLE COMPONENT
   ========================================================================== */

.membership-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.membership-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
}

.membership-table th,
.membership-table td {
    padding: 1rem;
    border-bottom: 1px solid #e5e5e5;
    border-right: 1px solid #e5e5e5;
    text-align: center;
    vertical-align: middle;
}

.membership-table th:last-child,
.membership-table td:last-child {
    border-right: none;
}

.membership-table tbody tr:last-child th,
.membership-table tbody tr:last-child td {
    border-bottom: none;
}

.membership-table thead th {
    background: #fafafa;
    font-weight: 600;
}

.membership-table .feature-name {
    text-align: left;
    font-weight: 500;
    background: #fff;
}

/* Membership table icons */
.membership-table svg {
    width: 24px;
    height: 24px;
    display: block;
    margin: 0 auto;
}

.membership-table .icon-yes {
    fill: var(--color-success);
}

.membership-table .icon-no {
    fill: var(--color-danger);
}

/* Membership table row hover effect */
.membership-table tbody tr {
    position: relative;
}

.membership-table tbody tr::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid transparent;
    border-radius: 3px;
    pointer-events: none;
    transition: border-color 0.2s ease;
}

.membership-table tbody tr:hover::after {
    border-color: var(--accent-purple);
}

.membership-table tbody tr:hover td:not(.feature-name) svg,
.membership-table tbody tr:hover th:not(.feature-name) svg {
    fill: var(--accent-purple);
    transition: fill 0.2s ease;
}

/* Membership table responsive - sticky first column */
@media screen and (max-width: 850px) {
    .membership-table-wrap {
        margin: 0 -2rem;
        padding: 0;
    }

    .membership-table {
        min-width: 600px;
    }

    .membership-table thead th:first-child,
    .membership-table .feature-name {
        position: sticky !important;
        left: 0 !important;
        background: #fff;
        z-index: 1;
    }

    .membership-table thead th:first-child {
        background: #fafafa;
        z-index: 2;
    }

    .membership-table thead th:first-child::after,
    .membership-table tbody .feature-name::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: 4px;
        background: linear-gradient(to right, rgba(0,0,0,0.05), transparent);
    }
}

/* ==========================================================================
   ICON UTILITIES
   ========================================================================== */

/* Ionicon arrow inline fix */
svg.ionicon-arr {
    position: relative;
    display: inline !important;
    width: 20px !important;
    height: 20px !important;
    top: 4px !important;
}

/* ==========================================================================
   GENERATEPRESS/GENERATEBLOCKS OVERRIDES
   ========================================================================== */

/* Fix for non-brand slides left empty by GP carousel filtering */
.brands-carousel .gb-loop-item,
.brands-carousel .gb-carousel-item.swiper-slide-blank {
    display: none;
}

.brands-carousel .gb-loop-item.has-post-thumbnail {
    display: block;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

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

@media (max-width: 768px) {
    :root {
        --text-8xl: 3.5rem;
        --text-7xl: 3rem;
        --text-6xl: 2.5rem;
        --text-5xl: 2.25rem;
        --text-4xl: 1.875rem;
        --text-3xl: 1.5rem;
    }
    
    .container,
    .container-narrow,
    .container-text {
        padding-left: var(--space-md);
        padding-right: var(--space-md);
    }
    
    .grid--2,
    .grid--3,
    .grid--4 {
        grid-template-columns: 1fr;
    }
    
    .filter-bar {
        flex-direction: column;
        position: static !important;
        top: auto !important;
    }
    
    .filter-group {
        min-width: 100%;
    }
    
    .meta-row {
        flex-direction: column;
        gap: var(--space-md);
    }
}

@media (max-width: 480px) {
    :root {
        --space-xl: 1.5rem;
        --space-2xl: 2rem;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}