/* AP Serwis — per-widget styles (BEM with .ap- prefix) */

/* === NAVBAR (fixed top, visible while scrolling) === */
.ap-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--ap-border);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.2s ease;
}

/* Spacer so first section (hero) starts below the fixed navbar */
.ap-navbar + * { margin-top: 72px; }

/* When the page is scrolled, navbar gains a heavier shadow */
.ap-navbar.ap-scrolled {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.98);
}

.ap-navbar__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.ap-navbar__brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--ap-fg);
    font-weight: 800;
    font-size: 1.125rem;
}

.ap-navbar__brand img {
    height: 56px;
    max-height: 56px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
}

.ap-navbar__menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1.75rem;
}

.ap-navbar__menu a {
    color: var(--ap-fg);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.ap-navbar__menu a:hover { color: var(--ap-primary); }

.ap-navbar__cta {
    margin-left: 1rem;
}

.ap-navbar__toggle {
    display: none;
    background: transparent;
    border: 0;
    width: 40px;
    height: 40px;
    cursor: pointer;
    color: var(--ap-fg);
}

@media (max-width: 992px) {
    .ap-navbar__menu, .ap-navbar__cta { display: none; }
    .ap-navbar__toggle { display: inline-flex; align-items: center; justify-content: center; }
    .ap-navbar.ap-open .ap-navbar__menu {
        display: flex;
        position: absolute;
        top: 72px; left: 0; right: 0;
        background: #fff;
        flex-direction: column;
        padding: 1rem 1.25rem;
        gap: 1rem;
        border-bottom: 1px solid var(--ap-border);
        box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    }
    .ap-navbar.ap-open .ap-navbar__cta { display: inline-flex; margin: 1rem 1.25rem; }
}

/* === HERO (centered, React 1:1: light grey bg with subtle gradients, white headline) === */
.ap-hero--centered {
    position: relative;
    min-height: clamp(560px, 90vh, 820px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background:
        radial-gradient(circle at 30% 40%, hsl(40 55% 50% / 0.18), transparent 55%),
        radial-gradient(circle at 70% 70%, hsl(40 55% 40% / 0.14), transparent 50%),
        linear-gradient(180deg, hsl(0 0% 75%) 0%, hsl(0 0% 70%) 100%);
    color: #fff;
    padding: 5rem 1rem;
    text-align: center;
}

.ap-hero__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: rgba(38, 38, 38, 0.4);
    pointer-events: none;
}

/* When video bg is present, hide gradient bg & let overlay tint the video */
.ap-hero--video {
    background: #2a2a2a !important;
    color: #fff;
}

.ap-hero__media-wrap {
    position: absolute;
    inset: -10% 0 0 0;
    width: 100%;
    height: 120%;
    overflow: hidden;
    z-index: 0;
}

.ap-hero__video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    will-change: transform;
}

.ap-hero__inner {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.ap-hero__logo {
    width: 100%;
    display: flex;
    justify-content: center;
}

.ap-hero__logo img {
    width: 224px;
    max-width: 80%;
    height: auto;
    display: block;
    filter: drop-shadow(0 12px 28px rgba(0,0,0,0.18));
}

@media (max-width: 768px) {
    .ap-hero__logo img { width: 180px; }
}

.ap-hero__heading {
    font-size: 36px;
    font-weight: 200;
    line-height: 1.1;
    letter-spacing: 0.04em;
    margin: 0;
    color: #fff;
    text-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

@media (max-width: 480px) {
    .ap-hero__heading { font-size: 28px; }
}

.ap-hero__cta {
    display: flex;
    justify-content: center;
    margin-top: 0.5rem;
}

.ap-btn--lg {
    padding: 1.1rem 2.4rem;
    font-size: 1.05rem;
    border-radius: var(--ap-radius);
}

/* Editor preview: don't enforce 90vh in Elementor editor */
.elementor-editor-active .ap-hero--centered { min-height: 60vh; }

/* === ABOUT (text+bullet list, React 1:1) === */
.ap-about__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--ap-fg);
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: none;
    margin-bottom: 0.5rem;
}

