/* =========================================================
   MOJA WARMIA — STRONA GŁÓWNA
   Jedno źródło stylów dla hero, wyszukiwarki, podglądu
   wydarzeń i siatki strony głównej.
   ========================================================= */

/* Hero ---------------------------------------------------- */
.mw-home-hero {
  position: relative;
  min-height: 700px;
  overflow: hidden;
  background: #f7f4ea var(--mw-home-bg) center / cover no-repeat;
}

.mw-home-hero__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(6,63,53,.82) 0%,
    rgba(6,63,53,.70) 25%,
    rgba(6,63,53,.43) 42%,
    rgba(6,63,53,.15) 59%,
    rgba(6,63,53,.02) 72%,
    rgba(6,63,53,0) 100%
  );
}

.mw-home-hero__grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0,1.15fr) minmax(390px,.72fr);
  gap: 72px;
  align-items: center;
  min-height: 700px;
  padding-top: 136px;
  padding-bottom: 46px;
}

.mw-home-hero__content { max-width: 820px; }

.mw-home-hero h1 {
  max-width: 700px;
  margin: 0 0 22px;
  font-family: "Poppins", sans-serif;
  font-size: clamp(56px,5vw,82px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -.045em;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,.18);
}

/* Druga linia nagłówka HOME: żółty akcent + dekoracyjne maźnięcie farbą. */
.mw-home-hero h1 span {
  position: relative;
  display: inline-block;
  color: #e5a900;
  z-index: 0;
}

.mw-home-hero h1 span::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: -.03em;
  right: -.06em;
  bottom: -.13em;
  height: .105em;
  background: rgba(229,169,0,.48);
  clip-path: polygon(0 38%, 8% 18%, 23% 30%, 41% 8%, 59% 25%, 76% 13%, 100% 31%, 97% 72%, 79% 61%, 61% 83%, 39% 67%, 18% 88%, 2% 70%);
  transform: rotate(-.7deg);
  transform-origin: center;
}

.mw-home-lead {
  max-width: 650px;
  margin: 0 0 24px;
  font-size: 18px;
  line-height: 1.5;
  color: #fff;
  text-shadow: 0 1px 7px rgba(0,0,0,.28);
}

/* Wyszukiwarka ------------------------------------------- */
.mw-home-search {
  display: grid;
  grid-template-columns: minmax(290px,1.32fr) minmax(300px,1.08fr) 160px;
  column-gap: 10px;
  align-items: stretch;
  max-width: 940px;
  min-height: 82px;
  padding: 8px;
  border: 1px solid rgba(16,43,37,.10);
  border-radius: 26px;
  background: rgba(255,255,255,.97);
  box-shadow: 0 18px 50px rgba(24,53,42,.16);
}

.mw-home-search__query,
.mw-home-search__location {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 7px 16px;
  border-right: 1px solid #e1e8e4;
}

.mw-home-search__location {
  position: relative;
  z-index: 20;
  min-width: 0;
  border-right: 0;
}


.mw-home-search__icon {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f0f7f3;
  color: #087b47;
}

.mw-home-search__icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mw-home-search__field {
  position: relative;
  min-width: 0;
  flex: 1;
}

.mw-home-search__field > strong {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
  font-weight: 800;
  color: #21483d;
}

.mw-home-search input[type="search"],
.mw-location-input {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 0 11px;
  border: 1px solid #d9e3dd;
  border-radius: 10px;
  background: #fff;
  outline: 0;
  color: #173b31;
  font: 600 14px var(--mw-font-body);
  transition: border-color .2s ease, box-shadow .2s ease;
}

.mw-home-search input::placeholder {
  color: #7a8b84;
  font-weight: 500;
}

.mw-home-search input[type="search"]:focus,
.mw-location-input:focus {
  border-color: #168154;
  box-shadow: 0 0 0 3px rgba(22,129,84,.09);
}

.mw-location-combobox {
  position: relative;
  width: 100%;
  min-width: 0;
}


.mw-location-input {
  min-width: 0;
  padding-right: 42px;
}

.mw-location-toggle {
  position: absolute;
  z-index: 3;
  right: 3px;
  bottom: 2px;
  width: 34px;
  height: 30px;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  color: #0b6f47;
  cursor: pointer;
}

.mw-location-toggle:hover,
.mw-location-toggle:focus {
  background: #eef7f1;
  outline: 0;
}

