:root {
    --bg: #f7f7f6;
    --surface: #ffffff;
    --text: #1f1a17;
    --primary: #28166f;
    --accent: #d94723;
    --muted: #6f6f6f;
    --border: #e2e2e2;

    --radius: 8px;
    --container: 1200px;
    --shadow: 0 10px 30px rgba(31, 26, 23, 0.08);
}

:root {
    --font-heading: "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --font-body: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

body {
    font-family: var(--font-body);
}

h1, h2, h3, .footer-cta-title {
    font-family: var(--font-heading);
    letter-spacing: 0.2px;
}


html {
    scroll-behavior: smooth;
}

html, body {
    overflow-x: clip;
}


*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--text);
    background-color: var(--bg);
    line-height: 1.65;
}

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

a:hover {
    text-decoration: underline;
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 84px;
}

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

.site-logo img {
    max-height: 52px;
    width: auto;
    display: block;
}

/* Nav - kill bullets no matter what WP outputs */
.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav .menu,
.main-nav ul {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.main-nav li {
    margin: 0;
    padding: 0;
}

.main-nav a {
    color: var(--text);
    font-weight: 600;
    letter-spacing: 0.2px;
}

.main-nav a:hover {
    color: var(--primary);
    text-decoration: none;
}

/* Mobile nav toggle button */
.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: 10px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.nav-toggle-bars {
    position: relative;
    width: 22px;
    height: 2px;
    background: var(--text);
    display: block;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
    content: "";
    position: absolute;
    left: 0;
    width: 22px;
    height: 2px;
    background: var(--text);
}

.nav-toggle-bars::before {
    top: -7px;
}

.nav-toggle-bars::after {
    top: 7px;
}

/* Desktop nav stays as-is */
/*.main-nav {*/
    /* no changes needed here for desktop */
/*}*/

/* Mobile layout */
@media (max-width: 900px) {
    .nav-toggle {
        display: inline-flex;
    }

    /* optional: hide header CTA on mobile to keep header clean */
    .header-cta {
        display: none;
    }

    /* menu hidden by default */
    .main-nav {
        display: none;
        width: 100%;
        order: 10;
        margin-top: 0.75rem;
        border-top: 1px solid var(--border);
        padding-top: 0.75rem;
    }

    /* when open */
    .main-nav.is-open {
        display: block;
    }

    .main-nav .menu {
        display: grid;
        gap: 0.5rem;
    }

    .main-nav a {
        display: block;
        padding: 0.75rem 0.5rem;
        border-radius: 10px;
    }

    .main-nav a:hover {
        background: rgba(40, 22, 111, 0.06);
    }

    /* make header wrap nicely */
    .header-inner {
        justify-content: space-between;
    }
}


/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1rem;
    border-radius: var(--radius);
    font-weight: 700;
    border: 1px solid transparent;
    white-space: nowrap;
}

.btn-accent {
    background: var(--accent);
    color: #fff;
}

.btn-accent:hover {
    filter: brightness(0.95);
    text-decoration: none;
}

/* Main */
.site-main {
    padding: 0;
}

.content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

article > h1 {
    margin-top: 0;
}

/* WordPress blocks: better default spacing */
.wp-block {
    margin-bottom: 1.25rem;
}

/* Mini gallery styling (Gutenberg Gallery block + images) */
.wp-block-gallery,
.gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.wp-block-gallery img,
.gallery img,
.wp-block-image img {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    display: block;
}