.ap-about__dot {
    width: 8px;
    height: 8px;
    background: var(--ap-primary);
    border-radius: 50%;
    display: inline-block;
}

.ap-about__desc {
    max-width: 720px;
    margin: 0 auto 2.5rem;
    text-align: center;
    color: var(--ap-fg);
    font-size: 1.02rem;
    line-height: 1.7;
}

.ap-about__desc p {
    margin: 0 0 1rem;
}

.ap-about__list {
    list-style: none;
    margin: 0 auto;
    padding: 0;
    max-width: 820px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem 1.25rem;
}

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

.ap-about__list li {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    color: var(--ap-fg);
    font-size: 0.97rem;
    font-weight: 500;
    background: #fff;
    border: 1px solid var(--ap-border);
    border-radius: 999px;
    padding: 0.75rem 1.25rem;
    transition: transform 0.3s cubic-bezier(.22,.9,.3,1),
                box-shadow 0.3s ease,
                border-color 0.3s ease,
                background 0.3s ease,
                color 0.3s ease;
    cursor: default;
    position: relative;
    overflow: hidden;
}

.ap-about__list li::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, hsl(40 55% 50% / 0.08), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.ap-about__list li:hover {
    transform: translateY(-3px) translateX(4px);
    border-color: hsl(40 55% 50% / 0.45);
    box-shadow: 0 10px 28px -8px hsl(40 55% 50% / 0.3);
}

.ap-about__list li:hover::before { opacity: 1; }

.ap-about__list li > span:last-child {
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

.ap-about__list li:hover > span:last-child { color: var(--ap-primary-dark); }

.ap-about__check {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: hsl(40 55% 50% / 0.15);
    color: var(--ap-primary-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.35s ease, color 0.35s ease, transform 0.45s cubic-bezier(.22,.9,.3,1), box-shadow 0.35s ease;
    position: relative;
    z-index: 1;
}

.ap-about__check svg {
    width: 16px;
    height: 16px;
    transition: transform 0.5s cubic-bezier(.22,.9,.3,1);
}

.ap-about__list li:hover .ap-about__check {
    background: var(--ap-gradient);
    color: #fff;
    transform: scale(1.12) rotate(-8deg);
    box-shadow: 0 8px 18px hsl(40 55% 50% / 0.4);
}

.ap-about__list li:hover .ap-about__check svg {
    transform: rotate(8deg) scale(1.1);
}

@media (prefers-reduced-motion: reduce) {
    .ap-about__list li,
    .ap-about__list li::before,
    .ap-about__check,
    .ap-about__check svg { transition: none !important; }
}

/* === SERVICES (with rich hover animations) === */
.ap-services__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.ap-services__card {
    background: var(--ap-card);
    border: 1px solid var(--ap-border);
    border-radius: var(--ap-radius);
    padding: 2rem 1.75rem 1.75rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(.22,.9,.3,1), box-shadow 0.35s ease, border-color 0.35s ease;
    isolation: isolate;
}

/* Animated gradient bar at top of card (slides in on hover) */
.ap-services__card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--ap-gradient);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.45s cubic-bezier(.22,.9,.3,1);
    z-index: 1;
}

/* Soft glow halo behind icon (fades in on hover) */
.ap-services__card::after {
    content: '';
    position: absolute;
    top: -40px; left: -40px;
    width: 180px; height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, hsl(40 55% 50% / 0.18), transparent 65%);
    opacity: 0;
    transition: opacity 0.45s ease;
    z-index: 0;
    pointer-events: none;
}

.ap-services__card > * { position: relative; z-index: 2; }

.ap-services__card:hover {
    border-color: var(--ap-primary);
    transform: translateY(-6px);
    box-shadow: 0 24px 60px -20px hsl(40 55% 50% / 0.3);
}

.ap-services__card:hover::before { transform: scaleX(1); }
.ap-services__card:hover::after  { opacity: 1; }

.ap-services__icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: hsl(40 55% 50% / 0.10);
    color: var(--ap-primary-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    transition: background 0.35s ease, color 0.35s ease, transform 0.45s cubic-bezier(.22,.9,.3,1);
}

