/*
Theme Name: Artech Szczytno
Theme URI: https://monitoringszczytno.pl
Author: Adrian Antosiak
Author URI: mailto:aantosiak@icloud.com
Description: Custom theme for Artech - professional security systems in Szczytno
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: artech-szczytno
*/

:root {
    --dark: #1a1f2e;
    --dark-light: #242b3d;
    --dark-lighter: #2d3548;
    --accent: #5B9BD5;
    --accent-glow: rgba(91, 155, 213, 0.4);
    --white: #ffffff;
    --gray-100: #f0f2f5;
    --gray-200: #e1e5eb;
    --gray-400: #b0b9c3;
    --accent-border: rgba(91, 155, 213, 0.15);
    --gray-500: #6b7280;
    --header-height: 90px;
    --section-padding-top: calc(var(--header-height) + 2rem);
    --section-padding-mobile: 2rem;
}

/* Light mode */
[data-theme="light"] {
    --dark: #ffffff;
    --dark-light: #f5f7fa;
    --dark-lighter: #e8ecf1;
    --white: #1a1f2e;
    --gray-100: #2d3548;
    --gray-200: #3d4559;
    --gray-400: #4a5568;
    --gray-500: #64748b;
    --accent-border: rgba(91, 155, 213, 0.25);
}

/* Theme transition */
html, html * {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
html.no-transition, html.no-transition * {
    transition: none !important;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + 1.5rem);
    overflow-x: hidden;
}

body {
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    color: var(--gray-400);
    background: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* Typography */
h1, h2, h3, h4 {
    font-weight: 200;
    color: var(--white);
    letter-spacing: 0.02em;
}

h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    line-height: 1.1;
}

h2 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    line-height: 1.2;
}

h3 {
    font-size: 1.25rem;
    font-weight: 300;
}

/* Optymalna szerokość linii */
p {
    max-width: 65ch;
}

.section-header p {
    max-width: 50ch;
    margin-left: auto;
    margin-right: auto;
}

/* Tighter letter-spacing dla dużych nagłówków na mobile */
@media (max-width: 767px) {
    h1, h2 {
        letter-spacing: -0.01em;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 480px) {
    .container { padding: 0 1.25rem; }
}

@media (min-width: 768px) {
    .container { padding: 0 1.5rem; }
}

@media (min-width: 1024px) {
    .container { padding: 0 2rem; }
}

@media (min-width: 1440px) {
    .container { max-width: 1400px; }
}

/* Frame accent */
.frame {
    position: relative;
    padding: 2rem;
}

.frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 1px solid rgba(91, 155, 213, 0.3);
    pointer-events: none;
}

/* Section label */
.section-label {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1rem;
}

.section-label::before {
    content: '';
    width: 40px;
    height: 1px;
    background: var(--accent);
}

.section-label a {
    color: var(--accent);
    text-decoration: none;
}

.section-label a:visited {
    color: var(--accent);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    min-height: 44px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    border: 1px solid;
    transition: all 0.3s ease;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    user-select: none;
    position: relative;
    z-index: 5;
}

.btn:active {
    transform: scale(0.98);
    transition-duration: 0.1s;
}

.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--dark);
    animation: btnPulse 2.5s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

/* Scan line effect on button */
.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 100%
    );
    transition: left 0.6s ease;
    pointer-events: none;
}

@keyframes btnPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(91, 155, 213, 0.4); }
    50% { box-shadow: 0 0 24px 4px rgba(91, 155, 213, 0.25); }
}

@media (hover: hover) {
    .btn-primary:hover {
        background: transparent;
        color: var(--accent);
        box-shadow: 0 0 32px var(--accent-glow),
                    inset 0 0 20px rgba(91, 155, 213, 0.1);
        transform: translateY(-2px);
        animation: none;
    }

    .btn-primary:hover::before {
        left: 100%;
    }
}

.btn-primary:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 0 16px var(--accent-glow);
}