@media (min-width: 720px) {
    .wp-block-gallery,
    .gallery {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Footer */
.site-footer {
    padding: 0;
    background: transparent;
    border-top: 0;
}

.footer-inner {
    display: grid;
    gap: 1rem;
}

.footer-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
}

.footer-item a {
    color: var(--muted);
}

.footer-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-nav a {
    color: var(--muted);
}

.footer-nav a:hover {
    color: var(--primary);
    text-decoration: none;
}

@media (max-width: 720px) {
    .header-inner {
        flex-wrap: wrap;
        justify-content: center;
    }

    .main-nav .menu,
    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
}
/* ORWO Sections */
.section {
    padding: 2.5rem 0;
}

.section--tight {
    padding: 1.5rem 0;
}

.section--surface {
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section-title {
    margin: 0 0 0.75rem 0;
    font-size: 1.6rem;
    line-height: 1.25;
    letter-spacing: 0.2px;
}

.section-lead {
    margin: 0 0 1.5rem 0;
    color: var(--muted);
    max-width: 70ch;
}

.hero {
    background: linear-gradient(180deg, rgba(40, 22, 111, 0.06), rgba(217, 71, 35, 0.03));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.hero h1 {
    margin: 0 0 0.75rem 0;
    font-size: 2rem;
    line-height: 1.15;
}

.hero p {
    margin: 0 0 1.25rem 0;
    color: var(--muted);
    max-width: 75ch;
}

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

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

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
}

.card h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.card p {
    margin: 0;
    color: var(--muted);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: var(--primary);
}

.kpi {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, 1fr);
}

.kpi .card {
    text-align: center;
}

.kpi .kpi-number {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text);
    margin: 0;
}

.kpi .kpi-label {
    margin: 0.25rem 0 0 0;
    color: var(--muted);
}

.cta {
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius);
    padding: 1.75rem;
    box-shadow: var(--shadow);
}

.cta h2 {
    margin: 0 0 0.5rem 0;
}

.cta p {
    margin: 0 0 1rem 0;
    opacity: 0.92;
}

.cta a.btn {
    background: var(--accent);
    color: #fff;
}

@media (min-width: 900px) {
    .hero {
        padding: 2.5rem;
    }

    .hero h1 {
        font-size: 2.4rem;
    }

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

    .kpi {
        grid-template-columns: repeat(4, 1fr);
    }
}
/* Buttons: outline */
.btn-outline {
    background: transparent;
    border-color: var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: rgba(40, 22, 111, 0.08);
    text-decoration: none;
}

/* Slider - full width */
.orwo-slider {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.orwo-slider-track {
    position: relative;
    overflow: hidden;
    min-height: 360px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.orwo-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 700ms ease;
}

.orwo-slide.is-active {
    opacity: 1;
}

.orwo-slider-track::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(31, 26, 23, 0.80), rgba(31, 26, 23, 0.25));
    z-index: 1;
}

.orwo-slider-overlay {
    position: relative;
    z-index: 2;
    padding: 2rem 1rem;
    color: #fff;
    max-width: var(--container);
    margin: 0 auto;
}

.orwo-slider-title {
    margin: 0 0 0.75rem 0;
    font-size: 2rem;
    line-height: 1.1;
}

.orwo-slider-subtitle {
    margin: 0 0 1.25rem 0;
    opacity: 0.92;
}

.orwo-slider-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

@media (min-width: 900px) {
    .orwo-slider-track {
        min-height: 520px;
    }

    .orwo-slider-title {
        font-size: 2.8rem;
    }

    .orwo-slider-overlay {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}


/* Footer contact section */
.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    color: var(--muted);
}

.footer-top {
    margin-bottom: 1.5rem;
}

.footer-title {
    margin: 0 0 0.5rem 0;
    color: var(--text);
    font-size: 1.6rem;
}

.footer-lead {
    margin: 0;
    max-width: 70ch;
}

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

