/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --text: #1f2937;
    --text-light: #6b7280;
    --bg: #ffffff;
    --bg-gray: #f9fafb;
    --border: #e5e7eb;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg-gray);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 40px 20px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
}

/* Social Proof */
.social-proof {
    background: white;
    padding: 15px;
    margin: 20px 0;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.stat {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Calculator Section */
.calculator-section {
    background: white;
    padding: 40px;
    margin: 20px 0;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.calculator-section h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary);
}

.calculator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

/* Input Styles */
.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

.input-with-unit {
    display: flex;
    gap: 10px;
}

.input-group input[type="number"],
.input-group select {
    padding: 12px;
    font-size: 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    width: 100%;
    transition: border-color 0.3s;
}

.input-group input[type="number"]:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.input-with-unit input {
    flex: 1;
}

.input-with-unit select {
    width: 80px;
}

.hint {
    display: block;
    color: var(--text-light);
    font-size: 0.85rem;
    margin-top: 5px;
}

/* Buttons */
.btn-calculate {
    width: 100%;
    padding: 16px;
    font-size: 1.1rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 10px;
}

.btn-calculate:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(37, 99, 235, 0.3);
}

.btn-calculate:active {
    transform: translateY(0);
}

/* Results Display */
.calculator-results {
    background: var(--bg-gray);
    padding: 30px;
    border-radius: 12px;
}

.calculator-results h3 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--primary);
}

.result-card {
    background: white;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 8px;
    text-align: center;
    border: 2px solid var(--border);
}

.result-card.highlight {
    border-color: var(--success);
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
}

.result-label {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 5px;
}

.result-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
}

.result-card.highlight .result-value {
    color: var(--success);
}

