/**
 * Codenseo - New Premium Style
 * Based on modern minimalist design
 */

/* ===== CSS Variables ===== */
:root {
    /* Primary Colors */
    --color-primary: #FF0000;
    --color-accent-green: #006400;
    --color-accent-green-light: #008000;
    --color-accent-green-neon: #00FF00;
    --color-accent-green-vibrant: #00E676;

    /* Brand Colors */
    --color-brand-orange: #FF4500;
    --color-brand-orange-vibrant: #FF6B00;
    --color-brand-mint: #98FF98;

    /* Backgrounds */
    --color-bg-light: #f8f5f5;
    --color-bg-dark: #121212;
    --color-bg-white: #FFFFFF;

    /* Text Colors */
    --color-text-dark: #1A1A1A;
    --color-text-gray: #64748B;
    --color-text-light: #FFFFFF;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 20px rgba(0,0,0,0.15);
    --shadow-glow-red: 0 0 20px -5px rgba(255, 0, 0, 0.5);
    --shadow-glow-green: 0 0 15px -3px rgba(0, 100, 0, 0.6);

    /* === LAYOUT SYSTEM === */
    /* Header measurements for safe area calculations */
    --header-topbar-height: 22px;
    --header-base-height: 80px;
    --header-scrolled-height: 60px;
    --header-mobile-height: 70px;
    --header-mobile-expanded-height: 200px; /* When mobile menu is open */
    
    /* Calculated safe areas - DYNAMICALLY UPDATED BY JAVASCRIPT */
    --safe-area-top: 140px; /* Default value - will be updated by JS */
    --safe-area-top-scrolled: 102px; /* Default for scrolled state */
    --safe-area-top-mobile: 130px; /* Default mobile value - matches JS value */
    --safe-area-top-mobile-expanded: 240px; /* When mobile menu is open */
    
    /* Performance optimized spacing */
    --section-spacing: clamp(3rem, 8vh, 6rem);
    --hero-spacing-top: max(8rem, var(--safe-area-top));
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden;
}

body {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--color-text-dark);
    background-color: var(--color-bg-light);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
    color: var(--color-text-dark);
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

h1 { font-size: 3rem; font-weight: 800; }
h2 { font-size: 2.5rem; font-weight: 800; }
h3 { font-size: 2rem; font-weight: 700; }
h4 { font-size: 1.5rem; font-weight: 700; }

p {
    margin-bottom: var(--spacing-sm);
}

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

a:hover {
    color: var(--color-brand-orange);
}

/* Lead paragraph - larger introductory text */
.lead {
    font-size: 1.25rem;
    line-height: 1.7;
    color: var(--color-text-gray);
    max-width: 800px;
}

.section-header .lead {
    margin: 0 auto;
}

.section-header .lead--narrow {
    max-width: 700px;
}

/* ===== Font Size Modes ===== */
html.font-normal {
    font-size: 16px;
}

html.font-medium {
    font-size: 18px;
}

html.font-large {
    font-size: 20px;
}

/* ===== Contrast Modes ===== */
/* Normal - standardowy */
body.contrast-normal {
    --color-text-dark: #1A1A1A;
    --color-text-gray: #64748B;
    --color-bg-light: #f8f5f5;
}

/* Medium - Tryb ciemny (Dark Mode) */
body.contrast-medium {
    --color-text-dark: #FFFFFF;
    --color-text-gray: #E0E0E0;
    --color-bg-light: #1A1A1A;
    background-color: #1A1A1A !important;
}

body.contrast-medium .card,
body.contrast-medium section,
body.contrast-medium [class*="-section"],
body.contrast-medium [class*="-card"],
body.contrast-medium [class*="-step"],
body.contrast-medium [class*="-box"],
body.contrast-medium [class*="-panel"]:not(.accessibility-toggle),
body.contrast-medium .bg-white,
body.contrast-medium .stat-item,
body.contrast-medium article {
    background: #2D2D2D !important;
    color: #FFFFFF !important;
}

body.contrast-medium h1,
body.contrast-medium h2,
body.contrast-medium h3,
body.contrast-medium p,
body.contrast-medium label,
body.contrast-medium span:not(.material-icons):not(.logo-cursor) {
    color: #FFFFFF !important;
}

body.contrast-medium .hero,
body.contrast-medium .ai-hero {
    background: linear-gradient(135deg, #000000 0%, #1A1A1A 100%) !important;
}

/* Footer sections should blend with footer bg, not show as gray boxes */
body.contrast-medium footer,
body.contrast-medium .footer-section,
body.contrast-medium .footer-grid,
body.contrast-medium .footer-brand {
    background: transparent !important;
}
body.contrast-medium footer {
    background: linear-gradient(180deg, #000000 0%, #1A1A1A 100%) !important;
}

/* Same for uslugi-card/uslugi-cards in medium contrast */
body.contrast-medium .uslugi-card,
body.contrast-medium .uslugi-cards,
body.contrast-medium .uslugi-card-icon {
    background: transparent !important;
    border: none !important;
}

/* High - Wysoki kontrast (czarne tło, żółty tekst) */
body.contrast-high {
    --color-text-dark: #FFFF00;
    --color-text-gray: #FFFF00;
    --color-bg-light: #000000;
    --color-primary: #FFFF00;
    background-color: #000000 !important;
}

body.contrast-high .card,
body.contrast-high [class*="-card"]:not(.uslugi-card):not(.uslugi-cards):not(.uslugi-card-icon),
body.contrast-high [class*="-step"],
body.contrast-high [class*="-box"],
body.contrast-high .stat-item,
body.contrast-high .automation-card,
body.contrast-high .ai-service-card,
body.contrast-high .contact-info-card,
body.contrast-high .services-overview,
body.contrast-high .wp-expertise-section {
    background: #000000 !important;
    border: 2px solid #FFFF00 !important;
    color: #FFFF00 !important;
}

/* uslugi-card: black bg, no border – also remove hover border */
body.contrast-high .uslugi-card,
body.contrast-high .uslugi-card:hover {
    background: #000000 !important;
    border: none !important;
    box-shadow: none !important;
    color: #FFFF00 !important;
}
/* uslugi-cards grid container + icon span: no accidental box */
body.contrast-high .uslugi-cards,
body.contrast-high .uslugi-card-icon {
    background: transparent !important;
    border: none !important;
}

body.contrast-high section,
body.contrast-high [class*="-section"],
body.contrast-high [class*="-panel"]:not(.accessibility-toggle),
body.contrast-high .bg-white,
body.contrast-high .legal-content-section,
body.contrast-high article {
    background: #000000 !important;
    color: #FFFF00 !important;
}

body.contrast-high h1,
body.contrast-high h2,
body.contrast-high h3,
body.contrast-high h4,
body.contrast-high p,
body.contrast-high a,
body.contrast-high li,
body.contrast-high label,
body.contrast-high span:not(.material-icons):not(.logo-cursor) {
    color: #FFFF00 !important;
    font-weight: 600 !important;
}

/* Buttons: yellow bg + black text for readability */
body.contrast-high .btn-primary {
    background: #FFFF00 !important;
    color: #000000 !important;
    border-color: #FFFF00 !important;
    font-weight: 700 !important;
}
body.contrast-high .btn-primary span,
body.contrast-high .btn-primary a {
    color: #000000 !important;
    background: transparent !important;
}
body.contrast-high .btn-secondary,
body.contrast-high .btn-outline {
    background: #000000 !important;
    color: #FFFF00 !important;
    border: 2px solid #FFFF00 !important;
}

body.contrast-high .hero,
body.contrast-high .ai-hero {
    background: #000000 !important;
}

body.contrast-high header {
    background: #000000 !important;
    border-bottom: 2px solid #FFFF00 !important;
}

body.contrast-high footer {
    background: #000000 !important;
    border-top: 2px solid #FFFF00 !important;
}

/* Images: slight desaturation to reduce visual noise */
body.contrast-high img:not(.logo-img) {
    filter: grayscale(30%) contrast(1.1);
}

/* Accessibility panel – contrast mode overrides */
body.contrast-medium .accessibility-panel {
    background: #2A2A2A !important;
    border-color: #555 !important;
}
body.contrast-medium .accessibility-panel h4 {
    color: var(--color-primary) !important;
    border-bottom-color: var(--color-primary) !important;
}
body.contrast-medium .control-group p {
    color: #E0E0E0 !important;
}
body.contrast-medium .control-group button:not(.active) {
    background: #3D3D3D !important;
    color: #FFFFFF !important;
    border-color: #666 !important;
}

body.contrast-high .accessibility-panel {
    background: #000000 !important;
    border-color: #FFFF00 !important;
}
body.contrast-high .accessibility-panel h4 {
    color: #FFFF00 !important;
    border-bottom-color: #FFFF00 !important;
}
body.contrast-high .control-group p {
    color: #FFFF00 !important;
}
body.contrast-high .control-group button:not(.active) {
    background: #000000 !important;
    color: #FFFF00 !important;
    border-color: #FFFF00 !important;
}
body.contrast-high .control-group button.active {
    background: #FFFF00 !important;
    color: #000000 !important;
    border-color: #FFFF00 !important;
}

/* ===== Square Tech Style ===== */
.square-tech {
    border-radius: 0 !important;
}

/* ===== Top Contact Bar ===== */
.top-contact-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(26, 26, 26, 0.85);
    backdrop-filter: blur(6px);
    z-index: 1001;
    font-size: 0.72rem;
    transition: transform 0.3s ease;
}

.top-contact-bar .header-container {
    padding: 0 2rem;
}

.top-bar-content {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0.2rem 0;
    gap: 1.5rem;
}

.top-bar-item {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-weight: 400;
    letter-spacing: 0.02em;
    transition: color 0.2s;
}

.top-bar-item:hover {
    color: rgba(255, 255, 255, 0.9);
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: 0.5rem;
    padding-left: 0.75rem;
    border-left: 1px solid rgba(255, 255, 255, 0.15);
}

.lang-flag {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    padding: 2px 6px;
    border-radius: 3px;
    color: rgba(255, 255, 255, 0.45);
    text-decoration: none;
    transition: color 0.2s, background 0.2s;
    line-height: 1.6;
}

.lang-flag:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.08);
}

