/* ============================================
   LEADMAGNET.CSS - Style dla stron lead magnet
   (Brandbook EagleGym)
   ============================================ */

/* --- SVG FALLBACK (zapobiega rozciąganiu) --- */
.lm-hero svg,
.lm-benefits svg,
.lm-form-section svg,
.lm-social-proof svg,
.lm-author svg,
.lm-thankyou svg,
.lm-popup svg {
    flex-shrink: 0;
}

/* --- HERO LEAD MAGNET --- */
.lm-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 100px 0 60px 0;
    background: var(--color-sand);
    position: relative;
}

.lm-hero-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 50px;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
}

@media (min-width: 992px) {
    .lm-hero-content {
        grid-template-columns: 1fr 1fr;
    }
}

.lm-hero-text {
    max-width: 550px;
}

.lm-hero-text h1 {
    font-size: clamp(2rem, 5vw, 2.8rem);
    line-height: 1.15;
    margin-bottom: 1.5rem;
}

.lm-hero-text h1 span {
    color: var(--color-forest);
}

.lm-hero-text .subtitle {
    font-size: 1.15rem;
    color: var(--color-charcoal-soft);
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* --- PDF MOCKUP --- */
.lm-mockup {
    display: flex;
    justify-content: center;
    align-items: center;
}

.lm-mockup-placeholder {
    width: 100%;
    max-width: 350px;
    aspect-ratio: 3/4;
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(45, 90, 61, 0.1);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    position: relative;
    overflow: hidden;
}

.lm-mockup-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: var(--color-forest);
}

.lm-mockup-placeholder svg {
    width: 60px;
    height: 60px;
    min-width: 60px;
    min-height: 60px;
    max-width: 60px;
    max-height: 60px;
    color: var(--color-forest);
    opacity: 0.5;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.lm-mockup-placeholder span {
    font-family: var(--font-head);
    font-size: 1.2rem;
    color: var(--color-charcoal);
    text-align: center;
    font-weight: 600;
}

.lm-mockup-placeholder small {
    font-size: 0.85rem;
    color: var(--color-charcoal-soft);
    margin-top: 10px;
}

/* --- KORZYŚCI GRID --- */
.lm-benefits {
    padding: var(--space-3xl) 0;
    background: white;
}

.lm-benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.lm-benefit-card {
    background: var(--color-sand);
    border-radius: var(--radius-lg);
    padding: 30px;
    border: 1px solid rgba(45, 90, 61, 0.08);
    transition: var(--transition-speed);
}

.lm-benefit-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.lm-benefit-icon {
    width: 48px;
    height: 48px;
    background: rgba(45, 90, 61, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.lm-benefit-icon svg {
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    max-width: 24px;
    max-height: 24px;
    color: var(--color-forest);
}

.lm-benefit-card h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--color-charcoal);
}

.lm-benefit-card p {
    font-size: 0.95rem;
    color: var(--color-charcoal-soft);
    line-height: 1.5;
    margin: 0;
}

/* --- FORMULARZ SEKCJA --- */
.lm-form-section {
    padding: var(--space-3xl) 0;
    background: var(--color-sand);
}

.lm-form-wrapper {
    max-width: 500px;
    margin: 0 auto;
    background: white;
    border-radius: var(--radius-lg);
    padding: 40px;
    border: 2px solid var(--color-forest);
    box-shadow: var(--shadow-md);
}

.lm-form-wrapper h2 {
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 10px;
}

.lm-form-wrapper .form-subtitle {
    text-align: center;
    color: var(--color-charcoal-soft);
    font-size: 0.95rem;
    margin-bottom: 30px;
}

/* Form Elements */
.lm-form .form-group {
    margin-bottom: 20px;
}

.lm-form label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-charcoal);
    margin-bottom: 8px;
}

.lm-form input[type="email"] {
    width: 100%;
    padding: 16px 20px;
    font-size: 1rem;
    border: 1px solid rgba(45, 90, 61, 0.2);
    border-radius: var(--radius-md);
    background: var(--color-sand);
    color: var(--color-charcoal);
    transition: var(--transition-speed);
    font-family: var(--font-body);
}

.lm-form input[type="email"]:focus {
    outline: none;
    border-color: var(--color-forest);
    box-shadow: 0 0 0 3px rgba(45, 90, 61, 0.1);
}

.lm-form input[type="email"]::placeholder {
    color: var(--color-charcoal-soft);
    opacity: 0.6;
}

/* Checkbox RODO */
.lm-checkbox-group {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 25px;
}

.lm-checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--color-forest);
    cursor: pointer;
}

.lm-checkbox-group label {
    font-size: 0.85rem;
    color: var(--color-charcoal-soft);
    line-height: 1.5;
    margin-bottom: 0;
    cursor: pointer;
}

.lm-checkbox-group label a {
    color: var(--color-forest);
    text-decoration: underline;
}

.lm-checkbox-group label a:hover {
    color: var(--color-forest-dark);
}

/* Submit Button */
.lm-form .btn-submit {
    width: 100%;
    padding: 18px 32px;
    font-size: 1.1rem;
}