.btn-outline {
    background: transparent;
    border-color: var(--white);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

/* Fill animation from left */
.btn-outline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--white);
    transition: width 0.35s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: -1;
    pointer-events: none;
}

@media (hover: hover) {
    .btn-outline:hover,
    .btn-outline:visited:hover {
        color: var(--dark);
        border-color: var(--white);
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    }

    .btn-outline:hover::before {
        width: 100%;
    }
}

.btn-outline:active {
    transform: translateY(0) scale(0.98);
}

.btn-outline:visited {
    color: var(--white);
}

/* ========================================
   HEADER
======================================== */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1rem 0;
    background: rgba(26, 31, 46, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(91, 155, 213, 0.1);
    transition: all 0.3s ease;
}

header.scrolled {
    padding: 0.75rem 0;
    background: rgba(26, 31, 46, 0.98);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15),
                0 0 1px rgba(91, 155, 213, 0.2);
}

/* Light mode header */
[data-theme="light"] header {
    background: rgba(255, 255, 255, 0.95);
    border-bottom-color: rgba(91, 155, 213, 0.15);
}

[data-theme="light"] header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08),
                0 0 1px rgba(91, 155, 213, 0.15);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 90px;
    width: auto;
}

footer .logo img {
    height: 70px;
}

@media (max-width: 767px) {
    .logo img {
        height: 60px;
    }

    footer .logo img {
        height: 50px;
    }
}

nav {
    display: none;
}

@media (min-width: 768px) {
    nav {
        display: flex;
        gap: 2.5rem;
    }
}

nav a {
    color: var(--gray-400);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 300;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.35s cubic-bezier(0.23, 1, 0.32, 1),
                left 0.35s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 0 6px rgba(91, 155, 213, 0);
}

nav a:hover {
    color: var(--white);
}

nav a:hover::after {
    width: 100%;
    left: 0;
    box-shadow: 0 0 6px rgba(91, 155, 213, 0.6);
}

nav a:focus,
nav a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.mobile-nav a:focus,
.mobile-nav a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.header-cta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.phone-link {
    display: none;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0.05em;
}

@media (min-width: 640px) {
    .phone-link {
        display: flex;
    }
}

.phone-link svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.mobile-menu-btn {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
    align-items: center;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

@media (min-width: 768px) {
    .mobile-menu-btn {
        display: none;
    }
}

.mobile-menu-btn span {
    width: 24px;
    height: 1px;
    background: var(--white);
    transition: 0.3s;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

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

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
}

/* Theme toggle button */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: 1px solid var(--accent-border);
    cursor: pointer;
    transition: all 0.3s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.theme-toggle:active {
    background: rgba(91, 155, 213, 0.2);
    transform: scale(0.95);
}

.theme-toggle:hover {
    border-color: var(--accent);
    background: rgba(91, 155, 213, 0.1);
}

.theme-toggle:focus,
.theme-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    stroke: var(--accent);
    fill: none;
    stroke-width: 1.5;
}

/* Sun icon (shown in dark mode) */
.theme-icon-sun {
    display: block;
}

/* Moon icon (shown in light mode) */
.theme-icon-moon {
    display: none;
}

[data-theme="light"] .theme-icon-sun {
    display: none;
}

[data-theme="light"] .theme-icon-moon {
    display: block;
}

/* Mobile toggle */
.theme-toggle--mobile {
    margin-top: 1.5rem;
    width: 100%;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
}

.theme-toggle--mobile::after {
    content: 'Zmień motyw';
    font-size: 0.9rem;
    color: var(--gray-400);
}

/* Logo variants */
.logo-light {
    display: none;
}

[data-theme="light"] .logo-dark {
    display: none;
}

[data-theme="light"] .logo-light {
    display: block;
}

/* Mobile Menu */
.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--dark);
    border-left: 1px solid rgba(91, 155, 213, 0.2);
    z-index: 99;
    transition: right 0.3s ease;
    padding: 5rem 2rem 2rem;
}

