/**
 * TW Hero Widget
 */

/* ========================
   BASE
   ======================== */
.tw-hero {
    display: flex;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.tw-hero--fullscreen {
    min-height: 100vh;
}

/* ========================
   LAYOUT: CENTERED
   ======================== */
.tw-hero--centered {
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.tw-hero__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    z-index: 0;
}

.tw-hero--centered > .tw-hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.tw-hero--centered > .tw-hero__content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 900px;
}

/* ========================
   LAYOUT: SPLIT
   ======================== */
.tw-hero--split {
    flex-direction: row;
}

.tw-hero--split-right {
    flex-direction: row;
}

.tw-hero__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 80px;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    gap: 8px;
}

.tw-hero--split .tw-hero__content {
    width: 55%;
}

.tw-hero__image {
    flex-shrink: 0;
    background-size: cover;
    position: relative;
    width: 50%;
}

/* Diagonal clip-path — treść lewa, zdjęcie prawe */
.tw-hero--split:not(.tw-hero--split-right) .tw-hero__image--diagonal {
    clip-path: polygon(15% 0, 100% 0, 100% 100%, 0% 100%);
}

/* Diagonal clip-path — zdjęcie lewe, treść prawa (lustrzane) */
.tw-hero--split-right .tw-hero__image--diagonal {
    clip-path: polygon(0 0, 100% 0, 85% 100%, 0 100%);
}

/* Gradient overlay na zdjęciu (split) */
.tw-hero__image > .tw-hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* ========================
   LABEL
   ======================== */
.tw-hero__label {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

/* ========================
   BREADCRUMBS
   ======================== */
.tw-hero__breadcrumbs {
    font-size: 14px;
    margin-bottom: 5px;
}

.tw-hero__breadcrumbs a {
    text-decoration: none;
    transition: opacity 0.2s;
}

.tw-hero__breadcrumbs a:hover {
    opacity: 0.8;
}

.tw-hero__breadcrumbs-sep {
    margin: 0 6px;
}

/* ========================
   TYPING
   ======================== */
.tw-hero__typing {
    width: 100%;
}

.tw-hero__typing .tw-typing-text {
    margin: 0;
    padding: 0;
}

/* ========================
   TITLE
   ======================== */
.tw-hero__title {
    margin: 0 0 20px 0;
    padding: 0;
}

/* ========================
   SUBTITLE
   ======================== */
.tw-hero__subtitle {
    margin: 0 0 15px 0;
    padding: 0;
    max-width: 480px;
}

/* ========================
   BUTTONS
   ======================== */
.tw-hero__buttons {
    display: flex;
    flex-direction: row;
    gap: 16px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.tw-hero__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.tw-hero__btn--primary {
    background-color: #1B8C6A;
    color: #ffffff;
}

.tw-hero__btn--primary:hover {
    background-color: #157a5b;
    color: #ffffff;
}

.tw-hero__btn--secondary {
    background-color: transparent;
    border-color: rgba(255,255,255,0.3);
    color: #ffffff;
}

.tw-hero__btn--secondary:hover {
    border-color: rgba(255,255,255,0.6);
    color: #ffffff;
}

/* ========================
   RESPONSIVE — TABLET (< 1024px)
   ======================== */
@media (max-width: 1024px) {
    .tw-hero--split {
        flex-direction: column-reverse !important;
        min-height: auto !important;
    }

    .tw-hero--split .tw-hero__content {
        width: 100% !important;
    }

    .tw-hero__image {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        clip-path: none !important;
        min-height: var(--tw-hero-mobile-img-height, 300px);
    }

    /* Na mobile gradient od dołu zdjęcia (nie usuwaj pełnego overlay) */
    .tw-hero--split .tw-hero__image > .tw-hero__overlay:not(.tw-hero__overlay--full) {
        background: none !important;
    }

    .tw-hero--split .tw-hero__image::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 50%;
        background: linear-gradient(to top, var(--tw-hero-bg, #1A252B), transparent);
        z-index: 1;
        pointer-events: none;
    }

    /* Centered — fullscreen off na mobile */
    .tw-hero--centered.tw-hero--fullscreen {
        min-height: auto;
    }
}

/* ========================
   RESPONSIVE — MOBILE (< 480px)
   ======================== */
@media (max-width: 480px) {
    .tw-hero__buttons {
        flex-direction: column;
        width: 100%;
    }

    .tw-hero__btn {
        width: 100%;
        text-align: center;
    }
}
