/* Portfolio section */
.portfolio {
    margin-top: 40px;
    background: #FFFFFF;
    padding: 0 120px;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    grid-template-areas:
        "a  b  c  d"
        "e  f  g  g"
        "h  i  g  g"
        "j  i  k  l";
    gap: 10px;
    width: 100%;
}

.p-cell {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    position: relative;
}

/* Cell 01 - Title */
.cell-a {
    grid-area: a;
    background: #FFFFFF;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    padding: 0;
}

.cell-a .p-title {
    font-weight: 700;
    font-size: clamp(20px, 3vw, 48px);
    line-height: 1.05;
    color: #000;
    margin: 0;
    padding: 15% 0 0 15%;
}

.cell-a .p-arrow {
    width: 55%;
    margin: 0 auto 15%;
    display: block;
}

/* Cell 02 - Image */
.cell-b {
    grid-area: b;
    background-image: url('../images/portfolio/webp/gallery_1_rescoop25_thumb.webp'); background-image: image-set(url('../images/portfolio/webp/gallery_1_rescoop25_thumb.webp') type('image/webp'), url('../images/portfolio/gallery_1_rescoop25_thumb.png'));
    background-size: cover;
    background-position: center;
    padding: 0;
}

/* Cell 03 - Text */
.cell-c {
    grid-area: c;
    background: #000000;
    display: flex;
    align-items: center;
    padding: 30px;
}

/* Cell 04 - Image */
.cell-d {
    grid-area: d;
    background-image: url('../images/portfolio/webp/gallery1_online_conference_thumb.webp'); background-image: image-set(url('../images/portfolio/webp/gallery1_online_conference_thumb.webp') type('image/webp'), url('../images/portfolio/gallery1_online_conference_thumb.png'));
    background-size: cover;
    background-position: center;
    padding: 0;
}

/* Cell 05 - Image */
.cell-e {
    grid-area: e;
    background-image: url('../images/portfolio/webp/gallery1_doradcy_plansze_thumb.webp'); background-image: image-set(url('../images/portfolio/webp/gallery1_doradcy_plansze_thumb.webp') type('image/webp'), url('../images/portfolio/gallery1_doradcy_plansze_thumb.png'));
    background-size: cover;
    background-position: center;
    padding: 0;
}

/* Cell 06 - Image */
.cell-f {
    grid-area: f;
    background-image: url('../images/portfolio/webp/gallery1_webinar_note_thumb.webp'); background-image: image-set(url('../images/portfolio/webp/gallery1_webinar_note_thumb.webp') type('image/webp'), url('../images/portfolio/gallery1_webinar_note_thumb.png'));
    background-size: cover;
    background-position: center;
    padding: 0;
}

/* Big cell (7+8+11+12) - Board full image */
.cell-g {
    grid-area: g;
    aspect-ratio: auto;
    background-image: url('../images/portfolio/webp/gallery_1_rescoop25_board_full.webp'); background-image: image-set(url('../images/portfolio/webp/gallery_1_rescoop25_board_full.webp') type('image/webp'), url('../images/portfolio/gallery_1_rescoop25_board_full.jpg'));
    background-size: cover;
    background-position: center;
    padding: 0;
}

/* Cell 09 - Text */
.cell-h {
    grid-area: h;
    background: #000000;
    display: flex;
    align-items: center;
    padding: 30px;
}

/* Vertical cell (10+14) - Photowall */
.cell-i {
    grid-area: i;
    aspect-ratio: auto;
    background-image: url('../images/portfolio/webp/gallery_1_rescoop26_photowall1_full.webp'); background-image: image-set(url('../images/portfolio/webp/gallery_1_rescoop26_photowall1_full.webp') type('image/webp'), url('../images/portfolio/gallery_1_rescoop26_photowall1_full.jpg'));
    background-size: cover;
    background-position: center top;
    padding: 0;
}

/* Cell 13 - Image */
.cell-j {
    grid-area: j;
    background-image: url('../images/portfolio/webp/gallery_1_golab_thumb.webp'); background-image: image-set(url('../images/portfolio/webp/gallery_1_golab_thumb.webp') type('image/webp'), url('../images/portfolio/gallery_1_golab_thumb.jpg'));
    background-size: cover;
    background-position: center;
    padding: 0;
}

/* Cell 15 - Image */
.cell-k {
    grid-area: k;
    background-image: url('../images/portfolio/webp/gallery1_videoexplainer_thumb.webp'); background-image: image-set(url('../images/portfolio/webp/gallery1_videoexplainer_thumb.webp') type('image/webp'), url('../images/portfolio/gallery1_videoexplainer_thumb.png'));
    background-size: cover;
    background-position: center;
    padding: 0;
}