.lang-flag.active {
    color: var(--primary);
    background: rgba(0, 230, 118, 0.08);
}

.top-bar-item .material-icons {
    font-size: 0.85rem;
}

/* ===== Header/Navigation ===== */
header {
    position: fixed;
    top: 22px;
    left: 0;
    right: 0;
    background: rgba(255, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

header.scrolled {
    background: rgba(255, 0, 0, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: padding 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

header.scrolled .header-container {
    padding: 0.75rem 2rem;
}

/* ===== Logo with blinking cursor ===== */
.logo {
    font-size: 1.5rem;
    font-weight: 800;
    font-family: 'Space Grotesk', monospace;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.1rem;
    color: white;
    text-transform: uppercase;
    letter-spacing: -1px;
}

header.scrolled .logo {
    font-size: 1.2rem;
}

/* Wszystkie linki menu pomniejszają się po scrollu */
header.scrolled nav a {
    font-size: 0.75rem !important;
    padding: 0.4rem 0;
}

.logo-code {
    position: relative;
    display: inline-block;
}

.logo-cursor {
    position: absolute;
    bottom: -2px;
    left: 2px;
    width: 0.6em;
    height: 4px;
    background-color: #00E676;
    animation: blink 1.2s infinite;
}

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

.logo-connector {
    position: relative;
    width: 0.8em;
    height: 1em;
    margin: 0 0.1rem;
}

.logo-connector svg {
    width: 100%;
    height: 100%;
}

.logo-search {
    display: inline-flex;
    align-items: center;
    gap: 0.1rem;
}

.logo-search-icon {
    font-size: 1.5rem;
    color: #00E676;
}

.logo:hover {
    opacity: 1;
}

/* Hover effect - odwrócenie kolorów */
.logo:hover .logo-code,
.logo:hover .logo-search {
    color: #00E676 !important;
}

.logo:hover .logo-cursor {
    background-color: white !important;
}

/* Connector zostaje ciemny - bez zmian na hover */
/* Ale środkowa kropka (center) zmienia się na białą */
.logo:hover .connector-center {
    fill: white !important;
}

.logo:hover .logo-search-icon {
    color: white !important;
}

/* Navigation */
nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
}

nav a {
    color: white;
    font-weight: 500;
    padding: 0.5rem 0;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent-green-vibrant);
    transition: width var(--transition-normal);
}

nav a:hover {
    color: rgba(255, 255, 255, 0.8);
}

nav a:hover::after {
    width: 100%;
}

nav a.active::after {
    width: 100%;
    background: var(--color-accent-green-vibrant);
}

nav a.active {
    color: white;
}

nav a.btn {
    padding: 0.7rem 1.5rem;
    border-radius: 6px;
    background: var(--color-accent-green);
    color: white !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

nav a.btn:hover {
    background: var(--color-accent-green-light);
}

nav a.btn::after {
    display: none;
}

/* Po scrollu button kontakt staje się zwykłym czarnym linkiem */
header.scrolled nav a.btn {
    padding: 0.4rem 0;
    border-radius: 0;
    background: transparent !important;
    color: #1A1A1A !important;
    border: none;
    box-shadow: none;
    font-size: 0.75rem !important;
}

header.scrolled nav a.btn::after {
    display: block;
    background: #1A1A1A;
}

header.scrolled nav a.btn:hover {
    background: transparent !important;
    color: white !important;
}

/* Mobile menu toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: white;
    padding: 0.5rem;
    margin-left: auto;
}

/* ===== Hero/Header Section ===== */
.hero,
.ai-hero {
    padding-top: var(--hero-spacing-top);
    padding-bottom: 1.5rem;
    background: var(--color-primary);
    color: white;
    position: relative;
    overflow: hidden;
    border-bottom-left-radius: 2rem;
    border-bottom-right-radius: 2rem;
    box-shadow: var(--shadow-glow-red);
}

/* Grid pattern background */
.hero::before,
.ai-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.1;
    pointer-events: none;
    background-image:
        linear-gradient(to right, white 1px, transparent 1px),
        linear-gradient(to bottom, white 1px, transparent 1px);
    background-size: 40px 40px;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 1000px;
}

/* Right-side hero background photo via CSS custom property set in PHP */
.hero::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 48%;
    height: 100%;
    background-image: var(--hero-right-img, none);
    background-size: cover;
    background-position: center;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(255,255,255,0.7) 28%, white 62%);
    mask-image: linear-gradient(to right, transparent 0%, rgba(255,255,255,0.7) 28%, white 62%);
    opacity: 0.28;
    filter: brightness(1.3) saturate(0.8);
    pointer-events: none;
    z-index: 1;
}
@media (max-width: 960px) {
    .hero::after { display: none; }
}

.hero h1,
.ai-hero h1 {
    font-size: 3rem;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    color: white;
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

.hero .tagline,
.ai-hero-subtitle {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    font-weight: 500;
}

/* Status badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    margin-bottom: 1.5rem;
    border-radius: 0;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #00E676;
    border-radius: 0;
    animation: pulse-dot 2s ease-in-out infinite;
}

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

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 0;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    border: 2px solid transparent;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.btn-primary {
    background: var(--color-accent-green);
    color: white !important;
    box-shadow: var(--shadow-glow-green);
    border-color: #008000;
}

.btn-primary:hover {
    background: var(--color-accent-green-light);
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(0, 100, 0, 0.8);
}

.btn-secondary {
    background: white;
    color: var(--color-primary) !important;
    border-color: var(--color-primary);
}

.btn-secondary:hover {
    background: var(--color-primary);
    color: white !important;
    transform: translateY(-2px);
}

/* ===== Container ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ===== Sections ===== */
section {
    padding: 4rem 0;
    position: relative;
}

section.bg-white {
    background: white;
}

section.bg-light {
    background: var(--color-bg-light);
}

/* Override inline padding-top on subpages to account for top bar */
section[style*="padding-top: 120px"],
section[style*="padding-top: 140px"] {
    padding-top: 140px !important;
}

/* AI Service hero - larger padding */
.ai-service-hero {
    padding-top: 140px;
    padding-bottom: 4rem;
    background: linear-gradient(135deg, #8B0000 0%, #C41E3A 100%) !important;
    color: white;
    min-height: 50vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}
.ai-service-hero h1 {
    color: white !important;
    margin-bottom: 1rem;
}
.ai-service-hero .subtitle {
    font-size: 1.5rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 2rem;
    font-weight: 500;
}
.ai-service-hero .description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: rgba(255,255,255,0.85);
}
.ai-service-hero .service-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}
.ai-service-hero .btn-primary {
    background: white !important;
    color: var(--color-primary) !important;
    font-size: 1.1rem;
    padding: 1rem 2.5rem;
}

.section-header {
    margin-bottom: 0;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    line-height: 1.1;
}

.section-header h2 .text-primary {
    color: var(--color-primary);
    border-bottom: 4px solid var(--color-primary);
    display: inline-block;
    padding-bottom: 0.25rem;
}

.section-header p {
    font-size: 0.9rem;
    color: var(--color-text-gray);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 500;
}

.padding-top-40{
    padding-top: 40px;
}

/* ===== Cards ===== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.card {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 0;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    border-radius: 0;
    position: relative;
    overflow: hidden;
}

.card-image {
    display: block;
    overflow: hidden;
    line-height: 0;
}

.card-image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.card:hover .card-image img {
    transform: scale(1.05);
}

.card-body {
    padding: 1.5rem 2rem 2rem;
}

/* Cards without images - keep old padding */
.card:not(:has(.card-image)) {
    padding: 2rem;
}

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

.card .icon-wrapper {
    width: 56px;
    height: 56px;
    background: var(--color-bg-light);
    border: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    transition: all var(--transition-normal);
    border-radius: 0;
}

.card:hover .icon-wrapper {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: -0.01em;
}

.card p {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--color-text-gray);
}

.card-thumb {
    display: block;
    overflow: hidden;
    line-height: 0;
    margin-bottom: 1rem;
}

.card-thumb img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.card:hover .card-thumb img {
    transform: scale(1.05);
}

.card:has(.card-thumb) {
    padding: 0;
}

.card:has(.card-thumb) > :not(.card-thumb) {
    padding-left: 2rem;
    padding-right: 2rem;
}

.card:has(.card-thumb) > :last-child {
    padding-bottom: 2rem;
}

/* ===== Contact Form ===== */
.contact-form .form-group {
    margin-bottom: 1.25rem;
}