.mobile-nav.open {
    right: 0;
}

.mobile-nav a {
    display: block;
    color: var(--gray-400);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 300;
    padding: 1rem 0;
    min-height: 48px;
    border-bottom: 1px solid rgba(91, 155, 213, 0.1);
    transition: color 0.3s ease, padding-left 0.3s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.mobile-nav a:hover {
    color: var(--accent);
    padding-left: 0.5rem;
}

.mobile-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 98;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-nav-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 767px) {
    .mobile-nav,
    .mobile-nav-overlay {
        display: block;
    }
}

/* ========================================
   HERO
======================================== */
.hero {
    min-height: auto;
    display: flex;
    align-items: flex-start;
    padding: var(--section-padding-top) 0 3rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    animation: scanLine 4s ease-in-out infinite;
    opacity: 0.5;
    pointer-events: none;
}

@keyframes scanLine {
    0% { top: 0; opacity: 0; }
    10% { opacity: 0.5; }
    90% { opacity: 0.5; }
    100% { top: 100%; opacity: 0; }
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(91, 155, 213, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(91, 155, 213, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

@media (min-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
    }
}

.hero-text h1 {
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.hero-text h1 .accent {
    color: var(--accent);
}

.hero-description {
    font-size: 1.1rem;
    color: var(--gray-400);
    margin-bottom: 2rem;
    max-width: 480px;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
    position: relative;
    z-index: 10;
}

.hero-stats {
    display: flex;
    gap: 3rem;
}

.hero-stat {
    position: relative;
    padding-left: 1rem;
}

.hero-stat::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--accent);
}

.hero-stat-number {
    font-size: 2rem;
    font-weight: 200;
    color: var(--white);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.hero-stat-label {
    font-size: 0.8rem;
    color: var(--gray-500);
    letter-spacing: 0.05em;
}

/* Hero visual */
.hero-visual {
    position: relative;
}

.hero-frame {
    position: relative;
    aspect-ratio: 4/3;
}

.hero-frame::before,
.hero-frame::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 60px;
    border: 1px solid var(--accent);
    z-index: 2;
    transition: box-shadow 0.3s ease;
}

.hero-frame:hover::before,
.hero-frame:hover::after {
    box-shadow: 0 0 15px rgba(91, 155, 213, 0.4);
}

.hero-frame::before {
    top: -10px;
    left: -10px;
    border-right: none;
    border-bottom: none;
}

.hero-frame::after {
    bottom: -10px;
    right: -10px;
    border-left: none;
    border-top: none;
}

@media (max-width: 639px) {
    .hero-frame::before,
    .hero-frame::after {
        width: 40px;
        height: 40px;
    }

    .hero-frame::before {
        top: -5px;
        left: -5px;
    }

    .hero-frame::after {
        bottom: -5px;
        right: -5px;
    }
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(20%);
}

.hero-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(26, 31, 46, 0.3) 0%, transparent 50%);
    pointer-events: none;
}

/* Scroll Indicator - hidden since hero no longer fills viewport */
.scroll-indicator {
    display: none;
}

@keyframes fadeInUp {
    to { opacity: 1; }
}

.scroll-indicator span {
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gray-500);
}

.scroll-indicator-mouse {
    width: 24px;
    height: 40px;
    border: 1px solid var(--accent);
    border-radius: 12px;
    position: relative;
}

.scroll-indicator-wheel {
    width: 4px;
    height: 8px;
    background: var(--accent);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollWheel 1.5s ease-in-out infinite;
}

@keyframes scrollWheel {
    0%, 100% { opacity: 1; top: 8px; }
    50% { opacity: 0.3; top: 20px; }
}

/* ========================================
   SERVICES
======================================== */
.services,
.about,
.portfolio,
.news,
.contact {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 4rem 0 3rem;
}

@media (min-width: 768px) {
    .services,
    .about,
    .portfolio,
    .news,
    .contact {
        min-height: auto;
    }
}

