/**
 * App Listings Manager - Frontend Styles
 */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

.alm-apps-listing {
    margin: 0 auto;
    width: 100%;
    max-width: 100%;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #ffffff;
    padding: 20px 10px;
    border-radius: 8px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
}

/* =========================================
   TOP RATED SLIDER (Modern + Mobile Swipe)
========================================= */

/* =========================================
   TOP RATED SLIDER (Premium Design)
========================================= */

.alm-slider {
    position: relative !important;
    border-radius: 24px !important;
    padding: 40px !important;
    /* Increased padding on ALL sides */
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%) !important;
    border: 1px solid rgba(39, 55, 71, 0.08) !important;
    box-shadow: 0 10px 40px rgba(39, 55, 71, 0.08) !important;
    overflow: visible !important;
    margin-bottom: 40px !important;
}

.alm-slider-viewport {
    overflow: hidden !important;
    width: auto !important;
    /* Allow it to respect parent padding */
    border-radius: 20px !important;
    padding: 20px 10px !important;
    /* Internal spacing for shadows */
    margin: 0 !important;
    /* Removed negative margin to prevent overlap */
}

.alm-slider-track {
    display: flex;
    gap: 20px;
    will-change: transform;
    transform: translate3d(0, 0, 0);
    margin: 0;
    padding: 0;
    list-style: none;
}

.alm-slider-track.is-anim {
    transition: transform 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

.alm-slide {
    flex: 0 0 auto;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 1;
}

.alm-slide:hover {
    transform: translateY(-5px);
}

/* Ensure slides have proper spacing on mobile */
@media (max-width: 767px) {
    .alm-slide {
        padding: 0 5px;
        box-sizing: border-box;
    }

    .alm-slider {
        padding: 10px 0 !important;
    }

    .alm-nav {
        width: 36px;
        height: 36px;
    }

    .alm-nav svg {
        width: 20px;
        height: 20px;
    }
}

.alm-slide {
    flex: 0 0 auto !important;
}

/* Slider Navigation Container */
.alm-slider {
    position: relative;
    padding: 0 40px !important;
    /* Make space for arrows */
}

.alm-slider-nav-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    /* Allow clicks to pass through to the slider */
}

/* Modern Arrow Navigation */
.alm-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 80px;
    background: rgba(255, 255, 255, 0.9);
    color: #273747;
    border: none;
    border-radius: 0;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
    /* Re-enable pointer events for the buttons */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    opacity: 0.9;
}

.alm-nav:hover {
    background: #ffffff;
    color: #EDD386;
    transform: translateY(-50%) scale(1.02);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    opacity: 1;
}

.alm-nav:active {
    transform: translateY(-50%) scale(0.98);
}

.alm-nav svg {
    width: 20px;
    height: 20px;
    transition: transform 0.2s ease;
}

.alm-prev {
    left: 0;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    padding-right: 5px;
}

.alm-next {
    right: 0;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
    padding-left: 5px;
}

.alm-nav.is-disabled,
.alm-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: translateY(-50%);
    box-shadow: none;
}

/* Hover effect for arrows */
.alm-nav:hover svg {
    transform: scale(1.2);
}

/* Mobile styles */
@media (max-width: 767px) {
    .alm-slider {
        padding: 0 30px !important;
    }

    .alm-nav {
        width: 30px;
        height: 60px;
    }

    .alm-nav svg {
        width: 16px;
        height: 16px;
    }
}

/* Hide arrows when slider is at start/end */
.alm-slider[data-at-start="true"] .alm-prev,
.alm-slider[data-at-end="true"] .alm-next {
    visibility: hidden;
    opacity: 0;
    transform: translateY(-50%) scale(0.8);
}

/* Mobile arrows overlay */
.alm-slider .alm-prev,
.alm-slider .alm-next {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 10 !important;
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(4px) !important;
}

.alm-slider .alm-prev {
    left: 10px !important;
}

.alm-slider .alm-next {
    right: 10px !important;
}

/* Desktop buttons (in header) */
@media (min-width: 640px) {

    .alm-slider .alm-prev,
    .alm-slider .alm-next {
        position: static !important;
        transform: none !important;
        background: #ffffff !important;
    }

    .alm-slider .alm-prev:hover,
    .alm-slider .alm-next:hover {
        transform: translateY(-2px) !important;
    }
}

