/*
 * =========================================
 * MOBILE RESPONSIVE CSS - ALL PAGES
 * =========================================
 * This file provides mobile-first responsive styles
 * for SEO content across all Calc84 pages.
 * 
 * Include this file in all HTML pages:
 * <link rel="stylesheet" href="css/mobile-responsive.css">
 * 
 * Version: 1.0.0
 * Author: Miqdad Qaisrani
 */

/* =========================================
   1. CSS VARIABLES (Fallback if not defined)
   ========================================= */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-app: #f0f2f5;
    --text-primary: #2d3436;
    --text-secondary: #636e72;
    --border-color: #e9ecef;
    --accent-color: #667eea;
    --nav-link-active: #0066cc;
    --legal-text: #666;
    --ui-highlight: #0984e3;
    --txt-func: #fff;
}

[data-theme="dark"] {
    --bg-primary: #181b1f;
    --bg-secondary: #353b48;
    --bg-app: #0f1115;
    --text-primary: #f5f6fa;
    --text-secondary: #b2bec3;
    --border-color: rgba(255,255,255,0.1);
    --accent-color: #3498db;
    --nav-link-active: #3498db;
    --legal-text: #aaa;
}

[data-theme="solar"] {
    --bg-primary: #001e3c;
    --bg-secondary: #0a192f;
    --bg-app: #0a192f;
    --text-primary: #ffd700;
    --text-secondary: #ffa500;
    --border-color: rgba(0, 229, 255, 0.2);
    --accent-color: #ffd700;
    --nav-link-active: #ffd700;
    --legal-text: #ffa500;
}

/* =========================================
   2. BASE SEO CONTENT CONTAINER
   ========================================= */
.seo-content-section {
    max-width: 900px;
    margin: 40px auto;
    padding: 24px 20px;
    width: 100%;
    box-sizing: border-box;
}

.seo-content-section article {
    width: 100%;
}

/* =========================================
   3. TYPOGRAPHY - RESPONSIVE HEADINGS
   ========================================= */
.seo-content-section h1 {
    font-size: clamp(1.5rem, 5vw, 2rem);
    margin-bottom: 1rem;
    color: var(--text-primary);
    line-height: 1.3;
    word-wrap: break-word;
}

.seo-content-section h2 {
    font-size: clamp(1.2rem, 4vw, 1.6rem);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    line-height: 1.3;
}

.seo-content-section h3 {
    font-size: clamp(1.1rem, 3.5vw, 1.3rem);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    line-height: 1.3;
}