.result-subtext {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* NEW: Interactive Comparison Table */
.comparison-table-section {
    background: white;
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
}

.comparison-table-section h4 {
    margin-bottom: 15px;
    color: var(--primary);
}

.interactive-comparison {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}

.interactive-comparison th,
.interactive-comparison td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.interactive-comparison th {
    background: var(--bg-gray);
    font-weight: 600;
    color: var(--text);
}

.interactive-comparison .highlight-row {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    font-weight: 600;
}

.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-low {
    background: #d1fae5;
    color: #065f46;
}

.badge-medium {
    background: #fef3c7;
    color: #92400e;
}

.badge-high {
    background: #fee2e2;
    color: #991b1b;
}

.comparison-insight {
    padding: 15px;
    background: var(--bg-gray);
    border-radius: 6px;
    border-left: 4px solid var(--success);
    font-size: 0.9rem;
}

/* Recommendation */
.recommendation {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
    margin: 20px 0;
}

/* Share Buttons */
.share-section {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-share,
.btn-secondary {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-share {
    background: var(--success);
    color: white;
}

.btn-share:hover {
    background: #059669;
}

.btn-secondary {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
}

/* NEW: Progress Tracker Section */
.progress-section {
    background: white;
    padding: 40px;
    margin: 40px 0;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.progress-section h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary);
}

.progress-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-bottom: 20px;
}

.chart-container {
    background: var(--bg-gray);
    padding: 20px;
    border-radius: 8px;
}

.progress-stats {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.stat-card {
    background: linear-gradient(135deg, var(--bg-gray) 0%, white 100%);
    padding: 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 2px solid var(--border);
}

.stat-icon {
    font-size: 2rem;
}

.stat-info {
    flex: 1;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-light);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

/* NEW: Optimal Weight Calculator */
.optimal-weight-section {
    background: white;
    padding: 40px;
    margin: 40px 0;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.optimal-weight-section h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary);
}

.optimal-calculator {
    max-width: 900px;
    margin: 0 auto;
}

.optimal-input {
    background: var(--bg-gray);
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.optimal-input label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
}

.weight-recommendation {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.level-card {
    padding: 25px;
    border-radius: 12px;
    border: 3px solid;
    transition: transform 0.3s, box-shadow 0.3s;
}

.level-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.level-card.beginner {
    border-color: var(--success);
    background: linear-gradient(135deg, #ecfdf5 0%, white 100%);
}

.level-card.intermediate {
    border-color: var(--warning);
    background: linear-gradient(135deg, #fffbeb 0%, white 100%);
}

.level-card.advanced {
    border-color: var(--danger);
    background: linear-gradient(135deg, #fef2f2 0%, white 100%);
}

.level-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.level-icon {
    font-size: 2rem;
}

.level-header h4 {
    color: var(--text);
}

.weight-range {
    text-align: center;
    margin: 20px 0;
}

.weight-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
}

.weight-label {
    font-size: 0.9rem;
    color: var(--text-light);
}

.level-card p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.5;
}

.weight-progression {
    background: var(--bg-gray);
    padding: 25px;
    border-radius: 8px;
}

.weight-progression h4 {
    margin-bottom: 20px;
    color: var(--primary);
}

.progression-bar {
    display: flex;
    gap: 15px;
}

.progression-step {
    flex: 1;
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.step-info {
    display: flex;
    flex-direction: column;
}

.step-info strong {
    color: var(--text);
    font-size: 0.9rem;
}

.step-info span {
    color: var(--text-light);
    font-size: 0.85rem;
}

/* Quick Tools */
.quick-tools {
    background: white;
    padding: 40px;
    margin: 40px 0;
    border-radius: 12px;
}

.quick-tools h2 {
    text-align: center;
    margin-bottom: 30px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.tool-card {
    background: var(--bg-gray);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

.tool-card h3 {
    margin-bottom: 10px;
    color: var(--primary);
}

.btn-tool {
    margin-top: 15px;
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-tool:hover {
    background: var(--primary-dark);
}

/* Products Section */
.products-section {
    background: white;
    padding: 40px;
    margin: 40px 0;
    border-radius: 12px;
}

.products-section h2 {
    text-align: center;
    margin-bottom: 30px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.product-card {
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: transform 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

.product-card h4 {
    margin-bottom: 10px;
}

.price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--success);
    margin: 10px 0;
}

.btn-product {
    display: inline-block;
    padding: 10px 20px;
    background: var(--warning);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-product:hover {
    background: #d97706;
}

/* FAQ Section */
.faq-section {
    background: white;
    padding: 40px;
    margin: 40px 0;
    border-radius: 12px;
}

.faq-section h2 {
    text-align: center;
    margin-bottom: 30px;
}

.faq-item {
    border-bottom: 1px solid var(--border);
    padding: 20px 0;
}

.faq-item h3 {
    color: var(--primary);
    margin-bottom: 10px;
}

.faq-item p {
    color: var(--text-light);
    line-height: 1.8;
}

/* Email Signup */
.email-signup {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 60px 40px;
    margin: 40px 0;
    border-radius: 12px;
    text-align: center;
}

.email-signup h2 {
    margin-bottom: 15px;
}

.signup-form {
    display: flex;
    gap: 10px;
    max-width: 500px;
    margin: 20px auto;
}

.signup-form input {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
}

.btn-signup {
    padding: 12px 24px;
    background: var(--success);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-signup:hover {
    background: #059669;
}

/* Content Section */
.content-section {
    background: white;
    padding: 40px;
    margin: 40px 0;
    border-radius: 12px;
    line-height: 1.8;
}

.content-section h2 {
    color: var(--primary);
    margin: 30px 0 20px 0;
}

.content-section h3 {
    color: var(--text);
    margin: 25px 0 15px 0;
}

.content-section ul,
.content-section ol {
    margin-left: 30px;
    margin-bottom: 20px;
}

.content-section li {
    margin-bottom: 10px;
}

.cta-text {
    background: var(--bg-gray);
    padding: 20px;
    border-left: 4px solid var(--success);
    border-radius: 6px;
    margin: 20px 0;
    font-weight: 600;
}

/* Ad Blocks */
.ad-block {
    margin: 40px 0;
    min-height: 100px;
    background: var(--bg-gray);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Footer */
.footer {
    background: var(--text);
    color: white;
    padding: 40px 20px;
    text-align: center;
    margin-top: 60px;
}

.footer a {
    color: white;
    text-decoration: none;
    margin: 0 10px;
}

.footer a:hover {
    text-decoration: underline;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .header h1 {
        font-size: 1.8rem;
    }
    
    .calculator-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .social-proof {
        flex-direction: column;
        gap: 10px;
    }
    
    .signup-form {
        flex-direction: column;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .calculator-section,
    .quick-tools,
    .products-section,
    .faq-section,
    .content-section,
    .progress-section,
    .optimal-weight-section {
        padding: 20px;
    }
    
    .share-section {
        flex-direction: column;
    }
    
    .result-value {
        font-size: 2rem;
    }
    
    .progress-grid {
        grid-template-columns: 1fr;
    }
    
    .progression-bar {
        flex-direction: column;
    }
    
    .weight-recommendation {
        grid-template-columns: 1fr;
    }
    
    /* FIX: Comparison table mobile overflow */
    .comparison-table-section {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .interactive-comparison {
        min-width: 500px; /* Prevent squashing */
        font-size: 0.85rem;
    }
    
    .interactive-comparison th,
    .interactive-comparison td {
        padding: 8px;
        white-space: nowrap;
    }
    
    /* Products grid mobile fix */
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    /* Better touch targets for mobile */
    .btn-calculate,
    .btn-share,
    .btn-secondary,
    .btn-tool {
        min-height: 48px; /* WCAG touch target */
        font-size: 1rem;
    }
    
    /* Input fields larger on mobile */
    .input-group input,
    .input-group select {
        font-size: 16px; /* Prevents iOS zoom */
        min-height: 44px;
    }
}

/* Additional breakpoint for tablets */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 960px;
    }
    
    .calculator-grid {
        gap: 30px;
    }
    
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .weight-recommendation {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Small phones */
@media (max-width: 480px) {
    .header h1 {
        font-size: 1.5rem;
    }
    
    .subtitle {
        font-size: 0.9rem;
    }
    
    .result-value {
        font-size: 1.75rem;
    }
    
    .calculator-section,
    .quick-tools,
    .products-section,
    .faq-section,
    .content-section,
    .progress-section,
    .optimal-weight-section {
        padding: 15px;
    }
    
    .social-proof {
        font-size: 0.85rem;
    }
    
    /* Chart responsive */
    .chart-container {
        padding: 10px;
    }
    
    /* Stat cards stack better */
    .stat-card {
        padding: 15px;
    }
    
    .stat-icon {
        font-size: 1.5rem;
    }
    
    .stat-value {
        font-size: 1.25rem;
    }
}

/* Toast Notification System */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 300px;
    max-width: 500px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10000;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-fade-out {
    animation: slideOutRight 0.3s ease-out;
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.toast-success {
    border-left: 4px solid #10b981;
}

.toast-error {
    border-left: 4px solid #ef4444;
}

.toast-warning {
    border-left: 4px solid #f59e0b;
}

.toast-info {
    border-left: 4px solid #2563eb;
}

.toast-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
}

.toast-close:hover {
    background: var(--bg-gray);
}

/* Toast mobile responsive */
@media (max-width: 768px) {
    .toast {
        top: 10px;
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
    }
}

/* Loading Overlay */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loader-content {
    background: white;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--bg-gray);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loader-text {
    color: var(--text);
    font-size: 1.1rem;
    font-weight: 600;
}

/* Enhanced focus states for accessibility */
input:focus,
select:focus,
button:focus {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

/* Skip to content link for screen readers */
.skip-to-content {
    position: absolute;
    left: -9999px;
    top: 0;
    padding: 10px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    z-index: 10001;
}

.skip-to-content:focus {
    left: 0;
}

/* Print styles */
@media print {
    .header,
    .ad-block,
    .email-signup,
    .footer,
    .share-section,
    .btn-secondary,
    .btn-tool {
        display: none;
    }
    
    .calculator-results,
    .progress-section,
    .optimal-results {
        page-break-inside: avoid;
    }
}
/* ================================================
   MOBILE HOTFIX V3.1 - CRITICAL OVERFLOW FIXES
   ================================================
   
   Применяет ЖЕСТКИЕ ограничения на все элементы
   чтобы ГАРАНТИРОВАТЬ отсутствие горизонтального скролла
   
   ДОБАВЬ ЭТИ СТИЛИ В КОНЕЦ style.css
   ================================================ */

/* CRITICAL: Force all elements to stay within viewport */
* {
    max-width: 100%;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden !important;
    width: 100%;
}

.container {
    width: 100%;
    max-width: 1200px;
    overflow-x: hidden;
}

/* FIX: Recommendations box word wrapping */
.recommendation {
    word-wrap: break-word;
    overflow-wrap: break-word;
    width: 100%;
    max-width: 100%;
}

.recommendation p {
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

/* FIX: Buttons must not overflow */
.btn-share,
.btn-secondary,
.btn-calculate,
.btn-tool,
.btn-signup {
    max-width: 100%;
    min-width: 0;
    white-space: normal;
    word-wrap: break-word;
}

/* FIX: All sections must respect viewport */
.calculator-section,
.calculator-results,
.progress-section,
.optimal-weight-section,
.quick-tools,
.products-section,
.content-section,
.faq-section,
.email-signup {
    max-width: 100%;
    overflow-x: hidden;
}

/* FIX: Charts container */
.chart-container {
    max-width: 100%;
    overflow-x: hidden;
}

/* FIX: Result cards */
.result-card {
    max-width: 100%;
    word-wrap: break-word;
}

/* FIX: Comparison table container - CRITICAL */
.comparison-table-section {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* FIX: Interactive comparison table */
.interactive-comparison {
    width: auto;
    max-width: none; /* Table can be wider but contained */
}

/* ================================================
   MOBILE SPECIFIC FIXES (768px and below)
   ================================================ */
@media (max-width: 768px) {
    /* Force viewport boundaries */
    body {
        overflow-x: hidden !important;
        width: 100vw;
        position: relative;
    }
    
    .container {
        width: 100%;
        padding: 0 15px;
        overflow-x: hidden;
    }
    
    /* Recommendations - CRITICAL FIX */
    .recommendation {
        padding: 15px;
        margin: 15px 0;
        width: calc(100% - 30px); /* Account for container padding */
        max-width: 100%;
        overflow: hidden;
    }
    
    .recommendation h4 {
        font-size: 1rem;
        margin-bottom: 10px;
        word-wrap: break-word;
    }
    
    .recommendation p {
        font-size: 0.9rem;
        line-height: 1.5;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    
    /* Buttons stack on mobile */
    .share-section {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }
    
    .btn-share,
    .btn-secondary {
        width: 100%;
        max-width: 100%;
        flex: none;
        padding: 14px 16px;
        font-size: 0.95rem;
        white-space: normal;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
    
    /* Calculator results */
    .calculator-results {
        padding: 15px;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .results-grid {
        width: 100%;
        max-width: 100%;
    }
    
    .result-card {
        width: 100%;
        max-width: 100%;
        padding: 15px;
    }
    
    .result-value {
        font-size: 1.8rem;
        word-wrap: break-word;
    }
    
    /* Comparison table - CRITICAL */
    .comparison-table-section {
        width: 100%;
        max-width: 100%;
        padding: 15px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .interactive-comparison {
        min-width: 500px;
        font-size: 0.85rem;
        border-collapse: collapse;
    }
    
    .interactive-comparison th,
    .interactive-comparison td {
        padding: 8px 6px;
        font-size: 0.85rem;
        white-space: nowrap;
    }
    
    /* Comparison insight */
    .comparison-insight {
        margin-top: 15px;
        font-size: 0.9rem;
        line-height: 1.5;
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
    }
    
    /* Progress section */
    .progress-section {
        width: 100%;
        max-width: 100%;
        padding: 15px;
        overflow-x: hidden;
    }
    
    .progress-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .stat-card {
        width: 100%;
        max-width: 100%;
        padding: 12px;
    }
    
    /* Chart container mobile */
    .chart-container {
        width: 100%;
        max-width: 100%;
        padding: 10px;
        overflow: hidden;
    }
    
    /* Tools grid */
    .tools-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .tool-card {
        width: 100%;
        max-width: 100%;
    }
    
    /* Products grid */
    .products-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .product-card {
        width: 100%;
        max-width: 100%;
    }
    
    /* Email signup */
    .signup-form {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }
    
    .signup-form input {
        width: 100%;
        max-width: 100%;
        font-size: 16px;
    }
    
    .btn-signup {
        width: 100%;
        max-width: 100%;
        padding: 14px;
        font-size: 1rem;
    }
    
    /* FAQ section */
    .faq-item {
        width: 100%;
        max-width: 100%;
        padding: 15px;
    }
    
    .faq-question {
        font-size: 1rem;
        word-wrap: break-word;
    }
    
    .faq-answer {
        font-size: 0.9rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Optimal weight section */
    .optimal-weight-section {
        width: 100%;
        max-width: 100%;
        padding: 15px;
        overflow-x: hidden;
    }
    
    .weight-recommendation {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .level-card {
        width: 100%;
        max-width: 100%;
        padding: 15px;
    }
    
    /* Progression bar */
    .progression-bar {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }
    
    .progression-step {
        width: 100%;
        max-width: 100%;
    }
}

/* ================================================
   EXTRA SMALL PHONES (480px and below)
   ================================================ */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .recommendation {
        padding: 12px;
        width: calc(100% - 20px);
    }
    
    .recommendation p {
        font-size: 0.85rem;
    }
    
    .btn-share,
    .btn-secondary {
        padding: 12px;
        font-size: 0.9rem;
    }
    
    .result-value {
        font-size: 1.5rem;
    }
    
    .interactive-comparison {
        font-size: 0.8rem;
    }
    
    .interactive-comparison th,
    .interactive-comparison td {
        padding: 6px 4px;
        font-size: 0.8rem;
    }
    
    .calculator-section,
    .calculator-results,
    .progress-section,
    .optimal-weight-section {
        padding: 12px;
    }
}

/* ================================================
   LANDSCAPE MODE ON SMALL PHONES
   ================================================ */
@media (max-width: 768px) and (orientation: landscape) {
    .header {
        padding: 20px;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .recommendation {
        padding: 10px;
    }
}

/* ================================================
   DEBUG MODE (uncomment to see boundaries)
   ================================================ */
/*
* {
    outline: 1px solid red !important;
}

.container {
    outline: 2px solid blue !important;
}

.recommendation {
    outline: 2px solid green !important;
}

.btn-share, .btn-secondary {
    outline: 2px solid orange !important;
}
*/

/* ================================================
   SEO CONTENT STYLES - Added for Article Pages
   ================================================ */

.intro-content { background: white; padding: 40px; margin: 30px 0; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.intro-text { font-size: 1.1rem; line-height: 1.8; margin-bottom: 30px; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-top: 20px; }
.feature-item { background: var(--bg-gray); padding: 20px; border-radius: 8px; text-align: center; }
.feature-icon { font-size: 2.5rem; display: block; margin-bottom: 10px; }
.breadcrumbs { padding: 15px 0; font-size: 0.9rem; color: var(--text-light); }
.breadcrumbs a { color: var(--primary); text-decoration: none; }
.guide-article { background: white; padding: 40px; margin: 20px auto; border-radius: 12px; max-width: 900px; }
.article-header { border-bottom: 3px solid var(--primary); padding-bottom: 20px; margin-bottom: 30px; }
.key-takeaways { background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%); border-left: 4px solid var(--success); padding: 25px; margin: 30px 0; border-radius: 8px; }
.toc { background: var(--bg-gray); padding: 25px; margin: 30px 0; border-radius: 8px; }
.guide-table { width: 100%; border-collapse: collapse; margin: 25px 0; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.guide-table thead { background: var(--primary); color: white; }
.guide-table th { padding: 15px; text-align: left; }
.guide-table td { padding: 12px 15px; border-bottom: 1px solid var(--border); }
.guide-cta { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); color: white; padding: 40px; margin: 50px 0; border-radius: 12px; text-align: center; }
.btn-cta { display: inline-block; background: white; color: var(--primary); padding: 15px 40px; border-radius: 8px; text-decoration: none; font-weight: 600; }
.related-articles { margin-top: 50px; padding-top: 30px; border-top: 2px solid var(--border); }
.articles-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.article-card { background: var(--bg-gray); padding: 20px; border-radius: 8px; border: 1px solid var(--border); }
.footer { background: var(--text); color: white; padding: 30px 0; margin-top: 60px; text-align: center; }

/* ================================================
   HEADING FIXES - h3 styling for level cards and products
   ================================================ */

/* Level card h3 should look like the old h4 */
.level-card h3 {
    font-size: 1.2rem;
    margin: 0;
    color: var(--text);
}

/* Product card h3 should look like the old h4 */
.product-card h3 {
    font-size: 1.2rem;
    margin: 15px 0 10px;
    color: var(--text);
    font-weight: 600;
}
