/* ========================================================================== */
/* HOME BLOCK (MaxiSpace layout) — merged styles (no duplicates)              */
/* ========================================================================== */

/* ====== BASE / LAYOUT ====== */

.home-xd {
    font-family: "Roboto", sans-serif;
    color: #0b1b2b;
}

.home-xd__container {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 16px;
    box-sizing: border-box;
}

.home-xd__section {
    padding: 72px 0;
}

/* ====== COMMON HEADINGS / EYEBROW ====== */

.home-xd__section-title {
    font-size: 2rem;
    line-height: 1.2;
    margin: 0 0 18px;
}

.home-xd__section-text {
    font-family: "Roboto", sans-serif;
    font-size: 50px;
    font-weight: 300;
    line-height: 1.2em;
    margin: 0;
    max-width: 500px;
    color: #000000;
}

.home-xd__section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
}

.home-xd__eyebrow {
    position: relative;
    margin: 0 0 10px;
    padding-left: 20px;
    font-size: 1.2rem;
    font-weight: bold;
    font-family: "din-2014", sans-serif;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: blink;
    color: var(--color3);
}

.home-xd__eyebrow a{
    color: var(--color3);
    text-decoration: blink;
}

.home-xd__eyebrow:before {
    content: '';
    position: absolute;
    top: 10px;
    left: 0;
    display: block;
    background: var(--color4);
    width: 10px;
    height: 10px;
}

.home-xd__eyebrow-white {
    position: relative;
    margin: 0 0 10px;
    padding-left: 20px;
    font-size: 1.2rem;
    font-weight: bold;
    font-family: "din-2014", sans-serif;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color1);
}

.home-xd__eyebrow-white a{
    color: var(--color1);
    text-decoration: blink;
}

.home-xd__eyebrow-white:before {
    content: '';
    position: absolute;
    top: 10px;
    left: 0;
    display: block;
    background: var(--color4);
    width: 10px;
    height: 10px;
}

/* ====== BUTTONS (common) ====== */

.home-xd__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.4rem;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid rgba(11, 27, 43, 0.18);
    background: #ffffff;
    color: #0b1b2b;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    white-space: nowrap;
}

.home-xd__btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}

.home-xd__btn--ghost {
    background: #ffffff;
}

/* ========================================================================== */
/* SECTION 1: HERO                                                            */
/* ========================================================================== */

.home-xd__hero {
    position: relative;
    min-height: 820px;
    display: flex;
    align-items: center;
    padding: 96px 0;
    background-size: cover;
    background-position: center;
    color: #ffffff;
    overflow: hidden;
}

.home-xd__overlay {
    position: absolute;
    inset: 0;
    background: transparent linear-gradient(90deg, #022655 50%, #03295A00 100%) 0% 0% no-repeat padding-box;
    z-index: 1;
}

.home-xd__hero-inner {
    position: relative;
    z-index: 2;
}

.home-xd__hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
    align-items: center;
}

.home-xd__hero-title {
    font-weight: 300;
    font-family: "din-2014", sans-serif;
    line-height: 1.05;
    margin: 0 0 18px;
    font-size: 2.4rem;
}

.home-xd__hero-title strong { 
    font-weight: bold; 
}

.home-xd__hero-subtitle {
    margin: 0;
    font-size: 1.25rem;
    font-family: "din-2014", sans-serif;
    line-height: 1.6;
    color: var(--color4);
}

.home-xd__hero-media img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 18px;
    opacity: 0.95;
    filter: saturate(1.02) contrast(1.05);
}

/* ========================================================================== */
/* SECTION 2: VALUE / STATS                                                   */
/* ========================================================================== */

.home-xd__section--value {
    background: var(--color2);
    background-image: url(/wp-content/uploads/2025/12/bg001-scaled.png);
    color: #ffffff;
}

.home-xd__section--value .home-xd__section-text,
.home-xd__section--value .home-xd__eyebrow {
    color: rgba(255,255,255,0.78);
}

.home-xd__value-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 26px;
    align-items: start;
}

.home-xd__stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    padding-top: 100px;
}