.ap-services__icon svg,
.ap-services__icon i {
    font-size: 28px;
    width: 28px;
    height: 28px;
    transition: transform 0.5s cubic-bezier(.22,.9,.3,1);
}

.ap-services__card:hover .ap-services__icon {
    background: var(--ap-gradient);
    color: #fff;
    transform: scale(1.08) rotate(-6deg);
    box-shadow: 0 14px 32px hsl(40 55% 50% / 0.4);
}

.ap-services__card:hover .ap-services__icon svg,
.ap-services__card:hover .ap-services__icon i {
    transform: rotate(6deg) scale(1.05);
}

.ap-services__title {
    font-size: 1.18rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    transition: color 0.25s ease;
}

.ap-services__card:hover .ap-services__title {
    color: var(--ap-primary-dark);
}

.ap-services__text {
    color: var(--ap-muted-fg);
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.55;
}

@media (prefers-reduced-motion: reduce) {
    .ap-services__card,
    .ap-services__card::before,
    .ap-services__card::after,
    .ap-services__icon,
    .ap-services__icon svg,
    .ap-services__icon i { transition: none !important; }
}

/* === TRANSMISSION TYPES === */
.ap-transmission__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.ap-transmission__card {
    background: var(--ap-card);
    border: 1px solid var(--ap-border);
    border-radius: var(--ap-radius);
    padding: 2rem;
    text-align: center;
    transition: all 0.25s ease;
}

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

.ap-transmission__name {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: var(--ap-fg);
}

.ap-transmission__desc {
    color: var(--ap-muted-fg);
    margin: 0;
    font-size: 0.9rem;
}

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

.ap-realization__card {
    background: var(--ap-card);
    border: 1px solid var(--ap-border);
    border-radius: var(--ap-radius);
    overflow: hidden;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
}

.ap-realization__card:hover {
    transform: translateY(-4px);
    box-shadow: var(--ap-shadow);
}

.ap-realization__image {
    aspect-ratio: 4/3;
    background: var(--ap-muted);
    overflow: hidden;
    position: relative;
    max-height: 240px;
}

.ap-realization__badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: var(--ap-gradient);
    color: #fff;
    padding: 0.3rem 0.7rem;
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: 999px;
    box-shadow: var(--ap-shadow);
    z-index: 2;
}

.ap-realization__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ap-realization__body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ap-realization__model {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 0.75rem;
}

.ap-realization__row {
    margin-bottom: 0.75rem;
}

.ap-realization__label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    color: var(--ap-primary-dark);
    margin-bottom: 0.25rem;
}

.ap-realization__text {
    color: var(--ap-fg);
    font-size: 0.95rem;
    margin: 0;
}

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

/* === Google rating badge (clickable) === */
.ap-google-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 1rem;
    padding: 0.55rem 1rem;
    background: #fff;
    border: 1px solid var(--ap-border);
    border-radius: 999px;
    text-decoration: none;
    color: var(--ap-fg);
    font-size: 0.92rem;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.ap-google-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px -8px rgba(0,0,0,0.12);
    border-color: hsl(40 55% 50% / 0.45);
}

.ap-google-badge__logo { display: inline-flex; align-items: center; }

.ap-google-badge__rating {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ap-fg);
}

.ap-google-badge__stars {
    color: var(--ap-primary);
    letter-spacing: 0.04em;
    font-size: 0.95rem;
}

.ap-google-badge__count {
    color: var(--ap-muted-fg);
    font-weight: 500;
    font-size: 0.85rem;
    border-left: 1px solid var(--ap-border);
    padding-left: 0.7rem;
    margin-left: 0.2rem;
}

@media (max-width: 480px) {
    .ap-google-badge__count {
        border-left: 0;
        padding-left: 0;
        margin-left: 0;
        flex-basis: 100%;
        text-align: center;
        font-size: 0.78rem;
    }
}

/* === Testimonials CTA buttons === */
.ap-testimonials__ctas {
    display: flex;
    justify-content: center;
    gap: 0.85rem;
    margin-top: 2.25rem;
    flex-wrap: wrap;
}

