/* ==========================================================================
   Metoda Nauczania — Perfectus School
   Custom page styles (loaded only on this page)
   ========================================================================== */

html {
    scroll-behavior: smooth;
}

:root {
    --pf-teddy: #E8922A;
    --pf-teddy-light: #FFF6EB;
    --pf-savvy: #2EAD6D;
    --pf-savvy-light: #EEFAF3;
    --pf-league: #2B6CB0;
    --pf-league-light: #EBF2FB;
    --pf-bearton: #7C3AED;
    --pf-bearton-light: #F3EDFF;
    --pf-brand-red: #c1282a;
    --pf-text: #2D3748;
    --pf-text-light: #637085;
    --pf-radius: 12px;
    --pf-radius-sm: 8px;
}

/* Remove theme content padding and page title on this page */
body:has(.pf-metoda) #content.site-content {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

body:has(.pf-metoda) .page-title-layout {
    display: none !important;
}

/* ---- Reset / Base ---- */
.pf-metoda {
    color: var(--pf-text);
    line-height: 1.7;
    overflow-x: hidden;
    text-align: left;
}

.pf-metoda *,
.pf-metoda *::before,
.pf-metoda *::after {
    box-sizing: border-box;
}

.pf-metoda p {
    margin: 0 0 1em;
    font-size: 16px;
    text-align: inherit;
}

.pf-metoda ul {
    margin: 0 0 1em;
    padding-left: 1.5em;
}

.pf-metoda ul li {
    margin-bottom: 0.4em;
    font-size: 15px;
}

/* ---- Buttons ---- */
.pf-metoda-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.pf-metoda-btn--primary {
    background: var(--pf-brand-red);
    color: #fff;
    border-color: var(--pf-brand-red);
}
.pf-metoda-btn--primary:hover {
    background: #a82022;
    border-color: #a82022;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(193, 40, 42, 0.3);
}

.pf-metoda-btn--outline {
    background: transparent;
    color: var(--pf-brand-red);
    border-color: var(--pf-brand-red);
}
.pf-metoda-btn--outline:hover {
    background: var(--pf-brand-red);
    color: #fff;
}

.pf-metoda-btn--white {
    background: #fff;
    color: var(--pf-brand-red);
    border-color: #fff;
}
.pf-metoda-btn--white:hover {
    background: rgba(255,255,255,0.9);
    color: var(--pf-brand-red);
    transform: translateY(-2px);
}

.pf-metoda-btn--outline-white {
    background: transparent;
    color: #fff;
    border-color: #fff;
}
.pf-metoda-btn--outline-white:hover {
    background: #fff;
    color: var(--pf-brand-red);
}

/* ---- Section Title ---- */
.pf-metoda-section-title {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 48px;
    color: var(--pf-text);
}

/* ==========================================================================
   HERO
   ========================================================================== */
.pf-metoda-hero {
    background: linear-gradient(135deg, #fff5f5 0%, #fff9f0 50%, #f0faf5 100%);
    padding: 80px 0;
    position: relative;
}

.pf-metoda-hero__content {
    text-align: center;
    max-width: 720px;
    margin: 0 auto;
}

.pf-metoda-hero__title {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--pf-text);
}

.pf-metoda-hero__subtitle {
    font-size: 18px;
    color: var(--pf-text-light);
    margin-bottom: 32px;
    line-height: 1.6;
}

.pf-metoda-hero__actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ==========================================================================
   NAVIGATOR
   ========================================================================== */
.pf-metoda-nav {
    padding: 80px 0;
    background: #fff;
}

.pf-metoda p.pf-metoda-section-subtitle {
    text-align: center;
    font-size: 17px;
    color: var(--pf-text-light);
    max-width: 640px;
    margin: -32px auto 48px;
    line-height: 1.6;
}

.pf-metoda-nav__grid {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 24px;
    align-items: stretch;
}

.pf-metoda-nav__path {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 24px;
    row-gap: 12px;
    position: relative;
    align-items: stretch;
}

.pf-metoda-nav__alt {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    padding-left: 24px;
    border-left: 2px solid #E2E8F0;
}

.pf-metoda-nav__alt .pf-metoda-nav__card {
    flex: 1;
}

.pf-metoda-nav__label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--pf-text-light);
    margin-bottom: 12px;
    grid-column: 1 / -1;
}

/* Arrow connectors between main path cards */
.pf-metoda-nav__card--step {
    position: relative;
    z-index: 1;
}

