/* Desktop view specific styles - Trigger at 992px to keep iPad Mini on Mobile View */
@media (min-width: 992px) {
    body.main-home {
        background-color: #f8f9fa !important;
        max-width: 100% !important;
        padding-top: 0 !important;
    }

    .desktop-view {
        font-family: 'Plus Jakarta Sans', sans-serif;
        background-color: #fcfcfc;
        min-height: 100vh;
        width: 100%;
        display: block !important;
    }

    /* Global Mobile Hide on Desktop */
    .mobile-area,
    .page-header,
    .news-area,
    .page-footer.d-lg-none {
        display: none !important;
    }

    .desk-navbar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 40px;
        background: white;
        border-bottom: 1px solid #f0f0f0;
    }

    .desk-logo img {
        height: 35px;
    }

    .desk-logo a {
        display: flex;
        align-items: center;
        gap: 10px;
        text-decoration: none !important;
        font-family: 'Plus Jakarta Sans', sans-serif;
        font-size: clamp(18px, 2vw, 24px);
        /* Fluid font size */
        font-weight: 700;
        color: #718096;
        line-height: 1;
        transition: transform 0.2s ease;
        flex-shrink: 0;
    }

    .desk-logo a:hover {
        transform: scale(1.02);
    }

    .desk-logo-health {
        color: #38a169;
        font-weight: 800;
    }

    .desk-nav-actions {
        display: flex;
        gap: clamp(10px, 3vw, 50px);
        /* Fluid gap */
        align-items: center;
        flex-grow: 1;
        justify-content: flex-end;
    }

    .desk-search-wrapper {
        position: relative;
        display: flex;
        align-items: center;
        flex-grow: 1;
        max-width: 650px;
        /* Increased from 500px */
        min-width: 150px;
    }

    .desk-search-input {
        background: #f4f5f7;
        border: 1px solid #e2e8f0;
        border-radius: 50px;
        padding: 12px 16px 12px 48px;
        height: 50px;
        font-family: inherit;
        font-size: 15px;
        outline: none;
        width: 350px;
        transition: all 0.2s ease;
    }

    .desk-search-input:focus {
        border-color: #38a169;
        box-shadow: 0 0 0 3px rgba(56, 161, 105, 0.1);
    }

    .desk-nav-item {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 10px !important;
        text-decoration: none !important;
        color: #718096 !important;
        font-size: 16px !important;
        font-weight: 600 !important;
        transition: all 0.2s ease;
        white-space: nowrap !important;
    }

    .desk-nav-item:hover {
        color: #38a169 !important;
    }

    .desk-nav-item img {
        height: 24px !important;
        width: 24px !important;
        object-fit: contain !important;
        filter: grayscale(100%);
        opacity: 0.5;
        transition: all 0.2s ease;
        display: block !important;
    }

    .desk-nav-item.active {
        color: #38a169 !important;
    }

    .desk-nav-item.active img {
        filter: none !important;
        opacity: 1 !important;
    }

    .desktop-container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0px 20px;
    }

    .desktop-main-title {
        font-size: 28px;
        font-weight: 700;
        color: #1a202c;
        margin-bottom: 30px;
        line-height: 1.3;
    }

    .desktop-main-title span {
        color: #a0aec0;
        font-weight: 400;
    }

    .desktop-categories-row {
        padding: 10px;
        display: flex;
        gap: 12px;
        margin-bottom: 10px;
        overflow-x: auto;
        padding-bottom: 10px;
        scrollbar-width: none;
    }

    .desktop-category-item {
        display: flex;
        align-items: center;
        justify-content: center;
        text-decoration: none !important;
        color: #718096;
        font-size: 14px;
        font-weight: 500;
        cursor: pointer;
        padding: 8px 20px;
        background: white;
        border: 1px solid #e2e8f0;
        border-radius: 50px;
        transition: all 0.2s ease;
        white-space: nowrap;
    }

    .desktop-category-item:hover {
        border-color: #38a169;
        color: #38a169;
        transform: translateY(-2px);
    }

    .desktop-category-item.active {
        background-color: #38a169;
        border-color: #38a169;
        color: white !important;
        box-shadow: 0 4px 12px rgba(56, 161, 105, 0.2);
    }

    .desktop-section-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 15px;
    }

    .desktop-section-title {
        font-size: 18px;
        font-weight: 700;
        color: #1a202c;
    }

    .desktop-section-title span {
        font-size: 14px;
        color: #a0aec0;
        font-weight: 400;
        margin-left: 10px;
    }

    .desktop-see-all {
        background-color: #e6f4ea;
        color: #38a169;
        padding: 6px 16px;
        border-radius: 20px;
        font-size: 12px;
        font-weight: 600;
        text-decoration: none !important;
        transition: background-color 0.2s;
    }

    .desktop-see-all:hover {
        background-color: #d1eada;
    }

    .desktop-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        /* 4 columns for discovery */
        gap: 20px;
        /* Tighter gap */
    }

    /* Tablet Specific Adjustments */
    @media (max-width: 1024px) {
        .desktop-grid {
            grid-template-columns: repeat(2, 1fr);
            gap: 20px;
        }

        .desk-card {
            height: 100%;
            min-height: 480px;
        }

        .desk-card-img-wrapper {
            height: 220px;
        }

        .desk-demand-statement {
            font-size: 19px;
            -webkit-line-clamp: 4;
            line-clamp: 4;
            word-wrap: break-word;
            overflow-wrap: break-word;
        }

        .desk-search-input {
            height: 50px;
            /* Tighter for tablets */
        }

        .desk-nav-actions {
            gap: 12px;
        }

        .desk-nav-item {
            font-size: 0 !important;
            gap: 0 !important;
            padding: 10px !important;
            border-radius: 50%;
            width: 44px;
            height: 44px;
            justify-content: center;
        }

        .desk-nav-item:hover {
            background-color: rgba(56, 161, 105, 0.05);
        }

        .desk-nav-item.active {
            background-color: rgba(56, 161, 105, 0.1);
        }

        .desk-navbar {
            padding: 10px 20px;
        }

        .desk-logo img {
            height: 30px;
        }

        .desk-logo a {
            gap: 6px;
        }
    }

    .desk-card {
        background: white;
        border-radius: 16px;
        /* Slightly tighter radius */
        overflow: hidden;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06), 0 10px 40px rgba(0, 0, 0, 0.04);
        display: flex;
        flex-direction: column;
        height: 470px;
        /* Adjusted to prevent clipping while staying compact */
        transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
        border: 1px solid rgba(0, 0, 0, 0.03);
    }

    .desk-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    }

    .desk-card-img-wrapper {
        position: relative;
        height: 280px;
        /* Balanced height for visibility and content space */
        background: #f8f9fa;
        overflow: hidden;
        flex-shrink: 0;
    }

    .desk-card-img-wrapper img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.5s ease;
    }

    .desk-card:hover .desk-card-img-wrapper img {
        transform: scale(1.05);
    }

    .desk-card-content {
        display: flex;
        flex-direction: column;
        flex-grow: 1;
        position: relative;
        padding-top: 10px;
        min-height: 0;
        /* Important for flex children */
    }

    /* Red Card Styles */
    .desk-card.red .desk-card-content {
        background-color: #E53E3E;
    }

    .desk-card.red .desk-category-tab {
        background-color: #C53030;
    }

    /* Green Card Styles */
    .desk-card.green .desk-card-content {
        background-color: #0C9350;
    }

    .desk-card.green .desk-category-tab {
        background-color: #08703D;
    }

    .desk-category-tab {
        position: absolute;
        top: -10px;
        left: 15px;
        color: white;
        padding: 4px 10px;
        border-radius: 4px;
        font-size: 10px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.8px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
        z-index: 2;
    }

    .desk-content-inner {
        padding: 15px 20px 15px;
        /* Balanced padding */
        display: flex;
        flex-direction: column;
        flex-grow: 1;
        justify-content: space-between;
    }

    .desk-demand-label {
        color: rgba(255, 255, 255, 0.85);
        font-size: 10px;
        font-weight: 700;
        letter-spacing: 1.2px;
        margin-bottom: 4px;
        text-transform: uppercase;
    }

    .desk-demand-statement {
        color: white;
        font-size: 18px;
        font-weight: 700;
        line-height: 1.25;
        margin-bottom: 8px;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        line-clamp: 3;
        -webkit-box-orient: vertical;
        height: 68px;
    }

    .desk-card-footer {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-top: auto;
        /* Forces footer to the very bottom of the flex container */
        padding-top: 10px;
    }

    .desk-btn-text {
        color: white;
        font-size: 14px;
        font-weight: 600;
        text-decoration: none;
        opacity: 0.9;
        transition: opacity 0.2s;
    }

    .desk-btn-text:hover {
        opacity: 1;
        color: white;
    }

    .desk-action-pill {
        background: white;
        border-radius: 50px;
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 5px 5px 5px 16px;
        text-decoration: none !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        transition: transform 0.2s, box-shadow 0.2s;
        flex-shrink: 0;
    }

    .desk-action-pill:hover {
        transform: scale(1.05);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    }

    .desk-action-pill:hover {
        transform: scale(1.05);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    }

    .desk-action-pill-left {
        font-weight: 700;
        font-size: 16px;
        display: flex;
        align-items: center;
    }

    .desk-card.red .desk-action-pill-left {
        color: #d32f2f;
    }

    .desk-card.green .desk-action-pill-left {
        color: #2f855a;
    }

    .desk-action-pill-right {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 13px;
        font-weight: 700;
        color: white;
    }

    .desk-card.red .desk-action-pill-right {
        background: #d32f2f;
    }

    .desk-card.green .desk-action-pill-right {
        background: #38a169;
        /* Green check circle */
    }

    .desk-dove-icon {
        height: 20px;
        width: auto;
    }

    .desk-check-icon {
        height: 32px;
        width: 32px;
        border-radius: 50%;
    }

    .desktop-categories-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 30px;
    }

    .desk-category-card {
        text-decoration: none !important;
        transition: transform 0.2s;
        display: flex;
        flex-direction: column;
    }

    .desk-category-card:hover {
        transform: translateY(-5px);
    }

    .desk-category-card-img {
        width: 100%;
        aspect-ratio: 1 / 1;
        border-radius: 20px;
        overflow: hidden;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
        background: #f0f0f0;
    }

    .desk-category-card-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .desk-category-card-name {
        margin-top: 15px;
        font-size: 18px;
        font-weight: 600;
        color: #4a5568;
        padding-left: 5px;
    }

    /* Articles List Page Desktop Layout */
    .desk-articles-layout {
        display: grid;
        grid-template-columns: 480px 1fr;
        gap: 40px;
        align-items: start;
        margin-top: 20px;
    }

    .desk-demand-hero {
        position: sticky;
        top: 30px;
    }

    .desk-hero-card {
        height: auto !important;
        min-height: 600px;
        background: white;
        border-radius: 20px;
        overflow: hidden;
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    }

    .desk-hero-card .desk-card-img-wrapper {
        height: 480px !important;
    }

    .desk-deserve-container {
        background: white;
        border-radius: 24px;
        padding: 40px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
        border: 1px solid #f0f0f0;
    }

    .desk-deserve-container .deserve-head {
        font-size: 24px !important;
        font-weight: 800 !important;
        margin-bottom: 25px !important;
        padding: 0 !important;
    }

    .desk-deserve-container .info-grid {
        border-bottom: 1px solid #f1f5f9;
        padding: 25px 0 !important;
        margin: 0 !important;
        display: flex !important;
        align-items: center !important;
        text-decoration: none !important;
    }

    .desk-deserve-container .info-grid:last-child {
        border-bottom: none;
    }

    .desk-deserve-container .info-img {
        width: 140px !important;
        height: 140px !important;
        border-radius: 16px !important;
        margin-right: 25px !important;
        object-fit: cover !important;
    }

    .desk-deserve-container .deserve-title {
        color: #718096 !important;
        font-size: 14px !important;
        font-weight: 600 !important;
        margin-bottom: 8px !important;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .desk-deserve-container .deserve-link {
        color: #2d3748 !important;
        font-size: 18px !important;
        font-weight: 700 !important;
        line-height: 1.5 !important;
        display: block !important;
    }

    /* Hide mobile leaks */
    .desktop-view .banner,
    .desktop-view .mini-title,
    .desktop-view .carousel-bg {
        display: none !important;
    }

    .desktop-see-all {
        background-color: #e6f4ea !important;
        color: #38a169 !important;
        padding: 8px 20px !important;
        border-radius: 50px !important;
        font-size: 14px !important;
        font-weight: 600 !important;
        text-decoration: none !important;
        border: none !important;
        display: inline-block !important;
    }
}