/* Trust Text */
.lm-trust-text {
    text-align: center;
    font-size: 0.8rem;
    color: var(--color-charcoal-soft);
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.lm-trust-text svg {
    width: 14px;
    height: 14px;
    color: var(--color-forest);
}

/* --- SOCIAL PROOF --- */
.lm-social-proof {
    padding: var(--space-2xl) 0;
    background: white;
    text-align: center;
}

.lm-download-counter {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: rgba(45, 90, 61, 0.08);
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    color: var(--color-forest);
    font-weight: 600;
}

.lm-download-counter svg {
    width: 18px;
    height: 18px;
}

.lm-testimonials-placeholder {
    max-width: 600px;
    margin: 30px auto 0 auto;
    padding: 30px;
    background: var(--color-sand);
    border-radius: var(--radius-lg);
    color: var(--color-charcoal-soft);
    font-style: italic;
}

/* --- AUTOR MINI SEKCJA --- */
.lm-author {
    padding: var(--space-3xl) 0;
    background: var(--color-sand);
}

.lm-author-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

@media (min-width: 768px) {
    .lm-author-content {
        flex-direction: row;
        text-align: left;
    }
}

.lm-author-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 3px solid var(--color-forest);
}

.lm-author-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lm-author-photo-placeholder {
    width: 100%;
    height: 100%;
    background: rgba(45, 90, 61, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lm-author-photo-placeholder svg {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    max-width: 40px;
    max-height: 40px;
    color: var(--color-forest);
    opacity: 0.5;
}

.lm-author-text h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.lm-author-text p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* --- MINIMALNY FOOTER --- */
.lm-footer {
    padding: 30px 0;
    background: var(--color-charcoal);
    text-align: center;
}

.lm-footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--transition-speed);
}

.lm-footer a:hover {
    color: white;
}

.lm-footer p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    margin-top: 10px;
}

/* --- EXIT INTENT POPUP --- */
.lm-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 26, 26, 0.6);
    backdrop-filter: blur(5px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.lm-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lm-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 450px;
    background: white;
    border-radius: var(--radius-lg);
    padding: 40px 30px;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.lm-popup.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.lm-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-charcoal-soft);
    cursor: pointer;
    line-height: 1;
    transition: var(--transition-speed);
}

.lm-popup-close:hover {
    color: var(--color-charcoal);
}

.lm-popup h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--color-charcoal);
}

.lm-popup .popup-subtitle {
    color: var(--color-charcoal-soft);
    font-size: 0.95rem;
    margin-bottom: 25px;
}

.lm-popup .lm-form input[type="email"] {
    margin-bottom: 15px;
}

.lm-popup .lm-checkbox-group {
    text-align: left;
    margin-bottom: 20px;
}

/* --- MOBILE STICKY CTA --- */
.lm-sticky-cta {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    z-index: 997;
    display: block;
}

.lm-sticky-cta .btn {
    width: 100%;
    justify-content: center;
    box-shadow: var(--shadow-lg);
}

@media (min-width: 768px) {
    .lm-sticky-cta {
        display: none;
    }
}

/* --- THANK YOU PAGE --- */
.lm-thankyou {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    background: var(--color-sand);
    width: 100%;
}

.lm-thankyou-content {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    padding: 0 20px;
}

.lm-success-icon {
    width: 80px;
    height: 80px;
    min-width: 80px;
    min-height: 80px;
    max-width: 80px;
    max-height: 80px;
    background: rgba(45, 90, 61, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px auto;
    flex-shrink: 0;
    overflow: hidden;
}

.lm-success-icon svg {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    max-width: 40px;
    max-height: 40px;
    color: var(--color-forest);
    flex-shrink: 0;
}

.lm-thankyou-content h1 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 15px;
}

.lm-thankyou-content h1 span {
    color: var(--color-forest);
}

.lm-thankyou-content > p {
    font-size: 1.1rem;
    color: var(--color-charcoal-soft);
    margin-bottom: 40px;
}

/* Instrukcje */
.lm-instructions {
    background: white;
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-bottom: 30px;
    text-align: left;
    border: 1px solid rgba(45, 90, 61, 0.08);
}

.lm-instructions h3 {
    font-size: 1rem;
    margin-bottom: 20px;
    color: var(--color-charcoal);
}

.lm-instruction-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    margin-bottom: 15px;
}

.lm-instruction-item:last-child {
    margin-bottom: 0;
}

.lm-instruction-number {
    width: 28px;
    height: 28px;
    background: var(--color-forest);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
}

.lm-instruction-item p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--color-charcoal-soft);
    line-height: 1.5;
    padding-top: 3px;
}

/* Backup Download */
.lm-backup-download {
    margin-bottom: 30px;
}

.lm-backup-download .btn {
    display: inline-flex;
}

/* Social CTA */
.lm-social-cta {
    margin-bottom: 40px;
}

.lm-social-cta p {
    font-size: 0.9rem;
    color: var(--color-charcoal-soft);
    margin-bottom: 15px;
}

.lm-social-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: linear-gradient(45deg, #405DE6, #5851DB, #833AB4, #C13584, #E1306C, #FD1D1D);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition-speed);
}