.ap-testimonials__ctas .ap-btn { gap: 0.55rem; }

@media (max-width: 480px) {
    .ap-testimonials__ctas .ap-btn { width: 100%; justify-content: center; }
}

.ap-testimonial {
    background: var(--ap-card);
    border: 1px solid var(--ap-border);
    border-radius: var(--ap-radius);
    padding: 1.75rem;
    transition: all 0.25s ease;
}

.ap-testimonial:hover {
    transform: translateY(-3px);
    box-shadow: var(--ap-shadow);
}

.ap-testimonial__head {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.ap-testimonial__avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--ap-gradient);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

.ap-testimonial__meta { flex: 1; min-width: 0; }

.ap-testimonial__author {
    font-weight: 700;
    color: var(--ap-fg);
    line-height: 1.2;
}

.ap-testimonial__date {
    font-size: 0.82rem;
    color: var(--ap-muted-fg);
    margin-top: 0.15rem;
}

.ap-testimonial__rating {
    color: var(--ap-primary);
    font-size: 1rem;
    margin-bottom: 0.75rem;
    letter-spacing: 0.1em;
}

.ap-testimonial__text {
    color: var(--ap-fg);
    font-style: italic;
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.55;
}

/* === GLOBAL CHROME (navbar/footer on non-homepage pages) === */
body:not(.elementor-page) .ap-navbar--global + * { margin-top: 0; }

body:not(.elementor-page) main,
body:not(.elementor-page) .wp-site-blocks {
    padding-top: 88px;
    padding-bottom: 4rem;
    max-width: var(--ap-container);
    margin: 0 auto;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

/* Hide theme's default header/footer when our global ones inject */
body:not(.elementor-page) .wp-block-template-part[data-slug="header"],
body:not(.elementor-page) header.wp-block-template-part,
body:not(.elementor-page) footer.wp-block-template-part,
body:not(.elementor-page) .wp-block-site-title,
body:not(.elementor-page) .wp-block-navigation--root,
body:not(.elementor-page) #site-header,
body:not(.elementor-page) #site-footer,
body:not(.elementor-page) .site-header,
body:not(.elementor-page) .site-footer { display: none !important; }

/* Single post + archive layout */
body.single-post main,
body.blog main,
body.archive main,
body.page main {
    background: #fff;
    border-radius: var(--ap-radius);
    padding: 2.5rem 2rem !important;
    box-shadow: 0 8px 30px rgba(0,0,0,0.04);
    margin-top: 100px !important;
    margin-bottom: 3rem;
}

@media (max-width: 768px) {
    body.single-post main,
    body.blog main,
    body.archive main,
    body.page main { padding: 1.5rem 1.25rem !important; margin-top: 84px !important; }
}

body.single-post .entry-title,
body.single-post h1.wp-block-post-title,
body.single-post .wp-block-post-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 0.75rem;
    color: var(--ap-fg);
}

body.single-post .wp-block-post-date,
body.single-post .entry-meta {
    font-size: 0.88rem;
    color: var(--ap-muted-fg);
    margin-bottom: 1.5rem;
    display: block;
}

body.single-post .wp-block-post-featured-image,
body.single-post .post-thumbnail {
    margin: 1.5rem -2rem 2rem;
    border-radius: 0;
    overflow: hidden;
}

body.single-post .wp-block-post-featured-image img,
body.single-post .post-thumbnail img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

body.single-post .ap-blog-content,
body.single-post .wp-block-post-content,
body.single-post .entry-content {
    font-size: 1.02rem;
    line-height: 1.75;
    color: var(--ap-fg);
    max-width: 720px;
    margin: 0 auto;
}

body.single-post .ap-blog-content h2,
body.single-post .wp-block-post-content h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 2.5rem 0 1rem;
    color: var(--ap-fg);
}

body.single-post .ap-blog-content h3,
body.single-post .wp-block-post-content h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 1.75rem 0 0.75rem;
    color: var(--ap-fg);
}