/* Enhanced Header Gradient Border */
.border-gradient {
    border-bottom: 2px solid transparent !important;
    border-image: linear-gradient(to right, #EDD386, #273747, #EDD386) 1 !important;
}

/* Horizontal Card (Premium Design) */
.alm-horizontal-card {
    height: 160px !important;
    min-height: 160px !important;
    max-height: 160px !important;
    background: #ffffff !important;
    border-radius: 16px !important;
    border: 1px solid rgba(0, 0, 0, 0.04) !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    overflow: hidden !important;
    position: relative !important;
}

.alm-horizontal-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(237, 211, 134, 0.6) !important;
}

/* Ensure proper sizing on mobile */
@media (max-width: 639px) {
    .alm-horizontal-card {
        height: 140px !important;
        min-height: 140px !important;
        max-height: 140px !important;
    }

    .alm-slider {
        padding: 15px !important;
    }
}

/* Card Content Styling */
.alm-horizontal-card h3 {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    margin-bottom: 4px !important;
    letter-spacing: -0.02em !important;
}

.alm-horizontal-card p {
    font-size: 12px !important;
    color: #64748b !important;
    font-weight: 500 !important;
}

/* Premium Download Button inside Card */
.alm-horizontal-card .p-4>a {
    background: linear-gradient(135deg, #EDD386 0%, #d4af37 100%) !important;
    color: #273747 !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    font-size: 11px !important;
    letter-spacing: 0.5px !important;
    border: none !important;
    box-shadow: 0 4px 10px rgba(237, 211, 134, 0.3) !important;
    transition: all 0.3s ease !important;
}

.alm-horizontal-card .p-4>a:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 15px rgba(237, 211, 134, 0.4) !important;
    background: linear-gradient(135deg, #f0dc95 0%, #e0b848 100%) !important;
}


.alm-section {
    margin: 0 0 40px 0;
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 10px;
    box-sizing: border-box;
}

.alm-section h2 {
    font-size: 1.5rem;
    margin: 0 0 15px 0;
    color: #333;
    padding: 0 0 8px 0;
    font-weight: 600;
    border-bottom: 2px solid #F1D88B;
    text-align: left;
    width: 100%;
    max-width: 100%;
    width: 100%;
    max-width: 1200px;
    width: 100%;
    max-width: 1200px;
    margin-left: 0;
    padding-left: 0;
}

/* Apps Grid Layout – Fixed Columns */
.alm-apps-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* Default mobile: 2 columns */
    gap: 20px;
    margin: 0;
    width: 100%;
    padding: 0;
    justify-content: center;
}

