/* =====================================================
   UNIFIED HERO
   Łączy: case-studies-hero, custom-hero, custom-hero-2
   Warianty: mockup (inline/overlap), stats (simple/icon)
   ===================================================== */

/* === BASE === */

.uh-hero {
    position: relative;
    z-index: 100;
    width: 100%;
    padding-top: 20vh;
    padding-bottom: 60px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--wp--preset--color--white);
    overflow: visible;
    font-family: var(--wp--preset--font-family--archivo);
    border-bottom: #FF3200 3px solid;
    box-sizing: border-box;
}

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

.uh-hero__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.85) 100%);
}

.uh-container {
    position: relative;
    z-index: 2;
    max-width: var(--wp--style--global--wide-size);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 50px;
}


/* === STREFA 1: TOP (tekst + mockup inline) === */

.uh-hero__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.uh-hero__text {
    flex: 1 1 0;
    max-width: 800px;
}

/* Gdy brak mockupa — tekst może być szerszy */
.uh-hero:not(.uh-hero--mockup-inline) .uh-hero__text {
    max-width: 880px;
}

.uh-hero__date {
    font-family: var(--wp--preset--font-family--gilroy);
    font-size: var(--wp--preset--font-size--caption);
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--wp--preset--color--orange);
}

.uh-hero__pretitle {
    font-family: var(--wp--preset--font-family--gilroy);
    font-size: 24px;
    font-weight: 600;
    color: var(--wp--preset--color--orange);
    margin: 0 0 24px 0;
}

.uh-hero__title {
    font-family: var(--wp--preset--font-family--gilroy);
    font-size: var(--wp--preset--font-size--heading-2);
    line-height: 1.2;
    margin: 0 0 24px 0;
    text-transform: uppercase;
}

.uh-hero__subtitle-orange {
    font-family: var(--wp--preset--font-family--gilroy);
    font-size: 24px;
    color: var(--wp--preset--color--orange);
    margin: 0 0 8px 0;
}

.uh-hero__subtitle-body {
    font-family: var(--wp--preset--font-family--archivo);
    font-size: 24px;
    line-height: 1.8;
    color: #F3F6FB;
    margin: 0;
}

.uh-hero__subtitle-body p {
    margin: 0;
    line-height: 34px;
}


/* === MOCKUP: INLINE (obok tekstu, side-by-side) === */

.uh-hero--mockup-inline .uh-hero__mockup--inline {
    flex: 0 0 auto;
    max-width: 450px;
    width: 100%;
    height: auto;
}

.uh-hero--mockup-inline .uh-hero__mockup--inline img {
    display: block;
    width: 100%;
    height: auto;
}


/* === MOCKUP: OVERLAP (absolute, wystaje poniżej hero) === */

.uh-hero__mockup--overlap {
    position: absolute;
    bottom: -320px;
    right: 0;
    z-index: 1000;
    max-width: 650px;
    width: 100%;
}

.uh-hero__mockup--overlap img {
    display: block;
    width: 100%;
    height: auto;
}


/* === STREFA 2: STATYSTYKI === */

.uh-hero__stats-grid {
    display: grid;
    gap: 20px;
    width: 100%;
}

/* --- Styl: simple (3 kolumny, glassmorphic, label + wartość) --- */

.uh-hero--stats-simple .uh-hero__stats-grid {
    grid-template-columns: repeat(3, 1fr);
    max-width: 900px;
}

.uh-hero--stats-simple .uh-hero__stat-box {
    background: #40434840;
    backdrop-filter: blur(4px);
    border-radius: 10px;
    padding: 25px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
}

.uh-hero__stat-value {
    font-family: var(--wp--preset--font-family--gilroy);
    font-size: var(--wp--preset--font-size--heading-4);
    line-height: 1.2;
    color: var(--wp--preset--color--orange);
    margin-bottom: 10px;
}

.uh-hero__stat-label {
    font-family: var(--wp--preset--font-family--archivo);
    font-size: var(--wp--preset--font-size--text);
}

/* --- Styl: icon (4 kolumny, ikona 120×120 + heading + tekst) --- */

.uh-hero--stats-icon .uh-hero__stats-grid {
    grid-template-columns: repeat(4, 1fr);
}

.uh-hero--stats-icon .uh-hero__stat-box {
    background: #40434840;
    backdrop-filter: blur(4px);
    border-radius: 10px;
    padding: 24px 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
    text-align: left;
}