@media (max-width: 767px) {
    .services,
    .about,
    .portfolio,
    .news,
    .contact {
        padding: 2.5rem 0 2rem;
    }
}

.services {
    background: var(--dark-light);
    position: relative;
}

.services::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.3;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

@media (max-width: 767px) {
    .section-header {
        margin-bottom: 2.5rem;
    }
}

.section-header .section-label {
    justify-content: center;
}

.section-header .section-label::before {
    display: none;
}

.section-header p {
    margin-top: 1rem;
    color: var(--gray-500);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.service-card {
    padding: 2rem;
    background: var(--dark);
    border: 1px solid var(--accent-border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
                border-color 0.3s ease,
                box-shadow 0.4s ease;
    position: relative;
    overflow: hidden;
}

/* Top accent line */
.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--accent) 0%, rgba(91, 155, 213, 0.5) 50%, var(--accent) 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    pointer-events: none;
}

/* Corner scan effect */
.service-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40px;
    height: 40px;
    border-top: 1px solid transparent;
    border-right: 1px solid transparent;
    transition: border-color 0.3s ease 0.1s,
                box-shadow 0.3s ease 0.1s;
    pointer-events: none;
}

.service-card:hover {
    border-color: var(--accent);
    transform: translateY(-8px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3),
                0 0 32px rgba(91, 155, 213, 0.15),
                inset 0 1px 0 rgba(91, 155, 213, 0.1);
}

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

.service-card:hover::after {
    border-top-color: var(--accent);
    border-right-color: var(--accent);
    box-shadow: 0 0 8px rgba(91, 155, 213, 0.4);
}

.service-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--accent);
    color: var(--accent);
    position: relative;
    transition: background-color 0.3s ease,
                box-shadow 0.3s ease,
                transform 0.3s ease;
}

.service-card:hover .service-icon {
    background: rgba(91, 155, 213, 0.1);
    box-shadow: 0 0 20px rgba(91, 155, 213, 0.3);
    transform: scale(1.05);
}

.service-icon svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
    transition: transform 0.3s ease;
}

.service-card:hover .service-icon svg {
    transform: scale(1.15);
}

.service-card h3 {
    margin-bottom: 0.75rem;
}

.service-card p {
    font-size: 0.9rem;
    line-height: 1.7;
}

/* ========================================
   ABOUT
======================================== */
.about {
    background: var(--dark);
}

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

@media (min-width: 1024px) {
    .about-content {
        grid-template-columns: 1fr 1fr;
    }
}

.about-visual {
    position: relative;
}

.about-frame {
    position: relative;
}

.about-frame::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    right: -20px;
    bottom: -20px;
    border: 1px solid var(--accent);
    z-index: -1;
}

@media (max-width: 767px) {
    .about-frame::before {
        right: 0;
        bottom: -10px;
        left: 10px;
        top: 10px;
    }
}

.about-image {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    filter: grayscale(30%);
}

.about-badge {
    position: absolute;
    bottom: -30px;
    right: 40px;
    background: var(--accent);
    color: var(--dark);
    padding: 1.25rem 1.75rem;
    text-align: center;
}

.about-badge strong {
    display: block;
    font-size: 2.5rem;
    font-weight: 200;
    line-height: 1;
}

.about-badge span {
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.about-text h2 {
    margin-bottom: 1.5rem;
}

.about-text p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.about-features {
    margin: 2rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.about-feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--gray-400);
}

.about-feature svg {
    width: 16px;
    height: 16px;
    fill: var(--accent);
    flex-shrink: 0;
}