.footer-map-row {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.map-embed {
    width: 100%;
    border: 0;
    border-radius: 0;
    overflow: hidden;
    background: #000;
}

.map-embed iframe {
    width: 100%;
    height: 420px;
    display: block;
}


/* Full-width contact bar */
.footer-contact-row {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    background: var(--text);
    color: #fff;
    padding: 2.5rem 0;
}

.footer-contact-inner {
    text-align: center;
}

.footer-title {
    margin: 0 0 1rem 0;
    font-size: 1.7rem;
    line-height: 1.2;
    color: #fff;
}

.footer-contact-lines {
    display: grid;
    gap: 0.75rem;
    justify-items: center;
    margin-bottom: 1.25rem;
}

.footer-line {
    opacity: 0.95;
    text-align: center;
    line-height: 1.5;
}

.footer-line strong {
    font-weight: 700;
}

.footer-line a {
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}

.footer-line a:hover {
    text-decoration: underline;
    color: #d94723;
}

.footer-copy p {
    margin: 0;
    opacity: 0.75;
    font-size: 0.9rem;
}

@media (min-width: 900px) {
    .map-embed iframe {
        height: 520px;
    }

    .footer-contact-row {
        padding: 3rem 0;
    }
}
/* Gutenberg offer grid (media library icons) */
/* Offer grid – 4 in a row on desktop, 2x2 on mobile */
.orwo-offer-grid {
    display: grid;
    gap: 1rem;
    width: 100%;
    margin-bottom: 3rem;
    /* mobile default: 2x2 */
    grid-template-columns: repeat(2, 1fr);
}

/* desktop */
@media (min-width: 900px) {
    .orwo-offer-grid {
        grid-template-columns: repeat(4, 1fr);
        margin-bottom: 4rem;
    }
}
.orwo-offer-tile {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    padding: 1.25rem;
    display: grid;
    gap: 0.75rem;
    align-content: start;
    transition: transform 200ms ease, box-shadow 200ms ease;
}

.orwo-offer-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 36px rgba(31, 26, 23, 0.12);
}

