/**
 * LEXCOM WordPress Starter
 *
 * Główne style motywu.
 */

/* ==========================================================================
   Variables
   ========================================================================== */

:root {
    --lexcom-content-width: 1200px;
    --lexcom-wide-width: 1200px;
    --lexcom-text-width: 800px;

    --lexcom-color-text: #1a1a1a;
    --lexcom-color-background: #fff;
    --lexcom-color-border: #e5e5e5;

    --lexcom-color-primary: #1a1a1a;
    --lexcom-color-primary-contrast: #fff;
    --lexcom-color-surface: #f5f5f5;

    --lexcom-spacing-page: 1rem;

    --lexcom-transition-fast: 0.2s ease;
}


/* ==========================================================================
   Base
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    color: var(--lexcom-color-text);
    background: var(--lexcom-color-background);
    overflow-wrap: break-word;
}

img,
svg,
video {
    display: block;
    max-width: 100%;
    height: auto;
}

iframe {
    max-width: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
    text-underline-offset: 0.2em;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}


/* ==========================================================================
   Accessibility
   ========================================================================== */

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.screen-reader-text:focus {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 100000;
    width: auto;
    height: auto;
    padding: 0.75rem 1rem;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    background: var(--lexcom-color-background);
    color: var(--lexcom-color-text);
}


/* ==========================================================================
   Layout
   ========================================================================== */

.site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-main {
    flex: 1 0 auto;
    width: 100%;
}


/* ==========================================================================
   Content
   ========================================================================== */

.content-container {
    width: min(
        calc(100% - (var(--lexcom-spacing-page) * 2)),
        var(--lexcom-content-width)
    );
    margin-inline: auto;
}

.entry {
    padding-block: 3rem;
}

.entry-header {
    margin-bottom: 2rem;
}

.entry-title {
    margin-top: 0;
}

.entry-content > :first-child {
    margin-top: 0;
}

.entry-content > :last-child {
    margin-bottom: 0;
}


/* ==========================================================================
   Entries
   ========================================================================== */

.entry-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    margin-top: 0.75rem;
}

.entry-thumbnail {
    display: block;
    margin: 0 0 2rem;
}

.entry-thumbnail img {
    width: 100%;
    height: auto;
}

.entry--summary {
    display: grid;
    grid-template-columns: minmax(0, 240px) minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
}

.entry--summary .entry-thumbnail {
    margin: 0;
}

.entry--summary .entry-thumbnail img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.entry--summary .entry-header {
    margin-bottom: 1rem;
}

.entry--summary .entry-title {
    margin-bottom: 0.5rem;
}

.entry--summary .entry-title a {
    color: inherit;
    text-decoration: none;
}

.entry--summary .entry-title a:hover,
.entry--summary .entry-title a:focus-visible {
    text-decoration: underline;
}

.entry-excerpt > :first-child {
    margin-top: 0;
}

.entry-excerpt > :last-child {
    margin-bottom: 0;
}

@media (max-width: 767px) {

    .entry--summary {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .search-form {
        flex-direction: column;
    }

    .search-form__submit {
        width: 100%;
    }

    .post-navigation {
        grid-template-columns: 1fr;
    }

    .post-navigation__next {
        text-align: left;
    }
}

/* ==========================================================================
   Post navigation
   ========================================================================== */

.post-navigation {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
    padding-top: 2rem;
    margin-top: 4rem;
    border-top: 1px solid var(--lexcom-color-border);
}

.post-navigation__previous,
.post-navigation__next {
    min-width: 0;
}

.post-navigation__next {
    text-align: right;
}

.post-navigation__label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.post-navigation a {
    font-weight: 700;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
    position: relative;
    z-index: 100;
    width: 100%;
    border-bottom: 1px solid var(--lexcom-color-border);
    background: var(--lexcom-color-background);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(
        calc(100% - (var(--lexcom-spacing-page) * 2)),
        var(--lexcom-wide-width)
    );
    min-height: 80px;
    margin-inline: auto;
    gap: 2rem;
}


/* ==========================================================================
   Branding
   ========================================================================== */

.site-branding {
    flex: 0 0 auto;
}

.custom-logo-link {
    display: block;
}

.custom-logo {
    display: block;
    width: auto;
    max-width: 200px;
    max-height: 60px;
}

.site-title {
    color: inherit;
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;
}


/* ==========================================================================
   Navigation
   ========================================================================== */

.site-navigation {
    margin-left: auto;
}

.site-navigation__menu {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.site-navigation__menu a {
    color: inherit;
    text-decoration: none;
}

.site-navigation__menu a:hover,
.site-navigation__menu a:focus-visible {
    text-decoration: underline;
    text-underline-offset: 0.25em;
}


/* ==========================================================================
   Mobile navigation toggle
   ========================================================================== */

.menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    margin-left: auto;
    color: inherit;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.menu-toggle__icon {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 24px;
    height: 18px;
    gap: 5px;
}

.menu-toggle__icon span {
    display: block;
    width: 100%;
    height: 2px;
    background: currentColor;
    transition:
        transform var(--lexcom-transition-fast),
        opacity var(--lexcom-transition-fast);
}


/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
    flex: 0 0 auto;
    width: 100%;
    margin-top: auto;
    border-top: 1px solid var(--lexcom-color-border);
    background: var(--lexcom-color-background);
}

.site-footer__inner {
    width: min(
        calc(100% - (var(--lexcom-spacing-page) * 2)),
        var(--lexcom-wide-width)
    );
    padding-block: 2rem;
    margin-inline: auto;
}

.footer-navigation {
    margin-bottom: 1.5rem;
}

.footer-navigation__menu {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.5rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.footer-navigation__menu a {
    color: inherit;
    text-decoration: none;
}

.footer-navigation__menu a:hover,
.footer-navigation__menu a:focus-visible {
    text-decoration: underline;
    text-underline-offset: 0.25em;
}

.site-footer__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--lexcom-color-border);
}