/* Cell 16 - Text */
.cell-l {
    grid-area: l;
    background: #000000;
    display: flex;
    align-items: center;
    padding: 30px;
}

/* White text for dark cells */
.p-white-text {
    font-weight: 400;
    font-size: clamp(14px, 1.8vw, 22px);
    line-height: 1.4;
    color: #FFFFFF;
    text-align: left;
    margin: 0;
}

.p-white-text strong {
    font-weight: 800;
}

/* Hover effect na kafelkach portfolio - daje feedback ze mozna kliknac */
.p-item--img {
    transition: transform 0.35s ease, filter 0.35s ease, opacity 0.35s ease;
    cursor: pointer;
}

.p-item--img:hover {
    transform: scale(1.02);
    filter: brightness(0.85);
}

.p-item--img:active {
    transform: scale(0.98);
    filter: brightness(0.7);
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about {
    margin-top: 10px;
    background: #FFFFFF;
    padding: 0 120px;
}

.about-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
    min-height: 520px;
}

.about-col-img {
    min-height: 520px;
}

.about-col-text {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-left: 30px;
    padding-bottom: 30px;
    padding-top: 20px;
    text-align: left;
}

.about-intro {
    font-size: clamp(32px, 4vw, 64px);
    font-weight: 700;
    line-height: 1;
    margin: 0 0 0.5rem;
}

.about-name {
    font-size: clamp(20px, 2.5vw, 36px);
    font-weight: 400;
    line-height: 1.3;
    margin: 0 0 1.5rem;
}

.about-name strong {
    font-weight: 700;
}

.about-body p {
    font-size: clamp(13px, 1.1vw, 16px);
    line-height: 1.6;
    margin: 0 0 0.75rem;
}

/* ============================================
   OFFER SECTION
   ============================================ */
.offer {
    margin-top: 30px;
    background: #000000;
    padding: 80px 120px 30px;
    min-height: 300px;
}

.offer-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.offer-title {
    font-weight: 700;
    font-size: clamp(24px, 3vw, 42px);
    line-height: 1.2;
    color: #FFFFFF;
    text-align: center;
    margin: 0 0 8px;
}

.offer-subtitle {
    font-weight: 400;
    font-size: 18px;
    line-height: 1.5;
    color: #FFFFFF;
    text-align: center;
    margin: 0;
}

.offer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    width: 100%;
    margin-top: 60px;
}

.offer-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 20px;
    min-height: 400px;
}

