/* Mobile UX Improvements */
/* Optimized for better mobile CTR and user experience */

/* Improve tap target sizes for mobile (minimum 48x48px per Google guidelines) */
@media (max-width: 768px) {
    /* Larger tap targets for buttons */
    .btn, .button, a.btn, button {
        min-height: 48px;
        min-width: 48px;
        padding: 12px 24px;
        font-size: 16px;
    }

    /* Improve navigation tap targets */
    nav a, .nav-link {
        padding: 12px 16px;
        min-height: 48px;
        display: flex;
        align-items: center;
    }

    /* Better hero CTA buttons on mobile */
    .hero .btn, .hero .button {
        width: 100%;
        max-width: 320px;
        margin: 8px auto;
        display: block;
        font-size: 18px;
        padding: 16px 32px;
    }

    /* Improve form input tap targets */
    input[type="text"],
    input[type="email"],
    input[type="search"],
    input[type="tel"],
    select,
    textarea {
        min-height: 48px;
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 12px 16px;
    }

    /* Larger, more visible search bars */
    .search-field, #search-input {
        height: 48px;
        font-size: 16px;
        padding: 12px 16px;
    }

    /* Better spacing for mobile reading */
    body {
        font-size: 16px;
        line-height: 1.6;
    }

    h1 {
        font-size: 32px;
        line-height: 1.3;
        margin-bottom: 16px;
    }

    h2 {
        font-size: 26px;
        line-height: 1.3;
        margin-bottom: 14px;
    }

    h3 {
        font-size: 22px;
        line-height: 1.4;
        margin-bottom: 12px;
    }

    p {
        font-size: 16px;
        line-height: 1.6;
        margin-bottom: 16px;
    }

    /* Better list spacing on mobile */
    ul, ol {
        margin-left: 20px;
        margin-bottom: 20px;
    }

    li {
        margin-bottom: 10px;
        line-height: 1.6;
    }

    /* Improve table readability on mobile */
    table {
        font-size: 14px;
        width: 100%;
        overflow-x: auto;
        display: block;
    }

    th, td {
        padding: 10px 8px;
        min-width: 100px;
    }

    /* Better card spacing */
    .feature-card, .pricing-card, .demo-card {
        margin-bottom: 20px;
        padding: 20px;
    }

    /* Improve meta descriptions visibility in search results */
    .post-meta, .article-meta {
        font-size: 14px;
        line-height: 1.5;
        margin-bottom: 12px;
    }

    /* Better knowledge base article titles */
    .kb-article h1, .blog-post h1 {
        font-size: 28px;
        line-height: 1.3;
        word-wrap: break-word;
    }

    /* Improve mobile menu visibility */
    .mobile-menu {
        font-size: 18px;
    }

    .mobile-menu a {
        padding: 16px 20px;
        border-bottom: 1px solid #eee;
    }

    /* Better content padding on mobile */
    .container {
        padding-left: 20px;
        padding-right: 20px;
    }

    .section {
        padding-top: 40px;
        padding-bottom: 40px;
    }

    /* Improve hero sections on mobile */
    .hero {
        padding: 40px 20px;
        text-align: center;
    }

    .hero h1 {
        font-size: 32px;
        line-height: 1.2;
        margin-bottom: 16px;
    }

    .hero .subtitle {
        font-size: 18px;
        line-height: 1.5;
        margin-bottom: 24px;
    }

    /* Better footer on mobile */
    #footer-widgets {
        flex-direction: column;
        padding: 30px 20px;
    }

    .footer-widget {
        width: 100%;
        margin-bottom: 30px;
    }

    /* Improve code blocks on mobile */
    pre, code {
        font-size: 14px;
        overflow-x: auto;
        word-wrap: break-word;
    }

    pre {
        padding: 16px;
        margin: 20px 0;
    }

    /* Better image handling */
    img {
        max-width: 100%;
        height: auto;
    }

    /* Improve breadcrumbs on mobile */
    .breadcrumbs {
        font-size: 14px;
        overflow-x: auto;
        white-space: nowrap;
    }

    /* Better pagination */
    .pagination a {
        min-height: 48px;
        min-width: 48px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin: 4px;
    }

    /* Improve search results display */
    .search-result {
        padding: 16px;
        margin-bottom: 16px;
    }

    .search-result h3 {
        font-size: 20px;
        margin-bottom: 8px;
    }

    .search-result p {
        font-size: 15px;
        line-height: 1.5;
    }

    /* Better knowledge base grid */
    .kb-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* Improve TOC on mobile */
    .toc, #TableOfContents {
        background: #f5f5f5;
        padding: 16px;
        margin: 20px 0;
        border-radius: 8px;
    }

    .toc ul, #TableOfContents ul {
        margin-left: 16px;
    }

    .toc a, #TableOfContents a {
        padding: 8px 0;
        display: block;
        line-height: 1.4;
    }

    /* Better alerts and notices */
    .alert, .notice {
        padding: 16px;
        margin: 16px 0;
        font-size: 15px;
        line-height: 1.5;
    }

    /* Improve FAQ sections */
    .faq-item {
        margin-bottom: 16px;
    }

    .faq-question {
        font-size: 18px;
        padding: 16px;
        min-height: 48px;
    }

    .faq-answer {
        font-size: 15px;
        line-height: 1.6;
        padding: 16px;
    }

    /* Better comparison tables */
    .comparison-table {
        font-size: 14px;
    }

    .comparison-table th {
        position: sticky;
        top: 0;
        background: white;
        z-index: 10;
    }

    /* Improve pricing cards */
    .pricing-card {
        width: 100%;
        max-width: 100%;
        margin: 0 0 20px 0;
    }

    .pricing-card h3 {
        font-size: 24px;
    }

    .pricing-card .price {
        font-size: 36px;
    }

    /* Better stats display */
    .stats {
        flex-direction: column;
    }

    .stat-item {
        width: 100%;
        margin-bottom: 20px;
        text-align: center;
    }

    .stat-number {
        font-size: 40px;
    }

    .stat-label {
        font-size: 16px;
    }
}