.seo-content-section p {
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.seo-content-section ul,
.seo-content-section ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.seo-content-section li {
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

/* =========================================
   3.1 QUICK ANSWER BOX (TL;DR)
   ========================================= */
.quick-answer {
    background: var(--bg-secondary);
    border-left: 4px solid var(--accent-color);
    border-radius: 8px;
    padding: clamp(16px, 4vw, 24px);
    margin-bottom: 24px;
    font-size: clamp(0.95rem, 2.8vw, 1.1rem);
    line-height: 1.7;
    color: var(--text-primary);
    font-weight: 500;
}

.quick-answer::before {
    content: '';
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent-color);
    margin-bottom: 8px;
}

/* =========================================
   3.2 FEATURE LIST (Checkmark bullets)
   ========================================= */
.feature-list {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
}

.feature-list li {
    padding: clamp(8px, 2vw, 10px) 0 8px clamp(28px, 6vw, 32px);
    margin-bottom: 6px;
    position: relative;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    line-height: 1.6;
    color: var(--text-secondary);
}

.feature-list li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    top: 8px;
    width: clamp(18px, 4vw, 22px);
    height: clamp(18px, 4vw, 22px);
    background: var(--accent-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(0.65rem, 1.8vw, 0.75rem);
    font-weight: bold;
    line-height: 1;
}

/* =========================================
   4. KEY TAKEAWAYS BOX
   ========================================= */
.key-takeaways {
    background: linear-gradient(135deg, #e0f2fe 0%, #dbeafe 100%);
    border: 2px solid #3b82f6;
    border-radius: 12px;
    padding: clamp(16px, 4vw, 24px);
    margin-bottom: 32px;
}

.key-takeaways h2 {
    color: #1e40af;
    margin-top: 0;
    font-size: clamp(1rem, 3.5vw, 1.3rem);
}

.key-takeaways ul {
    margin: 0;
    padding-left: clamp(1.2rem, 3vw, 1.5rem);
    color: #1e40af;
}

.key-takeaways li {
    margin-bottom: 8px;
    font-size: clamp(0.85rem, 2.5vw, 1rem);
}

/* =========================================
   5. AI SUMMARY BOX - WCAG AA Compliant
   ========================================= */
.ai-summary-box {
    background: linear-gradient(135deg, #4c63c7 0%, #5a3d8a 100%);
    color: #ffffff;
    padding: clamp(16px, 4vw, 24px);
    border-radius: 16px;
    margin-bottom: 32px;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
}

.ai-summary-box h2 {
    color: #ffffff;
    margin-top: 0;
    font-size: clamp(1rem, 3.5vw, 1.5rem);
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.ai-summary-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ai-summary-box li {
    padding: clamp(6px, 1.5vw, 8px) 0;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: clamp(0.85rem, 2.5vw, 1rem);
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.ai-summary-box li::before {
    content: '✓';
    background: rgba(255,255,255,0.2);
    width: clamp(20px, 5vw, 24px);
    height: clamp(20px, 5vw, 24px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(0.7rem, 2vw, 0.8rem);
    flex-shrink: 0;
    margin-top: 2px;
}

/* =========================================
   6. ARTICLE META
   ========================================= */
.article-meta {
    display: flex;
    gap: clamp(8px, 2vw, 20px);
    align-items: center;
    padding: clamp(10px, 2.5vw, 12px) clamp(12px, 3vw, 16px);
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: clamp(0.8rem, 2.2vw, 0.9rem);
    color: var(--text-secondary);
    flex-wrap: wrap;
}

/* =========================================
   7. LEAD TEXT
   ========================================= */
.lead-text {
    font-size: clamp(0.95rem, 3vw, 1.1rem);
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* =========================================
   8. INFO BOXES
   ========================================= */
.info-box {
    background: var(--bg-secondary);
    padding: clamp(16px, 4vw, 32px);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.info-box h2,
.info-box h3 {
    margin-top: 0;
    color: var(--text-primary);
}

/* =========================================
   9. VERIFICATION BOX
   ========================================= */
.verification-box {
    background: var(--bg-secondary);
    padding: clamp(16px, 4vw, 32px);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin: 32px 0;
    border-left: 4px solid #10b981;
}

.verification-box h2 {
    color: var(--text-primary);
    margin-top: 0;
}

/* =========================================
   10. CITATIONS
   ========================================= */
.citations {
    margin: 12px 0 0 0;
    padding-left: clamp(1.2rem, 3vw, 1.5rem);
    font-size: clamp(0.8rem, 2.2vw, 0.85rem);
    color: var(--text-secondary);
}

/* =========================================
   11. FEATURE GRID
   ========================================= */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: clamp(16px, 3vw, 24px);
    margin: 32px 0;
}

.feature-card {
    background: var(--bg-secondary);
    padding: clamp(16px, 3.5vw, 24px);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card .icon {
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: 12px;
}

.feature-card h3 {
    margin: 0 0 8px 0;
    color: var(--text-primary);
    font-size: clamp(1rem, 2.8vw, 1.1rem);
}

.feature-card p {
    margin: 0;
    color: var(--text-secondary);
    font-size: clamp(0.85rem, 2.2vw, 0.9rem);
    line-height: 1.5;
}

/* =========================================
   12. USE CASE SECTION
   ========================================= */
.use-case-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: clamp(16px, 3vw, 24px);
    margin: 32px 0;
}

.use-case-card {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    padding: clamp(16px, 3.5vw, 24px);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.use-case-card h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 12px 0;
    color: var(--text-primary);
    font-size: clamp(0.95rem, 2.5vw, 1rem);
}

.use-case-card ul {
    margin: 0;
    padding-left: 20px;
    color: var(--text-secondary);
}

.use-case-card li {
    margin-bottom: 6px;
    font-size: clamp(0.85rem, 2.2vw, 0.9rem);
}

/* =========================================
   13. COMPARISON TABLE
   ========================================= */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: clamp(16px, 3vw, 24px) 0;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
}

.comparison-table {
    width: 100%;
    min-width: 500px;
    border-collapse: collapse;
    margin: 0;
    background: var(--bg-primary);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    font-size: clamp(0.8rem, 2.2vw, 0.95rem);
}

.comparison-table th,
.comparison-table td {
    padding: clamp(8px, 2.2vw, 16px);
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.comparison-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

.comparison-table .highlight {
    background: rgba(102, 126, 234, 0.1);
    font-weight: 600;
}

.comparison-table .check::before {
    content: '✓';
    color: #10b981;
    font-weight: bold;
}

.comparison-table .cross::before {
    content: '✗';
    color: #ef4444;
}

/* =========================================
   14. AUTHOR CARD
   ========================================= */
.author-card {
    display: flex;
    align-items: center;
    gap: clamp(16px, 4vw, 20px);
    background: var(--bg-secondary);
    padding: clamp(16px, 4vw, 24px);
    border-radius: 12px;
    border-left: 4px solid #667eea;
    margin: 32px 0;
}

.author-card img {
    width: clamp(50px, 12vw, 80px);
    height: clamp(50px, 12vw, 80px);
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    flex-shrink: 0;
}

.author-card h3 {
    margin: 0 0 4px 0;
    color: var(--text-primary);
    font-size: clamp(1rem, 3vw, 1.2rem);
}

.author-card .author-title {
    color: #667eea;
    font-weight: 600;
    font-size: clamp(0.8rem, 2.2vw, 0.9rem);
    margin-bottom: 8px;
}

.author-card .author-bio {
    color: var(--text-secondary);
    font-size: clamp(0.8rem, 2.2vw, 0.9rem);
    line-height: 1.5;
    margin: 0;
}

.author-card .author-links {
    margin-top: 12px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.author-card .author-links a {
    color: var(--nav-link-active);
    font-size: clamp(0.8rem, 2.2vw, 0.85rem);
    text-decoration: none;
}

.author-card .author-links a:hover {
    text-decoration: underline;
}

/* =========================================
   15. FAQ SECTION
   ========================================= */
.faq-section,
.faq {
    margin: 24px 0;
}

.faq details,
.faq-section details {
    border-bottom: 1px solid var(--border-color);
    padding: clamp(12px, 2.5vw, 15px) 0;
}

.faq summary,
.faq-section summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--text-primary);
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    padding: clamp(10px, 2.5vw, 12px);
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.faq summary::-webkit-details-marker,
.faq-section summary::-webkit-details-marker {
    display: none;
}

.faq summary::after,
.faq-section summary::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--nav-link-active);
    margin-left: 8px;
}

.faq details[open] summary::after,
.faq-section details[open] summary::after {
    content: '\2212';
}

.faq details > p,
.faq .faq-answer,
.faq-section details > p,
.faq-section .faq-answer {
    padding: clamp(12px, 2.5vw, 16px);
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 8px 8px;
    font-size: clamp(0.85rem, 2.2vw, 0.95rem);
    color: var(--text-secondary);
    margin: 0;
}

.faq details > p,
.faq .faq-answer p,
.faq-section details > p,
.faq-section .faq-answer p {
    margin: 0;
}

/* =========================================
   16. TRUST BADGES
   ========================================= */
.trust-badges {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(8px, 2vw, 16px);
    justify-content: center;
    margin: clamp(16px, 3vw, 24px) 0;
}

.trust-badge-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: clamp(6px, 1.5vw, 10px) clamp(10px, 2.5vw, 16px);
    background: var(--bg-secondary);
    border-radius: 20px;
    font-size: clamp(0.75rem, 2vw, 0.85rem);
    color: var(--text-secondary);
}

.trust-badge-item .icon {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
}

/* =========================================
   17. RELATED TOOLS
   ========================================= */
.related-tools {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
    gap: clamp(12px, 2.5vw, 16px);
    margin: 24px 0;
}

.tool-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: clamp(10px, 2.5vw, 16px);
    background: var(--bg-secondary);
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.tool-card .icon {
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    flex-shrink: 0;
}

.tool-card .info h4 {
    margin: 0 0 4px 0;
    font-size: clamp(0.85rem, 2.2vw, 0.95rem);
}

.tool-card .info span {
    font-size: clamp(0.75rem, 2vw, 0.8rem);
    color: var(--text-secondary);
}

/* =========================================
   18. FEEDBACK SECTION
   ========================================= */
.feedback-section {
    text-align: center;
    padding: clamp(16px, 4vw, 24px);
    background: var(--bg-secondary);
    border-radius: 12px;
    margin: 32px 0;
}

.feedback-section p {
    margin: 0 0 12px 0;
    color: var(--text-primary);
    font-weight: 500;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
}

.feedback-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.feedback-btn {
    padding: clamp(6px, 2vw, 8px) clamp(12px, 3vw, 20px);
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    border-radius: 20px;
    cursor: pointer;
    font-size: clamp(0.8rem, 2.2vw, 0.9rem);
    transition: all 0.2s;
    color: var(--text-primary);
}

.feedback-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--accent-color);
}

/* =========================================
   19. LEGAL DISCLAIMER
   ========================================= */
.legal-disclaimer {
    background: var(--bg-secondary);
    border-top: 2px solid var(--border-color);
    padding: clamp(16px, 4vw, 20px);
    text-align: center;
    font-size: clamp(0.75rem, 2vw, 0.85rem);
    color: var(--text-secondary);
    margin-top: 40px;
}

.legal-disclaimer strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: 10px;
    font-size: clamp(0.8rem, 2.2vw, 0.9rem);
}

.legal-links {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.legal-links a {
    color: var(--nav-link-active);
    text-decoration: none;
    font-size: clamp(0.75rem, 2vw, 0.85rem);
}

.legal-links a:hover {
    text-decoration: underline;
}

/* =========================================
   20. BREADCRUMB NAVIGATION
   ========================================= */
.breadcrumb-nav {
    padding: clamp(10px, 2.5vw, 12px) clamp(12px, 3vw, 20px);
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: clamp(0.8rem, 2.2vw, 0.9rem);
}

.breadcrumb-nav ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.breadcrumb-nav li:not(:last-child)::after {
    content: '›';
    margin-left: 8px;
    color: var(--text-secondary);
}

.breadcrumb-nav a {
    color: var(--nav-link-active);
    text-decoration: none;
}

.breadcrumb-nav a:hover {
    text-decoration: underline;
}

.breadcrumb-nav [aria-current="page"] {
    color: var(--text-secondary);
    font-weight: 500;
}

/* =========================================
   21. QUICK REFERENCE SECTION
   ========================================= */
.quick-reference-section {
    background: var(--bg-secondary);
    padding: clamp(24px, 5vw, 40px) clamp(15px, 4vw, 20px);
    margin-top: 30px;
    border-top: 2px solid var(--border-color);
}

.quick-reference-container {
    max-width: 1200px;
    margin: 0 auto;
}

.quick-reference-title {
    text-align: center;
    color: var(--text-primary);
    font-size: clamp(1.4rem, 4vw, 1.8rem);
    margin-bottom: 10px;
}

.quick-reference-intro {
    text-align: center;
    color: var(--text-secondary);
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.quick-reference-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: clamp(16px, 3vw, 20px);
}

.quick-reference-card {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: clamp(18px, 4vw, 24px);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.quick-reference-card h3 {
    margin: 0 0 16px 0;
    color: var(--text-primary);
    font-size: clamp(1rem, 2.8vw, 1.1rem);
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 8px;
}

.function-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    gap: 12px;
    flex-wrap: wrap;
}

.function-row:last-child {
    border-bottom: none;
}

.function-row code {
    background: rgba(102, 126, 234, 0.1);
    color: var(--accent-color);
    padding: 4px 10px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: clamp(0.8rem, 2.2vw, 0.9rem);
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.function-row span {
    color: var(--text-secondary);
    font-size: clamp(0.85rem, 2.2vw, 0.9rem);
    text-align: right;
}

.tip-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.tip-row:last-child {
    border-bottom: none;
}

.tip-icon {
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    flex-shrink: 0;
}

/* =========================================
   22. TESTIMONIALS SECTION
   ========================================= */
.testimonials-section {
    max-width: 900px;
    margin: clamp(24px, 5vw, 40px) auto;
    padding: 0 clamp(15px, 4vw, 20px);
}

.testimonials-section h2 {
    text-align: center;
    color: var(--text-primary);
    margin-bottom: clamp(20px, 4vw, 30px);
    font-size: clamp(1.2rem, 3.5vw, 1.5rem);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: clamp(16px, 3vw, 24px);
}

.testimonial-card {
    background: var(--bg-secondary);
    padding: clamp(16px, 4vw, 24px);
    border-radius: 12px;
    border-left: 4px solid #667eea;
}

.testimonial-card .stars {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
    color: #fbbf24;
    font-size: clamp(1rem, 2.8vw, 1.2rem);
}

.testimonial-card p {
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.6;
    font-size: clamp(0.85rem, 2.2vw, 0.95rem);
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.testimonial-author .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1rem;
    flex-shrink: 0;
}

.testimonial-author .name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: clamp(0.9rem, 2.2vw, 0.95rem);
    margin: 0;
}

.testimonial-author .title {
    font-size: clamp(0.75rem, 2vw, 0.8rem);
    color: var(--text-secondary);
    margin: 0;
}

/* =========================================
   23. EDUCATIONAL BADGE
   ========================================= */
.educational-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #d4edda;
    color: #155724;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 10px;
}

[data-theme="dark"] .educational-badge {
    background: #155724;
    color: #d4edda;
}

/* =========================================
   24. MOBILE-SPECIFIC BREAKPOINTS
   ========================================= */

/* Mobile landscape and below */
@media (max-width: 768px) {
    .seo-content-section {
        padding: 20px 15px;
    }
    
    /* Stack author card vertically */
    .author-card {
        flex-direction: column;
        text-align: center;
    }
    
    .author-card .author-links {
        justify-content: center;
    }
    
    /* Stack function rows */
    .function-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    
    .function-row span {
        text-align: left;
    }
    
    /* Single column grids */
    .feature-grid,
    .use-case-section,
    .quick-reference-grid,
    .related-tools {
        grid-template-columns: 1fr;
    }
    
    /* Article meta stacks */
    .article-meta {
        flex-direction: column;
        align-items: flex-start;
    }
    
    /* Table allows horizontal scroll */
    .table-wrapper {
        margin: 16px -15px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .quick-answer {
        padding: 16px;
        font-size: 0.9rem;
    }

    .feature-list li {
        padding-left: 28px;
        font-size: 0.9rem;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .seo-content-section {
        padding: 16px 12px;
    }
    
    /* Trust badges smaller */
    .trust-badges {
        gap: 6px;
    }
    
    .trust-badge-item {
        padding: 6px 10px;
        border-radius: 16px;
    }
    
    /* Tool cards full width */
    .related-tools {
        grid-template-columns: 1fr;
    }

    .quick-answer {
        padding: 14px;
        font-size: 0.85rem;
    }

    .feature-list li {
        padding-left: 26px;
        font-size: 0.85rem;
    }
}

/* Extra small mobile */
@media (max-width: 375px) {
    .seo-content-section {
        padding: 12px 10px;
    }
    
    /* Smaller table text */
    .comparison-table {
        font-size: 0.75rem;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 6px 4px;
    }
}

/* =========================================
   25. ACCESSIBILITY
   ========================================= */

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .feature-card,
    .tool-card,
    .quick-reference-card {
        transition: none;
    }
    
    .feature-card:hover,
    .tool-card:hover,
    .quick-reference-card:hover {
        transform: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .info-box,
    .verification-box,
    .feature-card,
    .use-case-card,
    .quick-reference-card {
        border-width: 2px;
    }
}

/* =========================================
   26. PRINT STYLES
   ========================================= */
@media print {
    .seo-content-section {
        max-width: 100%;
        margin: 20px 0;
    }
    
    .ai-summary-box,
    .key-takeaways {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .feedback-section,
    .trust-badges {
        display: none;
    }
}


/* =========================================
   27. SIDEBAR NAVIGATION - MOBILE
   ========================================= */

/* Sidebar base styles */
.sidebar {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    max-width: 85vw;
    height: 100vh;
    height: 100dvh;
    background: var(--bg-primary, #ffffff);
    border-left: 1px solid var(--border-color, #e9ecef);
    z-index: 2000;
    transform: translateX(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -4px 0 15px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Dark theme */
[data-theme="dark"] .sidebar {
    background: #353b48;
    border-left-color: rgba(255,255,255,0.1);
}

/* Solar theme */
[data-theme="solar"] .sidebar {
    background: #001e3c;
    border-left-color: rgba(0, 229, 255, 0.2);
}

/* Sidebar active/open state */
.sidebar.active {
    transform: translateX(-280px);
}

/* Sidebar header */
.sidebar-header {
    background: var(--bg-secondary, #f8f9fa);
    padding: 20px;
    border-bottom: 1px solid var(--border-color, #e9ecef);
    position: sticky;
    top: 0;
    z-index: 10;
}

.sidebar-header > div:first-child {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.sidebar-logo {
    color: var(--text-primary, #2d3436);
    font-size: 1.2rem;
    font-weight: 700;
}

.sidebar-tagline {
    color: var(--text-secondary, #636e72);
    font-size: 0.8rem;
    opacity: 0.7;
}

/* Sidebar close button */
.sidebar-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-primary, #2d3436);
    padding: 5px;
    line-height: 1;
    border-radius: 4px;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.sidebar-close-btn:hover {
    background: rgba(0,0,0,0.05);
    color: var(--accent-color, #667eea);
}

.sidebar-close-btn:active {
    transform: scale(0.95);
}

/* Sidebar navigation */
.sidebar-nav {
    flex: 1;
    padding: 10px 0;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 15px;
}

.nav-section-title {
    padding: 15px 20px 5px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-secondary, #636e72);
    letter-spacing: 0.5px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    text-decoration: none;
    color: var(--text-primary, #2d3436);
    border-radius: 0;
    margin: 0;
    font-size: 0.95rem;
    transition: all 0.15s ease;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: var(--bg-secondary, #f8f9fa);
    color: var(--accent-color, #667eea);
    border-left-color: var(--accent-color, #667eea);
}

.nav-item.active {
    background: rgba(102, 126, 234, 0.1);
    color: var(--accent-color, #667eea);
    border-left-color: var(--accent-color, #667eea);
    font-weight: 600;
}

.nav-item .icon {
    font-size: 1.1rem;
    width: 24px;
    display: flex;
    justify-content: center;
    flex-shrink: 0;
}

/* Sidebar overlay */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Mobile menu button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--text-primary, #2d3436);
    padding: 0;
    width: 44px;
    height: 44px;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    transition: all 0.15s ease;
    position: relative;
    z-index: 2002;
}

.mobile-menu-btn:hover {
    background: rgba(0,0,0,0.05);
}

.mobile-menu-btn:active {
    transform: scale(0.95);
}

.mobile-menu-btn svg {
    width: 24px;
    height: 24px;
}

/* Desktop navigation */
.desktop-nav {
    display: flex;
    gap: 25px;
}

.desktop-nav a {
    text-decoration: none;
    color: var(--text-secondary, #636e72);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s ease;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
}

.desktop-nav a:hover {
    color: var(--accent-color, #667eea);
}

.desktop-nav a.active {
    color: var(--accent-color, #667eea);
    border-bottom-color: var(--accent-color, #667eea);
}

/* Header */
.header {
    height: 60px;
    background: var(--bg-primary, #ffffff);
    border-bottom: 1px solid var(--border-color, #e9ecef);
    display: flex;
    align-items: center;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-text h1,
.logo-title {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-primary, #2d3436);
    font-weight: 700;
}

.tagline {
    font-size: 0.75rem;
    color: var(--text-secondary, #636e72);
}

/* =========================================
   27.1 MOBILE BREAKPOINTS FOR SIDEBAR
   ========================================= */

/* Show mobile menu button on tablet and below */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex !important;
    }
    
    .desktop-nav {
        display: none !important;
    }
    
    .header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        background: var(--bg-primary, #ffffff);
        z-index: 2001;
        padding: 0 15px;
    }
    
    .logo-text {
        display: none;
    }
    
    /* Adjust main container for fixed header */
    .main-container {
        padding-top: 70px;
    }
}

/* Mobile landscape */
@media (max-width: 768px) and (orientation: landscape) {
    .sidebar {
        width: 260px;
    }
}

/* Small mobile */
@media (max-width: 375px) {
    .sidebar {
        width: 260px;
        right: -260px;
    }
    
    .sidebar.active {
        transform: translateX(-260px);
    }
    
    .sidebar-header {
        padding: 15px;
    }
    
    .nav-item {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
}

/* Prevent body scroll when sidebar is open */
body.sidebar-open {
    overflow: hidden;
}

/* Animation for pulse effect on mobile menu button */
@keyframes pulse-soft {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

.mobile-menu-btn.pulse {
    animation: pulse-soft 2s infinite ease-in-out;
}

/* Focus styles for accessibility */
.mobile-menu-btn:focus-visible,
.sidebar-close-btn:focus-visible,
.nav-item:focus-visible {
    outline: 2px solid var(--accent-color, #667eea);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .sidebar {
        border-left-width: 2px;
    }
    
    .nav-item.active {
        border-left-width: 4px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .sidebar,
    .sidebar-overlay {
        transition: none;
    }
    
    .mobile-menu-btn.pulse {
        animation: none;
    }
}

/* =========================================
   28. SMART HEADER NAVIGATION - MOBILE
   Hide on scroll down, show on scroll up
   ========================================= */

/* Mobile header optimization */
@media (max-width: 768px) {
    /* Hide full header on mobile - use floating menu button instead */
    .header {
        transform: translateY(-100%);
        pointer-events: none;
    }
    
    .header.header--visible {
        transform: translateY(0);
        pointer-events: auto;
    }
    
    /* Show only minimal header when explicitly visible */
    .header-content {
        padding: 0 10px;
    }
    
    /* Hide desktop nav, logo, and header menu button on mobile */
    /* (We use floating menu button instead for cleaner UX) */
    .header .logo-area,
    .header .desktop-nav,
    .header .mobile-menu-btn {
        display: none !important;
    }
    
    /* Floating menu button - always visible on mobile */
    .mobile-menu-btn--floating {
        display: flex !important;
        position: fixed;
        top: 10px;
        right: 10px;
        z-index: 9999;
        background: var(--ui-dropdown-bg, #fff);
        border: 1px solid var(--ui-dropdown-border, rgba(0,0,0,0.1));
        box-shadow: 0 2px 12px rgba(0,0,0,0.15);
        border-radius: 10px;
        width: 48px;
        height: 48px;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        color: var(--sidebar-text-primary, #2d3436);
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    
    [data-theme="dark"] .mobile-menu-btn--floating {
        background: var(--ui-dropdown-bg, #353b48);
        border-color: var(--ui-dropdown-border, rgba(255,255,255,0.1));
        box-shadow: 0 2px 12px rgba(0,0,0,0.4);
    }
    
    .mobile-menu-btn--floating:hover {
        transform: scale(1.08);
        box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    }
    
    .mobile-menu-btn--floating:active {
        transform: scale(0.95);
    }
    
    /* Hide standard mobile menu button in header on mobile */
    .header .mobile-menu-btn {
        display: none !important;
    }
    
    /* Adjust main container for floating button */
    .main-container {
        padding-top: 70px !important;
    }
    
    /* Adjust body padding */
    body {
        padding-top: 0;
    }
}

/* Small mobile adjustments */
@media (max-width: 480px) {
    .mobile-menu-btn--floating {
        top: 8px;
        right: 8px;
        width: 44px;
        height: 44px;
    }
    
    .main-container {
        padding-top: 60px !important;
    }
}

/* Extra small mobile */
@media (max-width: 375px) {
    .mobile-menu-btn--floating {
        width: 40px;
        height: 40px;
    }
    
    .mobile-menu-btn--floating svg {
        width: 20px;
        height: 20px;
    }
}

/* Desktop - Hide floating button, show normal header */
@media (min-width: 769px) {
    .mobile-menu-btn--floating {
        display: none !important;
    }
    
    .header {
        transform: translateY(0) !important;
        pointer-events: auto !important;
    }
}

/* =========================================
   29. SIDEBAR IMPROVEMENTS FOR MOBILE
   ========================================= */

@media (max-width: 768px) {
    /* Full-screen sidebar on mobile */
    .sidebar {
        width: 100%;
        right: -100%;
        max-width: 320px;
    }
    
    .sidebar.active {
        transform: translateX(-100%);
    }
    
    /* Add logo to sidebar on mobile since header is hidden */
    .sidebar-header {
        padding-top: max(var(--spacing-lg), env(safe-area-inset-top, 20px));
    }
    
    /* Ensure sidebar content is scrollable */
    .sidebar-nav {
        padding-bottom: max(var(--spacing-lg), env(safe-area-inset-bottom, 20px));
    }
}

/* =========================================
   30. REDUCED MOTION - HEADER
   ========================================= */

@media (prefers-reduced-motion: reduce) {
    .header,
    .mobile-menu-btn--floating {
        transition: none !important;
    }
}

/* =========================================
   31. MAIN CONTAINER PADDING FIX FOR MOBILE
   ========================================= */

/* Fix padding for mobile breakpoints to account for floating button */
@media (max-width: 768px) {
    .main-container {
        padding: 70px 10px 10px !important;
    }
}

@media (max-width: 480px) {
    .main-container {
        padding: 60px 8px 8px !important;
    }
}

@media (max-width: 375px) {
    .main-container {
        padding: 55px 5px 5px !important;
    }
}

/* Desktop keeps original padding */
@media (min-width: 769px) {
    .main-container {
        padding: calc(var(--spacing-lg, 16px) + 60px) var(--spacing-md, 16px) var(--spacing-lg, 16px) !important;
    }
}


/* =========================================
   32. PWA INSTALL TOAST - MOBILE-FIRST RESPONSIVE
   ========================================= */

/* Ensure PWA toast works well with floating menu button */
@media (max-width: 768px) {
    .pwa-toast {
        /* Position below floating menu button */
        top: -150px;
    }
    
    .pwa-toast.show {
        top: 66px; /* Below floating button (48px + padding) */
    }
    
    /* When header is visible on mobile, push toast down more */
    .header.header--visible ~ .pwa-toast.show,
    body:has(.header.header--visible) .pwa-toast.show {
        top: 126px; /* 60px header + 66px offset */
    }
}

/* Small mobile adjustments */
@media (max-width: 480px) {
    .pwa-toast.show {
        top: 62px;
    }
    
    .pwa-toast {
        /* Ensure it doesn't get cut off on small screens */
        max-height: calc(100vh - 80px);
        overflow-y: auto;
    }
}

/* Extra small mobile */
@media (max-width: 375px) {
    .pwa-toast.show {
        top: 58px;
    }
}

/* Handle landscape mode on mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .pwa-toast {
        width: calc(100% - 20px);
        max-width: 500px;
    }
    
    .pwa-toast.show {
        top: 10px;
    }
    
    /* Stack buttons horizontally in landscape */
    .pwa-btns {
        flex-direction: row;
        width: auto;
    }
}

/* Notch/safe area handling for modern phones */
@supports (padding-top: env(safe-area-inset-top)) {
    @media (max-width: 768px) {
        .pwa-toast.show {
            top: calc(66px + env(safe-area-inset-top, 0px));
        }
        
        .pwa-toast {
            padding-top: calc(16px + env(safe-area-inset-top, 0px) * 0.5);
        }
    }
}

/* Dark mode enhancements for PWA toast */
[data-theme="dark"] .pwa-toast {
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.5),
        0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .pwa-toast {
        transition: opacity 0.2s ease !important;
    }
    
    .pwa-toast.show {
        top: 66px;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .pwa-toast {
        border-width: 2px;
    }

    .pwa-primary,
    .pwa-secondary {
        border: 2px solid currentColor;
    }
}

/* Skip-to-content link for accessibility */
.skip-link { position: absolute; top: -2.5rem; left: 0; background: var(--accent-primary, #001a2c); color: #fff; padding: 0.5rem 1rem; z-index: 10000; border-radius: 0 0 0.25rem 0; font-size: 0.9rem; text-decoration: none; transition: top 0.2s; }
.skip-link:focus { top: 0; }
