/**
 * Poppins Font Optimizations
 *
 * This file contains specific optimizations for the Poppins font
 * to ensure proper rendering and readability across all devices.
 */

/* Base Poppins optimizations */
body {
    font-family: 'Poppins', sans-serif;
    text-rendering: optimizeLegibility;
}

/* Paragraph text optimizations */
p, 
.hero-description, 
.feature-card p, 
.course-excerpt p, 
.testimonial-text, 
.about-description, 
.about-feature-item p {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
}

/* Desktop optimizations (default) */
@media screen and (min-width: 1200px) {
    body {
        /* Slightly tighter for large screens where Poppins tends to look more spaced out */
        letter-spacing: -0.01em;
    }
    
    p,
    .hero-description,
    .feature-card p,
    .course-excerpt p {
        line-height: 1.65;
    }
}

/* Medium screens (992px - 1199px) */
@media screen and (max-width: 1199px) and (min-width: 992px) {
    body {
        letter-spacing: normal;
    }
    
    p,
    .hero-description,
    .feature-card p,
    .course-excerpt p {
        line-height: 1.6;
    }
}

/* Tablet screens (768px - 991px) */
@media screen and (max-width: 991px) and (min-width: 768px) {
    body {
        letter-spacing: 0.01em;
    }
    
    p,
    .hero-description,
    .feature-card p,
    .course-excerpt p {
        line-height: 1.6;
    }
}

/* Mobile screens (576px - 767px) */
@media screen and (max-width: 767px) and (min-width: 576px) {
    body {
        letter-spacing: 0.01em;
    }
    
    p,
    .hero-description,
    .feature-card p,
    .course-excerpt p {
        line-height: 1.7;
    }
}

/* Extra small screens (< 576px) */
@media screen and (max-width: 575px) {
    body {
        letter-spacing: 0.015em;
    }
    
    p,
    .hero-description,
    .feature-card p,
    .course-excerpt p {
        line-height: 1.75;
    }
}

/* Chrome on Mobile with Desktop mode (specific optimization) */
@media screen and (max-width: 1200px) and (-webkit-min-device-pixel-ratio: 2) {
    body {
        letter-spacing: 0.01em;
    }
    
    p,
    .hero-description,
    .feature-card p,
    .course-excerpt p {
        letter-spacing: 0.01em;
        line-height: 1.7;
    }
}

/* Special handling for mobile Chrome in desktop mode */
@media screen and (min-width: 1200px) and (-webkit-min-device-pixel-ratio: 2) and (max-device-width: 1000px) {
    body {
        letter-spacing: 0.01em;
        -webkit-text-size-adjust: 100%;
    }
    
    p,
    .hero-description,
    .feature-card p,
    .course-excerpt p {
        font-size: calc(var(--paragraph-font-size) * 1.05);
        line-height: 1.7;
        -webkit-text-size-adjust: 100%;
    }
}

/* High-DPI devices for sharper Poppins rendering */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
} 