.mw-location-toggle span {
  position: absolute;
  left: 12px;
  top: 7px;
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.mw-home-search__submit {
  min-width: 160px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 18px;
  background: #087b47;
  box-shadow: 0 10px 24px rgba(8,123,71,.18);
  color: #fff;
  font: 800 16px/1 var(--mw-font-display);
  cursor: pointer;
  transition: transform .2s ease, background .2s ease;
}

.mw-home-search__submit:hover {
  background: #066c3e;
  transform: translateY(-1px);
}

.mw-home-search__submit svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

/* Autocomplete lokalizacji ------------------------------- */
.mw-location-list {
  position: absolute;
  z-index: 999;
  top: calc(100% + 7px);
  left: 0;
  width: max(100%,240px);
  min-width: 240px;
  max-height: 300px;
  padding: 6px;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid #d8e4dd;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(18,59,43,.18);
  scrollbar-gutter: stable;
}

.mw-location-list[hidden] { display: none; }

.mw-location-option {
  width: 100%;
  min-width: 0;
  min-height: 39px;
  height: auto;
  margin: 0;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
  color: #173b31;
  text-align: left;
  white-space: nowrap;
  font: 650 13px/1.3 var(--mw-font-body);
  cursor: pointer;
}

.mw-location-option + .mw-location-option { margin-top: 1px; }

.mw-location-option:hover,
.mw-location-option:focus {
  background: #eef7f1;
  color: #076f43;
  outline: 0;
}

.mw-location-option.is-all {
  margin-bottom: 4px;
  padding-bottom: 9px;
  border-bottom: 1px solid #edf1ee;
  border-radius: 8px 8px 3px 3px;
  background: #f8fbf9;
  font-weight: 800;
}

.mw-location-option.is-all:hover,
.mw-location-option.is-all:focus { background: #eef7f1; }

.mw-location-option__pin,
.mw-location-option__all {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: grid;
  place-items: center;
  color: #0a7b48;
}

.mw-location-option__pin svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
}

.mw-location-option__all {
  font-size: 16px;
  line-height: 1;
}

.mw-location-option > span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mw-location-empty {
  padding: 10px;
  color: #6b7c75;
  font-size: 12px;
  line-height: 1.4;
}

/* Szybkie filtry ----------------------------------------- */
.mw-home-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}

.mw-home-chips a {
  min-height: 40px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #d8e2dc;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 5px 16px rgba(25,54,43,.04);
  color: #173e33;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.mw-home-chips a svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mw-home-chips a.is-today {
  border-color: #f6c52d;
  background: #f6c52d;
  color: #18372f;
}

/* „Już wkrótce” ------------------------------------------ */
.mw-home-preview {
  display: grid;
  gap: 12px;
  align-self: center;
  padding-top: 8px;
}

.mw-home-preview__head {
  padding: 0;
}

.mw-home-preview__head span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 999px;
  background: rgba(255,255,255,.88);
  box-shadow: 0 6px 18px rgba(20,42,35,.08);
  color: #087047;
  font: 800 13px/1 var(--mw-font-display);
  letter-spacing: .075em;
  text-transform: uppercase;
}

.mw-home-preview__list {
  display: grid;
  gap: 14px;
}

.mw-home-preview__all {
  justify-self: start;
  margin: 2px 0 0 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  text-shadow: 0 1px 8px rgba(0,0,0,.28);
}

.mw-home-preview__all:hover { text-decoration: underline; }

.mw-preview-card {
  position: relative;
  display: grid;
  grid-template-columns: 64px 96px minmax(0,1fr) 24px;
  gap: 14px;
  align-items: center;
  min-height: 94px;
  padding: 10px 15px 10px 10px;
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 22px;
  background: rgba(255,255,255,.95);
  box-shadow: 0 15px 36px rgba(20,42,35,.15);
  color: #122f27;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}

.mw-preview-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 44px rgba(20,42,35,.2);
}

.mw-preview-date {
  height: 66px;
  display: grid;
  place-content: center;
  border-radius: 15px;
  background: #08753d;
  color: #fff;
  text-align: center;
}

.mw-preview-date strong { font: 800 25px/1 var(--mw-font-display); }
.mw-preview-date small { margin-top: 4px; font-size: 10px; font-weight: 800; }

.mw-preview-img {
  width: 96px;
  height: 70px;
  object-fit: cover;
  border-radius: 14px;
}

.mw-preview-img--placeholder {
  display: grid;
  place-items: center;
  background: #eef6f0;
  color: #0a7b48;
}

.mw-preview-img--placeholder svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.mw-preview-copy { min-width: 0; }