/* Tablet: 3 columns */
@media (min-width: 640px) {
    .alm-apps-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Desktop: 5 columns */
@media (min-width: 1024px) {
    .alm-apps-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Premium Category Hero Banner */
.alm-category-hero {
    background: radial-gradient(circle at top right, #1e293b 0%, #0f172a 100%);
    padding: 80px 20px;
    text-align: center;
    color: white;
    margin-bottom: 60px;
    position: relative;
    overflow: hidden;
    border-radius: 0 0 40px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid rgba(237, 211, 134, 0.2);
}

/* Animated Background Shapes */
.alm-category-hero::before,
.alm-category-hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    z-index: 1;
    animation: floatShape 8s infinite alternate ease-in-out;
}

.alm-category-hero::before {
    top: -50px;
    left: -50px;
    width: 400px;
    height: 400px;
    background: rgba(237, 211, 134, 0.08);
    /* Gold glow */
}

.alm-category-hero::after {
    bottom: -50px;
    right: -50px;
    width: 300px;
    height: 300px;
    background: rgba(0, 200, 83, 0.05);
    /* Green glow */
    animation-delay: -4s;
}

@keyframes floatShape {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(20px, 30px) scale(1.1);
    }
}

/* Glassmorphism Content Box */
.alm-hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.alm-category-hero h1 {
    font-size: 3.5rem;
    margin: 0 0 20px 0;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: linear-gradient(to right, #EDD386, #fff, #EDD386);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
    animation: shine 6s linear infinite;
    display: inline-block;
}

@keyframes shine {
    to {
        background-position: 200% center;
    }
}

.alm-category-hero p {
    color: #cbd5e1;
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
    font-weight: 300;
}

/* Card sizing – let the grid cell control width */
.alm-apps-grid .alm-app-card {
    width: 100%;
    min-width: 0;
    /* allow shrinking for mobile */
    height: 310px;
    margin: 0;
    text-decoration: none !important;
    flex-shrink: 0;
}


/* Mobile: force 2-3 columns, no gaps */
@media (max-width: 480px) {
    .alm-apps-listing {
        padding: 10px 5px;
        /* reduce padding */
    }

    .alm-section {
        padding: 0 5px;
        /* reduce padding */
    }

    .alm-apps-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        /* exactly 2 columns */
        gap: 5px;
        /* smaller gap for more width */
        margin: 0;
        padding: 0;
        width: 100%;
    }

    /* Target the grid child (the link wrapper) */
    .alm-app-card-link {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        display: block !important;
    }

    .alm-apps-grid .alm-app-card {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        height: 270px;
    }

    .alm-app-card {
        width: 100% !important;
        min-width: 0 !important;
    }

    .alm-search-container {
        flex-direction: column;
        max-width: 100%;
    }

    .alm-search-btn {
        width: 100%;
        margin-top: 8px;
    }

    .alm-section h2 {
        font-size: 1.2rem;
        text-align: left;
    }

    .alm-view-more-container {
        text-align: center;
    }
}

/* Tablet/larger phones: 3 columns */
@media (min-width: 481px) and (max-width: 767px) {
    .alm-apps-listing {
        padding: 15px 5px;
        /* reduce padding */
    }

    .alm-section {
        padding: 0 5px;
        /* reduce padding */
    }

    .alm-apps-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        /* exactly 3 columns */
        gap: 8px;
        /* smaller gap for more width */
        margin: 0;
        padding: 0;
        width: 100%;
    }

    /* Target the grid child (the link wrapper) */
    .alm-app-card-link {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        display: block !important;
    }

    .alm-apps-grid .alm-app-card {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        height: 290px;
    }

    .alm-app-card {
        width: 100%;
        min-width: 0;
    }

    .alm-search-container {
        flex-direction: column;
        max-width: 100%;
    }

    .alm-search-btn {
        width: 100%;
        margin-top: 8px;
    }

    .alm-section h2 {
        font-size: 1.3rem;
        text-align: left;
    }

    .alm-view-more-container {
        text-align: center;
    }
}

/* App Card Styles */
.alm-app-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 310px;
    width: 100%;
    /* fill grid cell */
    min-width: 0;
    /* allow shrinking */
    display: flex;
    flex-direction: column;
    position: relative;
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
    transform: translateY(10px);
    border: 1px solid #F1D88B;
    margin: 0;
    text-decoration: none !important;
    outline: none !important;
}

/* Staggered animation delay for cards */
.alm-app-card:nth-child(2n) {
    animation-delay: 0.1s;
}

.alm-app-card:nth-child(3n) {
    animation-delay: 0.2s;
}

.alm-app-card:nth-child(4n) {
    animation-delay: 0.3s;
}

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

/* Hover Effects */
.alm-app-card:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid #00C853;
    z-index: 10;
}

/* App Image Container */
.alm-app-image-container {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    background-color: #fff9e6;
}

.alm-app-image-container img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.alm-app-placeholder {
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e9ecef;
    border-radius: 8px;
    color: #6c757d;
    font-size: 0.8rem;
    text-align: center;
}

/* App Content */
.alm-app-content {
    padding: 12px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.alm-app-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 5px 0;
    color: #222;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.alm-app-version {
    font-size: 0.7rem;
    color: #888;
    margin: 0 0 8px 0;
    font-weight: 500;
}

.alm-app-rating {
    margin-top: auto;
    margin-bottom: 10px;
}

.alm-star {
    color: #ddd;
    font-size: 0.85rem;
}

.alm-star.filled {
    color: #FFD700;
}

/* App Card Link */
.alm-app-card-link {
    text-decoration: none !important;
    color: inherit;
    display: block;
    width: 100%;
    min-width: 0;
    /* allow shrinking for grid */
    max-width: 100%;
    /* don't overflow grid */
    height: 100%;
    outline: none !important;
}

.alm-app-card-link:hover,
.alm-app-card-link:focus,
.alm-app-card-link:active {
    text-decoration: none !important;
    color: inherit;
    outline: none !important;
    box-shadow: none !important;
}

/* Additional App Info */
.alm-app-tagline {
    font-size: 0.75rem;
    color: #666;
    margin: 5px 0;
    font-style: italic;
    height: 30px;
    overflow: hidden;
}

.alm-app-size {
    font-size: 0.7rem;
    color: #888;
    margin: 3px 0;
}