body.single-post .ap-blog-content p { margin: 0 0 1.1rem; }
body.single-post .ap-blog-content ul,
body.single-post .ap-blog-content ol { margin: 0 0 1.25rem 1.25rem; padding: 0; }
body.single-post .ap-blog-content ul li,
body.single-post .ap-blog-content ol li { margin-bottom: 0.4rem; }
body.single-post .ap-blog-content strong { color: var(--ap-primary-dark); font-weight: 700; }
body.single-post .ap-blog-content a {
    color: var(--ap-primary-dark);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}
body.single-post .ap-blog-content a:hover { color: var(--ap-primary); }
body.single-post .ap-blog-content hr {
    border: 0;
    border-top: 2px solid var(--ap-border);
    margin: 2rem 0;
}

/* === Blog archive — cards grid matching home blog widget === */
body.blog main,
body.archive main {
    background: transparent !important;
    box-shadow: none !important;
    padding: 100px 1.25rem 3rem !important;
    max-width: var(--ap-container) !important;
}

/* Blog page H1 */
body.blog main h1.wp-block-heading,
body.archive main h1.wp-block-heading {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    text-align: center;
    margin: 0 0 2.5rem;
    color: var(--ap-fg);
}

/* Force grid on the post template */
body.blog .wp-block-post-template,
body.archive .wp-block-post-template,
body.blog ul.wp-block-post-template,
body.archive ul.wp-block-post-template {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)) !important;
    gap: 1.5rem !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

body.blog .wp-block-post,
body.archive .wp-block-post {
    list-style: none !important;
    background: #fff;
    border: 1px solid var(--ap-border);
    border-radius: var(--ap-radius);
    overflow: hidden;
    padding: 0 !important;
    margin: 0 !important;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    display: flex;
    flex-direction: column;
}

body.blog .wp-block-post::before,
body.archive .wp-block-post::before { display: none; } /* kill default list bullet */

body.blog .wp-block-post:hover,
body.archive .wp-block-post:hover {
    transform: translateY(-4px);
    box-shadow: var(--ap-shadow);
    border-color: hsl(40 55% 50% / 0.3);
}

body.blog .wp-block-post-featured-image,
body.archive .wp-block-post-featured-image {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    margin: 0;
    background: var(--ap-muted);
}
body.blog .wp-block-post-featured-image img,
body.archive .wp-block-post-featured-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    display: block;
}

body.blog .wp-block-post-title,
body.archive .wp-block-post-title {
    padding: 1rem 1.5rem 0.4rem !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    margin: 0 !important;
    color: var(--ap-fg);
}
body.blog .wp-block-post-title a,
body.archive .wp-block-post-title a {
    color: var(--ap-fg) !important;
    text-decoration: none !important;
}
body.blog .wp-block-post-title a:hover,
body.archive .wp-block-post-title a:hover { color: var(--ap-primary-dark) !important; }

body.blog .wp-block-post-date,
body.archive .wp-block-post-date,
body.blog .wp-block-post-terms,
body.archive .wp-block-post-terms {
    padding: 0 1.5rem !important;
    font-size: 0.82rem !important;
    color: var(--ap-muted-fg) !important;
    margin: 0 0 0.25rem !important;
}

/* Our injected excerpt wrapper */
body.blog .ap-archive-excerpt,
body.archive .ap-archive-excerpt {
    padding: 0.4rem 1.5rem 1.25rem !important;
    font-size: 0.92rem;
    color: var(--ap-muted-fg);
    line-height: 1.55;
    flex: 1;
}

/* Hide things in archive that we don't need */
body.blog .wp-block-post-content,
body.archive .wp-block-post-content {
    padding: 0 !important;
    margin: 0 !important;
}

/* "Read more" type elements — make a button */
body.blog .wp-block-post-content > p:last-child::after,
body.archive .wp-block-post-content > p:last-child::after { content: ''; }

/* Pagination */
.wp-block-query-pagination {
    grid-column: 1 / -1 !important;
    display: flex !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    margin-top: 2rem !important;
    list-style: none !important;
    padding: 0;
}
.wp-block-query-pagination a,
.wp-block-query-pagination .page-numbers {
    padding: 0.5rem 1rem;
    border: 1px solid var(--ap-border);
    border-radius: var(--ap-radius);
    color: var(--ap-fg);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}
