.articles-section {
    background: #fafafa;
    padding: 40px 0 60px 0;
}

.articles-title {
    color: #1686e0;
    font-family: 'Maven Pro', Arial, sans-serif;
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 16px;
}

.whitepapers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(650px, 1fr));
    gap: 40px 32px;
    margin: 40px 40px 0 40px;
    padding: 0 16px;
    position: relative;
}

.whitepaper-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.07);
    padding: 32px 28px 32px 28px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 350px;
    transition: box-shadow 0.2s;
    position: relative;
}

.whitepaper-card:hover {
    box-shadow: 0 8px 32px rgba(22,134,224,0.13);
}

.whitepaper-title {
    color: #1686e0;
    font-family: 'Maven Pro', Arial, sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.whitepaper-desc {
    color: #525252;
    font-family: 'Georgia', Arial, sans-serif;
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 24px;
}

.whitepaper-download {
    color: #ff6c2d;
    font-family: 'Maven Pro', Arial, sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.02em;
    margin-top: auto;
    transition: color 0.2s;
}

.whitepaper-download:hover {
    color: #1686e0;
}

/* Popup Overlay - Positioned over clicked card */
.download-popup-overlay {
    position: absolute;
    z-index: 9999;
    background: rgba(22, 134, 224, 0.15);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile-specific overlay positioning */
@media (max-width: 767px) {
    .download-popup-overlay {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        padding: 15px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 0;
    }

    .download-popup-overlay.keyboard-open {
        height: 100vh !important;
        height: 100dvh !important;
        align-items: flex-start;
        padding-top: 20px;
    }
}

/* Popup Modal */
.download-popup-modal {
    background: #fff;
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    margin-top: 10rem;
    max-height: 90vh;
    max-height: 90dvh;
    box-shadow: 0 8px 32px rgba(22,134,224,0.18);
    padding: 0 0 2.5rem 0;
    position: relative;
    animation: popupIn 0.2s;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

@keyframes popupIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.download-popup-header {
    background: #4bb2ff;
    border-radius: 16px 16px 0 0;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 10;
}

.download-popup-title {
    color: #fff;
    font-size: 1.6rem;
    font-weight: 600;
    font-family: 'Maven Pro', Arial, sans-serif;
}

.download-popup-close {
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
    cursor: pointer;
    margin-left: 1rem;
    transition: color 0.2s;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.download-popup-close:hover {
    color: #ff6c2d;
    background: rgba(255, 255, 255, 0.2);
}

.download-popup-form {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    margin: 2.5rem 0 0 0;
    align-items: center;
    padding: 0 20px;
}

.download-popup-form input {
    width: 100%;
    max-width: 420px;
    padding: 1.1rem 1.2rem;
    border: none;
    border-radius: 20px;
    background: #ededed;
    font-size: 1.15rem;
    color: #888;
    font-family: 'Maven Pro', Arial, sans-serif;
    margin: 0 auto;
    outline: none;
    text-align: left;
    box-sizing: border-box;
    -webkit-appearance: none;
    -webkit-border-radius: 20px;
}

.download-popup-form input:focus {
    background: #e0e0e0;
    color: #333;
}

.download-popup-form input::placeholder {
    color: #bdbdbd;
    opacity: 1;
}

.download-popup-btn {
    width: 100%;
    max-width: 300px;
    margin: 1.2rem auto 0 auto;
    padding: 1.1rem 0;
    border: none;
    border-radius: 16px;
    background: linear-gradient(90deg, #ff914d 0%, #ff6c2d 100%);
    color: #fff;
    font-size: 1.15rem;
    font-weight: 700;
    font-family: 'Maven Pro', Arial, sans-serif;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 16px rgba(255,108,45,0.13);
    text-transform: uppercase;
    -webkit-appearance: none;
}

.download-popup-btn:hover {
    background: linear-gradient(90deg, #ff6c2d 0%, #ff914d 100%);
}

.form-error {
    background: #fee;
    color: #c33;
    padding: 12px 16px;
    border-radius: 8px;
    margin: 0 20px 1.2rem 20px;
    font-size: 0.95rem;
    text-align: center;
}

.form-success {
    background: #efe;
    color: #3c3;
    padding: 12px 16px;
    border-radius: 8px;
    margin: 0 20px 1.2rem 20px;
    font-size: 0.95rem;
    text-align: center;
}

/* Tablet Styles - Fixed for 600px to 768px */
@media (min-width: 600px) and (max-width: 767px) {
    .articles-section {
        padding: 30px 0 50px 0;
    }

    .articles-title {
        font-size: 2.3rem;
        padding: 0 35px;
        margin-bottom: 18px;
    }

    .whitepapers-grid {
        display: grid;
        grid-template-columns: repeat(1, 1fr);
        gap: 28px 24px;
        margin: 35px auto 0 auto;
        padding: 0 24px;
        max-width: 800px;
    }

    .whitepaper-card {
        background: #fff;
        border-radius: 13px;
        box-shadow: 0 4px 24px rgba(0,0,0,0.07);
        padding: 26px 23px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        min-height: 310px;
        transition: box-shadow 0.2s, transform 0.2s;
    }

    .whitepaper-card:hover {
        box-shadow: 0 8px 32px rgba(22,134,224,0.13);
        transform: translateY(-2px);
    }

    .whitepaper-title {
        color: #1686e0;
        font-family: 'Maven Pro', Arial, sans-serif;
        font-size: 1.35rem;
        font-weight: 700;
        margin-bottom: 13px;
        line-height: 1.3;
    }

    .whitepaper-desc {
        color: #525252;
        font-family: 'Maven Pro', Arial, sans-serif;
        font-size: 18px;
        margin-bottom: 23px;
        line-height: 1.5;
        flex-grow: 1;
    }

    .whitepaper-download {
        color: #ff6c2d;
        font-family: 'Maven Pro', Arial, sans-serif;
        font-size: 0.93rem;
        font-weight: 600;
        text-decoration: none;
        letter-spacing: 0.02em;
        margin-top: auto;
        transition: color 0.2s;
        display: inline-block;
        padding: 9px 0;
    }

    .whitepaper-download:hover {
        color: #1686e0;
    }
}

/* Desktop Styles - Updated to start from 768px */
@media (min-width: 768px) {
    .articles-section {
        padding: 35px 0 55px 0;
    }

    .articles-title {
        font-size: 2.7rem;
        padding: 0 40px;
    }

    .whitepapers-grid {
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
        gap: 35px 30px;
        margin: 38px auto 0 auto;
        padding: 0 32px;
    }

    .whitepaper-card {
        border-radius: 15px;
        padding: 30px 26px;
        min-height: 335px;
    }

    .whitepaper-title {
        font-size: 1.42rem;
    }

    .whitepaper-desc {
        font-size: 18px;
        margin-bottom: 25px;
    }

    .whitepaper-download {
        font-size: 0.97rem;
    }
}

/* Desktop Styles */
@media (min-width: 1024px) {
    .articles-section {
        padding: 40px 0 60px 0;
    }

    .articles-title {
        font-size: 3rem;
    }

    .whitepapers-grid {
        grid-template-columns: repeat(auto-fit, minmax(600px, 1fr));
        gap: 40px 32px;
        margin: 40px auto 0 auto;
        padding: 0 40px;
    }

    .whitepaper-card {
        border-radius: 16px;
        padding: 32px 28px;
        min-height: 350px;
    }

    .whitepaper-title {
        font-size: 1.5rem;
    }

    .whitepaper-desc {
        font-size: 20px;
    }
}

/* Large Desktop Styles */
@media (min-width: 1200px) {
    .whitepapers-grid {
        grid-template-columns: repeat(auto-fit, minmax(650px, 1fr));
        max-width: 1400px;
    }
}

/* Extra Large Screens */
@media (min-width: 1440px) {
    .whitepapers-grid {
        grid-template-columns: repeat(auto-fit, minmax(700px, 1fr));
        max-width: 1600px;
    }
}

/* Mobile Styles */
@media (min-width: 380px) and (max-width: 599px) {
    .articles-title {
        font-size: 2.2rem;
        padding: 0 30px;
        margin-bottom: 20px;
    }

    .whitepapers-grid {
        display: grid;
        grid-template-columns: repeat(1, 1fr);
        padding: 0 20px;
        gap: 24px;
        margin: 32px auto 0 auto;
    }

    .whitepaper-card {
        padding: 26px 22px;
        border-radius: 12px;
        min-height: 300px;
    }

    .whitepaper-title {
        font-size: 1.3rem;
        margin-bottom: 14px;
    }

    .whitepaper-desc {
        font-size: 18px;
        margin-bottom: 22px;
        line-height: 1.5;
    }

    .whitepaper-download {
        font-size: 0.92rem;
        padding: 10px 0;
    }
}

/* Very Small Mobile Devices */
@media (max-width: 380px) {
    .articles-title {
        font-size: 1.75rem;
        padding: 0 15px;
    }

    .whitepapers-grid {
        display: grid;
        grid-template-columns: repeat(1, 1fr);
        padding: 0 0px;
        gap: 16px;
    }

    .whitepaper-card {
        padding: 20px 16px;
        border-radius: 10px;
        min-height: 260px;
    }

    .whitepaper-title {
        font-size: 1.2rem;
    }

    .whitepaper-desc {
        font-size: 16px;
    }

    .download-popup-form {
        padding: 0 15px;
    }

    .download-popup-title {
        font-size: 1.2rem;
    }

    .download-popup-close {
        font-size: 1.3rem;
        width: 25px;
        height: 25px;
    }
}