.contact-form label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-text-dark, #1A1A1A);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
    background: #f9f9f9;
    color: var(--color-text-dark, #1A1A1A);
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: #aaa;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--color-primary, #FF0000);
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.1);
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form .form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 768px) {
    .contact-form .form-row-2 {
        grid-template-columns: 1fr;
    }

    .contact-form {
        border: none !important;
        box-shadow: none !important;
        padding: 1rem 0 !important;
    }

    .contact-form input,
    .contact-form textarea {
        padding: 1rem;
        font-size: 1rem;
    }
}

/* ===== Stats Grid ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.stat-item {
    text-align: center;
    padding: 2rem 1rem;
    background: white;
    border-radius: 0;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-normal);
}

.stat-item:hover {
    transform: translateY(-4px);
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--color-primary);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--color-text-gray);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ===== Footer ===== */
footer {
    background: linear-gradient(180deg, #000000 0%, #1a1a1a 100%);
    color: var(--color-text-light);
    padding: 6rem 0 2rem;
    position: relative;
    border-top-left-radius: 2rem;
    border-top-right-radius: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: -2rem;
    z-index: 1;
}

footer a {
    color: rgba(255, 255, 255, 0.7);
    transition: all var(--transition-fast);
}

footer a:hover {
    color: white;
}

.footer-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.footer-section h4 {
    color: var(--color-primary);
    margin-bottom: var(--spacing-sm);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

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

.footer-section ul li {
    margin-bottom: 0.75rem;
}

.footer-section ul li a {
    font-size: 0.9rem;
    font-weight: 500;
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.75rem;
    font-family: 'Space Grotesk', monospace;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {

    /* --- Global mobile spacing --- */
    .container {
        padding: 0 1rem;
    }

    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.2rem; }

    section {
        padding: 2.5rem 0;
    }

    /* --- Top contact bar --- */
    .top-contact-bar {
        font-size: 0.7rem;
    }

    .top-bar-content {
        justify-content: center;
        padding: 0.25rem 0;
    }

    /* --- Mobile menu --- */
    .mobile-menu-toggle {
        display: block;
    }

    nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(190, 0, 0, 0.98);
        backdrop-filter: blur(20px);
        padding: 0.4rem 0;
        gap: 0;
        border-radius: 0;
        border: none;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    }

    nav ul.active {
        display: flex;
    }

    nav ul li {
        display: block;
        margin: 0 0.5rem;
    }

    nav a {
        display: block;
        padding: 0.7rem 1rem;
        width: 100%;
        text-align: center;
        border-radius: 4px;
        font-size: 0.85rem;
        margin: 1px 0;
    }

    nav a::after {
        display: none !important;
    }

    /* Active page */
    nav a.active {
        background: rgba(255, 255, 255, 0.92) !important;
        color: #1A1A1A !important;
        font-weight: 700;
    }

    nav a:hover:not(.active):not(.btn) {
        background: rgba(255, 255, 255, 0.1);
    }

    /* Kontakt button */
    nav a.btn {
        margin-top: 0.3rem;
        width: 100%;
        text-align: center;
        display: block;
        padding: 0.7rem 1rem !important;
        background: var(--color-accent-green) !important;
        color: white !important;
        border-radius: 4px !important;
        border: none !important;
        box-shadow: none !important;
        font-size: 0.85rem !important;
    }

    nav a.btn:hover {
        background: var(--color-accent-green-light) !important;
    }

    nav a.btn::after {
        display: none !important;
    }

    /* Scrolled state - same look on mobile */
    header.scrolled nav a {
        font-size: 0.85rem !important;
        padding: 0.7rem 1rem;
        color: white !important;
    }

    header.scrolled nav a.active {
        background: rgba(255, 255, 255, 0.92) !important;
        color: #1A1A1A !important;
    }

    header.scrolled nav a::after {
        display: none !important;
    }

    header.scrolled nav a.btn {
        padding: 0.7rem 1rem !important;
        background: var(--color-accent-green) !important;
        color: white !important;
        border-radius: 4px !important;
    }

    header.scrolled nav a.btn::after {
        display: none !important;
    }

    /* --- Hero sections --- */
    .hero,
    .ai-hero {
        min-height: auto !important;
        padding-top: var(--safe-area-top-mobile) !important;
        padding-bottom: 1.5rem !important;
    }

    .hero h1,
    .ai-hero h1 {
        font-size: 1.5rem !important;
        line-height: 1.2;
        margin-bottom: 0.75rem;
        text-shadow: none !important;
    }

    .hero .tagline,
    .ai-hero-subtitle {
        font-size: 0.9rem !important;
        text-shadow: none !important;
        margin-bottom: 1rem;
    }

    .status-badge {
        margin-bottom: 0.75rem;
    }

    /* Simplify complex animations on mobile */
    .workflow-animation {
        opacity: 0.08 !important; /* Keep visible but very subtle */
        transform: scale(0.7) !important;
        left: 45% !important;
        top: 40% !important;
    }

    .data-particles {
        opacity: 0.3 !important;
    }

    .rocket-orbit {
        animation: rocketOrbitSimple 4s ease-in-out infinite !important;
    }
    
    @keyframes rocketOrbitSimple {
        0%, 100% {
            transform: translateY(0) rotate(0deg);
        }
        25% {
            transform: translateY(-20px) rotate(90deg);
        }
        50% {
            transform: translateY(-40px) rotate(180deg);
        }
        75% {
            transform: translateY(-20px) rotate(270deg);
        }
    }
    
    /* Shorter hero section for mobile */
    .ai-hero {
        min-height: 40vh !important;
    }

    /* --- Subpages top spacing (for fixed header + top bar) --- */
    /* FIXED: Remove problematic rule - handled by .subpage-hero class below */

    /* AI Service hero mobile */
    .ai-service-hero {
        padding-top: var(--safe-area-top-mobile) !important;
        min-height: auto !important;
    }
    .ai-service-hero .service-icon {
        font-size: 3rem !important;
        margin-bottom: 1rem !important;
    }
    .ai-service-hero h1 {
        font-size: 1.5rem !important;
    }
    .ai-service-hero .subtitle {
        font-size: 1.1rem !important;
        margin-bottom: 1rem !important;
    }
    .ai-service-hero .description {
        font-size: 1rem !important;
    }

    /* --- Typography mobile --- */
    .section-header h1 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .section-header h2 {
        font-size: 1.3rem;
    }

    .section-header p {
        font-size: 0.85rem;
    }

    /* --- Cards --- */
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .card:not(:has(.card-image)):not(:has(.card-thumb)) {
        padding: 1.25rem;
    }

    .card-image img {
        height: 180px;
    }

    .card h3 {
        font-size: 1.05rem;
    }

    /* --- Contact form --- */
    .contact-wrapper {
        max-width: 100% !important;
    }

    .contact-form {
        border: none !important;
        box-shadow: none !important;
        padding: 0.5rem 0 !important;
        background: transparent !important;
    }

    .contact-form input,
    .contact-form textarea {
        padding: 0.9rem 1rem;
        font-size: 1rem;
    }

    /* --- Stats --- */
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }

    .stat-number {
        font-size: 2.5rem !important;
    }

    /* --- Marquee --- */
    .marquee-content {
        animation-duration: 30s;
    }

    .marquee-item {
        font-size: 1rem;
        padding: 0 1.5rem;
    }

    /* --- Footer --- */
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }

    /* --- Accessibility --- */
    .accessibility-controls {
        top: 75px;
        right: 10px;
    }

    .accessibility-toggle {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .accessibility-panel {
        right: -10px;
        min-width: 200px;
    }
}

/* ===== Animations ===== */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.marquee-wrapper {
    overflow: hidden;
    position: relative;
    width: 100%;
}

.marquee-content {
    display: flex;
    animation: marquee 20s linear infinite;
    will-change: transform;
}

.marquee-content:hover {
    animation-play-state: paused;
}