.alm-app-meta {
    display: flex;
    justify-content: space-between;
    margin: 5px 0;
}

.alm-app-updated {
    font-size: 0.7rem;
    color: #00C853;
    font-weight: 500;
}

/* Ribbon Tags */
.alm-ribbon {
    position: absolute;
    top: 12px;
    left: -25px;
    background: linear-gradient(135deg, #F1D88B, #e0c77a);
    color: #333;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 25px;
    transform: rotate(-45deg);
    z-index: 5;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
}

.alm-ribbon.new {
    background: linear-gradient(135deg, #00C853, #009d44);
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.alm-ribbon.updated {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.alm-ribbon.mod {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    color: #212529;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
}

/* Download Button */
.alm-download-btn {
    display: block;
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, #00C853, #009d44);
    color: white;
    text-align: center;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
    margin-top: auto;
}

.alm-download-btn:hover {
    background: #009d44;
    box-shadow: 0 5px 15px rgba(0, 200, 83, 0.4);
    transform: translateY(-2px);
}

/* Ripple effect for download button */
.alm-download-btn::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.alm-download-btn:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }

    100% {
        transform: scale(50, 50);
        opacity: 0;
    }
}

/* View More Button */
.alm-view-more-container {
    display: flex;
    justify-content: center;
    margin: 40px 0 20px;
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
}

.alm-view-more-btn {
    padding: 14px 35px;
    background: linear-gradient(135deg, #F1D88B, #e0c77a);
    color: #333;
    border: none;
    border-radius: 30px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(241, 216, 139, 0.3);
    min-width: 180px;
    text-align: center;
    display: inline-block;
}

.alm-view-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(241, 216, 139, 0.4);
}

.alm-view-more-btn:active {
    transform: translateY(0);
}

.alm-view-more-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.alm-view-more-btn:hover {
    background: linear-gradient(135deg, #e0c77a, #cdb669);
    transform: translateY(-3px);
}

/* Load More Button */
.alm-hidden-item {
    display: none !important;
}

/* Mobile: Hide items beyond 4 */
@media (max-width: 1023px) {
    .alm-hidden-item-mobile {
        display: none !important;
    }
}

/* Desktop: Hide items beyond 5 */
@media (min-width: 1024px) {
    .alm-hidden-item-desktop {
        display: none !important;
    }

    /* On desktop, show items 5 and below even if they have mobile hidden class */
    .alm-grid-item[data-item-index="5"].alm-hidden-item-mobile {
        display: block !important;
    }
}


.alm-load-more-container {
    display: flex;
    justify-content: center;
    margin: 30px 0 20px;
    width: 100%;
}

.alm-load-more-btn {
    padding: 14px 40px;
    background: linear-gradient(135deg, #00C853, #009d44);
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 200, 83, 0.3);
    min-width: 160px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.alm-load-more-btn:hover {
    background: linear-gradient(135deg, #009d44, #007a35);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 200, 83, 0.4);
}

.alm-load-more-btn:active {
    transform: translateY(0);
}

.alm-load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.alm-load-more-btn.loading .alm-btn-text {
    opacity: 0;
}

.alm-load-more-btn.loading .alm-btn-loader {
    display: block !important;
}

/* Loading Spinner */
.alm-spinner {
    animation: rotate 2s linear infinite;
    width: 24px;
    height: 24px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.alm-spinner .path {
    stroke: white;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }

    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }

    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}


/* Search and Filter Container */
.alm-search-filter-container {
    margin: 0 auto 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
    max-width: 800px;
    padding: 20px;
    box-sizing: border-box;
    background: #f8f9fa;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

/* Modern Search Input - Premium Design */
.alm-modern-search-wrapper {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.1));
}

.alm-modern-search-input {
    width: 100%;
    padding: 18px 50px 18px 24px;
    /* Equal padding, icon positioned separately */
    border: 2px solid transparent;
    border-radius: 60px;
    font-size: 1rem;
    font-weight: 400;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    color: #273747;
    outline: none;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    letter-spacing: 0.3px;
}

.alm-modern-search-input:hover {
    border-color: rgba(237, 211, 134, 0.3);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}

.alm-modern-search-input:focus {
    background: #ffffff;
    box-shadow: 0 16px 48px rgba(237, 211, 134, 0.25),
        0 0 0 4px rgba(237, 211, 134, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 1);
    border-color: #EDD386;
    transform: translateY(-3px);
    /* Remove extra padding change when focused to avoid jump */
}

.alm-modern-search-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
    opacity: 1;
    transition: all 0.3s ease;
}

.alm-modern-search-input:focus::placeholder {
    color: #cbd5e1;
    opacity: 0.7;
}

/* Search Icon - Modern design with hide on focus */
.alm-search-icon {
    position: absolute;
    right: 24px;
    left: auto;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    width: 24px;
    height: 24px;
    opacity: 1;
}

/* Hide icon on focus */
.alm-modern-search-wrapper:focus-within .alm-search-icon {
    opacity: 0;
    transform: translateY(-50%) translateX(10px) scale(0.8);
}

.alm-modern-search-wrapper:hover .alm-search-icon {
    color: #475569;
    transform: translateY(-50%) scale(1.05);
}

.alm-search-icon svg {
    width: 24px;
    height: 24px;
    display: block;
}

/* =========================================
   SEARCH DROPDOWN
========================================= */

.alm-search-dropdown {
    /* position: absolute; */
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    animation: dropdownFadeIn 0.2s ease;
}

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

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

.alm-search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    color: #273747;
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
    position: relative;
}

/* Make the entire area clickable */
.alm-search-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

/* Make sure child elements are above the clickable overlay */
.alm-search-item>* {
    position: relative;
    z-index: 2;
}

.alm-search-item:hover {
    background: linear-gradient(to right, rgba(237, 211, 134, 0.1), rgba(237, 211, 134, 0.05));
    padding-left: 20px;
    text-decoration: none;
}

/* Make sure child elements don't block clicks */
.alm-search-item * {
    pointer-events: none;
}

.alm-search-item:last-of-type {
    border-bottom: none;
}

.alm-search-thumb {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: #f1f5f9;
}

.alm-search-no-img {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
}

.alm-search-info {
    flex: 1;
    min-width: 0;
}

.alm-search-title {
    font-size: 14px;
    font-weight: 600;
    color: #273747;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.alm-search-category {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}

.alm-search-more {
    padding: 12px 16px;
    text-align: center;
    font-size: 13px;
    color: #64748b;
    font-weight: 600;
    background: #f8fafc;
    border-radius: 0 0 16px 16px;
}

.alm-search-no-results {
    padding: 24px 16px;
    text-align: center;
    color: #94a3b8;
    font-size: 14px;
}

/* Scrollbar styling for dropdown */
.alm-search-dropdown::-webkit-scrollbar {
    width: 6px;
}

.alm-search-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.alm-search-dropdown::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.alm-search-dropdown::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}


.alm-category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px 0 0 0;
    padding: 0;
    justify-content: flex-start;
    width: 100%;
}