/* Content card – rounded only on top */
.orwo-content-card {
    background: #fff;
    margin-top: 0;
    padding-top: 2rem;
    padding-bottom: 2.5rem;

    /* wizualna separacja */
    box-shadow: 0 -18px 40px rgba(31, 26, 23, 0.08);

    /* tylko góra */
    border-top-left-radius: var(--radius);
    border-top-right-radius: var(--radius);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

@media (min-width: 900px) {
    .orwo-content-card {
        padding-top: 3rem;
        padding-bottom: 3.5rem;
    }
}



/* Offer icons – larger, clean, integrated */
.orwo-offer-tile .wp-block-image {
    margin: 0;
}

.orwo-offer-tile .wp-block-image img {
    width: 110px;
    height: 110px;
    max-width: 100%;
    object-fit: contain;

    /* zero ramek */
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 0;

    /* lekka optyczna stabilizacja */
    opacity: 0.9;
}

/* Delikatne podbicie na hover */
.orwo-offer-tile:hover .wp-block-image img {
    opacity: 1;
}

/* Mobile – jeszcze trochę większe, bo jest miejsce */
@media (max-width: 600px) {
    .orwo-offer-tile .wp-block-image img {
        width: 120px;
        height: 120px;
    }
}


.orwo-offer-tile h3 {
    margin: 0;
    font-size: 1.2rem;
    line-height: 1.2;
    padding-left: 1rem;
    padding-right: 1rem;
}

.orwo-offer-tile h3 a {
    color: var(--text);
    text-decoration: none;
}

.orwo-offer-tile h3 a:hover {
    color: var(--primary);
    text-decoration: none;
}

.orwo-offer-grid .orwo-offer-tile h3 {
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Optional: make image link behave nicely */
.orwo-offer-tile .wp-block-image a {
    display: inline-block;
}

/* Front page: content wrapper without frame/rounding */
.content--page {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}
/* Footer CTA full-width with background image */
.footer-cta {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);

    background-image: url("../img/cta-bg.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    position: relative;
    padding: 3.5rem 0;
    color: #fff;
}

.footer-cta::before {
    content: "";
    position: absolute;
    inset: 0;
    
}

.footer-cta-inner {
    position: relative;
    z-index: 1;
    text-align: center;
    display: grid;
    gap: 0.75rem;
    justify-items: center;
}

.footer-cta-title {
    margin: 0;
    font-size: 2rem;
    line-height: 1.15;
}

.footer-cta-text {
    margin: 0;
    max-width: 70ch;
    opacity: 0.92;
}

.btn-cta-white {
    background: #fff;
    color: var(--accent); /* #d94723 */
    border: 1px solid rgba(255, 255, 255, 0.75);
    padding: 0.85rem 1.25rem;
}

.btn-cta-white:hover {
    text-decoration: none;
    filter: brightness(0.97);
}

@media (min-width: 900px) {
    .footer-cta {
        padding: 4.25rem 0;
    }

    .footer-cta-title {
        font-size: 2.4rem;
    }
}

/* Gutenberg content spacing – readable text */
.content--page .wp-block-group,
.content--page .wp-block-paragraph,
.content--page .wp-block-heading {
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Więcej oddechu na desktopie */
@media (min-width: 900px) {
    .content--page .wp-block-group,
    .content--page .wp-block-paragraph,
    .content--page .wp-block-heading {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* Apply side padding only to text content card, not to offer grid */
.orwo-content-grid .wp-block-group,
.orwo-content-grid .wp-block-paragraph,
.orwo-content-grid .wp-block-heading {
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 900px) {
  .orwo-content-grid .wp-block-group,
  .orwo-content-grid .wp-block-paragraph,
  .orwo-content-grid .wp-block-heading {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}


/* Make the whole offer tile clickable */
.orwo-offer-tile {
    position: relative;
}

.orwo-offer-tile .orwo-tile-link {
    position: absolute;
    inset: 0;
    z-index: 5;
    border-radius: inherit;
}

/* żeby nadal działały hover-y kafla */
.orwo-offer-tile:hover {
    cursor: pointer;
}

/* jeśli obrazek/tytuł mają swoje linki, to niech nie przeszkadzają */
.orwo-offer-tile a:not(.orwo-tile-link) {
    position: relative;
    z-index: 6;
}

/* Service pages: readable content + gallery */
body:not(.home) .content--page {
    padding-top: 1.5rem;
    padding-bottom: 2.5rem;
}

/* Lead paragraph (opcjonalnie dodawaj w Gutenberg jako „Wyróżniony akapit”) */
.content--page .is-style-lead,
.content--page .has-lead-font-size {
    font-size: 1.1rem;
    line-height: 1.65;
    color: var(--muted);
    max-width: 75ch;
}

/* Headings spacing */
.content--page h2,
.content--page h3 {
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
}

/* Paragraph width for readability */
body:not(.home) .content--page p,
body:not(.home) .content--page ul,
body:not(.home) .content--page ol {
    max-width: 85ch;
}

/* Gallery polish */
.content--page .wp-block-gallery {
    margin-top: 1.25rem;
}

.content--page .wp-block-gallery img {
    border-radius: var(--radius);
}

@media (min-width: 900px) {
    .page .content--page {
        padding-top: 2rem;
        padding-bottom: 0rem;
    }
}
/* Menu: offer items in #28166f, others unchanged */
.main-nav .menu a[href*="odlewy-z-aluminium"],
.main-nav .menu a[href*="odlewy-z-brazu-i-mosiadzu"],
.main-nav .menu a[href*="odlewy-z-zeliwa"],
.main-nav .menu a[href*="obrobka-mechaniczna"] {
    color: #28166f;
    font-weight: bolder;
}
/* Offer pages: H1 style */
.post-29 h1,
.post-31 h1,
.post-33 h1,
.post-35 h1 {
    text-align: center;
    color: #d94723;
    margin-top: 1rem;
}

.home .content content--page {
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Do NOT add Gutenberg side padding to the offer grid section */
.orwo-offer-grid{
  padding-left: 0 !important;
  padding-right: 0 !important;
}