.marquee-item {
    flex-shrink: 0;
    padding: 0 3rem;
    font-weight: bold;
    font-size: 1.25rem;
    color: var(--color-text-dark);
    text-transform: uppercase;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

/* ===== Accessibility Controls ===== */
.accessibility-controls {
    position: fixed;
    top: 120px;
    right: 20px;
    z-index: 1100;
}

.accessibility-toggle {
    width: 50px;
    height: 50px;
    background: var(--color-primary);
    color: white;
    border: 3px solid white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
}

.accessibility-toggle:hover {
    background: var(--color-brand-orange);
    transform: scale(1.1);
}

.accessibility-panel {
    position: absolute;
    top: 60px;
    right: 0;
    background: white;
    border: 2px solid var(--color-primary);
    border-radius: 12px;
    padding: 1.5rem;
    min-width: 250px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.accessibility-controls.active .accessibility-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.accessibility-panel h4 {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: 0.5rem;
}

.control-group {
    margin-bottom: 1.5rem;
}

.control-group:last-child {
    margin-bottom: 0;
}

.control-group p {
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--color-text-dark);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.control-group button {
    background: white;
    border: 2px solid rgba(255, 0, 0, 0.2);
    padding: 0.5rem 0.75rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.control-group button:hover {
    border-color: var(--color-primary);
    background: rgba(255, 0, 0, 0.05);
}

.control-group button.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

/* ===== Utility Classes ===== */
.text-center { text-align: center; }
.text-primary { color: var(--color-primary); }
.bg-white { background: white; }
.bg-light { background: var(--color-bg-light); }

/* Lead/Intro text */
.lead {
    font-size: 1.25rem;
    line-height: 1.7;
    color: var(--color-text-gray);
    max-width: 800px;
    margin: 0 auto;
}

.lead strong {
    color: var(--color-text-dark);
    font-weight: 700;
}

/* Stat number in cards - large display numbers */
.card .stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--color-primary);
    line-height: 1;
    margin-bottom: var(--spacing-sm);
}

/* ===== LAYOUT SYSTEM IMPLEMENTATION ===== */
/* Performance optimized layout system with CSS layers */
@layer layout {
    /* Main content wrapper with safe area */
    .page-content-wrapper {
        padding-top: var(--safe-area-top);
        scroll-margin-top: var(--safe-area-top); /* For anchor links */
        min-height: 100vh;
        position: relative;
    }

    /* Hero sections with optimized spacing */
    .hero-spacing {
        padding-top: var(--hero-spacing-top);
        padding-bottom: var(--section-spacing);
    }

    /* Subpage hero specific */
    .subpage-hero {
        padding-top: var(--safe-area-top);
        padding-bottom: 4rem;
        position: relative;
    }

    /* Section spacing with clamp for performance */
    .section-spacing {
        padding: var(--section-spacing) 0;
    }

    /* Mobile menu active state */
    .mobile-menu-active .page-content-wrapper {
        padding-top: var(--safe-area-top-mobile-expanded);
        scroll-margin-top: var(--safe-area-top-mobile-expanded);
    }
}

/* Responsive adaptations for layout system */
@media (max-width: 768px) {
    @layer layout {
        .page-content-wrapper {
            padding-top: var(--safe-area-top-mobile);
            scroll-margin-top: var(--safe-area-top-mobile);
        }

        .subpage-hero {
            padding-top: var(--safe-area-top-mobile);
            padding-bottom: 2.5rem;
        }

        .hero-spacing {
            padding-top: max(var(--safe-area-top-mobile), 6rem);
            padding-bottom: 2.5rem;
        }
    }
}

/* Header height management classes */
.header-height-observer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    pointer-events: none;
    opacity: 0;
}

/* Fix for existing inline styles - override with new system */
section[style*="padding-top: 120px"],
section[style*="padding-top: 140px"],
.subpage-hero {
    padding-top: var(--safe-area-top) !important; /* Dynamic from JS */
}

@media (max-width: 768px) {
    section[style*="padding-top: 120px"],
    section[style*="padding-top: 140px"],
    .subpage-hero {
        /* Double fallback: first try JS variable, then fallback to fixed value */
        padding-top: var(--safe-area-top-mobile, 150px) !important;
    }
}

/* Enhanced scroll behavior for anchor links */
:target {
    scroll-margin-top: var(--safe-area-top);
}

@media (max-width: 768px) {
    :target {
        scroll-margin-top: var(--safe-area-top-mobile);
    }
}

/* Performance optimization for layout shifts */
html {
    scroll-behavior: smooth;
}

/* Ensure images don't cause layout shifts */
img {
    aspect-ratio: attr(width) / attr(height);
}

/* ===== ACCESSIBILITY ENHANCEMENTS ===== */
/* Focus styles for keyboard navigation */
:focus-visible {
    outline: 3px solid var(--color-accent-green-vibrant);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ===== JS ANIMATION CLASSES ===== */
/* Card animation classes */
.card--animate-ready {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.card--animate-ready:nth-child(1) { transition-delay: 0s; }
.card--animate-ready:nth-child(2) { transition-delay: 0.1s; }
.card--animate-ready:nth-child(3) { transition-delay: 0.2s; }
.card--animate-ready:nth-child(4) { transition-delay: 0.3s; }
.card--animate-ready:nth-child(5) { transition-delay: 0.4s; }
.card--animate-ready:nth-child(6) { transition-delay: 0.5s; }

.card--animate-in {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Notification classes */
.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 6px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 10000;
    animation: slideInRight 0.3s ease;
}

.notification-success {
    background: #28a745;
    color: white;
}

.notification-error {
    background: #dc3545;
    color: white;
}

.notification-info {
    background: #007bff;
    color: white;
}

.notification--exiting {
    animation: slideOutRight 0.3s ease;
}

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

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Header animation classes */
.header--scrolled {
    background: rgba(255, 0, 0, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.top-bar--hidden {
    transform: translateY(-100%);
}

.header--top-zero {
    top: 0;
}

/* ==========================================================================
   PAGE COMPONENT CLASSES – replaces inline styles
   ========================================================================== */

/* --- Hero extras --- */
.status-badge-text {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.hero-cta {
    margin-top: 2rem;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-badges {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-top: 1.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    flex-wrap: wrap;
    justify-content: center;
}

.hero-badge-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.hero-badge-icon {
    color: #00E676;
    font-size: 1.1rem;
}

/* --- Trusted by --- */
.trusted-section {
    padding: 3rem 0;
    background: var(--color-bg-light);
    opacity: 0.85;
}

.trusted-label {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 2rem;
}

/* --- Services overview --- */
.services-overview {
    padding: 3rem 0;
    background: white;
    border-top: 4px solid var(--color-primary);
}

.services-overview-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(255, 0, 0, 0.2);
}

.services-overview-title {
    font-weight: 800;
    text-transform: uppercase;
    line-height: 1.1;
    margin: 0;
}

.services-overview-arrow {
    color: var(--color-primary);
    font-size: 2.5rem;
    animation: bounce 2s ease-in-out infinite;
    flex-shrink: 0;
}

/* --- Card link --- */
.card-link {
    display: inline-flex;
    align-items: center;
    color: var(--color-primary);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 1.5rem;
    transition: all 0.2s ease;
}

.card-link:hover {
    color: var(--color-brand-orange);
    gap: 0.5rem;
}

.card-link-icon {
    font-size: 1rem;
    margin-left: 0.25rem;
}

/* --- Why Win Section --- */
.why-win-section {
    padding: 5rem 0;
    background: var(--color-bg-light);
    position: relative;
    overflow: hidden;
}

.why-win-title {
    margin-bottom: 3rem;
    text-transform: uppercase;
    line-height: 1.1;
}

.why-win-accent {
    color: var(--color-primary);
    border-bottom: 4px solid var(--color-primary);
    display: inline-block;
    padding-bottom: 0.25rem;
}

.why-win-list {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    max-width: 900px;
}

.why-win-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.why-win-icon-wrap {
    position: relative;
    flex-shrink: 0;
}

.why-win-bg-num {
    font-size: 4rem;
    font-weight: 800;
    color: rgba(0, 0, 0, 0.05);
    position: absolute;
    top: -1.25rem;
    left: -1rem;
    z-index: 0;
    user-select: none;
    line-height: 1;
}

.why-win-icon {
    width: 48px;
    height: 48px;
    background: white;
    border: 2px solid var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.why-win-icon .material-icons {
    color: var(--color-primary);
    font-size: 1.5rem;
}

.why-win-icon--green {
    border-color: var(--color-accent-green-vibrant);
}

.why-win-icon--green .material-icons {
    color: var(--color-accent-green-vibrant);
}

.why-win-body {
    padding-top: 0.25rem;
}

.why-win-body h4 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
}

.why-win-body p {
    color: var(--color-text-gray);
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.7;
    margin-bottom: 0;
}

/* --- Stats section --- */
.stats-section {
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.03) 0%, rgba(255, 255, 255, 1) 100%);
    position: relative;
    overflow: hidden;
    padding: 5rem 0;
}

.stats-cta {
    text-align: center;
    margin-top: var(--spacing-xl);
}

/* --- Legal pages (Privacy Policy, Terms) --- */
.page-hero-simple {
    padding: calc(var(--header-base-height) + var(--header-topbar-height) + 2.5rem) 0 3rem;
    background: var(--color-primary);
    color: white;
    border-bottom: 3px solid rgba(0,0,0,0.15);
}

.page-hero-simple .section-label {
    color: white;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.page-hero-simple h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    margin: 0 0 0.5rem;
    color: white;
}

.page-hero-meta {
    color: rgba(255,255,255,0.85);
    font-size: 0.85rem;
    margin: 0;
}

.legal-content-section {
    padding: 4rem 0 5rem;
    background: white;
}

.legal-content {
    max-width: 820px;
    margin: 0 auto;
    color: var(--color-text-dark);
    line-height: 1.8;
}

.legal-content h2 {
    font-size: 1.25rem;
    font-weight: 800;
    margin: 2.5rem 0 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--color-primary);
    color: var(--color-text-dark);
}

.legal-content h2:first-child {
    margin-top: 0;
}

.legal-content h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 1.5rem 0 0.5rem;
    color: var(--color-text-dark);
}

.legal-content p {
    margin: 0 0 1rem;
    color: var(--color-text-dark);
}

.legal-content ul {
    margin: 0.5rem 0 1rem 1.5rem;
    color: var(--color-text-dark);
}

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

.legal-content a {
    color: var(--color-primary);
    text-decoration: underline;
}

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

.legal-table th,
.legal-table td {
    text-align: left;
    padding: 0.6rem 0.75rem;
    border: 1px solid rgba(0,0,0,0.1);
}

.legal-table th {
    background: var(--color-bg-dark);
    color: white;
    font-weight: 600;
}

.legal-table tr:nth-child(even) td {
    background: #f8f8f8;
}

/* --- CTA Section --- */
.cta-section {
    position: relative;
    min-height: 400px;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 4px solid var(--color-primary);
    border-bottom: 4px solid var(--color-primary);
}

.cta-bg {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(139, 0, 0, 0.9), rgba(196, 30, 58, 0.85)),
        url('data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 width=%2240%22 height=%2240%22><path d=%22M 40 0 L 0 0 0 40%22 fill=%22none%22 stroke=%22rgba(0,217,54,0.1)%22 stroke-width=%221%22/></svg>');
    background-size: cover, 40px 40px;
}