/* ========================================
   PORTFOLIO
======================================== */
.portfolio {
    background: var(--dark-light);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

a.portfolio-item,
.portfolio-item {
    position: relative;
    aspect-ratio: 1/1;
    overflow: hidden;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(91, 155, 213, 0.3);
    -webkit-touch-callout: none;
    user-select: none;
    text-decoration: none;
    display: block;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(40%);
    transition: filter 0.5s ease,
                transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    opacity: 0;
}

.portfolio-item img.loaded {
    opacity: 1;
}

.portfolio-item:hover img {
    filter: grayscale(0%) brightness(1.05);
    transform: scale(1.08);
}

.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent 40%, rgba(26, 31, 46, 0.95) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    opacity: 1;
    transition: all 0.3s ease;
    pointer-events: none;
}

.portfolio-item:hover .portfolio-overlay {
    background: linear-gradient(transparent 20%, rgba(26, 31, 46, 0.9) 100%);
}

/* Light mode portfolio overlay */
[data-theme="light"] .portfolio-overlay {
    background: linear-gradient(transparent 40%, rgba(255, 255, 255, 0.95) 100%);
}

[data-theme="light"] .portfolio-item:hover .portfolio-overlay {
    background: linear-gradient(transparent 20%, rgba(255, 255, 255, 0.9) 100%);
}

.portfolio-overlay h3 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.portfolio-overlay span {
    font-size: 0.8rem;
    color: var(--accent);
    letter-spacing: 0.05em;
}

.portfolio-item::before,
.portfolio-item::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    border: 1px solid var(--accent);
    z-index: 2;
    opacity: 0;
    transition: opacity 0.35s ease,
                transform 0.35s cubic-bezier(0.23, 1, 0.32, 1),
                box-shadow 0.35s ease;
    pointer-events: none;
}

.portfolio-item::before {
    top: 15px;
    left: 15px;
    border-right: none;
    border-bottom: none;
    transform: translate(-8px, -8px);
}

.portfolio-item::after {
    bottom: 15px;
    right: 15px;
    border-left: none;
    border-top: none;
    transform: translate(8px, 8px);
}

.portfolio-item:hover::before,
.portfolio-item:hover::after {
    opacity: 1;
    transform: translate(0, 0);
    box-shadow: 0 0 12px rgba(91, 155, 213, 0.5);
}

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

/* ========================================
   TOUCH-FRIENDLY IMPROVEMENTS
======================================== */

/* Touch devices - active states */
@media (hover: none) and (pointer: coarse) {
    /* Portfolio items */
    .portfolio-item:active img {
        filter: grayscale(0%);
        transform: scale(1.02);
    }

    .portfolio-item:active .portfolio-overlay {
        background: linear-gradient(transparent 20%, rgba(26, 31, 46, 0.9) 100%);
    }

    [data-theme="light"] .portfolio-item:active .portfolio-overlay {
        background: linear-gradient(transparent 20%, rgba(255, 255, 255, 0.9) 100%);
    }

    .portfolio-item:active::before,
    .portfolio-item:active::after {
        opacity: 1;
    }

    /* Service cards */
    .service-card:active {
        border-color: var(--accent);
        transform: translateY(-4px);
    }

    .service-card:active::before {
        transform: scaleX(1);
    }

    /* News cards */
    .news-card:active {
        border-color: var(--accent);
        transform: translateY(-3px);
    }

    /* Contact methods */
    .contact-method:active {
        border-color: var(--accent);
        transform: translateX(3px);
    }

    /* Social links */
    .social-link:active {
        background: var(--accent);
        border-color: var(--accent);
    }

    .social-link:active svg {
        fill: var(--dark);
    }

    /* Nav links in mobile menu */
    .mobile-nav a:active {
        color: var(--accent);
        padding-left: 0.5rem;
    }
}

/* ========================================
   REVIEWS
======================================== */
.reviews {
    padding: 6rem 0;
    background: var(--dark);
}

.reviews-container {
    max-width: 900px;
    margin: 0 auto;
}

/* ========================================
   NEWS
======================================== */
.news {
    background: var(--dark);
}

.news-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .news-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.news-card {
    position: relative;
    background: var(--dark);
    border: 1px solid var(--accent-border);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
                border-color 0.3s ease,
                box-shadow 0.4s ease;
    overflow: hidden;
}