.site-footer__copyright,
.site-footer__author {
    margin: 0;
}

.site-footer__author a {
    font-weight: 700;
}


/* ==========================================================================
   Gutenberg sections
   ========================================================================== */

/*
 * Wspólna baza dla wzorców z kategorii "Sekcje".
 *
 * Wzorce określają strukturę treści.
 * Motyw odpowiada za wygląd, odstępy i responsywność.
 */

.lexcom-section {
    width: 100%;
    padding-block: clamp(3rem, 6vw, 6rem);
}

.lexcom-section + .lexcom-section {
    margin-top: 0;
}


/* ==========================================================================
   Hero
   ========================================================================== */

.lexcom-section--hero {
    padding-block: clamp(4rem, 10vw, 8rem);
}


.lexcom-section--hero h1 {
    margin-top: 0;
    margin-bottom: 1.5rem;
}

.lexcom-section--hero .lexcom-lead {
    font-size: clamp(1.125rem, 2vw, 1.35rem);
    line-height: 1.6;
}

.lexcom-section--hero .wp-block-buttons {
    margin-top: 2rem;
}


/* ==========================================================================
   Text + image
   ========================================================================== */

.lexcom-columns {
    gap: clamp(2rem, 5vw, 5rem);
}

.lexcom-section--text-image .wp-block-heading,
.lexcom-section--image-text .wp-block-heading {
    margin-top: 0;
}

.lexcom-section-image {
    margin: 0;
}

.lexcom-section-image img {
    width: 100%;
    height: auto;
}


/* ==========================================================================
   Centered text
   ========================================================================== */

.lexcom-section--centered-text > * {
    max-width: var(--lexcom-text-width);
    margin-inline: auto;
}

.lexcom-section--centered-text .wp-block-buttons {
    margin-top: 2rem;
}


/* ==========================================================================
   Cards
   ========================================================================== */

.lexcom-section--cards > .wp-block-heading {
    margin-top: 0;
    margin-bottom: clamp(2rem, 4vw, 3rem);
}

.lexcom-cards {
    gap: 1.5rem;
}

.lexcom-card {
    height: 100%;
    padding: clamp(1.5rem, 3vw, 2rem);
    border: 1px solid var(--lexcom-color-border);
}

.lexcom-card > :first-child {
    margin-top: 0;
}

.lexcom-card > :last-child {
    margin-bottom: 0;
}


/* ==========================================================================
   CTA
   ========================================================================== */

.lexcom-section--cta {
    padding-inline: clamp(1.5rem, 5vw, 4rem);
    border: 1px solid var(--lexcom-color-border);
}

.lexcom-section--cta > * {
    max-width: var(--lexcom-text-width);
    margin-inline: auto;
}

.lexcom-section--cta .wp-block-buttons {
    margin-top: 2rem;
}


/* ==========================================================================
   FAQ
   ========================================================================== */

.lexcom-section--faq > .wp-block-heading {
    margin-top: 0;
    margin-bottom: clamp(2rem, 4vw, 3rem);
}

.lexcom-section--faq .wp-block-details {
    padding-block: 1rem;
    margin: 0;
    border-bottom: 1px solid var(--lexcom-color-border);
}

.lexcom-section--faq .wp-block-details:first-of-type {
    border-top: 1px solid var(--lexcom-color-border);
}

.lexcom-section--faq summary {
    font-weight: 700;
    cursor: pointer;
}

.lexcom-section--faq .wp-block-details > :last-child {
    margin-bottom: 0;
}