.uh-hero__stat-icon {
    display: flex;
    justify-content: flex-start;
}

.uh-hero__stat-icon img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    display: block;
}

.uh-hero__stat-heading {
    font-family: var(--wp--preset--font-family--gilroy);
    font-size: var(--wp--preset--font-size--text);
    text-transform: uppercase;
    color: var(--wp--preset--color--orange);
}

.uh-hero__stat-text {
    font-family: var(--wp--preset--font-family--archivo);
    font-size: var(--wp--preset--font-size--text);
    line-height: 1.6;
}

/* --- Styl: flat (duże wartości bez boxów, rzędowy układ) --- */

.uh-hero--stats-flat .uh-hero__stats-grid {
    grid-template-columns: repeat(4, 1fr);
    max-width: 100%;
    gap: 0px;
}

.uh-hero--stats-flat .uh-hero__stat-box {
    background: transparent;
    backdrop-filter: none;
    border-radius: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    border-right: 2px solid #4C4C4C;
}

.uh-hero--stats-flat .uh-hero__stat-box:last-child {
    border-right: none;
}


.uh-hero--stats-flat .uh-hero__stat-value {
    font-size: var(--wp--preset--font-size--heading-2);
    margin-bottom: 8px;
}

.uh-hero--stats-flat .uh-hero__stat-label {
    font-size: var(--wp--preset--font-size--text);
    color: var(--wp--preset--color--white);
}

/* --- Styl: card (białe karty, ikona po lewej + tekst po prawej) --- */

.uh-hero--stats-card .uh-hero__stats-grid {
    grid-template-columns: repeat(3, 1fr);
    max-width: 100%;
}

.uh-hero--stats-card .uh-hero__stat-box {
    background: #ffffff;
    backdrop-filter: none;
    border-radius: 12px;
    padding: 32px 24px;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 16px;
    text-align: left;
}

.uh-hero--stats-card .uh-hero__stat-icon {
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
}

.uh-hero--stats-card .uh-hero__stat-icon img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.uh-hero--stats-card .uh-hero__stat-text {
    color: #1a1a1a;
    font-size: var(--wp--preset--font-size--text);
    line-height: 1.6;
}

/* --- Styl: bullets-quote (3 punkty w rzędzie + blok cytatu) --- */

.uh-hero__bullets-quote-zone {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.uh-hero--stats-bullets-quote .uh-hero__stats-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px 40px;
    max-width: 100%;
}

.uh-hero--stats-bullets-quote .uh-hero__stat-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: transparent;
    backdrop-filter: none;
    border-radius: 0;
    padding: 0;
}

.uh-hero__bullet-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: var(--wp--preset--color--orange);
    flex-shrink: 0;
}

.uh-hero__bullet-text {
    font-family: var(--wp--preset--font-family--gilroy);
    font-weight: 700;
    font-size: var(--wp--preset--font-size--text);
    color: var(--wp--preset--color--white);
}

.uh-hero__quote-block {
    border-left: 4px solid var(--wp--preset--color--orange);
    padding: 10px 20px;
    font-family: var(--wp--preset--font-family--archivo);
    font-size: var(--wp--preset--font-size--text);
    color: var(--wp--preset--color--white);
    line-height: 1.7;
    max-width: 860px;
}

.uh-hero__quote-block p {
    margin: 0;
}


/* === STREFA 3: STOPKA (tekst + przyciski + social) === */