/* Accent corner */
.news-card::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 2;
    pointer-events: none;
}

.news-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 2px;
    height: 60px;
    background: var(--accent);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1) 0.1s;
    z-index: 2;
    pointer-events: none;
}

.news-card h3 a::after {
    content: '';
    position: absolute;
    inset: 0;
}

.news-card:hover {
    border-color: var(--accent);
    transform: translateY(-6px);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.25),
                0 0 24px rgba(91, 155, 213, 0.1);
}

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

.news-card:hover::after {
    transform: scaleY(1);
}

.news-card-image {
    aspect-ratio: 16/9;
    overflow: hidden;
}

.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(30%);
    transition: all 0.5s ease;
}

.news-card:hover .news-card-image img {
    filter: grayscale(0%);
    transform: scale(1.05);
}

.news-card-content {
    padding: 1.5rem;
}

.news-card-date {
    font-size: 0.75rem;
    color: var(--accent);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.news-card h3 {
    margin-bottom: 0.75rem;
}

.news-card h3 a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s ease;
}

.news-card h3 a:hover {
    color: var(--accent);
}

.news-card p {
    font-size: 0.9rem;
    line-height: 1.7;
}

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

/* ========================================
   CONTACT
======================================== */
.contact {
    background: var(--dark-light);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
}

@media (min-width: 1024px) {
    .contact-content {
        grid-template-columns: 1fr 1fr;
    }
}

.contact-info h2 {
    margin-bottom: 1.5rem;
}

.contact-info > p {
    margin-bottom: 2rem;
    line-height: 1.8;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    min-height: 80px;
    background: var(--dark-light);
    border: 1px solid var(--accent-border);
    text-decoration: none;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
                border-color 0.3s ease,
                box-shadow 0.3s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    position: relative;
    overflow: hidden;
}

/* Left accent bar */
.contact-method::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--accent);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1);
    pointer-events: none;
}

.contact-method:hover {
    border-color: var(--accent);
    transform: translateX(8px);
    box-shadow: -4px 0 16px rgba(91, 155, 213, 0.15),
                0 4px 12px rgba(0, 0, 0, 0.1);
}

.contact-method:hover::before {
    transform: scaleY(1);
}

.contact-method-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--accent);
    flex-shrink: 0;
    transition: background-color 0.3s ease,
                box-shadow 0.3s ease,
                transform 0.3s ease;
}

.contact-method:hover .contact-method-icon {
    background: rgba(91, 155, 213, 0.15);
    box-shadow: 0 0 16px rgba(91, 155, 213, 0.3);
    transform: scale(1.08);
}

.contact-method-icon svg {
    width: 20px;
    height: 20px;
    fill: var(--accent);
}

.contact-method-content strong {
    display: block;
    color: var(--white);
    font-weight: 400;
    margin-bottom: 0.25rem;
}

.contact-method-content span {
    font-size: 0.85rem;
    color: var(--gray-500);
}

.contact-map {
    position: relative;
    min-height: 400px;
    background: var(--dark-light);
    border: 1px solid var(--accent-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
    overflow: hidden;
}

.contact-map iframe {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    border: 0;
    filter: grayscale(60%) invert(92%) hue-rotate(180deg);
}

[data-theme="light"] .contact-map iframe {
    filter: grayscale(20%);
}

.contact-map::before,
.contact-map::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    border: 1px solid var(--accent);
    z-index: 2;
}

.contact-map::before {
    top: -1px;
    left: -1px;
    border-right: none;
    border-bottom: none;
}

.contact-map::after {
    bottom: -1px;
    right: -1px;
    border-left: none;
    border-top: none;
}

/* ========================================
   FOOTER
======================================== */
footer {
    padding: 4rem 0 2rem;
    background: var(--dark);
    border-top: 1px solid rgba(91, 155, 213, 0.1);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .footer-content {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }
}

.footer-brand p {
    margin-top: 1rem;
    font-size: 0.875rem;
    max-width: 280px;
}