/* ==========================================================================
   Latest posts
   ========================================================================== */

.lexcom-section--latest-posts > .wp-block-heading {
    margin-top: 0;
    margin-bottom: clamp(2rem, 4vw, 3rem);
}

.lexcom-latest-posts {
    padding: 0;
    margin: 0;
    list-style: none;
}

.lexcom-latest-posts li {
    padding-block: 1.5rem;
    border-bottom: 1px solid var(--lexcom-color-border);
}

.lexcom-latest-posts li:first-child {
    border-top: 1px solid var(--lexcom-color-border);
}

.lexcom-latest-posts a {
    font-weight: 700;
}


/* ==========================================================================
   Gutenberg buttons
   ========================================================================== */

.lexcom-section .wp-block-button__link {
    transition:
        opacity var(--lexcom-transition-fast),
        transform var(--lexcom-transition-fast);
}

.lexcom-section .wp-block-button__link:hover {
    opacity: 0.85;
}

.lexcom-section .wp-block-button__link:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

/* ==========================================================================
   Contact section
   ========================================================================== */

.lexcom-section--contact .wp-block-heading:first-child {
    margin-top: 0;
}


/* ==========================================================================
   Stats
   ========================================================================== */

.lexcom-section--stats > .wp-block-heading {
    margin-top: 0;
    margin-bottom: clamp(2rem, 4vw, 3rem);
}

.lexcom-stats {
    gap: 1.5rem;
}

.lexcom-stat {
    height: 100%;
    padding: 2rem 1rem;
    border: 1px solid var(--lexcom-color-border);
}

.lexcom-stat__number {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: clamp(2rem, 5vw, 3.5rem);
}

.lexcom-stat > :last-child {
    margin-bottom: 0;
}


/* ==========================================================================
   Gallery
   ========================================================================== */

.lexcom-section--gallery > .wp-block-heading {
    margin-top: 0;
}

.lexcom-gallery {
    margin-top: 2rem;
}


/* ==========================================================================
   Logos
   ========================================================================== */

.lexcom-section--logos > .wp-block-heading {
    margin-top: 0;
    margin-bottom: clamp(2rem, 4vw, 3rem);
}

.lexcom-logos {
    gap: 1.5rem;
}

.lexcom-logo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    padding: 1rem;
    margin: 0;
    border: 1px solid var(--lexcom-color-border);
    font-weight: 700;
}


/* ==========================================================================
   Testimonial
   ========================================================================== */

.lexcom-testimonial {
    max-width: var(--lexcom-text-width);
    padding: clamp(1.5rem, 4vw, 3rem);
    margin-inline: auto;
    border-left: 4px solid currentColor;
}

.lexcom-testimonial > :first-child {
    margin-top: 0;
}

.lexcom-testimonial > :last-child {
    margin-bottom: 0;
}

.lexcom-testimonial cite {
    display: block;
    margin-top: 1.5rem;
    font-style: normal;
    font-weight: 700;
}


/* ==========================================================================
   Mobile
   ========================================================================== */

@media (max-width: 767px) {

    /* Gutenberg sections */

    .lexcom-section {
        padding-block: 3rem;
    }

    .lexcom-section--hero {
        padding-block: 4rem;
    }

    .lexcom-columns {
        gap: 2rem;
    }

    .lexcom-section--text-image .lexcom-columns,
    .lexcom-section--image-text .lexcom-columns {
        flex-direction: column;
    }

    .lexcom-cards {
        gap: 1rem;
    }

    .lexcom-card {
        padding: 1.5rem;
    }

    .lexcom-section--cta {
        padding-inline: 1.5rem;
    }

    .lexcom-section .wp-block-buttons {
        width: 100%;
    }


    /* Header */

    .site-header__inner {
        min-height: 70px;
        gap: 1rem;
    }

    .custom-logo {
        max-width: 160px;
        max-height: 50px;
    }

    .menu-toggle {
        display: flex;
    }

    .site-navigation {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        z-index: 100;
        display: none;
        width: 100%;
        margin: 0;
        background: var(--lexcom-color-background);
        border-top: 1px solid var(--lexcom-color-border);
        border-bottom: 1px solid var(--lexcom-color-border);
        box-shadow: 0 8px 20px rgb(0 0 0 / 8%);
    }

    .site-navigation.is-open {
        display: block;
    }

    .site-navigation__menu {
        flex-direction: column;
        align-items: stretch;
        width: min(
            calc(100% - (var(--lexcom-spacing-page) * 2)),
            var(--lexcom-wide-width)
        );
        padding: 0.75rem 0;
        margin-inline: auto;
        gap: 0;
    }

    .site-navigation__menu li {
        width: 100%;
    }

    .site-navigation__menu a {
        display: block;
        width: 100%;
        padding: 0.875rem 0;
    }

    .menu-toggle[aria-expanded="true"] .menu-toggle__icon span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .menu-toggle[aria-expanded="true"] .menu-toggle__icon span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle[aria-expanded="true"] .menu-toggle__icon span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }


    /* Footer */

    .footer-navigation__menu {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .site-footer__bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */

.breadcrumbs {
    margin-bottom: 2rem;
}

.breadcrumbs__list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.breadcrumbs__item:not(:last-child)::after {
    content: "/";
    margin-left: 0.5rem;
}


/* ==========================================================================
   Search
   ========================================================================== */

.search-form {
    display: flex;
    width: 100%;
    max-width: 600px;
    margin-bottom: 3rem;
}

.search-form__label {
    flex: 1 1 auto;
}

.search-form__field {
    width: 100%;
    height: 48px;
    padding: 0.75rem 1rem;
    border: 1px solid var(--lexcom-color-border);
    background: var(--lexcom-color-background);
    color: var(--lexcom-color-text);
}

.search-form__submit {
    flex: 0 0 auto;
    min-height: 48px;
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--lexcom-color-text);
    background: var(--lexcom-color-text);
    color: var(--lexcom-color-background);
    cursor: pointer;
}

