/**
 * Rekrutacja Landing v2 — Custom Styles
 * Scoped to .rl2-landing to avoid conflicts with theme CSS
 * v1.0
 */

/* ── Fix theme sticky bar (outside .rl2-landing, missing box-sizing) ── */
.rekrutacja-sticky-bar {
    box-sizing: border-box;
}

/* ── Social proof bar dividers: hidden on mobile, visible on md+ ── */
.rl2-landing .rl2-sp-divider {
    display: none;
}

@media (min-width: 768px) {
    .rl2-landing .rl2-sp-divider {
        display: block;
    }
}

/* ── Base Reset (scoped, since Tailwind preflight is off) ── */
.rl2-landing *,
.rl2-landing *::before,
.rl2-landing *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.rl2-landing img {
    display: block;
    max-width: 100%;
}

.rl2-landing a {
    color: inherit;
    text-decoration: none;
}

.rl2-landing button {
    cursor: pointer;
    border-width: 0;
    border-style: solid;
    background: transparent;
    font-family: inherit;
    color: inherit;
}

/* ── Theme overrides: reset properties forced by parent theme ── */
.rl2-landing li {
    color: inherit;
    font-size: inherit !important;
    line-height: inherit !important;
    list-style: none;
}

.rl2-landing h1,
.rl2-landing h2,
.rl2-landing h3,
.rl2-landing h4,
.rl2-landing h5,
.rl2-landing h6 {
    text-transform: none;
    letter-spacing: normal;
    margin: 0;
}

/* ── Base font size for landing content ──
   Theme html is 10px; Tailwind rem values are scaled in config.
   Set explicit 16px here for em units and inherited text. */
.rl2-landing {
    font-size: 16px;
}

/* ── Hidden utility (avoids theme .hidden→fade-in-element replace) ── */
.rl2-landing .rl2-hidden {
    display: none !important;
}

/* ── Override theme heading colors & span sizing ── */
.rl2-landing h1,
.rl2-landing h2,
.rl2-landing h3,
.rl2-landing h4,
.rl2-landing h5,
.rl2-landing h6 {
    color: inherit;
}

/* Theme sets h1 span { font-size: 1.2rem } — restore inheritance */
.rl2-landing h1 span,
.rl2-landing h2 span {
    font-size: inherit;
}

/* ── Selection ── */
.rl2-landing ::selection {
    background-color: #C5A55A;
    color: #ffffff;
}