.lm-social-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.lm-social-btn svg {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    max-width: 20px;
    max-height: 20px;
    flex-shrink: 0;
}

/* Tripwire Offer */
.lm-tripwire {
    background: white;
    border: 2px solid var(--color-forest);
    border-radius: var(--radius-lg);
    padding: 30px;
    position: relative;
    overflow: hidden;
}

.lm-tripwire::before {
    content: 'OFERTA SPECJALNA';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: var(--color-forest);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 8px;
    text-align: center;
}

.lm-tripwire-content {
    padding-top: 20px;
}

.lm-tripwire h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.lm-tripwire p {
    font-size: 0.95rem;
    color: var(--color-charcoal-soft);
    margin-bottom: 20px;
}

.lm-tripwire-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.lm-tripwire-price .price {
    font-size: 2rem;
    font-family: var(--font-head);
    font-weight: 700;
    color: var(--color-forest);
}

.lm-tripwire-price .old-price {
    font-size: 1rem;
    color: var(--color-charcoal-soft);
    text-decoration: line-through;
}

/* --- FORM ERROR STATE --- */
.lm-form input[type="email"].error {
    border-color: var(--color-error);
}

.lm-form .error-message {
    color: var(--color-error);
    font-size: 0.8rem;
    margin-top: 5px;
    display: none;
}

.lm-form .error-message.show {
    display: block;
}

.lm-checkbox-group.error input[type="checkbox"] {
    outline: 2px solid var(--color-error);
    outline-offset: 2px;
}

/* --- ANIMATIONS --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lm-animate {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* --- INLINE LEAD MAGNET SECTION (na index.html) --- */
.lm-inline-section {
    padding: var(--space-4xl) 0;
    background: white;
    border-top: 1px solid rgba(45, 90, 61, 0.1);
    border-bottom: 1px solid rgba(45, 90, 61, 0.1);
}

.lm-inline-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .lm-inline-content {
        grid-template-columns: 1fr 1fr;
        gap: 60px;
    }
}

.lm-inline-text h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: 15px;
    color: var(--color-charcoal);
}

.lm-inline-text p {
    font-size: 1rem;
    color: var(--color-charcoal-soft);
    margin-bottom: 20px;
}

.lm-inline-benefits {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lm-inline-benefits li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 0.95rem;
    color: var(--color-charcoal);
}

.lm-inline-benefits li svg {
    color: var(--color-forest);
    flex-shrink: 0;
}

.lm-inline-form-wrap {
    background: var(--color-sand);
    border-radius: var(--radius-lg);
    padding: 30px;
    border: 1px solid rgba(45, 90, 61, 0.1);
}

.lm-inline-form input[type="email"] {
    width: 100%;
    padding: 14px 18px;
    font-size: 1rem;
    border: 1px solid rgba(45, 90, 61, 0.2);
    border-radius: var(--radius-md);
    background: white;
    color: var(--color-charcoal);
    margin-bottom: 15px;
    font-family: var(--font-body);
}

.lm-inline-form input[type="email"]:focus {
    outline: none;
    border-color: var(--color-forest);
    box-shadow: 0 0 0 3px rgba(45, 90, 61, 0.1);
}

.lm-inline-form .lm-checkbox-group {
    margin-bottom: 15px;
}

.lm-inline-form .btn-full {
    margin-bottom: 10px;
}

/* --- SLIDE-IN POPUP (róg ekranu) --- */
.lm-slidein {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 340px;
    background: white;
    border-radius: var(--radius-lg);
    padding: 25px;
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--color-forest);
    z-index: 996;
    transform: translateX(calc(100% + 40px));
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.lm-slidein.active {
    transform: translateX(0);
    opacity: 1;
}

.lm-slidein-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-charcoal-soft);
    cursor: pointer;
    line-height: 1;
    padding: 5px;
    transition: var(--transition-speed);
}

.lm-slidein-close:hover {
    color: var(--color-charcoal);
}

.lm-slidein-content {
    padding-right: 20px;
}

.lm-slidein-title {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--color-forest);
    margin-bottom: 8px;
}

.lm-slidein-desc {
    font-size: 1rem;
    color: var(--color-charcoal-soft);
    margin-bottom: 15px;
    line-height: 1.5;
}

.lm-slidein .btn-small {
    display: inline-flex;
    width: auto;
    padding: 12px 24px;
    font-size: 0.95rem;
}

/* Mobile slide-in - na dole ekranu */
@media (max-width: 767px) {
    .lm-slidein {
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        transform: translateY(100%);
    }

    .lm-slidein.active {
        transform: translateY(0);
    }
}

/* Ukryj slide-in gdy sekcja lead magnet jest widoczna */
.lm-slidein.hidden {
    display: none;
}

/* --- RESPONSIVE ADJUSTMENTS --- */
@media (max-width: 767px) {
    .lm-hero {
        padding: 80px 0 40px 0;
    }

    .lm-form-wrapper {
        padding: 30px 20px;
    }

    .lm-popup {
        padding: 30px 20px;
    }

    .lm-tripwire {
        padding: 25px 20px;
    }
}
