/* Lead Magnet Modal Styles */
#lead-magnet-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

#lead-magnet-modal.open {
    display: block;
    opacity: 1;
}

.lm-content {
    background-color: #fefefe;
    background-image: url('../assets/images/fondo-popup.webp');
    background-size: cover;
    background-position: center;
    border: none;
    margin: 2% auto;
    padding: 0;
    width: 95%;
    max-width: 1000px;
    border-radius: 16px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

#lead-magnet-modal.open .lm-content {
    transform: translateY(0);
}

.lm-close {
    position: absolute;
    right: 20px;
    top: 15px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    transition: color 0.2s;
}

.lm-close:hover {
    color: #333;
}

.lm-header {
    background: transparent;
    padding: 2rem 2rem 1rem;
    text-align: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.lm-title {
    color: var(--color-primary, #1e3a8a);
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
    line-height: 1.2;
}

.lm-subtitle {
    font-size: 1rem;
    color: #555;
    max-width: 600px;
    margin: 0 auto;
}

.lm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 2rem;
    background: transparent;
}

.lm-card {
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(5px);
    position: relative;
}

.lm-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--color-primary, #1e3a8a);
    background: rgba(255, 255, 255, 0.95);
}

.lm-card.featured {
    border: 2px solid var(--color-primary, #1e3a8a);
    background: rgba(240, 249, 255, 0.85);
    order: -1;
    /* Mobile friendly tweak if needed */
}

.lm-card-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--color-primary, #1e3a8a);
}

.lm-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #111;
}

.lm-card-desc {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
    flex-grow: 1;
    line-height: 1.5;
}

.lm-btn {
    display: block;
    width: 100%;
    padding: 0.75rem;
    text-align: center;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
    cursor: pointer;
    border: none;
    font-size: 0.95rem;
}

.lm-btn-outline {
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid #ddd;
    color: #555;
}

.lm-btn-outline:hover {
    border-color: var(--color-primary, #1e3a8a);
    color: var(--color-primary, #1e3a8a);
    background: #fff;
}

.lm-btn-primary {
    background: var(--color-primary, #1e3a8a);
    color: white;
    border: 2px solid var(--color-primary, #1e3a8a);
}

.lm-btn-primary:hover {
    background: #1e40af;
    /* Darker shade */
    border-color: #1e40af;
}

.lm-btn-accent {
    background: #10b981;
    /* Emerald 500 */
    color: white;
    border: 2px solid #10b981;
}

.lm-btn-accent:hover {
    background: #059669;
    border-color: #059669;
}

.lm-savings-banner {
    background: rgba(255, 251, 235, 0.9);
    /* Amber 50 */
    border: 1px solid #fcd34d;
    color: #92400e;
    padding: 0.75rem;
    border-radius: 8px;
    margin: 0 2rem;
    margin-top: -1rem;
    /* Overlap header slightly or push up */
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    justify-content: center;
}

.lm-footer {
    padding: 1rem 2rem;
    background: transparent;
    text-align: center;
    font-size: 0.8rem;
    color: #9ca3af;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* Form Styles for Option 1 Overlay */
#pdf-form-overlay {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-top: 15px;
    border: 1px solid #eee;
    display: none;
    /* Hidden by default */
}

@media (max-width: 768px) {
    .lm-grid {
        grid-template-columns: 1fr;
    }

    .lm-content {
        width: 100%;
        height: auto;
        min-height: 100%;
        margin: 0;
        border-radius: 0;
        max-width: none;
        overflow: visible;
    }

    .lm-card.featured {
        order: -1;
    }
}