.home-xd__stat {
    padding-top: 50px;
}

.home-xd__stat-label {
    font-size: 1.5rem;
    font-weight: bold;
    font-family: "din-2014", sans-serif;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color4);
    margin-bottom: 6px;
}

.home-xd__stat-prefix {
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    color: var(--color1);
}

.home-xd__stat-number {
    font-size: 9rem;
    font-weight: bold;
    font-family: "din-2014", sans-serif;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    margin: 6px 0 8px;
}

.home-xd__stat-suffix {
    font-size: 2.4rem;
    margin-left: 4px;
    font-weight: 300;
}

.home-xd__stat-text {
    font-size: 0.95rem;
    line-height: 1.5;
    color: rgba(255,255,255,0.78);
}

.home-xd__section--value {
    background: var(--color2);
    background-image: url(/wp-content/uploads/2025/12/bg001-scaled.png);
    color: #ffffff;
}

/* Block: Stats (silverfox/stats) */

.sf-stats {
  /* Zielone tło jak na załączniku */
  background: #00B250;
  color: #ffffff;
  width: 100%;
  margin-bottom: 50px;
}

.sf-stats__inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: clamp(16px, 3vw, 28px);
}

.sf-stats__grid {
  list-style: none;
  display: grid;
  gap: clamp(12px, 2.2vw, 28px);
  margin: 0;
  padding: 0;
  align-items: start;
}