/* ── Scrollbar (scoped to landing body) ── */
.rl2-page::-webkit-scrollbar { width: 6px; }
.rl2-page::-webkit-scrollbar-track { background: #040B14; }
.rl2-page::-webkit-scrollbar-thumb { background: #112233; border-radius: 3px; }
.rl2-page::-webkit-scrollbar-thumb:hover { background: #C5A55A; }

/* ── Glass Cards ── */
.rl2-landing .glass-card-dark {
    background: rgba(17, 34, 51, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(26, 46, 64, 0.6);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.rl2-landing .glass-card-dark:hover {
    background: rgba(20, 40, 60, 0.6);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-color: rgba(197, 165, 90, 0.12);
    transform: translateY(-2px);
    box-shadow:
        0 16px 56px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        0 1px 0 rgba(255, 255, 255, 0.06) inset,
        0 0 80px rgba(197, 165, 90, 0.03);
}

/* Large cards: no lift, same frosted glass */
.rl2-landing .glass-card-dark.glass-card-no-lift:hover {
    transform: none;
}

/* ── Calculator — Premium Glass ── */
.rl2-landing .rl2-calc-card {
    background: rgba(15, 30, 48, 0.5);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 1rem;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.03) inset,
        0 1px 0 rgba(255, 255, 255, 0.05) inset;
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.rl2-landing .rl2-calc-card:hover {
    background: rgba(18, 35, 55, 0.6);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow:
        0 24px 72px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        0 1px 0 rgba(255, 255, 255, 0.06) inset,
        0 0 80px rgba(197, 165, 90, 0.03);
}

/* Inner result panel — nested frosted glass */
.rl2-landing .rl2-calc-result {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.02) inset;
}

/* ── Salary Slider ── */
.rl2-landing .slider-dark {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
    padding: 20px 0;
}

.rl2-landing .slider-dark:focus {
    outline: none;
}

.rl2-landing .slider-dark::-webkit-slider-runnable-track {
    width: 100%;
    height: 1px;
    cursor: pointer;
    background: rgba(197, 165, 90, 0.3);
}

.rl2-landing .slider-dark::-webkit-slider-thumb {
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: #040B14;
    cursor: pointer;
    -webkit-appearance: none;
    margin-top: -9.5px;
    border: 2px solid #C5A55A;
    box-shadow: 0 0 12px rgba(197, 165, 90, 0.4);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.rl2-landing .slider-dark::-webkit-slider-thumb:hover {
    transform: scale(1.3);
    background: #C5A55A;
}

/* Firefox slider */
.rl2-landing .slider-dark::-moz-range-track {
    width: 100%;
    height: 1px;
    cursor: pointer;
    background: rgba(197, 165, 90, 0.3);
    border: none;
}

.rl2-landing .slider-dark::-moz-range-thumb {
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: #040B14;
    cursor: pointer;
    border: 2px solid #C5A55A;
    box-shadow: 0 0 12px rgba(197, 165, 90, 0.4);
}

.rl2-landing .slider-dark::-moz-range-thumb:hover {
    background: #C5A55A;
}

/* ── Timeline connector line ── */
.rl2-landing .timeline-line::before {
    content: '';
    position: absolute;
    left: 27px;
    top: 24px;
    bottom: -30px;
    width: 1px;
    background: linear-gradient(to bottom, #C5A55A 0%, rgba(197, 165, 90, 0) 100%);
    opacity: 0.5;
}

@media (max-width: 768px) {
    .rl2-landing .timeline-line::before {
        left: 15px;
    }
}

/* ── FAQ accordion ── */
.rl2-landing .rl2-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.rl2-landing .faq-icon-rotate {
    transition: transform 0.3s ease;
}

.rl2-landing .faq-icon-rotate.open {
    transform: rotate(180deg);
}

/* ── Hero Ken Burns (fallback if Tailwind animation doesn't apply) ── */
@keyframes rl2-ken-burns {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

.rl2-landing .rl2-ken-burns {
    animation: rl2-ken-burns 25s ease-out infinite alternate;
}

/* ── Smooth scroll for the landing ── */
.rl2-page {
    scroll-behavior: smooth;
}

/* ── Hide landing page default content wrapper from page.php fallback ── */
.rl2-page .wrapper.simple-margin {
    display: none;
}

/* ── Hide preloader on this template (theme only hides on .page-template-default) ── */
.page-template-page-rekrutacja-landing #sl-preloader,
.page-template-page-rekrutacja-landing-php #sl-preloader {
    display: none !important;
}

/* ── Requirement number watermark ── */
.rl2-landing .requirement-number {
    position: absolute;
    left: -4.8rem;     /* 48px — matching Tailwind scaled -left-12 */
    top: 0;
    font-family: 'Taviraj', serif;
    font-size: 7.2rem; /* 72px — matching Tailwind text-7xl */
    font-style: italic;
    color: #112233;
    pointer-events: none;
    z-index: -1;
    transition: color 0.5s ease;
}

.rl2-landing .requirement-item:hover .requirement-number {
    color: rgba(197, 165, 90, 0.1);
}

/* ── Mobile adjustments ── */
@media (max-width: 768px) {
    .rl2-landing .requirement-number {
        position: relative;
        left: auto;
        top: auto;
        display: block;
        font-size: 3.2rem;
        font-style: italic;
        color: rgba(197, 165, 90, 0.3);
        margin-bottom: -0.4rem;
        z-index: 0;
        pointer-events: none;
    }
}

/* ── Calculator level buttons ── */
.rl2-landing .calc-level-btn {
    transition: color 0.3s ease, border-color 0.3s ease;
}

.rl2-landing .calc-level-btn.active {
    color: #C5A55A;
    border-bottom-color: #C5A55A;
}

.rl2-landing .calc-level-btn:not(.active) {
    color: #8ba3b8;
    border-bottom-color: transparent;
}

.rl2-landing .calc-level-btn:not(.active):hover {
    color: #f8fafc;
}

/* ── Scroll Indicator Animation ── */
@keyframes rl2-scroll-bounce {
    0%, 100% { transform: translateY(0); opacity: 0.5; }
    50% { transform: translateY(8px); opacity: 0.9; }
}

.rl2-landing .rl2-scroll-indicator {
    animation: rl2-scroll-bounce 2.5s ease-in-out infinite;
}

@keyframes rl2-scroll-line-pulse {
    0%, 100% { height: 32px; opacity: 0.4; }
    50% { height: 48px; opacity: 0.8; }
}

.rl2-landing .rl2-scroll-line {
    animation: rl2-scroll-line-pulse 2.5s ease-in-out infinite;
}

/* ── Scroll-Reveal Animations ── */
.rl2-landing .rl2-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.rl2-landing .rl2-reveal.rl2-revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children inside grids/flex containers */
.rl2-landing .rl2-reveal-stagger > .rl2-reveal:nth-child(1) { transition-delay: 0ms; }
.rl2-landing .rl2-reveal-stagger > .rl2-reveal:nth-child(2) { transition-delay: 120ms; }
.rl2-landing .rl2-reveal-stagger > .rl2-reveal:nth-child(3) { transition-delay: 240ms; }
.rl2-landing .rl2-reveal-stagger > .rl2-reveal:nth-child(4) { transition-delay: 360ms; }
.rl2-landing .rl2-reveal-stagger > .rl2-reveal:nth-child(5) { transition-delay: 480ms; }
.rl2-landing .rl2-reveal-stagger > .rl2-reveal:nth-child(6) { transition-delay: 600ms; }

/* Fade-in from left (for labels, gold lines) */
.rl2-landing .rl2-reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.rl2-landing .rl2-reveal-left.rl2-revealed {
    opacity: 1;
    transform: translateX(0);
}

/* Scale-in (for result numbers, highlights) */
.rl2-landing .rl2-reveal-scale {
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.6s ease-out, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.rl2-landing .rl2-reveal-scale.rl2-revealed {
    opacity: 1;
    transform: scale(1);
}

/* Gold line grow animation */
@keyframes rl2-line-grow {
    from { width: 0; }
    to { width: 48px; }
}

.rl2-landing .rl2-line-grow.rl2-revealed {
    animation: rl2-line-grow 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Hero content entrance */
@keyframes rl2-hero-fade-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rl2-landing .rl2-hero-animate > *:nth-child(1) {
    animation: rl2-hero-fade-up 1s ease-out 0.3s both;
}

.rl2-landing .rl2-hero-animate > *:nth-child(2) {
    animation: rl2-hero-fade-up 1s ease-out 0.5s both;
}

.rl2-landing .rl2-hero-animate > *:nth-child(3) {
    animation: rl2-hero-fade-up 1s ease-out 0.7s both;
}

.rl2-landing .rl2-hero-animate > *:nth-child(4) {
    animation: rl2-hero-fade-up 1s ease-out 0.9s both;
}

/* ── Testimonial Slider ── */
.rl2-landing .rl2-testimonial-slider {
    overflow: hidden;
}

.rl2-landing .rl2-testimonial-track {
    will-change: transform;
}

.rl2-landing .rl2-testimonial-slide {
    box-sizing: border-box;
}

/* Arrows hidden on small screens, shown md+ */
.rl2-landing .rl2-testimonial-prev,
.rl2-landing .rl2-testimonial-next {
    display: none;
}

@media (min-width: 768px) {
    .rl2-landing .rl2-testimonial-prev,
    .rl2-landing .rl2-testimonial-next {
        display: flex;
    }
}

/* Active dot */
.rl2-landing .rl2-testimonial-dot.active {
    background-color: #C5A55A;
    width: 24px;
}

.rl2-landing .rl2-testimonial-dot:not(.active) {
    background-color: rgba(255, 255, 255, 0.2);
    width: 8px;
}

/* ── FAQ answer: force child elements to inherit white color ── */
.rl2-landing .rl2-faq-answer p,
.rl2-landing .rl2-faq-answer span,
.rl2-landing .rl2-faq-answer li,
.rl2-landing .rl2-faq-answer a {
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: inherit !important;
    line-height: inherit !important;
}

/* ── Accessibility: Focus-visible styles ── */
.rl2-landing button:focus-visible,
.rl2-landing a:focus-visible {
    outline: 2px solid #C5A55A;
    outline-offset: 2px;
    border-radius: 2px;
}

.rl2-landing .rl2-faq-item button:focus-visible {
    outline: 2px solid #C5A55A;
    outline-offset: -2px;
}

/* ── WCAG 2.1 — Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
    .rl2-landing .rl2-ken-burns {
        animation: none;
    }

    .rl2-landing .rl2-scroll-line {
        animation: none;
    }

    .rl2-landing .rl2-testimonial-track {
        transition: none !important;
    }

    .rl2-landing .glass-card-dark,
    .rl2-landing .rl2-calc-card {
        transition: none;
    }

    .rl2-landing .glass-card-dark:hover {
        transform: none;
    }

    .rl2-landing .rl2-reveal,
    .rl2-landing .rl2-reveal-left,
    .rl2-landing .rl2-reveal-scale {
        opacity: 1 !important;
        transform: none !important;
    }

    .rl2-landing .rl2-faq-content {
        transition: none !important;
    }
}