.mw-preview-copy strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font: 800 15px/1.3 var(--mw-font-display);
}

.mw-preview-copy small {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  color: #527067;
}

.mw-preview-copy small svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.mw-preview-arrow { color: #0a7c4a; font-size: 19px; }

/* Najnowsze wydarzenia ----------------------------------- */
.mw-home-events {
  padding: 34px 0 76px;
  background: #fff;
}

.mw-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 20px;
}

.mw-section-eyebrow {
  color: #0a8950;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.mw-section-head h2 {
  margin: 5px 0 0;
  color: #083c32;
  font: 800 clamp(30px,3vw,44px)/1.1 var(--mw-font-display);
}

.mw-section-head > a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #087544;
  font-weight: 800;
  text-decoration: none;
}

.mw-home-event-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.mw-home-event-grid {
  display: grid;
  grid-template-columns: repeat(6,minmax(0,1fr));
  column-gap:14px;
  row-gap:22px;
}

.mw-home-event-grid .dwwe-card { min-width: 0; }
.mw-home-event-grid .dwwe-card__media { aspect-ratio: 16/8.2; }
.mw-home-event-grid .dwwe-card__body { padding: 12px 12px 13px; }
.mw-home-event-grid .dwwe-card__city { margin-bottom:9px; font-size:12px; line-height:1.15; letter-spacing:.07em; color:#066b43; }
.mw-home-event-grid .dwwe-card__city svg { width:16px; height:16px; flex:0 0 16px; stroke-width:2.25; }
.mw-home-event-grid .dwwe-card__title { font-size: 15px; }
.mw-home-event-grid .dwwe-card__meta { margin-top: 10px; font-size: 11px; }
.mw-home-event-grid .dwwe-card__more { padding-top: 12px; font-size: 12px; }

.mw-home-events__all-wrap {
  display: flex;
  justify-content: center;
  margin-top: 2px;
}

.mw-home-events__all {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid #0a8950;
  border-radius: 999px;
  color: #087544;
  background: #fff;
  font-weight: 800;
  text-decoration: none;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}

.mw-home-events__all:hover,
.mw-home-events__all:focus-visible {
  background: #0a8950;
  color: #fff;
  transform: translateY(-1px);
}

.mw-home-empty {
  grid-column: 1/-1;
  padding: 44px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  border: 1px dashed #bfd3c7;
  border-radius: 22px;
  background: #f6faf7;
}

.mw-home-empty strong { font-size: 22px; }
.mw-home-empty a { margin-top: 8px; color: #087544; font-weight: 800; }

/* Organizator --------------------------------------------- */
.mw-organizer-card {
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border: 1px solid #e9e2ca;
  border-radius: 24px;
  background: linear-gradient(145deg,#fffdf6,#f6f4e7);
}

.mw-organizer-card__icon {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #edf8f0;
  color: #087b47;
}

.mw-organizer-card__icon svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mw-organizer-card__icon img {
  width: 39px;
  height: 39px;
  display: block;
  object-fit: contain;
}

.mw-organizer-card h3 {
  margin: 22px 0 10px;
  color: #083b31;
  font: 800 22px/1.15 var(--mw-font-display);
}

.mw-organizer-card p {
  margin: 0;
  color: #56665f;
  line-height: 1.55;
}

.mw-organizer-card > a {
  width: 100%;
  min-height: 48px;
  margin-top: auto;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 999px;
  background: #087b47;
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.mw-organizer-card--wide {
  min-height: 0;
  padding: 22px 26px;
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: 22px;
}

.mw-organizer-card--wide .mw-organizer-card__icon { margin: 0; }
.mw-organizer-card--wide .mw-organizer-card__copy h3 { margin: 0 0 5px; }
.mw-organizer-card--wide .mw-organizer-card__copy p { margin: 0; }
.mw-organizer-card--wide > a { width: auto; min-width: 205px; margin: 0; }

/* Responsive strony głównej — wyłącznie komponenty .mw-home-*.
   Globalne breakpointy nagłówka/shella pozostają w responsive.css. */
@media (max-width: 1500px) {
  .mw-home-event-grid { grid-template-columns: repeat(5,minmax(0,1fr)); }
}

@media (max-width: 1320px) {
  .mw-home-event-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
}

@media (max-width: 1250px) {
  .mw-home-hero__grid {
    grid-template-columns: minmax(0,1fr) 430px;
    gap: 34px;
  }
}

@media (max-width: 1180px) {
  .mw-home-event-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}

@media (max-width: 1050px) {
  .mw-home-hero__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .mw-home-preview { padding-top: 0; }
  .mw-home-preview__list { grid-template-columns: repeat(3,1fr); }
  .mw-preview-card { grid-template-columns: 56px 1fr 20px; }
  .mw-preview-img { display: none; }
}

@media (max-width: 900px) {
  .mw-home-event-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 760px) {
  .mw-home-hero { min-height: auto; }

  .mw-home-hero__veil {
    background: linear-gradient(180deg,rgba(6,63,53,.82),rgba(6,63,53,.68) 70%,rgba(6,63,53,.48));
  }

  .mw-home-hero__grid {
    min-height: auto;
    padding-top: 132px;
    padding-bottom: 42px;
    gap: 28px;
  }

  .mw-home-hero h1 { font-size: 52px; }
  .mw-home-lead { font-size: 16px; }

  .mw-home-search {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .mw-home-search__query,
  .mw-home-search__location {
    width: 100%;
    min-width: 0;
    border-right: 0;
    border-bottom: 1px solid #e8ece9;
  }

  .mw-location-combobox,
  .mw-location-input {
    width: 100%;
    min-width: 0;
  }

  .mw-location-list {
    left: 0;
    right: 0;
    width: 100%;
    min-width: 0;
    max-height: 250px;
  }

  .mw-home-search__submit { min-height: 54px; }
  .mw-home-preview__list { grid-template-columns: 1fr; }
  .mw-home-event-grid { grid-template-columns: 1fr; }

  .mw-section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .mw-home-event-layout { display: block; }
  .mw-organizer-card { margin-top: 20px; }

  .mw-organizer-card--wide {
    display: flex;
    align-items: flex-start;
  }

  .mw-organizer-card--wide > a {
    width: 100%;
    min-width: 0;
    margin-top: 18px;
  }
}

/* v2.1.63 — HOME: ergonomia na telefonach, bez wpływu na tablet/desktop. */
@media (max-width:600px){
  .mw-home-hero__grid{
    padding-top:108px;
    padding-bottom:34px;
    gap:24px;
  }

  .mw-home-hero h1{
    margin-bottom:16px;
    font-size:clamp(38px,11.5vw,48px);
    line-height:1;
  }

  .mw-home-lead{
    margin-bottom:18px;
    font-size:14px;
    line-height:1.45;
  }

  /* Wyszukiwarka: większa szerokość robocza pól, mniej pustych przestrzeni. */
  .mw-home-search{
    width:100%;
    padding:6px;
    gap:0;
    border-radius:20px;
  }
  .mw-home-search__query,
  .mw-home-search__location{
    gap:9px;
    min-height:58px;
    padding:6px 9px;
  }
  .mw-home-search__icon{
    width:38px;
    height:38px;
    flex-basis:38px;
  }
  .mw-home-search__icon svg{
    width:19px;
    height:19px;
  }
  .mw-home-search__field > strong{
    margin-bottom:3px;
    font-size:11px;
  }
  .mw-home-search input[type="search"],
  .mw-location-input{
    height:32px;
    padding-inline:9px;
    font-size:13px;
  }
  .mw-home-search__submit{
    min-height:48px;
    margin-top:5px;
    border-radius:15px;
  }

  .mw-home-chips{
    gap:7px;
    margin-top:14px;
  }
  .mw-home-chips a{
    min-height:36px;
    padding:0 11px;
    gap:6px;
    font-size:12px;
  }
  .mw-home-chips a svg{
    width:15px;
    height:15px;
  }

  /* Już wkrótce: trochę więcej miejsca na tytuł i mniej elementów dekoracyjnych. */
  .mw-home-preview{
    gap:9px;
  }
  .mw-home-preview__list{
    gap:9px;
  }
  .mw-preview-card{
    grid-template-columns:52px minmax(0,1fr) 18px;
    gap:10px;
    min-height:76px;
    padding:8px 10px 8px 8px;
    border-radius:17px;
  }
  .mw-preview-date{
    height:58px;
    border-radius:12px;
  }
  .mw-preview-date strong{
    font-size:22px;
  }
  .mw-preview-copy strong{
    font-size:13px;
    line-height:1.25;
  }
  .mw-preview-copy small{
    margin-top:5px;
    font-size:11px;
  }
  .mw-preview-arrow{
    font-size:16px;
  }
  .mw-home-preview__all{
    margin-left:3px;
    font-size:13px;
  }
}