/* Jeśli dokładnie 4 elementy — zawsze 4 kolumny na desktopie */
.sf-stats--four .sf-stats__grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* W innych przypadkach układ automatyczny */
.sf-stats--auto .sf-stats__grid {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.sf-stats__item {
  padding: clamp(6px, 1.2vw, 10px);
  min-width: 0;
}

.sf-stats__label {
  margin: 0 0 10px 0;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 24px;
  line-height: 1.2;
  opacity: 0.95;
  color: #03295A;
}

.sf-stats__value {
  margin: 0;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  line-height: 1;
}

.sf-stats__number {
  font-weight: 800;
  font-size: clamp(44px, 9.2vw, 150px);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.sf-stats__unit {
  font-weight: 700;
  font-size: clamp(16px, 3.3vw, 50px);
  transform: translateY(-0.35em);
  opacity: 0.95;
}

.sf-stats__desc {
  margin: 10px 0 0 0;
  font-size: 15px;
  line-height: 1.35;
  opacity: 0.9;
  max-width: 34ch;
}

/* Tablet: 2 kolumny (tak, żeby było czytelnie) */
@media (max-width: 1024px) {
  .sf-stats--four .sf-stats__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Mobile: 1 kolumna */
@media (max-width: 560px) {
  .sf-stats__inner {
    padding: 16px;
  }

  .sf-stats--four .sf-stats__grid,
  .sf-stats--auto .sf-stats__grid {
    grid-template-columns: 1fr;
  }

  .sf-stats__desc {
    max-width: 100%;
  }
}

/* UX: preferencje ruchu */
@media (prefers-reduced-motion: reduce) {
  .sf-stats * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}



/* ========================================================================== */
/* SECTION: CLIENTS                                                           */
/* ========================================================================== */

.home-xd__section--clients {
    background: #FAFAFA;
    padding: 28px 0;
    border-bottom: 1px solid rgba(11, 27, 43, 0.08);
}

/* Eyebrow-like title, but ma swój kolor i bold */
.home-xd__clients-title {
    position: relative;
    font-family: "din-2014", sans-serif;
    font-weight: bold;
    font-size: 1.2rem;
    padding-left: 20px;
    text-transform: uppercase;
    color: var(--color3);
}

.home-xd__clients-title:before {
    content: '';
    position: absolute;
    top: 8px;
    left: 0;
    display: block;
    background: var(--color4);
    width: 10px;
    height: 10px;
}

.home-xd__clients-row{
    --ms-cols: 6; /* fallback */
    display: grid;
    grid-template-columns: repeat(var(--ms-cols), minmax(0, 1fr));
    gap: var(--ms-clients-gap, 26px);
    align-items: center;
    margin-top: 50px;
    margin-bottom: 50px;
}

.home-xd__client{
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

/* Carousel mode (enabled only when JS keeps .is-carousel) */
.home-xd__clients-row.is-carousel{
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    gap: var(--ms-clients-gap, 26px);
    padding-bottom: 6px;
    scrollbar-width: none;
}
.home-xd__clients-row.is-carousel::-webkit-scrollbar{ display:none; }

.home-xd__clients-row.is-carousel .home-xd__client{
    flex: 0 0 calc((100% - (var(--ms-clients-gap, 26px) * (var(--ms-cols) - 1))) / var(--ms-cols));
    scroll-snap-align: start;
}

@media (max-width: 1024px){
    .home-xd__clients-row{ --ms-cols: 4; }
}
@media (max-width: 560px){
    .home-xd__clients-row{ --ms-cols: 2; }
}

.home-xd__client img {
    width: auto;
    max-width: 150px;
    display: block;
    opacity: 0.85;
    transition: opacity 0.15s ease;
}

.home-xd__client img:hover {
    opacity: 1;
}

/* ========================================================================== */
/* SECTION 4: MARKETS                                                         */
/* ========================================================================== */

/* Osobne heady dla markets (różne font-size, max-width itp.) */

.home-xd__section-markets-text {
    font-family: "Roboto", sans-serif;
    font-size: 36px;
    font-weight: 300;
    line-height: 1.2em;
    margin: 0;
    max-width: 970px;
    color: #000000;
}

.home-xd__section-markets-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
}

.home-xd__market-thumb img {
    width: 320px;
    height: 320px;
    object-fit: cover;
}

.home-xd__market-title {
    text-align: left;
    font-size: 30px;
    font-weight: bold;
    letter-spacing: 0px;
    color: #03295A;
    opacity: 1;
    padding-top: 10px;
}

.home-xd__markets-nav{
    display:flex;
    gap:10px;
    align-items:center;
    justify-content:flex-end;
    margin-top: 4px;
}

.home-xd__nav-btn{
    width:40px;
    height:40px;
    border-radius:100%;
    border:1px solid rgba(11, 27, 43, 0.22);
    background:#fff;
    color:#0b1b2b;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    line-height:1;
}

.home-xd__nav-btn:disabled{
    opacity:.35;
    cursor:default;
}

.home-xd__markets-carousel{
    position:relative;
}

.home-xd__markets-viewport{
    overflow-x:auto;
    overflow-y:hidden;
    -webkit-overflow-scrolling:touch;
    scroll-snap-type:x mandatory;
    scroll-padding-left: 2px;
    scrollbar-width:none;
}

.home-xd__markets-viewport::-webkit-scrollbar{
    display:none;
}

.home-xd__markets-track{
    display:flex;
    gap:14px;
    margin-bottom: 30px;
}

.home-xd__market-card{
    flex:0 0 100%;
    scroll-snap-align:start;
    text-decoration: inherit !important;
}

@media (min-width: 640px){
    .home-xd__market-card{
        flex-basis: calc((100% - 14px) / 2);
    }
}

@media (min-width: 992px){
    .home-xd__market-card{
        flex-basis: calc((100% - (14px * 3)) / 4);
    }
}

@media (max-width: 768px){
    .home-xd__section-markets-text {
        font-size: 20px;
    }
    .home-xd__market-thumb img {
        width: 100%;
    }
}

/* ========================================================================== */
/* SECTION 5: FEATURED PROJECTS                                               */
/* ========================================================================== */

section.home-xd__section.home-xd__section--projects {
    background: #FAFAFA;
}

/* Osobne heady dla projects (różne font-size, max-width itp.) */

.home-xd__section-projects-text {
    font-family: "Roboto", sans-serif;
    font-size: 36px;
    font-weight: 300;
    line-height: 1.2em;
    margin: 0;
    max-width: 800px;
    color: #000000;
}

.home-xd__section-projects-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
}

/* jeśli w projektach chcesz kropkę nieco wyżej (było top:6px), to nadpisujemy tylko tutaj */
.home-xd__section--projects .home-xd__eyebrow:before {
    top: 6px;
}
#sf-archive .home-xd__eyebrow:before {
    top: 8px;
}


.home-xd__projects-list {
    display: grid;
    gap: 14px;
}

.home-xd__project-item {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 14px;
    align-items: center;
    text-decoration: none;
    color: inherit;
    background: #ffffff;
}

@media (max-width: 768px) {
    .home-xd__section-projects-text {
        font-size: 20px;
    }
    .home-xd__project-item {
        grid-template-columns: 1fr;
    }
    .home-xd__project-thumb img {
        width: 100% !important;
    }
    .home-xd__project-body {
        grid-template-columns: 1fr !important;
    }
    .home-xd__project-title {
        font-size: 24px !important;
    }
    .home-xd__project-excerpt {
        font-size: 18px !important;
    }
}

.home-xd__project-thumb img {
    width: 350px;
    height: 150px;
    object-fit: cover;
    display: block;
}

.home-xd__project-body {
    display: grid;
    grid-template-columns: 330px 1fr;
    gap: 30px;
    padding: 20px;
}

.home-xd__project-title {
    font-size: 30px;
    font-weight: bold;
    margin-bottom: 4px;
    color: #03295A;
}

.home-xd__project-excerpt {
    color: #000000;
    font-size: 28px;
    line-height: 1.5;
}

/* ========================================================================== */
/* BREAKPOINTS (global)                                                       */
/* ========================================================================== */

@media (min-width: 768px) {
    .home-xd__hero-grid {
        grid-template-columns: 1.2fr 0.8fr;
        gap: 40px;
    }

    .home-xd__hero-title {
        font-size: 3.2rem;
    }

    .home-xd__value-grid {
        grid-template-columns: 1.1fr 1fr;
        gap: 40px;
    }

    .home-xd__stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* (Twoje stare wpisy miały grid-template-columns na track, ale u Ciebie track jest flex.
       Zostawiamy tylko flex + breakpointy kart, żeby nie mieszać.) */

    .home-xd__news-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .home-xd__hero-title {
        font-size: 6.2rem;
    }
}

@media (max-width: 768px){
    .home-xd__section-text {
        font-size: 24px;
    }
    .home-xd__stats {
        grid-template-columns: repeat(2, 1fr);
        padding-top: 30px;
    }
    .home-xd__stat-label {
        font-size: 1rem;
    }
    .home-xd__stat-number {
        font-size: 7rem;
    }
}

/* News + Insights (frontend) */
.home-xd__section--news-insights {
  padding: 48px 0;
}

.home-xd__section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.home-xd__btn.home-xd__btn--outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 18px;
  border: 2px solid #0C2D57;
  border-radius: 999px;
  color: #0C2D57;
  background: transparent;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}

.home-xd__btn.home-xd__btn--outline:hover {
  text-decoration: none;
}

.home-xd__news-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.home-xd__news-media {
  display: block;
  overflow: hidden;
}

.home-xd__news-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.home-xd__news-body {
  padding-top: 14px;
}

.home-xd__news-tag {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #0C2D57;
  margin-bottom: 10px;
}

.home-xd__news-title {
  margin: 0 0 10px 0;
  font-size: 28px;
  line-height: 1.15;
  font-weight: 800;
  color: #0C2D57;
}

.home-xd__news-title a {
  color: inherit;
  text-decoration: none;
}

.home-xd__news-excerpt {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #3E4A59;
  max-width: 62ch;
}

@media (max-width: 900px) {
  .home-xd__section-header {
    align-items: flex-start;
    flex-direction: column;
  }
  .home-xd__btn.home-xd__btn--outline {
    align-self: flex-start;
  }
  .home-xd__news-grid {
    grid-template-columns: 1fr;
  }
  .home-xd__news-title {
    font-size: 22px;
  }
}


/* DOWNLOAD */

.ms-download {
  border-radius: 10px;
}

.ms-download-wrap--fullwidth {
  /* w edytorze też ma działać pełna szerokość */
  max-width: none;
}