.cta-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.25), transparent);
}

.cta-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 3rem 1.5rem;
    max-width: 800px;
}

.cta-icon-wrap {
    display: inline-block;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 230, 118, 0.3);
    margin-bottom: 2rem;
}

.cta-icon {
    color: #00E676;
    font-size: 3rem;
    display: block;
}

.cta-title {
    color: white;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: -0.01em;
}

.cta-tagline {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    font-size: 0.9rem;
    font-family: 'Space Grotesk', monospace;
    font-weight: 500;
    letter-spacing: 0.1em;
}

.cta-btn {
    font-size: 1.1rem;
    padding: 1rem 2.5rem;
}

/* --- Blog section --- */
.blog-cta {
    text-align: center;
    margin-top: var(--spacing-xl);
}

.blog-empty {
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--color-text-gray);
}

@media (max-width: 768px) {
    .services-overview-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .services-overview-arrow { display: none; }

    .why-win-item { gap: 1rem; }

    .why-win-bg-num { font-size: 2.5rem; }

    .hero-badges { gap: 1rem; font-size: 0.8rem; }
}

/* --- Utility --- */
.text-center { text-align: center; }
.text-highlight { color: var(--color-primary); }

.section-label {
    display: block;
    color: var(--color-primary);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 0.5rem;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: rgba(255, 0, 0, 0.06);
    border: 1px solid rgba(255, 0, 0, 0.18);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1.5rem;
}

.flex-center-gap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* --- Tag chips --- */
.tag {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background: rgba(255, 0, 0, 0.06);
    border: 1px solid rgba(255, 0, 0, 0.15);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-dark);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all var(--transition-fast);
    cursor: default;
}

.tag:hover {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

/* ==========================================================================
   AUTOMATION SECTION (n8n & AI)
   ========================================================================== */

.automation-section {
    padding: var(--section-spacing) 0;
    background: var(--color-bg-light);
    border-top: 4px solid var(--color-primary);
}

.automation-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-top: 3rem;
}

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

@media (max-width: 600px) {
    .automation-grid { grid-template-columns: 1fr; }
}

.automation-card {
    background: white;
    border: 1px solid rgba(255, 0, 0, 0.1);
    padding: 1.5rem;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.automation-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--color-primary);
    transform: scaleX(0);
    transition: transform var(--transition-normal);
    transform-origin: left;
}

.automation-card:hover {
    border-color: rgba(255, 0, 0, 0.25);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.automation-card:hover::before {
    transform: scaleX(1);
}

.automation-icon {
    width: 44px;
    height: 44px;
    background: rgba(255, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    transition: background var(--transition-fast);
}

.automation-card:hover .automation-icon {
    background: rgba(255, 0, 0, 0.14);
}

.automation-icon .material-icons {
    color: var(--color-primary);
    font-size: 1.4rem;
}

.automation-card h4 {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-dark);
}

.automation-card p {
    color: var(--color-text-gray);
    font-size: 0.875rem;
    line-height: 1.65;
    margin-bottom: 0;
}

.automation-cta {
    text-align: center;
    margin-top: 3rem;
}

/* ==========================================================================
   WORDPRESS EXPERTISE SECTION
   ========================================================================== */

.wp-expertise-section {
    padding: var(--section-spacing) 0;
    background: white;
    border-top: 4px solid var(--color-primary);
}

.wp-expertise-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

@media (max-width: 900px) {
    .wp-expertise-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

.wp-expertise-content .section-label {
    margin-bottom: 0.75rem;
}

.wp-expertise-content h2 {
    line-height: 1.1;
    margin-bottom: 1rem;
}

.wp-expertise-content .lead {
    color: var(--color-text-gray);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.wp-feature-list {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
}

.wp-feature-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0;
    font-size: 0.95rem;
    font-weight: 500;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--color-text-dark);
}

.wp-feature-list li:last-child {
    border-bottom: none;
}

.wp-feature-list .material-icons {
    color: var(--color-accent-green-vibrant);
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* WordPress visual side */
.wp-expertise-visual {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.wp-stats-card {
    background: var(--color-bg-light);
    border: 2px solid rgba(255, 0, 0, 0.15);
    padding: 2rem;
    display: flex;
    justify-content: space-around;
    gap: 1rem;
    border-top: 3px solid var(--color-primary);
}

.wp-stat {
    text-align: center;
}

.wp-stat-number {
    display: block;
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--color-primary);
    line-height: 1;
    font-family: 'Space Grotesk', sans-serif;
}

.wp-stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--color-text-gray);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.35rem;
}

.wp-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

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

.footer-brand {
    margin-bottom: 3rem;
}

.footer-logo {
    font-size: 2rem;
    font-weight: bold;
    letter-spacing: -1px;
    margin-bottom: 1rem;
    display: inline-flex;
    align-items: center;
}

.footer-logo-c { color: white; }
.footer-logo-n { color: #FF6B00; }
.footer-logo-s { color: white; }

.footer-tagline {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    max-width: 300px;
    font-family: 'Space Grotesk', monospace;
    line-height: 1.6;
}

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

.footer-info {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
}

.footer-admin-link {
    color: rgba(255, 255, 255, 0.3);
    margin-left: 1rem;
    font-size: 0.7rem;
}

/* ==========================================================================
   COOKIE CONSENT BANNER
   ========================================================================== */

#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #111;
    border-top: 2px solid var(--color-primary);
    padding: 1rem 1.5rem;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.4);
}

.cookie-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.cookie-text {
    flex: 1;
    min-width: 240px;
}

.cookie-text strong {
    display: block;
    color: #fff;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.cookie-text p {
    color: rgba(255,255,255,0.6);
    font-size: 0.8rem;
    margin: 0;
    line-height: 1.5;
}

.cookie-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 0.5rem 1.1rem;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
}

.cookie-btn-accept {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

.cookie-btn-accept:hover {
    background: #e60000;
    border-color: #e60000;
}

.cookie-btn-reject {
    background: transparent;
    color: rgba(255,255,255,0.7);
    border-color: rgba(255,255,255,0.25);
}

.cookie-btn-reject:hover {
    border-color: rgba(255,255,255,0.6);
    color: #fff;
}

.cookie-link {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.4);
    text-decoration: underline;
    white-space: nowrap;
}

.cookie-link:hover {
    color: rgba(255,255,255,0.8);
}

/* Persistent cookie settings toggle — bottom-right corner */
#cookie-settings-btn {
    position: fixed;
    bottom: 1.75rem;
    right: 1.25rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #222;
    color: rgba(255,255,255,0.6);
    border: 1px solid rgba(255,255,255,0.12);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.25s ease, transform 0.25s ease, background 0.2s ease, color 0.2s ease;
    pointer-events: none;
}
#cookie-settings-btn.visible {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}
#cookie-settings-btn:hover {
    background: #333;
    color: #fff;
    border-color: rgba(255,255,255,0.3);
}
#cookie-settings-btn .material-icons {
    font-size: 1.1rem;
    line-height: 1;
}

@media (max-width: 600px) {
    .cookie-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ==========================================================================
   LAZY LOADING – fade in on intersect
   ========================================================================== */

img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.4s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* ==========================================================================
   SUBPAGE HERO
   ========================================================================== */

.subpage-hero {
    padding: calc(var(--header-base-height) + var(--header-topbar-height) + 3rem) 0 3rem;
    border-bottom: 3px solid var(--color-primary);
    background: white;
}

.subpage-hero-desc {
    color: var(--color-text-gray);
    font-size: 1.1rem;
    max-width: 680px;
    margin-top: 0.75rem;
    line-height: 1.7;
}

/* ==========================================================================
   AI PAGE
   ========================================================================== */

.ai-hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #6b0000 0%, #c41e3a 100%);
    overflow: hidden;
    padding: calc(var(--header-base-height) + var(--header-topbar-height) + 2rem) 0 6rem;
}

.ai-grid-overlay {
    position: absolute;
    inset: 0;
    background-image: url('data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 width=%2240%22 height=%2240%22><path d=%22M 40 0 L 0 0 0 40%22 fill=%22none%22 stroke=%22rgba(0,230,118,0.07)%22 stroke-width=%221%22/></svg>');
    background-size: 40px 40px;
    animation: gridDrift 28s linear infinite;
    pointer-events: none;
}

@keyframes gridDrift {
    0%   { transform: translateY(0) rotate(0deg);   opacity: 0.7; }
    50%  { transform: translateY(-8px) rotate(0.3deg); opacity: 1; }
    100% { transform: translateY(0) rotate(0deg);   opacity: 0.7; }
}