.offer-icon-wrap {
    width: 80%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.offer-icon-img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.offer-cell-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.offer-cell-title {
    font-weight: 700;
    font-size: clamp(16px, 1.5vw, 22px);
    color: #FFFFFF;
    margin: 0 0 12px;
}

.offer-cell-desc {
    font-weight: 400;
    font-size: clamp(13px, 1.1vw, 16px);
    line-height: 1.5;
    color: #FFFFFF;
    margin: 0;
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact {
    margin-top: 0;
    background: #FFFFFF;
    padding: 0 120px 0 0;
}

.contact-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
}

.contact-col-img {
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.contact-col-img img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.contact-col-info {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-left: 30px;
    padding-bottom: 30px;
    padding-right: 30px;
    padding-top: 30px;
    text-align: left;
}

.contact-title {
    font-weight: 800;
    font-size: clamp(28px, 3.5vw, 48px);
    line-height: 1.2;
    color: #000000;
    margin: 0 0 20px;
}

.contact-desc {
    font-weight: 400;
    font-size: 16px;
    line-height: 1.6;
    color: #333333;
    margin: 0 0 24px;
}

.contact-details {
    margin-bottom: 20px;
}

.contact-details p {
    font-size: 16px;
    line-height: 1.8;
    margin: 0;
    color: #333333;
}

.contact-details a {
    color: #000000;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}

.contact-details a:hover {
    color: #555555;
}

.contact-socials {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

/* contact-socials removed - social icons only in footer */

.btn--dark {
    background: #000000;
    color: #FFFFFF;
    align-self: flex-start;
}

.btn--dark:hover {
    background: #333333;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: #000000;
    padding: 40px 120px;
}

.footer-inner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    width: 100%;
}

.footer-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
}

/* Column 1 - Logo + socials */
.footer-logo {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    display: block;
}

.footer-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.footer-contact-label {
    font-weight: 700;
    font-size: 16px;
    color: #FFFFFF;
    margin: 0 0 12px;
    line-height: 1.3;
}

.footer-socials {
    display: flex;
    gap: 10px;
}

.footer-socials a {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.footer-socials a:hover {
    opacity: 0.8;
}

.footer-socials a img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Column 2, 3, 4 - Headings + lists */
.footer-heading {
    font-weight: 700;
    font-size: 16px;
    color: #FFFFFF;
    margin: 0 0 10px;
    line-height: 1.3;
}

.footer-heading--spaced {
    margin-top: 16px;
}

.footer-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-list li {
    font-weight: 400;
    font-size: 14px;
    color: #FFFFFF;
    line-height: 1.8;
    margin: 0;
}

.footer-text {
    font-weight: 400;
    font-size: 14px;
    color: #FFFFFF;
    line-height: 1.6;
    margin: 0;
}

.footer-text a {
    color: #FFFFFF;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.footer-text a:hover {
    opacity: 0.7;
}

.footer-copyright {
    font-weight: 400;
    font-size: 12px;
    color: #FFFFFF;
    opacity: 0.6;
    margin: 16px 0 0;
    line-height: 1.5;
}

/* ============================================
   SECTION 6: TESTIMONIALS
   ============================================ */
.testimonials {
    margin-top: 56px;
    background: #FFFFFF;
    padding: 0 120px;
}

.testimonials-inner {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 20px;
    min-height: 420px;
}

.test-title-col {
    padding-top: 10%;
    padding-left: 10px;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
}

.test-title {
    font-weight: 700;
    font-size: clamp(20px, 2.5vw, 36px);
    line-height: 1.2;
    color: #000000;
    text-align: left;
    margin: 0;
}

/* ---- Carousel column with background ---- */
.test-carousel-col {
    padding: 10px;
}

.test-carousel-col-bg {
    background: #c2fcc0;
    padding: 24px 32px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    min-height: 380px;
}

.test-carousel {
    position: relative;
    width: 100%;
    min-height: 280px;
}

.test-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.test-slide.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
    position: relative;
}

.test-quote {
    font-weight: 400;
    font-size: clamp(14px, 1.2vw, 18px);
    line-height: 1.7;
    color: #333333;
    margin: 0 0 24px;
    font-style: italic;
}

.test-author {
    font-weight: 700;
    font-size: 16px;
    color: #000000;
    margin: 0;
}

.test-role {
    font-weight: 400;
    font-size: 14px;
    color: #555555;
    margin: 6px 0 0;
}

/* ---- Carousel dots ---- */
.test-carousel-dots {
    display: flex;
    gap: 10px;
    margin-top: 8px;
    justify-content: center;
}

.test-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #000000;
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s ease;
}

.test-dot.active,
.test-dot:hover {
    background: #000000;
}

/* ============================================
   SECTION 5: CLIENTS WAVE
   ============================================ */
.clients-wave {
    position: relative;
    width: 100%;
    height: 22.5vw;
    min-height: 180px;
    margin-top: -20px;
    z-index: 10;
    overflow: hidden;
}

.wave2-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
}

.clients-wave-content {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 30px;
    padding-bottom: 5px;
}

.clients-title {
    font-weight: 700;
    font-size: clamp(24px, 3vw, 42px);
    line-height: 1.2;
    color: #FFFFFF;
    text-align: center;
    margin: 0;
}

.logo-slider {
    width: 100%;
    margin-top: 20px;
    margin-bottom: 20px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
}

.logo-track {
    display: flex;
    align-items: center;
    gap: 220px;
    width: max-content;
    animation: scrollLogos 80s linear infinite;
}

.logo-track img {
    height: 90px;
    width: auto;
    flex-shrink: 0;
    opacity: 0.95;
}

@keyframes scrollLogos {
    0% { transform: translateX(0); }
    100% { transform: translateX(-6400px); }
}


/* ============================================
   RESPONSIVE - TABLET (768px - 1023px)
   ============================================ */