.wp-block-query-pagination a:hover,
.wp-block-query-pagination .page-numbers.current {
    background: var(--ap-gradient);
    color: #fff;
    border-color: transparent;
}

/* Hide pagination at bottom (or style it like buttons) */
body.blog .wp-block-query-pagination,
body.archive .wp-block-query-pagination {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

body.blog .wp-block-query-pagination a,
body.archive .wp-block-query-pagination a,
body.blog .wp-block-query-pagination .page-numbers,
body.archive .wp-block-query-pagination .page-numbers {
    padding: 0.5rem 1rem;
    border: 1px solid var(--ap-border);
    border-radius: var(--ap-radius);
    color: var(--ap-fg);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

body.blog .wp-block-query-pagination a:hover,
body.archive .wp-block-query-pagination a:hover,
body.blog .wp-block-query-pagination .page-numbers.current,
body.archive .wp-block-query-pagination .page-numbers.current {
    background: var(--ap-gradient);
    color: #fff;
    border-color: transparent;
}

/* === Legal pages (Polityka prywatności / Cookies / Regulamin / 404) === */
body.page main {
    max-width: 860px;
}

body.page .wp-block-post-title,
body.page h1.entry-title,
body.page h1.wp-block-heading {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 1.5rem;
    color: var(--ap-fg);
    border-bottom: 4px solid var(--ap-primary);
    padding-bottom: 1rem;
    display: inline-block;
}

body.page .ap-blog-content,
body.page .wp-block-post-content,
body.page .entry-content {
    font-size: 1.02rem;
    line-height: 1.75;
    color: var(--ap-fg);
}

body.page .ap-blog-content h2,
body.page .wp-block-post-content h2 {
    font-size: 1.7rem;
    font-weight: 800;
    margin: 0 0 1.25rem;
    color: var(--ap-fg);
}

body.page .ap-blog-content h3,
body.page .wp-block-post-content h3 {
    font-size: 1.18rem;
    font-weight: 700;
    margin: 2rem 0 0.75rem;
    color: var(--ap-fg);
    padding-left: 0.85rem;
    border-left: 3px solid var(--ap-primary);
}

body.page .ap-blog-content p,
body.page .wp-block-post-content p { margin: 0 0 1rem; }

body.page .ap-blog-content ul,
body.page .ap-blog-content ol,
body.page .wp-block-post-content ul,
body.page .wp-block-post-content ol {
    margin: 0 0 1.25rem 0;
    padding-left: 1.4rem;
}

body.page .ap-blog-content li,
body.page .wp-block-post-content li { margin-bottom: 0.5rem; }

body.page .ap-blog-content strong,
body.page .wp-block-post-content strong {
    color: var(--ap-primary-dark);
    font-weight: 700;
}

body.page .ap-blog-content a,
body.page .wp-block-post-content a {
    color: var(--ap-primary-dark);
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-thickness: 1px;
}

body.page .ap-blog-content a:hover,
body.page .wp-block-post-content a:hover { color: var(--ap-primary); }

body.page .ap-blog-content em,
body.page .wp-block-post-content em {
    color: var(--ap-muted-fg);
    font-style: italic;
    font-size: 0.92em;
}

/* Tables in legal pages */
body.page .ap-blog-content table,
body.page .wp-block-post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0 1.75rem;
    font-size: 0.93rem;
    border: 1px solid var(--ap-border);
    border-radius: var(--ap-radius);
    overflow: hidden;
}

body.page .ap-blog-content table th,
body.page .wp-block-post-content table th {
    background: hsl(40 55% 50% / 0.10);
    color: var(--ap-fg);
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid var(--ap-primary);
    font-weight: 700;
}

body.page .ap-blog-content table td,
body.page .wp-block-post-content table td {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--ap-border);
    vertical-align: top;
}

body.page .ap-blog-content table tr:last-child td,
body.page .wp-block-post-content table tr:last-child td { border-bottom: 0; }

