/* =========================================
   SEKCJA OFERTY (Kompletnie Nowy Wygląd)
========================================= */

.offer-section {
    background: #f8fbff; /* Bardzo delikatny, perłowo-niebieski */
    position: relative;
    z-index: 2;
    padding-top: 100px;
    padding-bottom: 160px; /* Zostawione miejsce na falę */
    overflow: hidden; /* Trzyma tła w ryzach */
    border-top: 1px solid rgba(74, 158, 255, 0.1);
}

/* Dekoracyjne "organiczne" tło sekcji (lewitujące rozmyte plamy) */
.offer-bg-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.6;
    pointer-events: none;
}
.shape-left {
    width: 400px;
    height: 400px;
    background: #d3e5f5;
    top: -100px;
    left: -150px;
}
.shape-right {
    width: 500px;
    height: 500px;
    background: #e6f0ff;
    bottom: -150px;
    right: -200px;
}

/* =========================================
   WYŚRODKOWANY NAGŁÓWEK
========================================= */
.offer-header {
    text-align: center;
    max-width: 750px;
    margin: 0 auto 70px auto;
    padding: 0 20px;
}

.offer-subtitle {
    display: inline-block;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 800;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #4a9eff 0%, #8a98eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.offer-title {
    font-size: 3.2rem;
    font-weight: 800;
    color: #1a202c;
    margin-bottom: 25px;
    line-height: 1.2;
}

.offer-title span.highlight {
    color: #4a9eff;
    position: relative;
    display: inline-block;
    z-index: 1;
}

.offer-title span.highlight::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 12px;
    background: rgba(74, 158, 255, 0.15);
    bottom: 5px;
    left: 0;
    z-index: -1;
    border-radius: 4px;
}

.offer-desc {
    color: #4a5568;
    font-size: 1.15rem;
    line-height: 1.8;
    font-weight: 500;
    margin: 0;
}

/* =========================================
   NOWOCZESNE KARTY
========================================= */

.team-offer-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 50px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.team-offer-card {
    background: #ffffff !important;
    border-radius: 32px; /* Zwiększone, miękkie zaokrąglenia całej karty */
    overflow: visible; /* Zmienione na visible, by zdjęcie mogło wystawać lekko poza górę (3D efekt) */
    text-decoration: none !important;
    color: #1a202c !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.04);
    border: 1px solid #ffffff;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    margin-top: 20px; /* Zostawiamy miejsce na wysunięte zdjęcie */
}

.team-offer-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 30px 60px rgba(74, 158, 255, 0.12);
    border-color: #e6f0ff;
}

/* ZDJĘCIE - "Zawieszone" nad kartą (Efekt Apple) */
.team-offer-photo {
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 35px; /* Bok i środek */
    margin-top: -30px; /* WYSUNIĘCIE w górę poza kartę! */
}

.team-offer-photo img {
    width: auto;
    max-width: 100%;
    height: 320px;
    object-fit: contain;
    display: block;

    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12),
    0 4px 12px rgba(0, 0, 0, 0.04);
    border: 4px solid #ffffff; /* Czysta biała ramka otaczająca samo zdjęcie */
    background: #ffffff; /* Białe tło zdjęcia w ramce */

    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.team-offer-card:hover .team-offer-photo img {
    transform: translateY(-8px) scale(1.03);
}

/* TEKST NA KARCIE */
.team-offer-content {
    padding: 40px 40px 45px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    position: relative;
    text-align: left;
}

.team-offer-badge {
    display: inline-block;
    align-self: flex-start; /* Odciąga badge od pełnej szerokości */
    background: #eef5ff;
    color: #4a9eff !important;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 0.85rem;
    margin-bottom: 20px;
}

.team-offer-content h3 {
    font-size: 2.2rem;
    font-weight: 800;
    margin: 0 0 5px 0;
    color: #1a202c;
}

.team-offer-role {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: #a0aec0;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 25px;
}

.team-offer-desc {
    color: #4a5568;
    line-height: 1.7;
    margin-bottom: 35px;
    font-size: 1.1rem;
    flex-grow: 1;
}

.team-offer-link {
    display: inline-flex;
    align-items: center;
    color: #4a9eff !important;
    font-weight: 800;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border-top: 1px dashed #edf2f7;
    padding-top: 25px;
}

.team-offer-card:hover .team-offer-link {
    color: #3685e6 !important;
    padding-left: 10px;
}

/* =========================================
   PŁYNNA FALA MIĘDZY OFERTĄ A KONTAKTEM
========================================= */
.offer-section::after {
    content: '';
    position: absolute;
    /* Zmieniono bottom na -5px, aby w pełni zamaskować prześwity (pixel rounding bug) */
    bottom: -5px;
    left: 0;
    width: 100%;
    /* Dodane 5px do wysokości fali, by zrekompensować opuszczenie */
    height: 125px;

    /* Bardzo płynna, długa fala (jedno łagodne wzniesienie i opadnięcie) - kolor %23d3e5f5 to start sekcji kontakt */
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 1440 120' preserveAspectRatio='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,60 C480,140 960,-20 1440,60 L1440,120 L0,120 Z' fill='%23d3e5f5'/%3E%3C/svg%3E");

    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center bottom;
    z-index: 10;
    pointer-events: none;
}

/* =========================================
   RESPONSYWNOŚĆ
========================================= */

@media (max-width: 1024px) {
    .team-offer-grid {
        gap: 30px;
    }
    .team-offer-photo img {
        height: 280px;
    }
    .offer-title {
        font-size: 2.6rem;
    }
    .team-offer-content {
        padding: 30px 25px 35px;
    }
}

@media (max-width: 768px) {
    .offer-section {
        padding-top: 80px;
        padding-bottom: 110px;
    }
    .offer-title {
        font-size: 2.2rem;
    }
    .offer-desc {
        font-size: 1.05rem;
    }

    .team-offer-grid {
        grid-template-columns: 1fr;
        gap: 60px; /* Większy odstęp w pionie dla wysuniętych zdjęć */
        margin-top: 20px;
    }
    .team-offer-photo {
        padding: 0 20px;
    }
    .team-offer-photo img {
        height: 280px;
    }

    .offer-section::after {
        height: 55px; /* Na telefonach fala jest niższa */
        bottom: -5px; /* Tutaj też utrzymujemy -5px */
    }
}