.uh-hero__footer-wrap {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.uh-hero__footer-text {
    font-family: var(--wp--preset--font-family--archivo);
    font-size: 17px;
    line-height: 1.6;
    max-width: 700px;
}

.uh-hero__footer {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    width: 100%;
}

/* Układ: obok siebie (przyciski i social po przeciwległych stronach) */
.uh-hero__footer--row {
    justify-content: space-between;
}

/* Socials po lewej w row layout — CSS order, nie PHP */
.uh-hero__footer--row.uh-hero__footer--socials-left .uh-hero__socials {
    order: -1;
}

/* Układ: osobne rzędy (przyciski zawsze wyżej, social poniżej) */
.uh-hero__footer--column {
    flex-direction: column;
    align-items: flex-start;
    gap: 80px;
}

/* W column layout left/right = wyrównanie poziome social, nie kolejność pionowa */
.uh-hero__footer--column.uh-hero__footer--socials-left .uh-hero__socials {
    align-self: flex-start;
}

.uh-hero__footer--column.uh-hero__footer--socials-right .uh-hero__socials {
    align-self: flex-end;
}

/* Wrapper na 1 lub 2 przyciski */
.uh-hero__buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

/* Przycisk CTA — główny (filled orange) */
.uh-hero__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    border-radius: 8px;
    background: var(--wp--preset--color--orange);
    color: var(--wp--preset--color--white);
    text-decoration: none;
    font-family: var(--wp--preset--font-family--gilroy);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    border: 2px solid transparent;
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

.uh-hero__button:hover {
    background-color: rgba(255, 50, 0, 0.1);
    border-color: var(--wp--preset--color--white);
    color: var(--wp--preset--color--white);
}

/* Przycisk CTA — drugorzędny (outline white) */
.uh-hero__button--secondary {
    background: transparent;
    border-color: var(--wp--preset--color--white);
    color: var(--wp--preset--color--white);
}

.uh-hero__button--secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--wp--preset--color--white);
    color: var(--wp--preset--color--white);
}

/* Social icons */
.uh-hero__socials {
    display: flex;
    gap: 20px;
    padding-bottom: 5px;
}

.uh-hero__social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--wp--preset--color--white);
    text-decoration: none;
    transition: color 0.3s ease;
}

.uh-hero__social-link:hover {
    color: var(--wp--preset--color--orange);
}