.ai-particles { position: absolute; inset: 0; pointer-events: none; }
.ai-particle {
    position: absolute;
    width: 4px; height: 4px;
    background: rgba(0, 230, 118, 0.6);
    border-radius: 50%;
    animation: particleFloat 8s infinite ease-in-out;
}
.ai-particle:nth-child(1)  { left: 10%; top: 20%; animation-delay: 0s; }
.ai-particle:nth-child(2)  { left: 25%; top: 60%; animation-delay: 1s; }
.ai-particle:nth-child(3)  { left: 50%; top: 30%; animation-delay: 2s; }
.ai-particle:nth-child(4)  { left: 70%; top: 70%; animation-delay: 0.5s; }
.ai-particle:nth-child(5)  { left: 85%; top: 25%; animation-delay: 1.5s; }
.ai-particle:nth-child(6)  { left: 40%; top: 80%; animation-delay: 3s; }
.ai-particle:nth-child(7)  { left: 15%; top: 50%; animation-delay: 2.5s; }
.ai-particle:nth-child(8)  { left: 60%; top: 15%; animation-delay: 4s; }

@keyframes particleFloat {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.6; }
    50%       { transform: translateY(-30px) scale(1.5); opacity: 1; }
}

.ai-hero-inner { position: relative; z-index: 3; }

.ai-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(0, 230, 118, 0.4);
    color: rgba(255,255,255,0.9);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.ai-pulse-dot {
    width: 8px; height: 8px;
    background: #00E676;
    border-radius: 50%;
    animation: pulseDot 1.5s ease-in-out infinite;
}

@keyframes pulseDot {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0,230,118,0.4); }
    50%       { transform: scale(1.2); box-shadow: 0 0 0 6px rgba(0,230,118,0); }
}

