/* =========================
   HERO / BANNER CAROUSEL
========================= */

.hero,
.hero-carousel {
    position: relative;
    overflow: hidden;
    background-color: #f5f5f5;
}

/* Disable old static hero image only when carousel is used */
.hero-carousel::after {
    display: none !important;
    content: none !important;
}

.hero-slides {
    position: relative;
    min-height: 420px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    min-height: 420px;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    z-index: 2;
}

.hero-slide-image {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;

    width: 58%;
    z-index: 0;

    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;

    opacity: 0.9;

    mask-image: linear-gradient(
        90deg,
        transparent 0%,
        transparent 22%,
        rgba(0, 0, 0, 0.12) 32%,
        rgba(0, 0, 0, 0.35) 42%,
        rgba(0, 0, 0, 0.65) 52%,
        black 62%,
        black 82%,
        transparent 100%
    );

    -webkit-mask-image: linear-gradient(
        90deg,
        transparent 0%,
        transparent 10%,
        black 38%,
        black 82%,
        transparent 100%
    );
}

.hero-inner,
.hero-carousel .hero-inner {
    position: relative;
    z-index: 1;

    min-height: 420px;
    display: flex;
    align-items: center;
}

.hero-content,
.hero-carousel .hero-content {
    max-width: 570px;
    padding: 50px 0 105px;
}

.hero h1 {
    color: black;
    font-size: clamp(2rem, 4vw, 3.25rem);
    line-height: 1.05;
    margin-bottom: 18px;
    font-weight: 500;
}

.hero p {
    font-size: 1.05rem;
    line-height: 1.55;
    max-width: 520px;
}

.hero-buttons {
    display: flex;
    gap: 18px;
    margin-top: 28px;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 68px;
    z-index: 5;
    transform: translateX(-50%);

    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 11px;
    height: 11px;
    padding: 0;
    border: 2px solid var(--primary-blue);
    border-radius: 50%;
    background-color: white;
    cursor: pointer;
}

.hero-dot.is-active {
    background-color: var(--primary-blue);
}


/* =========================
   TOP FEATURE STRIP
========================= */

.feature-strip {
    position: relative;
    z-index: 5;
    margin-top: -42px;
    margin-bottom: 42px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;

    background-color: white;
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-card);
    padding: 34px 28px;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;

    text-align: center;
    padding: 0 24px;
}

.feature-icon {
    display: block;
    width: 78px;
    height: 78px;
    object-fit: contain;
    margin-bottom: 18px;
}

.feature-item p {
    margin: 0;
    color: black;
    font-size: 1.05rem;
    line-height: 1.35;
}


/* =========================
   COURSES OFFER
========================= */

.courses-offer {
    padding-bottom: 34px;
}

.flags-offer {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px 70px;
}


/* =========================
   ABOUT
========================= */

.about {
    padding: 24px 0 28px;
}

.about p {
    line-height: 1.6;
    margin-bottom: 14px;
    font-size: 0.97rem;
}


/* =========================
   DIAGNOSTIC CTA
========================= */

.diagnostic {
    background-color: var(--primary-blue);
    color: white;
    border-radius: var(--border-radius);
    padding: 22px 35px;

    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;

    box-shadow: var(--shadow-card);
    margin-bottom: 40px;
}

.diagnostic h2 {
    font-size: 1.35rem;
    margin-bottom: 6px;
}

.diagnostic p {
    font-size: 0.92rem;
    opacity: 0.95;
}

.diagnostic .gold-button:hover,
.diagnostic .gold-button:focus {
    color: var(--secondary-gold) !important;
    border-color: var(--secondary-gold) !important;
}


/* =========================
   NEWS / AKTUALITY
========================= */

.news {
    padding-bottom: 36px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 38px;
    align-items: stretch;
}

.news-all-button-wrap {
    margin-top: 34px;
    text-align: right;
}

/* =========================
   AKTUALITY ARCHIVE PAGE
========================= */

.news-archive {
    padding-top: 54px;
    padding-bottom: 90px;
    background: transparent;
}

.news-archive .standard-page-header {
    margin-bottom: 40px;
    background: transparent;
}

.news-archive-grid {
    margin-top: 0;
}


/* =========================
   TESTIMONIALS / RECENZE
========================= */

.testimonials {
    padding-bottom: 42px;
}

.testimonial-icon {
    display: block;
    width: 92px;
    height: 92px;
    margin: 0 auto 20px;
    object-fit: contain;
}

.testimonial-person {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    text-align: center;
}

.testimonial-person h3,
.testimonial-person p {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.testimonial-person h3::after,
.testimonial-person p::after {
    left: 50%;
    transform: translateX(-50%);
}

.testimonial-text,
.testimonial-text p {
    font-style: italic;
    line-height: 1.4;
}

.testimonial-text p {
    margin: 0;
}


/* =========================
   RESPONSIVE
========================= */

@media (max-width: 900px) {
    .hero-slides,
    .hero-slide,
    .hero-inner,
    .hero-carousel .hero-inner {
        min-height: 380px;
    }

    .hero-slide-image {
        width: 100%;
        opacity: 0.25;
        -webkit-mask-image: none;
        mask-image: none;
    }

    .hero-carousel .hero-content {
        max-width: 100%;
    }

    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 28px 0;
    }

    .flags-offer {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px 28px;
    }

    .news-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .diagnostic {
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
        padding: 24px 28px;
    }

    .diagnostic .secondary-button,
    .diagnostic .gold-button,
    .diagnostic .primary-button {
        align-self: flex-start;
    }
}

@media (max-width: 800px) {
    .single-news-card,
    .single-news-content,
    .single-news-image {
        max-width: 100% !important;
    }

    .single-news-lead {
        font-size: 1rem !important;
    }
}

@media (max-width: 520px) {
    .hero-slides,
    .hero-slide,
    .hero-inner,
    .hero-carousel .hero-inner {
        min-height: 430px;
    }

    .hero-content,
    .hero-carousel .hero-content {
        padding: 42px 0 100px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: flex-start;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .feature-item {
        padding: 0;
    }
}

/* =========================
   FRONT PAGE SECTION TITLES
========================= */

.courses-offer > .section-title,
.about > .section-title,
.news > .section-title,
.testimonials > .section-title {
    margin-bottom: 32px;
}

.about > .section-title {
    margin-bottom: 24px;
}

@media (max-width: 650px) {
    .flags-offer {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .flag-course {
        width: 100%;
        max-width: 100%;
    }
}


@media (max-width: 900px) {
    .hero-content {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-content h1,
    .hero-content p {
        text-align: center;
    }

    .hero-buttons {
        justify-content: center;
    }
}


@media (max-width: 600px) {
    .hero-buttons,
    .hero-actions {
        flex-direction: column;
        align-items: center;
        gap: 14px;
    }

    .hero-buttons a,
    .hero-actions a,
    .hero-buttons .button,
    .hero-actions .button {
        width: min(100%, 300px);
        text-align: center;
        justify-content: center;
    }
}
