/*
Theme Name: BudMajster Portal
Theme URI: https://example.com/budmajster
Author: Codex
Author URI: https://openai.com
Description: Motyw WordPress dla firmy budowlanej z portalem ogloszen uslugodawcow.
Version: 1.2.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 8.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: budmajster
*/

:root {
  --bm-bg: #ffffff;
  --bm-surface: #f4f5f2;
  --bm-surface-strong: #e7e9e2;
  --bm-text: #171b18;
  --bm-muted: #647067;
  --bm-border: #d8ddd4;
  --bm-yellow: #f6c343;
  --bm-yellow-dark: #c18b0b;
  --bm-green: #163f2f;
  --bm-green-soft: #dbe8dd;
  --bm-red: #a43f2d;
  --bm-radius: 8px;
  --bm-shadow: 0 18px 50px rgba(22, 31, 26, 0.12);
  --bm-container: min(1180px, calc(100vw - 40px));
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bm-bg);
  color: var(--bm-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  height: auto;
  max-width: 100%;
}

.bm-container {
  margin-inline: auto;
  width: var(--bm-container);
}

.bm-header {
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--bm-border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.bm-header__inner {
  align-items: center;
  display: flex;
  gap: 28px;
  min-height: 76px;
}

.bm-brand {
  align-items: center;
  display: inline-flex;
  font-size: 1.25rem;
  font-weight: 850;
  gap: 10px;
  letter-spacing: 0;
  white-space: nowrap;
}

.bm-brand__mark {
  align-items: center;
  background: var(--bm-yellow);
  color: var(--bm-green);
  display: inline-flex;
  font-size: 1rem;
  font-weight: 900;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.bm-nav {
  align-items: center;
  display: flex;
  flex: 1;
  gap: 22px;
  justify-content: flex-end;
}

.bm-nav a {
  color: var(--bm-muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.bm-nav li {
  list-style: none;
}

.bm-nav a:hover {
  color: var(--bm-text);
}

.bm-button,
.bm-submit,
.bm-nav .bm-button {
  align-items: center;
  background: var(--bm-yellow);
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: #16170f;
  cursor: pointer;
  display: inline-flex;
  font-size: 0.96rem;
  font-weight: 850;
  gap: 8px;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.bm-button:hover,
.bm-submit:hover {
  background: #ffd15a;
  box-shadow: 0 12px 24px rgba(193, 139, 11, 0.22);
  transform: translateY(-1px);
}

.bm-button--dark {
  background: var(--bm-green);
  color: #fff;
}

.bm-button--dark:hover {
  background: #20513e;
  box-shadow: 0 12px 24px rgba(22, 63, 47, 0.22);
}

.bm-hero {
  background:
    radial-gradient(circle at 78% 18%, rgba(246,195,67,0.26) 0 120px, transparent 121px),
    linear-gradient(135deg, rgba(22,63,47,0.08) 0 1px, transparent 1px) 0 0 / 34px 34px,
    linear-gradient(90deg, rgba(255,255,255,0.98) 0%, rgba(255,255,255,0.9) 42%, rgba(255,255,255,0.2) 100%),
    url("assets/images/hero-construction.svg") right center / min(58vw, 880px) auto no-repeat,
    var(--bm-surface);
  border-bottom: 1px solid var(--bm-border);
}

.bm-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(240px, 0.55fr);
  min-height: 650px;
  padding: 82px 0 58px;
}

.bm-hero h1 {
  font-size: clamp(2.65rem, 6vw, 5.8rem);
  letter-spacing: 0;
  line-height: 0.95;
  margin: 0 0 28px;
  max-width: 820px;
}

.bm-hero p {
  color: #3b473e;
  font-size: clamp(1.08rem, 2vw, 1.36rem);
  line-height: 1.5;
  margin: 0 0 32px;
  max-width: 680px;
}

.bm-search-panel {
  background: #fff;
  border: 1px solid var(--bm-border);
  box-shadow: 0 24px 70px rgba(22, 31, 26, 0.18);
  margin-top: 44px;
  max-width: 860px;
  padding: 18px;
}

.bm-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.bm-stats {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 30px;
  max-width: 780px;
}

.bm-stats > div {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--bm-border);
  padding: 18px;
}

.bm-stats strong {
  display: block;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  line-height: 1;
}

.bm-stats span {
  color: var(--bm-muted);
  display: block;
  font-size: 0.88rem;
  font-weight: 800;
  margin-top: 7px;
}

.bm-strip {
  background: var(--bm-green);
  color: #fff;
}

.bm-strip__inner {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.bm-strip span {
  border-left: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.82);
  font-weight: 850;
  padding: 18px 20px;
}

.bm-search-form,
.bm-filter-form {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(260px, 1.35fr) minmax(190px, 0.75fr) auto;
}

.bm-field,
.bm-textarea,
.bm-select {
  background: #fff;
  border: 1px solid var(--bm-border);
  color: var(--bm-text);
  font: inherit;
  min-height: 46px;
  padding: 11px 13px;
  width: 100%;
}

.bm-field:focus,
.bm-textarea:focus,
.bm-select:focus {
  border-color: var(--bm-green);
  box-shadow: 0 0 0 3px rgba(22, 63, 47, 0.12);
  outline: none;
}

.bm-section {
  padding: 82px 0;
}

.bm-editor-page {
  padding: 72px 0;
}

.bm-front-editor {
  padding-top: 0;
}

.bm-editor-content > * {
  margin-left: auto;
  margin-right: auto;
  max-width: 1180px;
}

.bm-editor-content h1 {
  font-size: clamp(2.7rem, 6vw, 5.7rem);
  letter-spacing: 0;
  line-height: 0.95;
  margin: 0 0 24px;
}

.bm-editor-content h2 {
  font-size: clamp(2rem, 4vw, 3.8rem);
  letter-spacing: 0;
  line-height: 1;
  margin-bottom: 24px;
  margin-top: 72px;
}

.bm-editor-content h3 {
  font-size: 1.25rem;
  line-height: 1.18;
}

.bm-editor-content p,
.bm-editor-content li {
  color: #4b574f;
  font-size: 1.04rem;
}

.bm-editor-hero {
  background:
    radial-gradient(circle at 82% 12%, rgba(246,195,67,0.28) 0 140px, transparent 141px),
    linear-gradient(135deg, rgba(22,63,47,0.08) 0 1px, transparent 1px) 0 0 / 34px 34px,
    var(--bm-surface);
  border-bottom: 1px solid var(--bm-border);
  margin-bottom: 0;
  padding: 76px 0;
}

.bm-editor-hero__grid,
.bm-editor-split,
.bm-editor-contact {
  gap: 44px;
}

.bm-editor-photo {
  box-shadow: var(--bm-shadow);
  overflow: hidden;
}

.bm-editor-photo img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  width: 100%;
}

.bm-editor-band {
  background: var(--bm-green);
  color: #fff;
  margin: 0 auto 74px;
  padding: 34px;
}

.bm-editor-band h2,
.bm-editor-band h3,
.bm-editor-band p {
  color: #fff;
}

.bm-editor-band p {
  color: rgba(255, 255, 255, 0.76);
}

.bm-editor-cards > .wp-block-column,
.bm-editor-contact > .wp-block-column {
  border: 1px solid var(--bm-border);
  padding: 24px;
}

.bm-editor-gallery img {
  background: var(--bm-surface);
  border: 1px solid var(--bm-border);
}

.wp-block-button__link {
  background: var(--bm-yellow);
  border-radius: 0;
  color: #16170f;
  font-weight: 900;
  padding: 12px 18px;
}

.bm-wp-button-dark .wp-block-button__link {
  background: var(--bm-green);
  color: #fff;
}

.bm-animate {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 620ms ease, transform 620ms ease;
}

.bm-animate.bm-inview {
  opacity: 1;
  transform: translateY(0);
}

.bm-editor-photo img,
.bm-listing-card__media img {
  transition: transform 520ms ease;
}

.bm-editor-photo:hover img,
.bm-listing-card:hover .bm-listing-card__media img {
  transform: scale(1.035);
}

.bm-section--soft {
  background: var(--bm-surface);
}

.bm-section__head {
  align-items: end;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 32px;
}

.bm-section__head h2,
.bm-form-shell h1,
.bm-archive-head h1,
.bm-single h1 {
  font-size: clamp(2rem, 4vw, 3.6rem);
  letter-spacing: 0;
  line-height: 1;
  margin: 0;
}

.bm-section__head p,
.bm-archive-head p {
  color: var(--bm-muted);
  margin: 10px 0 0;
  max-width: 620px;
}

.bm-grid {
  display: grid;
  gap: 18px;
}

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

.bm-grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.bm-card {
  background: #fff;
  border: 1px solid var(--bm-border);
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 22px;
  transition: box-shadow 180ms ease, transform 180ms ease, border-color 180ms ease;
}

.bm-listing-card {
  gap: 16px;
}

.bm-card:hover {
  border-color: #b8c4b8;
  box-shadow: 0 20px 45px rgba(22, 31, 26, 0.1);
  transform: translateY(-2px);
}

.bm-listing-card__media {
  aspect-ratio: 16 / 10;
  background: var(--bm-surface-strong);
  margin: -22px -22px 2px;
  overflow: hidden;
  position: relative;
}

.bm-listing-card__media img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.bm-listing-card h3 {
  font-size: 1.24rem;
  line-height: 1.2;
  margin: 0;
}

.bm-meta {
  color: var(--bm-muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.91rem;
  font-weight: 700;
  gap: 12px;
}

.bm-price {
  color: var(--bm-green);
  font-size: 1.25rem;
  font-weight: 900;
  margin-top: auto;
}

.bm-ribbon {
  background: var(--bm-yellow);
  color: #15170f;
  font-size: 0.78rem;
  font-weight: 950;
  left: 12px;
  padding: 7px 10px;
  position: absolute;
  top: 12px;
}

.bm-verified {
  background: var(--bm-green-soft);
  color: var(--bm-green);
  padding: 2px 7px;
}

.bm-card-foot {
  color: var(--bm-muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.82rem;
  font-weight: 750;
  gap: 10px;
  margin-top: auto;
}

.bm-category-card {
  background: var(--bm-green);
  color: #fff;
  min-height: 190px;
  overflow: hidden;
  padding: 24px;
  position: relative;
}

.bm-category-card::after {
  background: repeating-linear-gradient(135deg, rgba(246,195,67,0.22) 0 10px, transparent 10px 20px);
  bottom: -30px;
  content: "";
  height: 95px;
  position: absolute;
  right: -20px;
  transform: rotate(-8deg);
  width: 140px;
}

.bm-category-card:nth-child(even) {
  background: #26362e;
}

.bm-category-card h3 {
  font-size: 1.45rem;
  line-height: 1.12;
  margin: 0 0 18px;
}

.bm-category-card p {
  color: rgba(255, 255, 255, 0.78);
  margin: 0;
}

.bm-offer-list {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bm-offer-item {
  align-items: start;
  background: #fff;
  border-left: 6px solid var(--bm-yellow);
  display: grid;
  gap: 6px;
  padding: 22px;
}

.bm-offer-item strong {
  font-size: 1.1rem;
}

.bm-offer-item span {
  color: var(--bm-muted);
}

.bm-process-section {
  background:
    linear-gradient(135deg, rgba(22,63,47,0.96), rgba(18,23,20,0.98)),
    var(--bm-green);
  color: #fff;
}

.bm-process-section .bm-section__head p {
  color: rgba(255, 255, 255, 0.72);
}

.bm-process {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.bm-process__item {
  border: 1px solid rgba(255, 255, 255, 0.16);
  min-height: 230px;
  padding: 24px;
}

.bm-process__item span {
  color: var(--bm-yellow);
  display: block;
  font-size: 2.4rem;
  font-weight: 950;
  line-height: 1;
  margin-bottom: 32px;
}

.bm-process__item strong {
  display: block;
  font-size: 1.1rem;
  line-height: 1.22;
}

.bm-process__item p {
  color: rgba(255, 255, 255, 0.72);
  margin: 10px 0 0;
}

.bm-cta {
  background: var(--bm-green);
  color: #fff;
  overflow: hidden;
  position: relative;
}

.bm-cta::after {
  background: repeating-linear-gradient(135deg, rgba(246,195,67,0.95) 0 18px, transparent 18px 36px);
  content: "";
  height: 100%;
  opacity: 0.8;
  position: absolute;
  right: 0;
  top: 0;
  width: min(26vw, 320px);
}

.bm-cta__inner {
  align-items: center;
  display: grid;
  gap: 30px;
  grid-template-columns: 1fr auto;
  padding: 58px 0;
  position: relative;
  z-index: 1;
}

.bm-cta h2 {
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1;
  margin: 0 0 12px;
}

.bm-cta p {
  color: rgba(255, 255, 255, 0.78);
  margin: 0;
  max-width: 650px;
}

.bm-archive-head {
  background: var(--bm-surface);
  border-bottom: 1px solid var(--bm-border);
  padding: 62px 0 42px;
}

.bm-filter-form {
  margin-top: 28px;
  max-width: 960px;
}

.bm-form-shell,
.bm-single {
  margin: 0 auto;
  max-width: 860px;
  padding: 72px 20px;
}

.bm-dashboard-shell {
  margin: 0 auto;
  max-width: 1180px;
  padding: 72px 20px;
}

.bm-form {
  display: grid;
  gap: 18px;
  margin-top: 32px;
}

.bm-form label {
  color: #334039;
  display: grid;
  font-weight: 800;
  gap: 7px;
}

.bm-form small {
  color: var(--bm-muted);
  font-weight: 600;
}

.bm-auth-form {
  background: var(--bm-surface);
  border: 1px solid var(--bm-border);
  padding: 24px;
}

.bm-auth-box {
  align-items: center;
  background: var(--bm-surface);
  border: 1px solid var(--bm-border);
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
  padding: 22px;
}

.bm-auth-box p {
  flex: 1 1 320px;
  margin: 0;
}

.bm-check {
  align-items: center;
  display: flex !important;
  font-weight: 750 !important;
  gap: 10px !important;
}

.bm-check input {
  height: 18px;
  width: 18px;
}

.bm-form__row {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bm-message {
  border-left: 6px solid var(--bm-green);
  margin-top: 24px;
  padding: 14px 18px;
}

.bm-message--error {
  border-color: var(--bm-red);
}

.bm-message--success {
  border-color: var(--bm-green);
}

.bm-dashboard {
  display: grid;
  gap: 28px;
}

.bm-stats--dashboard {
  margin-top: 0;
  max-width: none;
}

.bm-dashboard__head {
  align-items: end;
  border-bottom: 1px solid var(--bm-border);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding-bottom: 28px;
}

.bm-dashboard__head h1,
.bm-dashboard__editor h2,
.bm-dashboard__panel h2 {
  font-size: clamp(1.8rem, 3vw, 3.2rem);
  line-height: 1;
  margin: 0 0 10px;
}

.bm-dashboard__head p {
  color: var(--bm-muted);
  margin: 0;
  max-width: 720px;
}

.bm-dashboard__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.bm-dashboard__editor,
.bm-dashboard__panel {
  background: #fff;
  border: 1px solid var(--bm-border);
  max-width: 100%;
  overflow: hidden;
  padding: 24px;
}

.bm-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  width: 100%;
}

.bm-table {
  border-collapse: collapse;
  min-width: 760px;
  width: 100%;
}

.bm-table th,
.bm-table td {
  border-bottom: 1px solid var(--bm-border);
  padding: 14px 10px;
  text-align: left;
  vertical-align: middle;
}

.bm-table th {
  color: var(--bm-muted);
  font-size: 0.84rem;
  text-transform: uppercase;
}

.bm-table td:last-child {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.bm-table a {
  color: var(--bm-green);
  font-weight: 850;
}

.bm-table .bm-danger {
  color: var(--bm-red);
}

.bm-status {
  background: var(--bm-surface);
  border: 1px solid var(--bm-border);
  display: inline-flex;
  font-size: 0.84rem;
  font-weight: 850;
  padding: 5px 8px;
}

.bm-status--publish {
  background: var(--bm-green-soft);
  border-color: #b9d1bd;
  color: var(--bm-green);
}

.bm-status--pending {
  background: #fff4cf;
  border-color: #ead085;
  color: #6d4c00;
}

.bm-status--draft {
  color: var(--bm-muted);
}

.bm-single__hero {
  aspect-ratio: 16 / 9;
  background: var(--bm-surface-strong);
  margin: 30px 0;
  overflow: hidden;
}

.bm-single__hero img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.bm-single__panel {
  background: var(--bm-surface);
  border: 1px solid var(--bm-border);
  display: grid;
  gap: 10px;
  margin: 28px 0;
  padding: 22px;
}

.bm-footer {
  background: #121714;
  color: #fff;
  padding: 54px 0;
}

.bm-footer__inner {
  display: grid;
  gap: 26px;
  grid-template-columns: 1fr auto;
}

.bm-footer a,
.bm-footer p {
  color: rgba(255, 255, 255, 0.74);
}

.bm-empty {
  background: var(--bm-surface);
  border: 1px dashed var(--bm-border);
  padding: 32px;
}

.bm-preview-note {
  background: #fff7d7;
  border: 1px solid #ead085;
  color: #5f4507;
  font-weight: 700;
  padding: 12px 16px;
  text-align: center;
}

@media (max-width: 900px) {
  .bm-header__inner,
  .bm-nav,
  .bm-section__head,
  .bm-dashboard__head,
  .bm-cta__inner,
  .bm-footer__inner {
    align-items: stretch;
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  .bm-header__inner {
    padding: 16px 0;
  }

  .bm-nav {
    justify-content: start;
  }

  .bm-hero {
    background:
      linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(255,255,255,0.9) 62%, rgba(255,255,255,0.72) 100%),
      url("assets/images/hero-construction.svg") center bottom / 760px auto no-repeat,
      var(--bm-surface);
  }

  .bm-hero__inner {
    grid-template-columns: 1fr;
    min-height: 720px;
    padding-top: 54px;
  }

  .bm-search-form,
  .bm-filter-form,
  .bm-grid--3,
  .bm-grid--4,
  .bm-process,
  .bm-strip__inner,
  .bm-offer-list,
  .bm-form__row {
    grid-template-columns: 1fr;
  }

  .bm-cta::after {
    display: none;
  }
}

@media (max-width: 560px) {
  :root {
    --bm-container: min(100vw - 24px, 1180px);
  }

  .bm-nav {
    gap: 12px;
  }

  .bm-section {
    padding: 54px 0;
  }

  .bm-stats {
    grid-template-columns: 1fr;
  }

  .bm-card,
  .bm-category-card,
  .bm-offer-item {
    padding: 18px;
  }

  .bm-listing-card__media {
    margin: -18px -18px 0;
  }
}