body.page .ap-blog-content code,
body.page .wp-block-post-content code {
    background: var(--ap-muted);
    color: var(--ap-primary-dark);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 0.92em;
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

body.page .ap-blog-content hr,
body.page .wp-block-post-content hr {
    border: 0;
    border-top: 2px solid var(--ap-border);
    margin: 2rem 0;
}

/* === BLOG LIST === */
.ap-blog-list__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 1.5rem;
}

.ap-blog-card {
    display: flex;
    flex-direction: column;
    background: var(--ap-card);
    border: 1px solid var(--ap-border);
    border-radius: var(--ap-radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s ease;
}

.ap-blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--ap-shadow);
    border-color: hsl(40 55% 50% / 0.3);
}

.ap-blog-card__image {
    aspect-ratio: 16/10;
    background: var(--ap-muted);
    overflow: hidden;
}

.ap-blog-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ap-blog-card__body { padding: 1.25rem 1.5rem 1.5rem; }

.ap-blog-card__meta {
    display: flex;
    gap: 0.75rem;
    font-size: 0.82rem;
    color: var(--ap-muted-fg);
    margin-bottom: 0.5rem;
}

.ap-blog-card__cat {
    color: var(--ap-primary-dark);
    font-weight: 600;
}

.ap-blog-card__title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    line-height: 1.3;
}

.ap-blog-card__excerpt {
    color: var(--ap-muted-fg);
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.5;
}

.ap-blog-list__cta {
    margin-top: 2rem;
    text-align: center;
}

/* === FAQ === */
.ap-faq {
    max-width: 900px;
    margin: 0 auto;
}

.ap-faq__item {
    border-bottom: 1px solid var(--ap-border);
}

.ap-faq__q {
    width: 100%;
    background: transparent;
    border: 0;
    padding: 1.25rem 0;
    text-align: left;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--ap-fg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.ap-faq__q-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: hsl(40 55% 50% / 0.1);
    color: var(--ap-primary-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s ease, background 0.25s ease;
    flex-shrink: 0;
}

.ap-faq__item.ap-open .ap-faq__q-icon {
    transform: rotate(180deg);
    background: var(--ap-primary);
    color: #fff;
}

.ap-faq__a {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: var(--ap-muted-fg);
}

.ap-faq__item.ap-open .ap-faq__a {
    max-height: 600px;
    padding: 0 0 1.25rem;
}

/* === CONTACT === */
.ap-contact__grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 2.5rem;
    align-items: stretch;
}

@media (max-width: 768px) {
    .ap-contact__grid { grid-template-columns: 1fr; }
}

.ap-contact__info-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.ap-contact__info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.ap-contact__info-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: hsl(40 55% 50% / 0.1);
    color: var(--ap-primary-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ap-contact__info-label {
    font-size: 0.8rem;
    color: var(--ap-muted-fg);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 0.15rem;
}

.ap-contact__info-value {
    margin: 0;
    color: var(--ap-fg);
    font-weight: 600;
    line-height: 1.4;
}

.ap-contact__info-value a {
    color: var(--ap-fg);
    text-decoration: none;
}

.ap-contact__info-value a:hover { color: var(--ap-primary); }

.ap-contact__map {
    border-radius: var(--ap-radius);
    overflow: hidden;
    box-shadow: var(--ap-shadow);
    min-height: 360px;
    background: var(--ap-muted);
}

.ap-contact__map iframe {
    width: 100%;
    height: 100%;
    min-height: 360px;
    border: 0;
    display: block;
}

.ap-contact__ctas {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.75rem;
    flex-wrap: wrap;
}

/* === FOOTER === */
.ap-footer {
    background: var(--ap-secondary);
    color: rgba(255,255,255,0.85);
    padding: 4rem 0 1.5rem;
}

.ap-footer__grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}