/* Extra small mobile devices (phones < 375px) */
@media (max-width: 375px) {
    .hero h1 {
        font-size: 28px;
    }

    h1 {
        font-size: 28px;
    }

    h2 {
        font-size: 24px;
    }

    h3 {
        font-size: 20px;
    }

    .container {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* Landscape mobile optimizations */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        padding: 30px 20px;
    }

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

    .section {
        padding-top: 30px;
        padding-bottom: 30px;
    }
}

/* Improve touch scrolling on iOS */
@supports (-webkit-overflow-scrolling: touch) {
    * {
        -webkit-overflow-scrolling: touch;
    }
}

/* Better focus states for accessibility on mobile */
@media (max-width: 768px) {
    a:focus, button:focus, input:focus, select:focus, textarea:focus {
        outline: 3px solid #0C71C3;
        outline-offset: 2px;
    }

    /* Remove tap highlight color on mobile */
    * {
        -webkit-tap-highlight-color: rgba(12, 113, 195, 0.3);
    }
}

/* Improve mobile search experience */
@media (max-width: 768px) {
    .search-container {
        width: 100%;
        padding: 12px 16px;
    }

    .search-results {
        padding: 16px;
    }

    .search-result-item {
        padding: 16px 0;
        border-bottom: 1px solid #eee;
    }

    .search-result-title {
        font-size: 18px;
        font-weight: 600;
        margin-bottom: 8px;
        line-height: 1.3;
    }

    .search-result-snippet {
        font-size: 15px;
        line-height: 1.5;
        color: #555;
    }

    .search-result-url {
        font-size: 14px;
        color: #0C71C3;
        margin-top: 4px;
    }
}

/* Better mobile article meta display for SEO */
@media (max-width: 768px) {
    .article-header {
        margin-bottom: 24px;
    }

    .article-title {
        font-size: 28px;
        line-height: 1.3;
        margin-bottom: 12px;
        word-wrap: break-word;
        hyphens: auto;
    }

    .article-meta {
        font-size: 14px;
        color: #666;
        margin-bottom: 16px;
    }

    .article-description {
        font-size: 16px;
        line-height: 1.6;
        color: #333;
        margin-bottom: 20px;
    }
}
