/* RESPONSIVE DESIGN */

/* Tablet Styles */
@media (min-width: 769px) and (max-width: 1024px) {
    .content-grid,
    .content-grid-3 {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .content-grid-2 {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .container {
        padding: 0 30px;
    }

    .article-card.featured,
    .article-card.large {
        grid-column: span 2;
    }

    .hero h1 {
        font-size: 48px;
    }

    .section-title {
        font-size: 42px;
    }
}

/* Mobile Styles */
@media (max-width: 768px) {
    /* Navigation */
    .mobile-menu-toggle {
        display: block;
        color: var(--text-dark);
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: white;
        flex-direction: column;
        padding: 80px 20px 20px;
        transition: right 0.3s ease;
        box-shadow: -2px 0 10px rgba(0,0,0,0.1);
        align-items: flex-start;
        z-index: 1001;
    }

    .main-nav.active {
        right: 0;
    }

    .main-nav li {
        width: 100%;
        margin-bottom: 10px;
    }

    .main-nav a {
        display: block;
        padding: 15px 0;
        border-bottom: 1px solid var(--border-light);
        font-size: 16px;
    }

    /* Logo adjustment for mobile */
    .logo-image {
        height: 32px;
    }
    
    .logo-text {
        font-size: 20px;
    }

    /* Hero Section */
    .hero {
        padding: 60px 0;
    }

    .hero h1 {
        font-size: 42px;
        line-height: 1.1;
        text-align: center;
    }
    
    .hero {
        text-align: center;
    }

    .hero-subtitle {
        font-size: 16px;
        margin-bottom: 32px;
        max-width: none;
    }

    /* Content Grid */
    .content-grid,
    .content-grid-2,
    .content-grid-3 {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .article-card {
        height: 420px;
    }

    .article-card.featured,
    .article-card.large {
        grid-column: span 1;
        height: 460px;
    }

    .article-image {
        height: 200px;
    }

    .featured .article-image,
    .large .article-image {
        height: 220px;
    }

    .article-title {
        font-size: 20px;
    }

    .featured .article-title {
        font-size: 24px;
    }

    .article-content {
        padding: 20px;
    }

    /* Section titles */
    .section-title {
        font-size: 36px;
        margin-bottom: 16px;
        text-align: center;
    }
    
    .section-subtitle {
        text-align: center;
    }

    .section-subtitle {
        font-size: 18px;
        margin-bottom: 30px;
    }

    /* Email Capture */
    .email-capture {
        padding: 60px 0;
    }

    .email-capture h2 {
        font-size: 28px;
        margin-bottom: 15px;
    }

    .email-form {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .email-input {
        width: 100%;
        margin-bottom: 0;
    }

    .lead-magnet-benefits ul {
        grid-template-columns: 1fr;
        gap: 8px;
        text-align: left;
    }

    /* Article Pages */
    .article-hero {
        padding: 80px 0;
    }

    .article-hero h1 {
        font-size: 28px;
        line-height: 1.3;
    }

    .article-wrapper {
        padding: 40px 15px;
    }

    .article-wrapper h2 {
        font-size: 26px;
        margin: 30px 0 15px;
    }

    .article-wrapper h3 {
        font-size: 20px;
        margin: 25px 0 10px;
    }

    .article-intro {
        font-size: 18px;
        line-height: 1.7;
    }

    /* Tables */
    .comparison-table {
        font-size: 14px;
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .comparison-table td, .comparison-table th {
        padding: 12px 8px;
        min-width: 120px;
    }

    /* Components */
    .testimonial-box {
        padding: 20px;
        margin: 30px 0;
    }

    .testimonial-quote {
        font-size: 16px;
    }

    .highlight-box {
        padding: 20px;
        margin: 25px 0;
    }

    .inline-cta {
        padding: 30px 20px;
        margin: 40px 0;
    }

    .inline-cta h3 {
        font-size: 22px;
    }

    .author-bio {
        flex-direction: column;
        text-align: center;
        padding: 25px 20px;
    }

    .author-image {
        margin-bottom: 15px;
    }

    /* Sticky CTA */
    .sticky-cta {
        padding: 12px 15px;
    }

    .sticky-cta .container {
        flex-direction: column;
        gap: 10px;
    }

    .sticky-cta span {
        font-size: 14px;
        text-align: center;
    }

    .sticky-cta .cta-button {
        padding: 10px 20px;
        font-size: 14px;
        width: 100%;
        max-width: 250px;
    }

    /* Footer */
    .footer {
        padding: 40px 0 20px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .footer-section h3 {
        margin-bottom: 15px;
    }

    .footer-links {
        margin-bottom: 20px;
    }

    .footer-bottom {
        padding-top: 20px;
        font-size: 14px;
    }
}

/* Small Mobile Styles */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero h1 {
        font-size: 26px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .section-title {
        font-size: 28px;
    }

    .email-capture h2 {
        font-size: 24px;
    }

    .article-hero h1 {
        font-size: 24px;
    }

    .article-wrapper h2 {
        font-size: 22px;
    }

    .cta-button {
        padding: 12px 30px;
        font-size: 15px;
    }

    .main-nav {
        width: 90%;
    }

    /* Make tables more mobile-friendly */
    .comparison-table {
        font-size: 12px;
    }

    .comparison-table th, .comparison-table td {
        padding: 8px 6px;
        min-width: 100px;
    }
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        padding: 40px 0;
    }

    .hero h1 {
        font-size: 28px;
    }

    .article-hero {
        padding: 60px 0;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Optimize for retina displays */
    .article-image {
        background-size: cover;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    /* This can be implemented later for dark mode support */
    /*
    :root {
        --bg-white: #1a202c;
        --text-dark: #f7fafc;
        --bg-light: #2d3748;
    }
    */
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .article-card:hover {
        transform: none;
    }

    .cta-button:hover {
        transform: none;
    }
}

/* Print Styles */
@media print {
    .header-main,
    .sticky-cta,
    .email-capture,
    .footer {
        display: none;
    }

    .article-wrapper {
        max-width: none;
        padding: 0;
    }

    .article-hero {
        background: none;
        color: black;
        padding: 20px 0;
    }

    .comparison-table {
        font-size: 12px;
    }

    .inline-cta {
        background: none;
        border: 2px solid #333;
        color: #333;
    }
}