/* SVG mask — base */
.uh-icon {
    font-size: 0;
    display: inline-block;
    width: 36px;
    height: 36px;
    background-color: currentColor;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

/* SVG masks — platformy */
.uh-icon--facebook {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 512'%3E%3Cpath d='M279.1 288l14.22-92.66h-88.91v-60.13c0-25.35 12.42-50.06 52.24-50.06h40.42V6.26S260.4 0 225.4 0c-73.22 0-121.1 44.38-121.1 124.7v70.62H22.89V288h81.39v224h100.2V288z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 512'%3E%3Cpath d='M279.1 288l14.22-92.66h-88.91v-60.13c0-25.35 12.42-50.06 52.24-50.06h40.42V6.26S260.4 0 225.4 0c-73.22 0-121.1 44.38-121.1 124.7v70.62H22.89V288h81.39v224h100.2V288z'/%3E%3C/svg%3E");
}

.uh-icon--instagram {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath d='M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath d='M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z'/%3E%3C/svg%3E");
}

.uh-icon--x {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M389.2 48h70.6L305.6 224.2 487 464H345L233.6 318.1 106.5 464H35.8L200.7 275.5 26.8 48H172.4L272.9 180.9 389.2 48zM364.4 421.8h39.1L151.1 88h-42L364.4 421.8z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M389.2 48h70.6L305.6 224.2 487 464H345L233.6 318.1 106.5 464H35.8L200.7 275.5 26.8 48H172.4L272.9 180.9 389.2 48zM364.4 421.8h39.1L151.1 88h-42L364.4 421.8z'/%3E%3C/svg%3E");
}

.uh-icon--youtube {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 576 512'%3E%3Cpath d='M549.655 124.083c-6.281-23.65-24.787-42.276-48.284-48.597C458.781 64 288 64 288 64S117.22 64 74.629 75.486c-23.497 6.322-42.003 24.947-48.284 48.597-11.412 42.867-11.412 132.305-11.412 132.305s0 89.438 11.412 132.305c6.281 23.65 24.787 41.5 48.284 47.821C117.22 448 288 448 288 448s170.78 0 213.371-11.486c23.497-6.321 42.003-24.171 48.284-47.821 11.412-42.867 11.412-132.305 11.412-132.305s0-89.438-11.412-132.305zm-317.51 213.508V175.185l142.739 81.205-142.739 81.201z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 576 512'%3E%3Cpath d='M549.655 124.083c-6.281-23.65-24.787-42.276-48.284-48.597C458.781 64 288 64 288 64S117.22 64 74.629 75.486c-23.497 6.322-42.003 24.947-48.284 48.597-11.412 42.867-11.412 132.305-11.412 132.305s0 89.438 11.412 132.305c6.281 23.65 24.787 41.5 48.284 47.821C117.22 448 288 448 288 448s170.78 0 213.371-11.486c23.497-6.321 42.003-24.171 48.284-47.821 11.412-42.867 11.412-132.305 11.412-132.305s0-89.438-11.412-132.305zm-317.51 213.508V175.185l142.739 81.205-142.739 81.201z'/%3E%3C/svg%3E");
}

.uh-icon--linkedin {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath d='M416 32H31.9C14.3 32 0 46.5 0 64.3v383.4C0 465.5 14.3 480 31.9 480H416c17.6 0 32-14.5 32-32.3V64.3c0-17.8-14.4-32.3-32-32.3zM135.4 416H69V202.2h66.5V416zm-33.2-243c-21.3 0-38.5-17.3-38.5-38.5S80.9 96 102.2 96c21.2 0 38.5 17.3 38.5 38.5 0 21.3-17.2 38.5-38.5 38.5zm282.1 243h-66.4V312c0-24.8-.5-56.7-34.5-56.7-34.6 0-39.9 27-39.9 54.9V416h-66.4V202.2h63.7v29.2h.9c8.9-16.8 30.6-34.5 62.9-34.5 67.2 0 79.7 44.3 79.7 101.9V416z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath d='M416 32H31.9C14.3 32 0 46.5 0 64.3v383.4C0 465.5 14.3 480 31.9 480H416c17.6 0 32-14.5 32-32.3V64.3c0-17.8-14.4-32.3-32-32.3zM135.4 416H69V202.2h66.5V416zm-33.2-243c-21.3 0-38.5-17.3-38.5-38.5S80.9 96 102.2 96c21.2 0 38.5 17.3 38.5 38.5 0 21.3-17.2 38.5-38.5 38.5zm282.1 243h-66.4V312c0-24.8-.5-56.7-34.5-56.7-34.6 0-39.9 27-39.9 54.9V416h-66.4V202.2h63.7v29.2h.9c8.9-16.8 30.6-34.5 62.9-34.5 67.2 0 79.7 44.3 79.7 101.9V416z'/%3E%3C/svg%3E");
}


/* =====================================================
   RESPONSYWNOŚĆ
   ===================================================== */

@media (max-width: 1024px) {
    .uh-hero__mockup--overlap {
        max-width: 500px;
        bottom: -100px;
    }
}

@media (max-width: 992px) {
    .uh-hero {
        padding-top: 120px;
    }

    .uh-container {
        gap: 40px;
    }

    /* Top: tekst i mockup inline stackują się pionowo */
    .uh-hero__top {
        flex-direction: column;
    }

    .uh-hero__text,
    .uh-hero:not(.uh-hero--mockup-inline) .uh-hero__text {
        max-width: 100%;
    }

    .uh-hero--mockup-inline .uh-hero__mockup--inline {
        max-width: 100%;
    }

    /* Overlap mockup ukryty na mobile */
    .uh-hero__mockup--overlap {
        display: none;
    }

    /* Pretitle i subtitle body: 20px / 28px line-height */
    .uh-hero__pretitle {
        font-size: 20px;
        line-height: 28px;
        margin-bottom: 16px;
    }

    .uh-hero__subtitle-body p{
        font-size: 20px;
        line-height: 28px;
    }

    /* Stats: 1 kolumna, pełna szerokość */
    .uh-hero--stats-simple .uh-hero__stats-grid,
    .uh-hero--stats-flat .uh-hero__stats-grid,
    .uh-hero--stats-icon .uh-hero__stats-grid,
    .uh-hero--stats-card .uh-hero__stats-grid {
        grid-template-columns: 1fr;
        max-width: 100%;
        gap: 40px;
    }

    .uh-hero__stat-value {
        font-size: var(--wp--preset--font-size--heading-5);
    }

    .uh-hero--stats-flat .uh-hero__stat-value {
        font-size: var(--wp--preset--font-size--heading-3);
    }

    /* Stopka: wszystkie warianty stackują pionowo */
    .uh-hero__footer--row,
    .uh-hero__footer--column {
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
    }

    .uh-hero__buttons {
        width: 100%;
    }

    .uh-hero__button {
        flex: 1 1 auto;
        justify-content: center;
    }

    .uh-hero__socials {
        justify-content: flex-start;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .uh-hero--stats-flat .uh-hero__stat-box {
        width: 100%;
        border-right: none;
    }

    .uh-hero--stats-flat .uh-hero__stat-box::after {
        content: "";
        display: block;
        width: 20%;
        height: 2px;
        background-color: #4C4C4C;
        margin-top: 20px;
    }

    .uh-hero--stats-flat .uh-hero__stat-box:last-child::after {
        display: none;
    }
}