.ai-hero-title {
    color: white;
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    line-height: 1.05;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.ai-glitch {
    display: inline-block;
    position: relative;
}

.ai-glitch::before, .ai-glitch::after {
    content: attr(data-text);
    position: absolute;
    left: 0; top: 0;
    color: white;
    opacity: 0;
}

.ai-glitch::before { animation: glitch1 5s infinite 2s; color: #00E676; clip-path: inset(20% 0 60% 0); }
.ai-glitch::after  { animation: glitch2 5s infinite 2.1s; color: #ff4444; clip-path: inset(60% 0 20% 0); }

@keyframes glitch1 {
    0%,95%,100% { transform: none; opacity: 0; }
    96%          { transform: translateX(-3px); opacity: 0.8; }
    97%          { transform: translateX(3px);  opacity: 0; }
}
@keyframes glitch2 {
    0%,95%,100% { transform: none; opacity: 0; }
    96%          { transform: translateX(3px);  opacity: 0.8; }
    97%          { transform: translateX(-3px); opacity: 0; }
}

.ai-hero-sub { color: rgba(255,255,255,0.75); font-size: 0.6em; font-weight: 600; letter-spacing: 0.05em; }

.ai-hero-desc {
    color: rgba(255,255,255,0.88);
    font-size: 1.05rem;
    line-height: 1.7;
    max-width: 620px;
    margin-bottom: 2rem;
}
.ai-hero-desc strong { color: #00E676; }

.ai-hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2.5rem; }

.btn-ai-ghost {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.875rem 1.75rem;
    border: 1.5px solid rgba(255,255,255,0.4);
    color: white;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s;
    background: rgba(255,255,255,0.05);
}
.btn-ai-ghost:hover { background: rgba(255,255,255,0.15); color: white; border-color: white; }

/* Terminal */
.ai-terminal {
    background: #0d0d0d;
    border: 1px solid rgba(0,230,118,0.25);
    max-width: 560px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.ai-terminal-bar {
    background: #1a1a1a;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid #2a2a2a;
}
.ai-dot { width: 10px; height: 10px; border-radius: 50%; }
.ai-dot-red    { background: #ff5f57; }
.ai-dot-yellow { background: #febc2e; }
.ai-dot-green  { background: #28c840; }
.ai-terminal-title { margin-left: auto; color: #555; font-size: 0.75rem; }
.ai-terminal-body { padding: 1rem 1.25rem; }
.ai-terminal-line {
    font-family: 'Space Grotesk', monospace;
    font-size: 0.8rem;
    padding: 0.2rem 0;
    color: #ccc;
    opacity: 0;
    animation: termFade 0.4s ease forwards;
}
.ai-terminal-line:nth-child(1) { animation-delay: 0.3s; }
.ai-delay-1 { animation-delay: 0.9s; }
.ai-delay-2 { animation-delay: 1.5s; }
.ai-delay-3 { animation-delay: 2.1s; }
.ai-delay-4 { animation-delay: 2.7s; }
.ai-delay-5 { animation-delay: 3.3s; }
@keyframes termFade { to { opacity: 1; } }

.ai-term-prompt { color: #555; margin-right: 0.5rem; }
.ai-term-green  { color: #00E676; }
.ai-term-blue   { color: #64b5f6; }
.ai-term-yellow { color: #ffd54f; }
.ai-cursor { animation: cursorBlink 1s step-end infinite; }
@keyframes cursorBlink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }

.ai-robot-wrap {
    position: absolute;
    right: 3rem;
    bottom: 2rem;
    animation: robotWalk 6s ease-in-out infinite;
    filter: drop-shadow(0 16px 40px rgba(0,0,0,0.55));
}

.ai-robot-img {
    width: 260px;
    height: 260px;
    object-fit: contain;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
}
@keyframes robotWalk {
    0%,100% { transform: translateY(0) rotate(0deg); }
    25%      { transform: translateY(-6px) rotate(-2deg); }
    75%      { transform: translateY(-6px) rotate(2deg); }
}

.ai-loader-dots {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 5;
}
.ai-loader-dots span {
    width: 10px; height: 10px;
    border-radius: 2px;
    background: rgba(255,255,255,0.15);
    animation: sqPulse 2s infinite ease-in-out;
}
.ai-loader-dots span:nth-child(1) { animation-delay: 0s; }
.ai-loader-dots span:nth-child(2) { animation-delay: 0.2s; }
.ai-loader-dots span:nth-child(3) { animation-delay: 0.4s; }
.ai-loader-dots span:nth-child(4) { animation-delay: 0.6s; }
.ai-loader-dots span:nth-child(5) { animation-delay: 0.8s; }
.ai-loader-dots span:nth-child(6) { animation-delay: 1.0s; }
@keyframes sqPulse {
    0%,100% { background: rgba(255,255,255,0.1); transform: scale(1); }
    45%      { background: #00E676; transform: scale(1.3); box-shadow: 0 0 12px rgba(0,230,118,0.5); }
}

/* How section */
.ai-how-section { padding: var(--section-spacing) 0; background: white; border-top: 3px solid var(--color-primary); }

.ai-flow {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr;
    gap: 1.5rem;
    align-items: start;
    margin-top: 3rem;
}

.ai-flow-step {
    background: var(--color-bg-light);
    border: 1px solid rgba(255,0,0,0.1);
    padding: 1.5rem;
    text-align: center;
    transition: all var(--transition-normal);
}
.ai-flow-step:hover { border-color: var(--color-primary); transform: translateY(-4px); }

.ai-flow-num {
    font-size: 2rem;
    font-weight: 800;
    color: rgba(255,0,0,0.08);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.ai-flow-icon {
    width: 48px; height: 48px;
    background: rgba(255,0,0,0.08);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1rem;
}
.ai-flow-icon .material-icons { color: var(--color-primary); font-size: 1.4rem; }

.ai-flow-step h4 { font-size: 0.9rem; text-transform: uppercase; margin-bottom: 0.5rem; }
.ai-flow-step p  { color: var(--color-text-gray); font-size: 0.85rem; line-height: 1.6; margin: 0; }

.ai-flow-arrow { display: flex; align-items: center; padding-top: 4rem; color: var(--color-primary); font-size: 1.5rem; }
.ai-flow-arrow .material-icons { font-size: 2rem; }

@media (max-width: 768px) {
    .ai-flow { grid-template-columns: 1fr; }
    .ai-flow-arrow { display: none; }
    .ai-hero-section { min-height: auto; padding-bottom: 4rem; }
    .ai-terminal { max-width: 100%; }
    .ai-robot-wrap { display: none; }
}

/* Services grid */
.ai-services-section { padding: var(--section-spacing) 0; background: var(--color-bg-light); }

.ai-services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-top: 2.5rem;
}

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

.ai-service-card {
    background: white;
    border: 1px solid rgba(255,0,0,0.1);
    padding: 1.75rem;
    transition: all var(--transition-normal);
    position: relative;
}
.ai-service-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: var(--color-primary); transform: scaleX(0); transition: transform var(--transition-normal);
}
.ai-service-card:hover { transform: translateY(-5px); box-shadow: 0 12px 30px rgba(0,0,0,0.1); border-color: rgba(255,0,0,0.2); }
.ai-service-card:hover::before { transform: scaleX(1); }

.ai-service-card--featured {
    grid-column: span 2;
    background: linear-gradient(135deg, rgba(255,0,0,0.03), white);
    border-color: rgba(255,0,0,0.2);
}
@media (max-width: 1024px) { .ai-service-card--featured { grid-column: span 2; } }
@media (max-width: 600px)  { .ai-service-card--featured { grid-column: span 1; } }

.ai-service-icon {
    width: 44px; height: 44px;
    background: rgba(255,0,0,0.08);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 1rem;
}
.ai-service-icon .material-icons { color: var(--color-primary); font-size: 1.4rem; }

.ai-service-card h3 { font-size: 1.1rem; text-transform: uppercase; margin-bottom: 0.75rem; }
.ai-service-card p  { color: var(--color-text-gray); font-size: 0.875rem; line-height: 1.65; }

.ai-service-features {
    list-style: none;
    padding: 0;
    margin-top: 1rem;
    border-top: 1px solid rgba(0,0,0,0.06);
    padding-top: 1rem;
}
.ai-service-features li {
    font-size: 0.8rem;
    padding: 0.3rem 0;
    padding-left: 1.25rem;
    position: relative;
    color: var(--color-text-gray);
}
.ai-service-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--color-accent-green-vibrant);
    font-weight: 700;
}

/* Tech strip */
.ai-tech-section { padding: 3rem 0; background: white; border-top: 1px solid rgba(0,0,0,0.06); }

.ai-tech-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}
@media (max-width: 768px) { .ai-tech-grid { grid-template-columns: repeat(2, 1fr); } }

.ai-tech-item {
    border: 1px solid rgba(255,0,0,0.12);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    transition: all var(--transition-fast);
}
.ai-tech-item:hover { border-color: var(--color-primary); }
.ai-tech-name { font-weight: 800; font-size: 1rem; font-family: 'Space Grotesk', monospace; color: var(--color-primary); }
.ai-tech-desc { font-size: 0.75rem; color: var(--color-text-gray); }

/* ==========================================================================
   SERVICES (USŁUGI) PAGE
   ========================================================================== */

.uslugi-section { padding: var(--section-spacing) 0; }
.uslugi-section--alt { background: var(--color-bg-light); }

.uslugi-block { max-width: 1100px; }

.uslugi-block-header {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.uslugi-block-num {
    font-size: 5rem;
    font-weight: 800;
    color: rgba(255,0,0,0.06);
    line-height: 1;
    flex-shrink: 0;
    font-family: 'Space Grotesk', sans-serif;
}

.uslugi-block-header .lead { margin-top: 0.5rem; }

.uslugi-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}
.uslugi-cards--2col { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 1024px) { .uslugi-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .uslugi-cards, .uslugi-cards--2col { grid-template-columns: 1fr; } }

.uslugi-card {
    background: white;
    border: 1px solid rgba(255,0,0,0.1);
    padding: 1.25rem;
    transition: all var(--transition-normal);
}
.uslugi-section--alt .uslugi-card { background: white; }
.uslugi-card:hover { border-color: var(--color-primary); transform: translateY(-3px); box-shadow: var(--shadow-md); }

.uslugi-card-icon { color: var(--color-primary); font-size: 1.75rem; display: block; margin-bottom: 0.75rem; }
.uslugi-card h4 { font-size: 0.85rem; text-transform: uppercase; margin-bottom: 0.5rem; }
.uslugi-card p  { font-size: 0.85rem; color: var(--color-text-gray); line-height: 1.6; margin: 0; }

.uslugi-tech-strip { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem; }

.uslugi-cta-inline { margin-top: 1.5rem; }

/* Section illustration (CMS, robot, etc.) in block header */
.uslugi-section-illus {
    width: 200px;
    height: 200px;
    object-fit: contain;
    flex-shrink: 0;
    margin-left: auto;
    align-self: center;
    border-radius: 12px;
    background: transparent;
}

@media (max-width: 768px) {
    .uslugi-block-header { flex-direction: column; gap: 0.5rem; }
    .uslugi-block-num { font-size: 3rem; }
    .uslugi-section-illus { display: none; }
}

/* ==========================================================================
   ABOUT PAGE
   ========================================================================== */

.about-stats-section { padding: 3rem 0; background: white; border-top: 3px solid var(--color-primary); }

.about-story-section { padding: var(--section-spacing) 0; background: var(--color-bg-light); }

.about-story-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}
@media (max-width: 900px) { .about-story-grid { grid-template-columns: 1fr; gap: 2rem; } }

.about-story-text .lead { color: var(--color-text-gray); font-size: 1rem; line-height: 1.7; margin-bottom: 1rem; }

/* Timeline */
.about-timeline { display: flex; flex-direction: column; gap: 0; }

.about-tl-item {
    display: flex;
    gap: 1rem;
    padding-bottom: 1.5rem;
    position: relative;
}
.about-tl-item::before {
    content: '';
    position: absolute;
    left: 3.25rem;
    top: 1.5rem;
    bottom: 0;
    width: 2px;
    background: rgba(255,0,0,0.15);
}
.about-tl-item:last-child::before { display: none; }

.about-tl-year {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--color-primary);
    width: 3.5rem;
    flex-shrink: 0;
    padding-top: 0.15rem;
    font-family: 'Space Grotesk', monospace;
}

.about-tl-content h4 { font-size: 0.9rem; text-transform: uppercase; margin-bottom: 0.25rem; }
.about-tl-content p  { font-size: 0.85rem; color: var(--color-text-gray); line-height: 1.5; margin: 0; }

.about-tl-item--now .about-tl-year { color: var(--color-accent-green-vibrant); }

.about-values-section { padding: var(--section-spacing) 0; background: white; }

.about-values-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 2.5rem;
}
@media (max-width: 768px) { .about-values-grid { grid-template-columns: 1fr; } }

.about-value-item { padding: 1.5rem; border: 1px solid rgba(255,0,0,0.1); }
.about-value-icon { width: 44px; height: 44px; background: rgba(255,0,0,0.08); display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; }
.about-value-icon .material-icons { color: var(--color-primary); font-size: 1.4rem; }
.about-value-item h4 { font-size: 0.9rem; text-transform: uppercase; margin-bottom: 0.5rem; }
.about-value-item p  { font-size: 0.875rem; color: var(--color-text-gray); line-height: 1.65; margin: 0; }

.about-company-section { padding: var(--section-spacing) 0; background: var(--color-bg-light); }

.about-company-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}
@media (max-width: 900px) { .about-company-grid { grid-template-columns: 1fr; gap: 2rem; } }

.about-company-info h3 { font-size: 1.2rem; margin-bottom: 1.5rem; text-transform: uppercase; }

.about-company-details { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.about-company-details li { display: flex; align-items: center; gap: 0.75rem; font-size: 0.9rem; }
.about-company-details .material-icons { color: var(--color-primary); font-size: 1.1rem; }
.about-company-details a { color: var(--color-text-dark); }
.about-company-details a:hover { color: var(--color-primary); }

.about-trusted-logos { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1rem; }
.about-trusted-item {
    padding: 0.5rem 1rem;
    border: 1px solid rgba(0,0,0,0.12);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--color-text-gray);
}

/* ==========================================================================
   CONTACT PAGE
   ========================================================================== */

.contact-page-section { padding: 3rem 0 var(--section-spacing); }

.contact-page-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 3rem;
    align-items: start;
}
@media (max-width: 900px) { .contact-page-grid { grid-template-columns: 1fr; } }

/* Select styling */
.contact-form select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid rgba(255,0,0,0.15);
    background: white;
    font-family: inherit;
    font-size: 1rem;
    color: var(--color-text-dark);
    transition: border-color var(--transition-fast);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M6 8 0 0h12z' fill='%23888'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}
.contact-form select:focus { outline: none; border-color: var(--color-primary); }

.contact-submit {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1.05rem;
}

.contact-recaptcha-note {
    margin-top: 1rem;
    font-size: 0.8rem;
    color: var(--color-text-gray);
    text-align: center;
    margin-bottom: 0;
}

.contact-info-card {
    background: white;
    border: 1px solid rgba(255,0,0,0.12);
    border-top: 3px solid var(--color-primary);
    padding: 1.75rem;
}
.contact-info-card h3 { font-size: 1rem; text-transform: uppercase; margin-bottom: 1.5rem; }
.contact-founder-note {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0,0,0,0.07);
    font-size: 0.75rem;
    color: var(--color-text-gray);
    letter-spacing: 0.03em;
}

.about-company-founder {
    font-size: 0.75rem;
    color: var(--color-text-gray);
    letter-spacing: 0.03em;
    margin-top: 0.25rem;
    margin-bottom: 1.25rem;
}

.contact-info-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 1rem; }
.contact-info-list li { display: flex; align-items: flex-start; gap: 0.75rem; }
.contact-info-list .material-icons { color: var(--color-primary); font-size: 1.1rem; flex-shrink: 0; margin-top: 0.1rem; }
.contact-info-list li > div { display: flex; flex-direction: column; gap: 0.15rem; }
.contact-info-list strong { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-text-gray); }
.contact-info-list span, .contact-info-list a { font-size: 0.9rem; color: var(--color-text-dark); }
.contact-info-list a:hover { color: var(--color-primary); }

.contact-promise-card {
    background: var(--color-bg-light);
    border: 1px solid rgba(255,0,0,0.1);
    padding: 1.5rem;
    margin-top: 1.25rem;
}
.contact-promise-card h4 { font-size: 0.85rem; text-transform: uppercase; margin-bottom: 1rem; }

.contact-promise-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.contact-promise-list li { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; }
.contact-promise-list .material-icons { color: var(--color-accent-green-vibrant); font-size: 1rem; }

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

.blog-listing-section { padding: 3rem 0 var(--section-spacing); }

.blog-grid { display: flex; flex-direction: column; gap: 1.5rem; max-width: 860px; margin: 0 auto; }

.blog-grid .card {
    display: flex;
    flex-direction: row;
    overflow: hidden;
    border-radius: 0;
    border: 1px solid rgba(255,0,0,0.1);
    box-shadow: none;
    transition: all var(--transition-normal);
}
.blog-grid .card:hover { border-color: var(--color-primary); transform: translateX(4px); }

.blog-grid .card-image { flex: 0 0 260px; min-height: 180px; overflow: hidden; }
.blog-grid .card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition-slow); }
.blog-grid .card:hover .card-image img { transform: scale(1.04); }