.footer-column h4 {
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
    color: var(--accent);
}

.footer-column ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-column a {
    color: var(--gray-500);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.footer-column a:hover {
    color: var(--white);
}

.footer-column li:not(:has(a)) {
    color: var(--gray-500);
    font-size: 0.875rem;
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(91, 155, 213, 0.1);
    text-align: center;
}

@media (min-width: 640px) {
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

.footer-bottom p {
    font-size: 0.8rem;
    color: var(--gray-500);
}

.social-links {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

@media (min-width: 640px) {
    .social-links {
        justify-content: flex-start;
    }
}

.social-link {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(91, 155, 213, 0.3);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                background-color 0.3s ease,
                border-color 0.3s ease,
                box-shadow 0.3s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    position: relative;
}

.social-link:hover {
    background: var(--accent);
    border-color: var(--accent);
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 8px 20px rgba(91, 155, 213, 0.35);
}

.social-link svg {
    width: 16px;
    height: 16px;
    fill: var(--gray-400);
    transition: fill 0.3s ease,
                transform 0.3s ease;
}

.social-link:hover svg {
    fill: var(--dark);
    transform: scale(1.1);
}

/* ========================================
   ANIMATIONS
======================================== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    filter: blur(4px);
    transition: opacity 0.7s cubic-bezier(0.23, 1, 0.32, 1),
                transform 0.7s cubic-bezier(0.23, 1, 0.32, 1),
                filter 0.7s cubic-bezier(0.23, 1, 0.32, 1);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.7s cubic-bezier(0.23, 1, 0.32, 1),
                transform 0.7s cubic-bezier(0.23, 1, 0.32, 1);
}

.reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.7s cubic-bezier(0.23, 1, 0.32, 1),
                transform 0.7s cubic-bezier(0.23, 1, 0.32, 1);
}

.reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

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

    .reveal, .reveal-left, .reveal-right {
        opacity: 1;
        transform: none;
    }

    .hero::before {
        animation: none;
    }
}

/* ========================================
   ARCHIVE PAGES
======================================== */
.archive-header {
    padding: calc(80px + 4rem) 0 4rem;
    background: var(--dark);
    text-align: center;
}

.archive-header h1 {
    margin-bottom: 1rem;
}

.archive-header p {
    color: var(--gray-500);
    max-width: 500px;
    margin: 0 auto;
}

.archive-content {
    padding: 4rem 0;
    background: var(--dark-light);
}

.single-project {
    padding: var(--section-padding-top) 0 4rem;
}

/* Skip to main content link */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    background: var(--accent);
    color: var(--dark);
    padding: 0.75rem 1.5rem;
    z-index: 1000;
    font-weight: 400;
    text-decoration: none;
}

.skip-link:focus {
    top: 0;
}

/* Focus states for interactive elements */
.btn:focus,
.btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.portfolio-item:focus,
.portfolio-item:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.social-link:focus,
.social-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.contact-method:focus,
.contact-method:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* WPForms integration */
.wpforms-container {
    margin-top: 2rem;
}

.wpforms-form input,
.wpforms-form textarea {
    background: var(--dark-light) !important;
    border: 1px solid var(--accent-border) !important;
    color: var(--white) !important;
}

.wpforms-form input:focus,
.wpforms-form textarea:focus {
    border-color: var(--accent) !important;
}

.wpforms-form .wpforms-submit {
    background: var(--accent) !important;
    border-color: var(--accent) !important;
    color: var(--dark) !important;
}

/* WPForms light mode */
[data-theme="light"] .wpforms-form input,
[data-theme="light"] .wpforms-form textarea {
    background: var(--dark-light) !important;
    border: 1px solid var(--accent-border) !important;
    color: var(--white) !important;
}

[data-theme="light"] .wpforms-form .wpforms-submit {
    color: #ffffff !important;
}

/* ========================================
   NEWS TEXT-ONLY CARDS
======================================== */
.news-card--text-only {
    display: flex;
    flex-direction: column;
}

.news-card--text-only .news-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-card--text-only .news-card-content p {
    flex: 1;
}

.single-news-content {
    max-width: 800px;
}

.single-news-content p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

/* ========================================
   PROJECT GALLERY
======================================== */
.project-gallery {
    margin-bottom: 2rem;
}

.project-gallery-main {
    position: relative;
    margin-bottom: 1rem;
    background: var(--dark-light);
}

.project-gallery-main img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    display: block;
}

.gallery-lightbox-btn {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    width: 48px;
    height: 48px;
    background: rgba(26, 31, 46, 0.9);
    border: 1px solid var(--accent);
    color: var(--accent);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.gallery-lightbox-btn:active {
    background: var(--accent);
    color: var(--dark);
    transform: scale(0.95);
}

.gallery-lightbox-btn:hover {
    background: var(--accent);
    color: var(--dark);
}

.project-gallery-thumbs {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) var(--dark-light);
}

.project-gallery-thumbs::-webkit-scrollbar {
    height: 6px;
}

.project-gallery-thumbs::-webkit-scrollbar-track {
    background: var(--dark-light);
}

.project-gallery-thumbs::-webkit-scrollbar-thumb {
    background: var(--accent);
}

.gallery-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    padding: 0;
    border: 2px solid transparent;
    background: none;
    cursor: pointer;
    transition: border-color 0.3s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.gallery-thumb:active {
    border-color: var(--accent);
}

.gallery-thumb:active img {
    filter: grayscale(0%);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(50%);
    transition: filter 0.3s ease;
}

.gallery-thumb:hover img,
.gallery-thumb.active img {
    filter: grayscale(0%);
}

.gallery-thumb.active {
    border-color: var(--accent);
}

/* Portfolio gallery count badge */
.portfolio-gallery-count {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(26, 31, 46, 0.9);
    color: var(--accent);
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    z-index: 3;
    border: 1px solid var(--accent);
    pointer-events: none;
}

/* Lightbox */
.gallery-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-lightbox[hidden] {
    display: none;
}

.gallery-lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: none;
    border: none;
    color: var(--white);
    font-size: 2rem;
    cursor: pointer;
    padding: 1rem;
    min-width: 48px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.lightbox-close:active,
.lightbox-prev:active,
.lightbox-next:active {
    color: var(--accent);
    transform: scale(0.9);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    color: var(--accent);
}

.lightbox-close {
    top: 1rem;
    right: 1rem;
    font-size: 2.5rem;
}

.lightbox-prev {
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
}

.lightbox-next {
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
}

/* Portfolio Lightbox */
.portfolio-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portfolio-lightbox[hidden] {
    display: none;
}

.portfolio-lightbox img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
}

.portfolio-lightbox-counter {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--gray-400);
    font-size: 0.9rem;
    letter-spacing: 0.1em;
}

/* Portfolio item with gallery */
.portfolio-item.has-gallery {
    cursor: pointer;
}

.portfolio-item:not(.has-gallery) {
    cursor: default;
}

@media (min-width: 768px) {
    .gallery-thumb {
        width: 100px;
        height: 100px;
    }
}

/* ========================================
   EMPTY STATE
======================================== */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    border: 1px dashed rgba(91, 155, 213, 0.3);
    background: transparent;
}

.empty-state p {
    color: var(--gray-500);
    font-size: 1.1rem;
    font-style: italic;
}

/* ========================================
   PERFORMANCE & ACTIVE NAV
======================================== */

/* Performance: wyłącz blur na mobile */
@media (max-width: 767px) {
    .reveal {
        filter: none !important;
    }

    .reveal.revealed {
        filter: none !important;
    }
}

/* GPU acceleration dla headera */
header {
    will-change: transform;
    transform: translateZ(0);
}

/* Active nav states */
nav a.active,
.mobile-nav a.active {
    color: var(--accent);
}