.pf-metoda-nav__path .pf-metoda-nav__card--step:not(:last-child)::after {
    content: '\2192';
    position: absolute;
    right: -18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: var(--pf-text-light);
    z-index: 0;
    pointer-events: none;
}

.pf-metoda-nav__card,
.pf-metoda-nav__card:hover,
.pf-metoda-nav__card:focus,
.pf-metoda-nav__card:visited,
.pf-metoda-nav__card:active {
    display: block;
    padding: 32px 24px;
    border-radius: 6px;
    text-decoration: none;
    color: var(--pf-text) !important;
    transition: all 0.2s ease;
    position: relative;
}

.pf-metoda-nav__card--teddy { background: var(--pf-teddy-light); border: 1px solid var(--pf-teddy); }
.pf-metoda-nav__card--savvy { background: var(--pf-savvy-light); border: 1px solid var(--pf-savvy); }
.pf-metoda-nav__card--league { background: var(--pf-league-light); border: 1px solid var(--pf-league); }
.pf-metoda-nav__card--bearton { background: var(--pf-bearton-light); border: 1px solid var(--pf-bearton); }

.pf-metoda-nav__card:hover,
.pf-metoda-nav__card:focus {
    filter: brightness(0.97);
}

.pf-metoda-nav__logo {
    display: block;
    max-height: 64px;
    width: auto;
    margin-bottom: 12px;
    object-fit: contain;
}

.pf-metoda-nav__age {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    padding: 3px 10px;
    border-radius: 4px;
    color: #fff;
}

.pf-metoda-nav__card--teddy .pf-metoda-nav__age { background: var(--pf-teddy); }
.pf-metoda-nav__card--savvy .pf-metoda-nav__age { background: var(--pf-savvy); }
.pf-metoda-nav__card--league .pf-metoda-nav__age { background: var(--pf-league); }
.pf-metoda-nav__card--bearton .pf-metoda-nav__age { background: var(--pf-bearton); }

.pf-metoda-nav__name {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 8px;
}