.blog-grid .card-body {
    flex: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.blog-grid .card-body h3 { font-size: 1.15rem; line-height: 1.3; margin-bottom: 0.5rem; }
.blog-grid .card-body h3 a { color: var(--color-text-dark); }
.blog-grid .card-body h3 a:hover { color: var(--color-primary); }
.blog-grid .card-body p { color: var(--color-text-gray); font-size: 0.875rem; line-height: 1.55; margin: 0.5rem 0; }

@media (max-width: 640px) {
    .blog-grid .card { flex-direction: column; }
    .blog-grid .card-image { flex: none; min-height: 180px; }
}

.blog-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 3rem;
}
.blog-page-current { pointer-events: none; }

.blog-empty-state {
    text-align: center;
    padding: 5rem 1rem;
    max-width: 500px;
    margin: 0 auto;
}
.blog-empty-icon { font-size: 3rem; color: rgba(255,0,0,0.2); display: block; margin-bottom: 1rem; }
.blog-empty-state h3 { margin-bottom: 0.75rem; }
.blog-empty-state p { color: var(--color-text-gray); }

.blog-cta-section { background: var(--color-bg-light); padding: 3rem 0; border-top: 1px solid rgba(0,0,0,0.06); }

.blog-cta-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    max-width: 860px;
    margin: 0 auto;
    flex-wrap: wrap;
}
.blog-cta-box h3 { margin-bottom: 0.25rem; font-size: 1.1rem; }
.blog-cta-box p  { color: var(--color-text-gray); font-size: 0.9rem; margin: 0; }

/* ==========================================================================
   IMAGE COMPONENTS
   ========================================================================== */

/* About story image */
.about-story-img-wrap {
    margin-top: 2rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}
.about-story-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: center center;
    display: block;
    transition: transform 0.5s ease;
}
.about-story-img-wrap:hover .about-story-img { transform: scale(1.03); }

/* Contact visual image */
.contact-visual {
    margin-top: 1.5rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}
.contact-visual-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 220px;
}

/* AI visual strip */
.ai-visual-strip {
    position: relative;
    height: 200px;
    overflow: hidden;
}
.ai-visual-strip-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: brightness(0.35) saturate(0.5);
}
.ai-visual-strip-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,0,0,0.25) 0%, rgba(0,230,118,0.12) 100%);
}
.ai-visual-strip-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ai-visual-strip-text span {
    font-family: 'Space Grotesk', monospace;
    font-size: clamp(0.75rem, 2vw, 1rem);
    font-weight: 600;
    letter-spacing: 0.15em;
    color: rgba(255,255,255,0.7);
    text-align: center;
    padding: 0 1rem;
}
@media (max-width: 640px) { .ai-visual-strip { height: 120px; } }

/* Lazy image fade-in */
img.lazy { opacity: 0; transition: opacity 0.5s ease; }
img.lazy.loaded { opacity: 1; }

/* ==========================================================================
   SCROLL TO TOP BUTTON
   ========================================================================== */

#scroll-top-btn {
    position: fixed;
    bottom: 1.75rem;
    left: 1.25rem;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 18px rgba(220,0,0,0.35);
    z-index: 10001;
    transform: translateX(-80px);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 0.3s ease,
                box-shadow 0.2s ease;
    pointer-events: none;
}
#scroll-top-btn.visible {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}
#scroll-top-btn:hover {
    box-shadow: 0 6px 24px rgba(220,0,0,0.55);
    transform: translateX(0) translateY(-3px);
}
#scroll-top-btn .material-icons {
    font-size: 1.6rem;
    line-height: 1;
}

/* ============================================================
   Blog Search
   ============================================================ */
.blog-search-form {
    margin-top: 2rem;
    max-width: 600px;
}

.blog-search-wrap {
    display: flex;
    align-items: center;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 50px;
    padding: 0.4rem 0.4rem 0.4rem 1.1rem;
    gap: 0.5rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.blog-search-wrap:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 2px 12px rgba(230,30,30,0.12);
}

.blog-search-icon-input {
    color: #888;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.blog-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--color-text-dark);
    font-size: 0.95rem;
    font-family: inherit;
    min-width: 0;
}

.blog-search-input::placeholder {
    color: #aaa;
}

.blog-search-input::-webkit-search-cancel-button {
    display: none;
}

.blog-search-btn {
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 0.55rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s, transform 0.15s;
    font-family: inherit;
}

.blog-search-btn:hover {
    background: var(--color-primary-dark, #c01010);
    transform: translateY(-1px);
}

.blog-search-clear {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    transition: color 0.2s, background 0.2s;
    text-decoration: none;
}

.blog-search-clear:hover {
    color: var(--color-primary);
    background: rgba(230,30,30,0.08);
}

.blog-search-clear .material-icons {
    font-size: 1.1rem;
}

/* Search results info bar */
.blog-search-results-info {
    margin-bottom: 1.5rem;
    padding: 0.85rem 1.25rem;
    background: #f8f5f5;
    border-left: 3px solid var(--color-primary);
    border-radius: 0 8px 8px 0;
    font-size: 0.95rem;
    color: #555;
}

.blog-search-results-info strong {
    color: var(--color-text-dark);
}

@media (max-width: 600px) {
    .blog-search-form {
        max-width: 100%;
    }

    .blog-search-btn {
        padding: 0.55rem 0.9rem;
        font-size: 0.85rem;
    }
}


/* ─── Category Filter (blog listing) ─────────────────────────────────────── */
.blog-category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
    max-width: 860px;
    margin-left: auto;
    margin-right: auto;
}

.category-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.85rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    background: var(--color-gray-100, #f3f4f6);
    color: var(--color-text-gray, #555);
    text-decoration: none;
    border: 1.5px solid transparent;
    transition: all 0.18s ease;
}

.category-tag:hover {
    background: var(--color-primary-light, #e6fff5);
    color: var(--color-primary, #00e676);
    border-color: var(--color-primary, #00e676);
}

.category-tag.active {
    background: var(--color-primary, #00e676);
    color: #111;
    border-color: var(--color-primary, #00e676);
}

.category-count {
    background: rgba(0,0,0,0.08);
    border-radius: 999px;
    padding: 0 0.4rem;
    font-size: 0.72rem;
    font-weight: 700;
}

.category-tag.active .category-count {
    background: rgba(0,0,0,0.15);
}

/* ─── Card category tag (article cards) ──────────────────────────────────── */
.card-meta-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.card-category-tag {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: var(--color-primary-light, #e6fff5);
    color: var(--color-primary-dark, #00b356);
    text-decoration: none;
    transition: background 0.15s;
}

.card-category-tag:hover {
    background: var(--color-primary, #00e676);
    color: #111;
}

/* ─── Article page category badge & author link ───────────────────────────── */
.article-category-badge {
    display: inline-block;
    padding: 0.2rem 0.75rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: var(--color-primary-light, #e6fff5);
    color: var(--color-primary-dark, #00b356);
    text-decoration: none;
    margin-bottom: 0.6rem;
    transition: background 0.15s;
}

.article-category-badge:hover {
    background: var(--color-primary, #00e676);
    color: #111;
}

.article-author-link {
    color: inherit;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px dotted currentColor;
}

.article-author-link:hover {
    color: var(--color-primary, #00e676);
    border-bottom-style: solid;
}

/* ─── Author Profile Page (autor.php) ─────────────────────────────────────── */
.author-hero {
    padding: 3rem 0;
}

.author-profile-wrap {
    display: flex;
    gap: 2.5rem;
    align-items: flex-start;
}

.author-avatar {
    flex-shrink: 0;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--color-primary, #00e676);
    background: var(--color-primary-light, #e6fff5);
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-avatar-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-primary-dark, #00b356);
    background: var(--color-primary-light, #e6fff5);
}

.author-intro {
    flex: 1;
}

.author-job-title {
    font-size: 1rem;
    color: var(--color-gray-500, #666);
    margin: 0.25rem 0 1.25rem;
}

.author-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.author-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.author-stat strong {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--color-primary, #00e676);
    line-height: 1;
}

.author-stat span {
    font-size: 0.75rem;
    color: var(--color-gray-500, #666);
    margin-top: 0.2rem;
}

.author-links {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.author-linkedin {
    display: inline-flex;
    align-items: center;
}

/* Bio + sidebar grid */
.author-content-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 3rem;
    align-items: start;
}

.author-bio p {
    margin-bottom: 1rem;
    line-height: 1.75;
}

.author-skills-box {
    background: var(--color-surface, #1a1a1a);
    border: 1px solid var(--color-border, #2a2a2a);
    border-radius: var(--border-radius-lg, 12px);
    padding: 1.5rem;
}

.author-skills-box h3 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-gray-400, #888);
    margin: 0 0 1rem;
}

.author-expertise-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.expertise-tag {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--color-primary-light, #e6fff5);
    color: var(--color-primary-dark, #00b356);
    border: 1px solid var(--color-primary, #00e676);
}

.author-stack-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.author-stack-list li {
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--color-text-secondary, #ccc);
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--color-border, #2a2a2a);
}

.author-stack-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.author-stack-list strong {
    color: var(--color-text, #eee);
    font-weight: 700;
}

/* Responsive */
@media (max-width: 768px) {
    .author-profile-wrap {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .author-stats {
        justify-content: center;
    }

    .author-links {
        justify-content: center;
    }

    .author-content-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}