.search-results-list {
    margin-top: 3rem;
}


/* ==========================================================================
   Pagination
   ========================================================================== */

.navigation.pagination {
    margin-top: 3rem;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0.5rem;
    border: 1px solid var(--lexcom-color-border);
    text-decoration: none;
}

.page-numbers.current {
    border-color: currentColor;
    font-weight: 700;
}


/* ==========================================================================
   404
   ========================================================================== */

.error-404 .search-form {
    margin-top: 3rem;
}


/* ==========================================================================
   Utilities
   ========================================================================== */

[hidden] {
    display: none !important;
}


/* GLightbox */
.glightbox-container .gslide-image img {
    background: #f5f5f5;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* Swiper – dostępne cele dotykowe paginacji */
.swiper-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
}

.swiper-pagination-bullet {
	position: relative;
	width: 44px;
	height: 44px;
	margin: 0 !important;
	background: transparent !important;
	opacity: 1;
}

.swiper-pagination-bullet::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #999;
	transform: translate(-50%, -50%);
	opacity: 0.5;
}

.swiper-pagination-bullet-active::after {
	background: #fff;
	opacity: 1;
}

/* ==========================================================================
   Cookie Consent
   ========================================================================== */

#cc--main,
.pressidium-cc-theme {
    --cc-bg: var(--lexcom-color-background);
    --cc-text: var(--lexcom-color-text);

    /* Primary buttons */
    --cc-btn-primary-bg: var(--lexcom-color-primary);
    --cc-btn-primary-text: var(--lexcom-color-primary-contrast);
    --cc-btn-primary-hover-bg: var(--lexcom-color-text);
    --cc-btn-primary-hover-text: var(--lexcom-color-background);

    /* Secondary buttons */
    --cc-btn-secondary-bg: var(--lexcom-color-surface);
    --cc-btn-secondary-text: var(--lexcom-color-text);
    --cc-btn-secondary-hover-bg: var(--lexcom-color-border);
    --cc-btn-secondary-hover-text: var(--lexcom-color-text);

    /* Toggles */
    --cc-toggle-bg-off: var(--lexcom-color-border);
    --cc-toggle-bg-on: var(--lexcom-color-primary);
    --cc-toggle-bg-readonly: var(--lexcom-color-border);
    --cc-toggle-knob-bg: var(--lexcom-color-background);
    --cc-toggle-knob-icon-color: var(--lexcom-color-primary-contrast);

    /* Content */
    --cc-block-text: var(--lexcom-color-text);
    --cc-cookie-category-block-bg: var(--lexcom-color-surface);
    --cc-cookie-category-block-bg-hover: var(--lexcom-color-border);
    --cc-section-border: var(--lexcom-color-border);
    --cc-cookie-table-border: var(--lexcom-color-border);

    /* Overlay */
    --cc-overlay-bg: #000;
    --cc-overlay-opacity: 0.65;

    /* Scrollbar */
    --cc-webkit-scrollbar-bg: var(--lexcom-color-border);
    --cc-webkit-scrollbar-bg-hover: var(--lexcom-color-primary);

    /* Floating settings button */
    --cc-btn-floating-bg: var(--lexcom-color-primary);
    --cc-btn-floating-icon: var(--lexcom-color-primary-contrast);
    --cc-btn-floating-hover-bg: var(--lexcom-color-text);
    --cc-btn-floating-hover-icon: var(--lexcom-color-background);
}