.pf-metoda-nav__desc {
    font-size: 14px;
    color: var(--pf-text-light);
    margin: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==========================================================================
   METHOD SECTIONS
   ========================================================================== */
.pf-metoda-method {
    padding: 80px 0;
}

.pf-metoda-method:nth-child(even) {
    background: #fff;
}

.pf-metoda-method--teddy { background: var(--pf-teddy-light); }
.pf-metoda-method--savvy { background: #fff; }
.pf-metoda-method--league { background: var(--pf-league-light); }
.pf-metoda-method--bearton { background: #fff; }

/* ---- Method Header ---- */
.pf-metoda-method__header {
    text-align: center;
    margin-bottom: 48px;
}

.pf-metoda-method__badge {
    display: inline-block;
    padding: 6px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 16px;
}

.pf-metoda-method--teddy .pf-metoda-method__badge { background: var(--pf-teddy); }
.pf-metoda-method--savvy .pf-metoda-method__badge { background: var(--pf-savvy); }
.pf-metoda-method--league .pf-metoda-method__badge { background: var(--pf-league); }
.pf-metoda-method--bearton .pf-metoda-method__badge { background: var(--pf-bearton); }

.pf-metoda-method__logo {
    display: block;
    max-height: 120px;
    width: auto;
    margin: 0 auto 20px;
    object-fit: contain;
}

.pf-metoda-method__title {
    font-size: 36px;
    font-weight: 800;
    margin: 0 0 12px;
}

.pf-metoda-method__subtitle {
    font-size: 17px;
    color: var(--pf-text-light);
    margin: 0;
}

/* ---- Callout (Bearton) ---- */
.pf-metoda-method__callout {
    background: var(--pf-bearton-light);
    border-left: 4px solid var(--pf-bearton);
    padding: 20px 28px;
    border-radius: 0 var(--pf-radius-sm) var(--pf-radius-sm) 0;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 40px;
    color: var(--pf-text);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* ---- Intro ---- */
.pf-metoda-method__intro {
    max-width: 700px;
    margin: 0 auto 48px;
    text-align: center;
    font-size: 16px;
}

.pf-metoda-method__intro p {
    font-size: 16px;
    line-height: 1.8;
}

/* ---- Features — horizontal scroll carousel ---- */
.pf-metoda-method__features {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 24px;
    padding: 0 max(24px, calc((100% - 1140px) / 2 + 24px)) 16px;
    margin: 0 0 48px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.pf-metoda-method__features::-webkit-scrollbar {
    display: none;
}

.pf-metoda-feature {
    flex: 0 0 280px;
    background: rgba(255,255,255,0.7);
    padding: 24px;
    border-radius: var(--pf-radius);
    backdrop-filter: blur(4px);
    scroll-snap-align: start;
}

.pf-metoda-method--savvy .pf-metoda-feature,
.pf-metoda-method--bearton .pf-metoda-feature {
    background: #f5f5f7;
}

.pf-metoda-feature__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.pf-metoda-method--teddy .pf-metoda-feature__icon { background: rgba(232,146,42,0.15); color: var(--pf-teddy); }
.pf-metoda-method--savvy .pf-metoda-feature__icon { background: rgba(46,173,109,0.15); color: var(--pf-savvy); }
.pf-metoda-method--league .pf-metoda-feature__icon { background: rgba(43,108,176,0.15); color: var(--pf-league); }
.pf-metoda-method--bearton .pf-metoda-feature__icon { background: rgba(124,58,237,0.15); color: var(--pf-bearton); }

.pf-metoda-feature h4 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 6px;
}

.pf-metoda-feature p {
    font-size: 14px;
    color: var(--pf-text-light);
    margin: 0;
    line-height: 1.5;
}

/* ---- Carousel wrapper & arrows ---- */
.pf-metoda-carousel {
    position: relative;
    max-width: 1140px;
    margin: 0 auto;
}

.pf-metoda-carousel__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px !important;
    height: 40px !important;
    min-width: 40px;
    min-height: 40px;
    max-width: 40px;
    max-height: 40px;
    padding: 0 !important;
    margin: 0;
    border-radius: 50% !important;
    border: 1px solid #e2e8f0 !important;
    background: #fff !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pf-text);
    z-index: 10;
    transition: opacity 0.2s ease, box-shadow 0.2s ease;
    line-height: 1;
    font-size: 0;
    -webkit-appearance: none;
    appearance: none;
}

.pf-metoda-carousel__arrow svg {
    display: block;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.pf-metoda-carousel__arrow:hover,
.pf-metoda-carousel__arrow:active,
.pf-metoda-carousel__arrow:focus {
    box-shadow: 0 4px 16px rgba(0,0,0,0.14);
    color: var(--pf-text) !important;
    background: #fff !important;
}

.pf-metoda-carousel__arrow svg,
.pf-metoda-carousel__arrow:hover svg,
.pf-metoda-carousel__arrow:active svg,
.pf-metoda-carousel__arrow:focus svg {
    stroke: var(--pf-text) !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.pf-metoda-carousel__arrow--prev {
    left: -18px;
}

.pf-metoda-carousel__arrow--next {
    right: -18px;
}

.pf-metoda-carousel__arrow.is-hidden {
    opacity: 0;
    pointer-events: none;
}

/* Hide arrows on touch devices / mobile — swipe is natural there */
@media (max-width: 991px) {
    .pf-metoda-carousel__arrow {
        display: none;
    }
}

/* ==========================================================================
   ACCORDION
   ========================================================================== */
.pf-metoda-accordion {
    max-width: 700px;
    margin: 0 auto 2px;
    background: rgba(255,255,255,0.8);
    border-radius: var(--pf-radius-sm);
    overflow: hidden;
}

.pf-metoda-method--savvy .pf-metoda-accordion,
.pf-metoda-method--bearton .pf-metoda-accordion {
    background: #f5f5f7;
}

.pf-metoda-accordion__trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 18px 24px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: var(--pf-text);
    transition: background 0.2s;
    text-align: left;
}

.pf-metoda .pf-metoda-accordion__trigger,
.pf-metoda .pf-metoda-accordion__trigger:hover,
.pf-metoda .pf-metoda-accordion__trigger:focus,
.pf-metoda .pf-metoda-accordion__trigger:active {
    background: none !important;
    background-image: none !important;
    background-color: transparent !important;
    color: var(--pf-text) !important;
    box-shadow: none !important;
}

.pf-metoda .pf-metoda-accordion__trigger:hover {
    background-color: rgba(0,0,0,0.06) !important;
}

.pf-metoda-accordion__icon {
    flex-shrink: 0;
    margin-left: 12px;
}

.pf-metoda-accordion__trigger[aria-expanded="true"] .pf-metoda-accordion__icon {
    transform: rotate(180deg);
}

.pf-metoda-accordion__panel {
    display: none;
    padding: 24px;
}

.pf-metoda-accordion__panel.is-open {
    display: block;
}

/* ---- Levels ---- */
.pf-metoda-levels {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pf-metoda-level {
    padding: 16px 20px;
    border-radius: var(--pf-radius-sm);
    background: #fff;
}

.pf-metoda-method--teddy .pf-metoda-level { border: 1px solid var(--pf-teddy); }
.pf-metoda-method--savvy .pf-metoda-level { border: 1px solid var(--pf-savvy); }
.pf-metoda-method--league .pf-metoda-level { border: 1px solid var(--pf-league); }
.pf-metoda-method--bearton .pf-metoda-level { border: 1px solid var(--pf-bearton); }

.pf-metoda-level__name {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 2px;
}

.pf-metoda-level__age {
    font-size: 13px;
    color: var(--pf-text-light);
    font-weight: 500;
    margin-bottom: 4px;
}

.pf-metoda-level p {
    font-size: 14px;
    margin: 4px 0 0;
    color: var(--pf-text-light);
}

/* ---- Method CTA ---- */
.pf-metoda-method__cta {
    text-align: center;
    margin-top: 48px;
}

/* ==========================================================================
   CTA SECTION
   ========================================================================== */
.pf-metoda-cta {
    background: linear-gradient(135deg, var(--pf-brand-red), #a82022);
    color: #fff;
    padding: 80px 0;
    text-align: center;
    margin-bottom: 50px;
}

.pf-metoda-cta__title {
    font-size: 32px;
    font-weight: 800;
    margin: 0 0 16px;
    color: #fff;
}

.pf-metoda-cta__text {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 36px;
    text-align: center !important;
}

.pf-metoda-cta__actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}


/* ==========================================================================
   FIX: Elementor shape divider (not loaded on custom page template)
   ========================================================================== */
.elementor-shape {
    overflow: hidden;
    position: absolute;
    left: 0;
    right: 0;
    width: 100%;
    line-height: 0;
    direction: ltr;
}

.elementor-shape-top {
    top: -1px;
}

.elementor-shape-top svg {
    display: block;
    width: calc(100% + 1.3px);
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

.elementor-shape-fill {
    fill: #fff;
}

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

/* Tablet */
@media (max-width: 991px) {
    .pf-metoda-hero__title {
        font-size: 34px;
    }

    .pf-metoda-nav__grid {
        grid-template-columns: 1fr;
    }

    .pf-metoda-nav__path {
        grid-template-columns: repeat(3, 1fr);
    }

    .pf-metoda-nav__alt {
        border-left: none;
        padding-left: 0;
        border-top: 2px solid #E2E8F0;
        padding-top: 24px;
    }

}

/* Mobile */
@media (max-width: 767px) {
    .pf-metoda-hero {
        padding: 48px 0 40px;
    }

    .pf-metoda-hero__title {
        font-size: 28px;
    }

    .pf-metoda-hero__subtitle {
        font-size: 16px;
    }

    .pf-metoda-hero__actions {
        flex-direction: column;
        align-items: center;
    }

    .pf-metoda-nav {
        padding: 48px 0;
    }

    .pf-metoda-nav__grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .pf-metoda-nav__path {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .pf-metoda-nav__card--step:not(:last-child)::after {
        content: '\2193' !important;
        right: auto !important;
        left: 50%;
        top: auto !important;
        bottom: -24px;
        transform: translateX(-50%) !important;
    }

    .pf-metoda-nav__alt {
        border-left: none;
        padding-left: 0;
        border-top: 2px solid #E2E8F0;
        padding-top: 24px;
        margin-top: 16px;
    }

    .pf-metoda-section-title {
        font-size: 22px;
        margin-bottom: 32px;
    }

    .pf-metoda-method {
        padding: 48px 0;
    }

    .pf-metoda-method__title {
        font-size: 28px;
    }

    /* Carousel: full viewport width on mobile */
    .pf-metoda-carousel {
        margin-left: -15px;
        margin-right: -15px;
    }

    .pf-metoda-method__features {
        padding: 0 16px 12px;
        scroll-padding: 0 16px;
        gap: 12px;
    }

    .pf-metoda-feature {
        flex: 0 0 80vw;
        padding: 20px;
    }

    .pf-metoda-cta {
        padding: 48px 0;
    }

    .pf-metoda-cta__title {
        font-size: 24px;
    }

    .pf-metoda-cta__text {
        font-size: 16px;
    }

    .pf-metoda-btn {
        padding: 12px 24px;
        font-size: 14px;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .pf-metoda-hero__title {
        font-size: 24px;
    }
}