.alm-category-btn {
    padding: 10px 20px;
    background: transparent;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    margin: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    color: #333;
    text-decoration: none;
}

.alm-category-btn:hover {
    background: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.alm-category-btn.active {
    background: #F1D88B !important;
    border-color: #e0c77a !important;
    color: #333 !important;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(241, 216, 139, 0.3);
    transform: translateY(-1px);
}

/* Loading spinner */
.alm-loading {
    display: none;
    width: 100%;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

.alm-loading:after {
    content: "";
    display: block;
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #F1D88B;
    border-radius: 50%;
    animation: alm-spin 1s linear infinite;
    margin-bottom: 15px;
}

.alm-loading-text {
    color: #6c757d;
    font-size: 1.1rem;
    margin-top: 15px;
    font-weight: 500;
}

@keyframes alm-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Ensure the container is centered */
.alm-apps-listing {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.alm-section {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 40px;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Search Results Section */
.alm-search-results {
    animation: fadeIn 0.5s ease forwards;
}

.alm-search-results .alm-apps-grid {
    min-height: 100px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 180px));
    gap: 16px;
    margin-bottom: 20px;
}

.alm-search-results .alm-apps-grid .alm-app-card {
    width: 100%;
    min-width: 160px !important;
    max-width: 180px;
    height: 310px;
}

.alm-search-results h2 {
    color: #00C853;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
}

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

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

/* No Results Message */
.alm-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
    font-size: 1.2rem;
    font-weight: 500;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    margin: 20px 0;
    background: #f8f9fa;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

.alm-no-results:before {
    content: "\f534";
    font-family: 'dashicons';
    font-size: 48px;
    color: #F1D88B;
    margin-bottom: 20px;
    display: block;
    line-height: 1;
}

@keyframes alm-spinner {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Widget specific overrides */
.alm-widget .alm-search-filter-container {
    background: transparent;
    box-shadow: none;
    padding: 0;
    max-width: 100%;
    margin: 0;
    border-radius: 0;
}

/* Single App Page Styles */
.alm-single-app-wrapper {
    font-family: 'Poppins', sans-serif;
}

.alm-app-header-bg {
    background-size: cover;
    background-position: center;
}

.alm-download-btn-lg {
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px 0 rgba(0, 200, 83, 0.39);
}

.alm-download-btn-lg:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 200, 83, 0.23);
}

/* Prose overrides for better readability */
.prose p {
    margin-bottom: 1.5em;
}

.prose h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 2em;
    margin-bottom: 1em;
    color: #273747;
}

