/* Download Widget - MyLekha Style V2 */

/* --- Container & Grid --- */
.sp-download-widget-v2 {
    max-width: 1368px !important;
    margin: 0 auto -100px auto !important;
    width: calc(100% - 40px) !important;
    min-height: 448px !important;
    height: auto !important;
    background: linear-gradient(90deg, #facc15 0%, #a3e635 50%, #14b8a6 100%) !important;
    border-radius: 24px !important;
    position: relative;
    z-index: 99;
    padding: 40px 24px !important;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    box-shadow: none !important;
}
/* Force removal of any global Elementor Kit styles applied to images/logos */
.sp-download-widget-v2 img,
.sp-download-widget-v2 svg {
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    filter: none !important;
    padding: 0 !important;
    background: none !important;
}

.sp-download-container {
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
}

.sp-download-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 24px;
    align-items: stretch;
}

/* Ensure the Elementor section also allows overlap */
.elementor-widget-sp-download-widget {
    z-index: 99;
    margin-bottom: -100px !important;
}

/* --- Left Info Card --- */
.sp-info-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #111827;
    text-align: left;
    gap: 25px;
}

.sp-app-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #022c22; /* Darker green container */
    padding: 8px;
    border-radius: 20px;
    width: fit-content;
}

.sp-toggle-item {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: transparent;
    opacity: 0.4;
    border: none !important;
    box-shadow: none !important;
}

.sp-toggle-item.active {
    background: #0f766e; /* Match teal active toggle */
    opacity: 1;
}

.sp-toggle-icon {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sp-toggle-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit !important;
}

.sp-info-content {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

.sp-info-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sp-app-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #111827; /* Dark text for light gradient bg */
}

.sp-app-desc {
    font-size: 16px;
    line-height: 1.6;
    color: #4b5563; /* Medium dark text */
    max-width: 90%;
    margin-bottom: 60px;
}

.sp-download-footer {
    margin-top: auto;
}

.sp-available-text {
    font-size: 14px;
    font-weight: 600;
    color: #4b5563; /* Match dark tone */
    margin-bottom: 25px;
}

.sp-store-icons {
    display: flex;
    align-items: center;
    gap: 2.14px;
}

.sp-download-widget-v2 .sp-store-icons a.sp-store-link,
.sp-download-widget-v2 .sp-store-icons .sp-store-icon-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: none !important;
    background-color: transparent !important;
    background-image: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: none !important;
    border: none !important;
    outline: none !important;
}

.sp-store-icon-circle:hover {
    transform: scale(1.1);
}

.sp-store-icon-circle img,
.sp-store-icon-circle svg,
.sp-custom-store-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sp-store-icon-circle img {
    filter: brightness(0) invert(1);
}

/* --- Service Cards --- */
.sp-services-wrapper {
    display: contents;
}
/* --- Service Cards Desktop Pattern (Left-Aligned per Image 2) --- */
.sp-service-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px; /* Flatter radius match */
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Left aligned */
    text-align: left; /* Left aligned */
    height: 400px;
    max-width: 376px;
    width: 100%;
    gap: 10px;
    position: relative;
}



.sp-service-icon-box {
    width: clamp(80px, 10vw, 110px);
    height: auto;
    margin-bottom: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none !important; /* Explicit removal */
    filter: none !important; /* Explicit removal of drop-shadows */
}

.sp-service-icon-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: none !important; /* Force removal of any embedded or inherited shadows */
    box-shadow: none !important;
}

.sp-service-title {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 12px;
    line-height: 1.25;
}

.sp-service-desc {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 16px;
}

.sp-service-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 113px;
    height: 36px;
    gap: 4px;
    background: #111827;
    color: #ffffff !important;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    padding: 0 16px;
    text-decoration: none !important;
    margin-top: auto;
    white-space: nowrap;
}

/* --- Optimized Responsive Section --- */
/* 1. DESKTOP (Global Base) */
.sp-download-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 30px;
    align-items: stretch;
}

/* 2. TABLET LAYOUT (iPad, iPad Mini, Large Tablets) */
/* --- NEW TABLET & MOBILE RESPONSIVE FIX --- */

@media (max-width: 1024px) {
    /* 1. Force the main layout to stack (Dashboard on top, Services below) */
    .sp-download-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 30px !important;
    }

    /* 2. Make the Training and Customize cards stack vertically */
    .sp-services-wrapper {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 20px !important;
    }

    /* 3. Ensure cards take full width on tablets */
    .sp-service-card {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
    }

    /* 4. Center the app info content for a better tablet look */
    .sp-info-card {
        width: 100% !important;
        text-align: left;
    }
}

@media (max-width: 767px) {
    /* 5. Mobile specific: Center everything */
    .sp-available-text, 
    .sp-app-title, 
    .sp-app-desc {
        text-align: center !important;
    }

    .sp-app-toggle,
    .sp-store-icons {
        justify-content: center !important;
        margin: 0 auto !important;
    }

    .sp-download-container {
        padding: 20px 15px !important;
    }

    .sp-app-title {
        font-size: 26px !important;
    }
}

/* 3. MOBILE LAYOUT (Button Top-Right pattern) */
@media (max-width: 767px) {
    .sp-download-widget-v2 {
        padding: 40px 15px !important;
        border-radius: 30px !important;
        margin-bottom: -110px !important;
    }

    .sp-download-container {
        padding: 0 !important;
    }

    .sp-app-title {
        font-size: clamp(1.2rem, 5.5vw, 1.5rem) !important;
        margin-bottom: 10px !important;
        line-height: 1.2 !important;
    }

    .sp-app-desc {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
        margin-bottom: 20px !important;
        opacity: 0.9 !important;
    }

    .sp-available-text {
        font-size: 0.8rem !important;
        margin-bottom: 15px !important;
    }

    .sp-service-card {
        padding: 24px 20px !important;
        gap: 24px !important;
        position: relative !important;
        border-radius: 20px !important;
        flex-direction: column !important; /* Stacked layout for mobile */
        align-self: stretch !important;
        align-items: flex-start !important;
    }

    .sp-service-icon-box {
        width: 60px !important;
        height: auto !important;
        margin-right: 0 !important;
        margin-bottom: 10px !important;
    }

    .sp-store-icon-circle {
        width: 44px !important;
        height: 44px !important;
    }

    .sp-toggle-item {
        width: 48px !important;
        height: 48px !important;
    }

    .sp-service-title {
        font-size: 1.25rem !important;
        margin-bottom: 8px !important;
        max-width: 100% !important; 
    }

    .sp-service-desc {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
        margin-bottom: 0 !important;
    }

    .sp-service-btn {
        position: relative !important;
        top: auto !important;
        right: auto !important;
        padding: 10px 20px !important;
        font-size: 0.85rem !important;
        margin-top: 15px !important;
        border-radius: 10px !important;
        width: fit-content !important;
    }

    .sp-info-card {
        padding-bottom: 25px !important;
        margin-bottom: 20px !important;
        border-bottom: 1px solid rgba(0,0,0,0.1) !important;
    }
}

/* Very small screen fix */
@media (max-width: 350px) {
    .sp-service-title { font-size: 15px !important; }
    .sp-service-btn { padding: 6px 10px !important; font-size: 10px !important; }
}