@media (max-width: 1024px) {
    .clients-wave {
        height: 56vw;
        min-height: 400px;
        margin-top: 15vw;
        margin-bottom: 15vw;
    }
    .clients-wave-content {
        padding-top: 70px;
    }
    .clients-title {
        font-size: 36px;
    }
    .logo-track img {
        height: 84px;
    }
    .logo-track {
        gap: 120px;
    }
    .testimonials-bg {
        padding: 10px;
    }
    .testimonials-inner {
        gap: 10px;
    }
    .test-carousel-col {
        padding: 10px;
    }
    .test-carousel-col-bg {
        padding: 20px 24px;
        min-height: 320px;
    }
    .test-quote {
        font-size: 15px;
    }
    .contact-title {
        font-size: 32px;
    }
    /* Tablet portfolio override */
    .portfolio {
        padding: 0 5vw;
    }
    .portfolio-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: repeat(7, 1fr);
        grid-template-areas:
            "a b"
            "e f"
            "h i"
            "j i"
            "c d"
            "g g"
            "k l";
        gap: 5px;
    }
    .cell-g {
        aspect-ratio: 2 / 1;
    }
    .cell-i {
        aspect-ratio: auto;
    }
    .cell-a .p-title {
        font-size: clamp(40px, 5vw, 60px);
    }
    .p-white-text {
        font-size: clamp(18px, 2vw, 24px);
    }
    .p-white-text strong {
        font-size: clamp(20px, 2.2vw, 26px);
    }
    .offer {
        padding: 60px 5vw 20px;
    }
    .about {
        padding: 0 5vw;
    }
    .testimonials {
        padding: 0 5vw;
    }
    .contact {
        padding: 0 !important;
    }
    .contact-inner {
        display: flex;
        flex-direction: column;
    }
    .contact-col-info {
        order: -1;
        padding: 40px 10vw !important;
    }
    .contact-col-img {
        width: 100%;
        overflow: hidden;
    }
    .contact-col-img img {
        width: 100%;
        height: 50vw;
        object-fit: cover;
        object-position: bottom;
    }
    .footer {
        padding: 40px 5vw;
    }
    .offer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .clients-wave {
        margin-top: 20px;
    }
    @keyframes scrollLogos {
        0% { transform: translateX(0); }
        100% { transform: translateX(-8000px); }
    }
}

/* ============================================
   RESPONSIVE - PHONE (< 768px)
   ============================================ */
@media (max-width: 576px) {
    /* ---- About ---- */
    .about {
        padding: 0 !important;
    }

    /* ---- Portfolio ---- */
    .portfolio-grid {
        display: none;
    }
    .portfolio-phone {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    /* ---- Clients Wave ---- */
    .clients-wave {
        height: auto;
        min-height: 396px;
        margin-top: -20px;
        padding-bottom: 54px;
    }
    .clients-wave-content {
        padding-top: 90px;
        padding-bottom: 18px;
    }
    .clients-title {
        font-size: 32px;
        padding: 0 20px;
    }
    .logo-slider {
        margin-top: 29px;
        margin-bottom: 18px;
    }
    .logo-track {
        gap: 90px;
    }
    .logo-track img {
        height: 80px;
    }
    @keyframes scrollLogos {
        0% { transform: translateX(0); }
        100% { transform: translateX(-4000px); }
    }

    /* ---- Testimonials ---- */
    .testimonials-bg {
        padding: 8px;
    }
    .test-carousel-col {
        padding: 8px;
    }
    .test-carousel-col-bg {
        padding: 16px 20px;
        min-height: 280px;
    }
    .test-quote {
        font-size: 14px;
        margin-bottom: 16px;
    }
    .test-author {
        font-size: 14px;
    }
    .test-role {
        font-size: 12px;
    }
    .test-title {
        font-size: 20px;
    }
    .test-title-col {
        padding-left: 0;
    }

    /* ---- Offer ---- */
    .offer {
        padding: 40px 0 0 !important;
    }
    .offer-header {
        padding: 0 5vw;
    }
    .offer-grid {
        grid-template-columns: 1fr !important;
        margin-top: 30px;
        gap: 0;
    }
    .offer-cell {
        padding: 30px 5vw;
    }
    .offer-title {
        font-size: 24px;
    }
    .offer-subtitle {
        font-size: 15px;
    }
    .offer-cell-title {
        font-size: 24px !important;
    }
    .offer-cell-desc {
        font-size: 14px;
    }

    /* ---- Contact ---- */
    .contact {
        padding: 0 !important;
    }
    .contact-inner {
        display: flex !important;
        flex-direction: column;
        grid-template-columns: none !important;
    }
    .contact-col-info {
        order: -1;
        padding: 30px 5vw !important;
    }
    .contact-col-img {
        width: 100%;
        overflow: visible;
    }
    .contact-col-img img {
        max-height: none;
        height: 60vw;
        object-fit: cover;
        object-position: bottom;
    }

    /* ---- Contact ---- */
    .contact-title {
        font-size: 28px;
    }
    .contact-desc {
        font-size: 14px;
    }
    .contact-details p {
        font-size: 14px;
    }

    /* ---- Footer ---- */
    .footer-contact-label {
        font-size: 14px;
    }
    .footer-heading {
        font-size: 14px;
    }
    .footer-list li,
    .footer-text {
        font-size: 13px;
    }
    .footer-socials a {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 576px) {
    /* Portfolio phone layout handled in grid.css */
    @keyframes scrollLogos {
        0% { transform: translateX(0); }
        100% { transform: translateX(-4000px); }
    }
}