.prose ul {
    list-style-type: disc;
    padding-left: 1.5em;
    margin-bottom: 1.5em;
}

.prose li {
    margin-bottom: 0.5em;
}

/* Hide scrollbar for horizontal scrolling areas */
.alm-hide-scrollbar::-webkit-scrollbar {
    display: none;
}

.alm-hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Safe area padding for mobile sticky bar */
.safe-area-pb {
    padding-bottom: env(safe-area-inset-bottom, 20px);
}

/* Search Widget Container - Premium Design */
.alm-search-widget-container {
    width: 100%;
    margin-bottom: 30px;
    padding: 30px 20px;
    background: linear-gradient(135deg, rgba(237, 211, 134, 0.08) 0%, rgba(255, 255, 255, 0.95) 100%);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(237, 211, 134, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.alm-search-widget-container:hover {
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.alm-widget.alm-search-widget {
    width: 100%;
}

/* Responsive adjustments for widget */
@media (max-width: 768px) {
    .alm-search-widget-container {
        padding: 20px 15px;
        margin-bottom: 20px;
    }

    .alm-modern-search-input {
        font-size: 0.95rem;
        padding: 16px 20px;
    }

    .alm-modern-search-input:focus {
        padding-left: 20px;
    }

    .alm-search-icon {
        left: 20px;
        width: 22px;
        height: 22px;
    }

    .alm-search-icon svg {
        width: 22px;
        height: 22px;
    }

    /* Mobile filter button adjustments */
    .alm-category-filter {
        gap: 6px;
    }

    .alm-category-btn {
        font-size: 0.85rem;
        padding: 8px 14px;
    }

    /* Horizontal scroll for mobile when enabled */
    .alm-widget-scroll-mobile .alm-category-filter {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        /* Firefox */
        -ms-overflow-style: none;
        /* IE and Edge */
        padding-bottom: 5px;
    }

    .alm-widget-scroll-mobile .alm-category-filter::-webkit-scrollbar {
        display: none;
        /* Chrome, Safari, Opera */
    }

    .alm-widget-scroll-mobile .alm-category-btn {
        flex-shrink: 0;
        white-space: nowrap;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    .alm-modern-search-input {
        font-size: 0.9rem;
        padding: 14px 18px;
    }

    .alm-modern-search-input:focus {
        padding-left: 18px;
    }

    .alm-search-icon {
        left: 18px;
        width: 20px;
        height: 20px;
    }

    .alm-search-icon svg {
        width: 20px;
        height: 20px;
    }

    .alm-category-filter {
        gap: 5px;
    }

    .alm-category-btn {
        font-size: 0.8rem;
        padding: 6px 12px;
    }

    /* Horizontal scroll for mobile when enabled */
    .alm-widget-scroll-mobile .alm-category-filter {
        gap: 5px;
    }
}

/* Blog Button Specific Styling (Stand out from categories) */
.alm-blog-btn-nav {
    background: linear-gradient(135deg, #6366F1 0%, #A855F7 100%) !important;
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3) !important;
    padding: 10px 25px !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem !important;
    text-decoration: none !important;
    border-radius: 50px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.alm-blog-btn-nav::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 20%;
    height: 200%;
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(30deg);
    transition: all 0.5s ease;
    opacity: 0;
}

.alm-blog-btn-nav:hover::after {
    left: 120%;
    opacity: 1;
}

.alm-blog-btn-nav:hover {
    background: linear-gradient(135deg, #4F46E5 0%, #9333EA 100%) !important;
    transform: translateY(-2px) scale(1.03) !important;
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.5) !important;
    color: white !important;
}