@media (max-width: 768px) {
    .ap-footer__grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

.ap-footer__col--brand {
    text-align: left !important;
    align-items: flex-start;
}

.ap-footer__brand {
    display: block !important;
    text-align: left !important;
    margin: 0 0 1rem !important;
    padding: 0 !important;
}

.ap-footer__brand img {
    display: block !important;
    height: 64px !important;
    width: auto !important;
    max-width: 180px !important;
    object-fit: contain !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
}

.ap-footer__brand span {
    display: block;
    color: #fff;
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0;
    padding: 0;
}

.ap-footer__about {
    font-size: 0.92rem;
    line-height: 1.6;
    margin: 0 0 1.25rem !important;
    text-align: left !important;
    max-width: 280px;
    padding: 0;
}

.ap-footer__col-title {
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 1rem;
}

.ap-footer__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    font-size: 0.95rem;
}

.ap-footer__list a {
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    transition: color 0.2s;
}

.ap-footer__list a:hover { color: var(--ap-primary); }

.ap-footer__bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: rgba(255,255,255,0.55);
}

/* === COOKIE BANNER === */
.ap-cookies {
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    max-width: 480px;
    background: #fff;
    border: 1px solid var(--ap-border);
    border-radius: var(--ap-radius);
    box-shadow: 0 30px 80px rgba(0,0,0,0.15);
    padding: 1.5rem;
    z-index: 200;
    display: none;
}

.ap-cookies.ap-show { display: block; }

.ap-cookies__title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
}

.ap-cookies__text {
    font-size: 0.9rem;
    color: var(--ap-muted-fg);
    margin: 0 0 1rem;
}

.ap-cookies__buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* === SCROLL TOP === */
.ap-scroll-top {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--ap-gradient);
    color: #fff;
    border: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s, box-shadow 0.3s;
    box-shadow: var(--ap-shadow);
    z-index: 150;
}

.ap-scroll-top.ap-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.ap-scroll-top:hover {
    box-shadow: 0 25px 70px -15px hsl(40 55% 50% / 0.6);
}

/* Editor preview helpers */
.elementor-editor-active .ap-cookies,
.elementor-editor-active .ap-scroll-top {
    display: none !important;
}

/* === MOBILE SWIPE CAROUSEL (Realizations, Testimonials, Blog) === */
.ap-swipe { position: relative; }

.ap-swipe-arrows {
    display: none;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1rem;
}

@media (max-width: 768px) {
    .ap-swipe .ap-realizations__grid,
    .ap-swipe .ap-testimonials__track,
    .ap-swipe .ap-blog-list__grid {
        display: flex !important;
        grid-template-columns: none !important;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        scroll-padding: 1rem;
        gap: 1rem;
        padding: 0.5rem 1rem 1rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        scroll-behavior: smooth;
    }
    .ap-swipe .ap-realizations__grid::-webkit-scrollbar,
    .ap-swipe .ap-testimonials__track::-webkit-scrollbar,
    .ap-swipe .ap-blog-list__grid::-webkit-scrollbar { display: none; }

    .ap-swipe .ap-realizations__grid > *,
    .ap-swipe .ap-testimonials__track > *,
    .ap-swipe .ap-blog-list__grid > * {
        flex: 0 0 85%;
        scroll-snap-align: start;
        min-width: 0;
    }

    .ap-swipe-arrows { display: flex; }
}

.ap-swipe-arrow {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--ap-gradient);
    color: #fff;
    border: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px hsl(40 55% 50% / 0.35);
    transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.ap-swipe-arrow:hover:not(:disabled) {
    transform: scale(1.06);
    box-shadow: 0 12px 32px hsl(40 55% 50% / 0.45);
}

.ap-swipe-arrow:disabled {
    opacity: 0.35;
    cursor: default;
    background: hsl(0 0% 80%);
    box-shadow: none;
}

/* === AP Serwis — fix przewijania poza stopkę na mobile === */
html, body { overscroll-behavior-y: none; overscroll-behavior-x: none; }
body { overflow-x: clip; max-width: 100vw; }
.elementor.elementor-12 { overflow: hidden; }
@supports (-webkit-touch-callout: none) {
  html, body { overscroll-behavior: contain; -webkit-overflow-scrolling: auto; }
}
@media (max-width: 768px) {
  body { padding-bottom: 0 !important; margin-bottom: 0 !important; }
}
