/* Calculator Page Specific Styles */
.calculator-page {
    background-color: #f8fafc;
}

.calc-layout {
    display: flex;
    gap: 40px;
    padding: 120px 0 100px; /* Increased from 60px to accommodate fixed header */
}

.calc-tool-section {
    flex: 1;
    max-width: 800px;
}

.calc-sidebar {
    width: 320px;
    flex-shrink: 0;
}

/* Header & Back Link */
.back-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text-muted);
    transition: color var(--transition-speed);
}

.back-link:hover {
    color: var(--primary);
}

/* Calculator Header */
.calc-header {
    margin-bottom: 40px;
}

.calc-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 16px;
    color: white;
}

.calc-badge.nutrition {
    background-color: var(--secondary);
}

.calc-header h1 {
    font-size: 2.8rem;
    color: var(--text-main);
    margin-bottom: 16px;
    line-height: 1.2;
}

.calc-header p {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 700px;
}

/* Main Calculator Box */
.calc-box {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: 0 10px 40px rgba(15, 82, 186, 0.08);
    border: 1px solid var(--border-color);
    margin-bottom: 60px;
}

/* Form Styles */
.form-group {
    margin-bottom: 24px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

label {
    display: block;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 10px;
    font-size: 0.95rem;
}

input[type="number"], select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 1.05rem;
    color: var(--text-main);
    background-color: #f8fafc;
    transition: all var(--transition-speed);
}

input[type="number"]:focus, select:focus {
    border-color: var(--primary);
    background-color: white;
    outline: none;
    box-shadow: 0 0 0 4px rgba(15, 82, 186, 0.1);
}

.form-help {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 8px;
}

/* Radio Cards Custom Design */
       .radio-group {
           display: grid;
           grid-template-columns: 1fr 1fr;
           gap: 16px;
       }

       .radio-card {
           position: relative;
           cursor: pointer;
       }

       .radio-card input {
           position: absolute;
           opacity: 0;
           cursor: pointer;
       }

       .radio-content {
           display: flex;
           justify-content: center;
           align-items: center;
           gap: 10px;
           padding: 16px;
           background-color: #f8fafc;
           border: 2px solid var(--border-color);
           border-radius: 10px;
           font-weight: 600;
           color: var(--text-muted);
           transition: all var(--transition-speed);
           font-size: 1.05rem;
       }

       .radio-content ion-icon {
           font-size: 1.4rem;
       }

       .radio-card input:checked ~ .radio-content {
           background-color: rgba(15, 82, 186, 0.05);
           border-color: var(--primary);
           color: var(--primary);
       }

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    margin-top: 30px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(15, 82, 186, 0.3);
}

.btn-secondary {
    width: 100%;
    padding: 14px;
    background-color: transparent;
    color: var(--text-muted);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed);
    margin-top: 20px;
}

.btn-secondary:hover {
    border-color: var(--text-main);
    color: var(--text-main);
    background-color: #f8fafc;
}

/* Interactive Results Area */
.hidden {
    display: none !important;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-header {
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 16px;
    margin-bottom: 24px;
}

.result-header h2 {
    color: var(--text-main);
    font-size: 1.8rem;
}

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

.result-card {
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    gap: 20px;
    align-items: center;
}

.result-card.highlight-card {
    background: linear-gradient(135deg, rgba(15, 82, 186, 0.05) 0%, rgba(15, 82, 186, 0.1) 100%);
    border-color: var(--primary-light);
}

.result-card.get-card {
    background: linear-gradient(135deg, rgba(0, 168, 107, 0.05) 0%, rgba(0, 168, 107, 0.1) 100%);
    border-color: rgba(0, 168, 107, 0.3);
}

.result-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    flex-shrink: 0;
}

.highlight-card .result-icon {
    background-color: var(--primary);
    color: white;
}

.get-card .result-icon {
    background-color: var(--secondary);
    color: white;
}

.result-data {
    display: flex;
    flex-direction: column;
}

.result-label {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-main);
    margin-bottom: 4px;
}

.result-value {
    font-size: 2.2rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    line-height: 1.1;
}

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

.get-card .result-value {
    color: var(--secondary);
}

.result-value small {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
}

.result-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 6px;
}

/* Macros Bars */
.result-macros {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
}

.result-macros h3 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--text-main);
}

.macro-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background-color: #f8fafc;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 4px solid var(--text-muted);
}

.macro-bar:nth-child(1) { border-left-color: #3b82f6; } /* Carbs */
.macro-bar:nth-child(2) { border-left-color: #ef4444; } /* Prot */
.macro-bar:nth-child(3) { border-left-color: #eab308; } /* Fats */

.macro-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.macro-val {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-main);
}

/* Scientific Context Layout */
.scientific-context {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: 0 5px 20px rgba(28, 39, 76, 0.05);
    border: 1px solid var(--border-color);
}

.scientific-context h2 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border-color);
}

.context-block {
    margin-bottom: 30px;
}

.context-block h3 {
    font-size: 1.3rem;
    color: var(--primary);
    margin-bottom: 12px;
}

.context-block h4 {
    font-size: 1.1rem;
    color: var(--text-main);
    margin: 20px 0 8px;
}

.context-block p {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 12px;
}

.formula-box {
    background-color: #f1f5f9;
    padding: 16px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 14px;
    color: #334155;
    line-height: 1.6;
    border-left: 4px solid var(--secondary);
}

.caution-block {
    background-color: #fffbeb;
    border: 1px solid #fde68a;
    padding: 20px;
    border-radius: 10px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.caution-block ion-icon {
    color: #d97706;
    font-size: 1.8rem;
    flex-shrink: 0;
}

.caution-block strong {
    color: #92400e;
    display: block;
    margin-bottom: 4px;
}

.caution-block p {
    color: #b45309;
    margin: 0;
    font-size: 0.95rem;
}

.clinical-dev {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px dashed var(--border-color);
}

.dev-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.3rem;
}

.dev-info strong {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.dev-info span {
    font-weight: 700;
    color: var(--text-main);
}

/* Sidebar Ads Position */
.calc-sidebar {
    position: relative;
}

.adsense-sticky {
    position: sticky;
    top: 100px; /* Below the sticky header */
}

.adsense-placeholder-vertical {
    width: 100%;
    height: 600px;
    background-color: #e5e9f2;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #64748b;
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 30px;
}

.related-tools {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
}

.related-tools h3 {
    font-size: 1.1rem;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.related-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    color: var(--text-muted);
    font-weight: 600;
    transition: color var(--transition-speed);
}

.related-link:hover {
    color: var(--primary);
}

.related-link ion-icon {
    font-size: 1.3rem;
    color: var(--secondary);
}

.related-link:not(:last-child) {
    border-bottom: 1px dashed var(--border-color);
}

/* Responsive Calculators Page */
@media (max-width: 1024px) {
    .calc-layout {
        flex-direction: column;
    }
    
    .calc-tool-section {
        max-width: 100%;
    }
    
    .calc-sidebar {
        width: 100%;
    }
    
    .adsense-sticky {
        position: static;
    }
    
    .adsense-placeholder-vertical {
        height: 250px;
    }
}

@media (max-width: 768px) {
    .calc-header h1 {
        font-size: 2.2rem;
    }
    
    .calc-box, .scientific-context {
        padding: 24px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .result-cards, .next-steps-grid {
        grid-template-columns: 1fr;
    }
}
/* --- Landing Page Components --- */

/* Guide Steps */
.step-guide {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin: 30px 0;
}

.step-item {
    background-color: #f8fafc;
    padding: 24px;
    border-radius: 12px;
    position: relative;
    border: 1px solid var(--border-color);
}

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

/* Accordion (FAQ) */
.faq-section {
    margin-top: 40px;
}

.faq-item {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 12px;
    overflow: hidden;
    background-color: white;
}

.faq-question {
    width: 100%;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    text-align: left;
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.faq-item.active .faq-answer {
    padding: 10px 20px 20px;
    max-height: 500px;
}

.faq-item.active .faq-question ion-icon {
    transform: rotate(180deg);
}

/* Reference Tables */
.data-table-wrapper {
    overflow-x: auto;
    margin: 20px 0;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.data-table th, .data-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background-color: #f1f5f9;
    color: var(--text-main);
    font-weight: 700;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover td {
    background-color: #f8fafc;
}

/* Next Steps (Internal Links) */
.next-steps-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 30px;
}

.next-step-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.next-step-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(15, 82, 186, 0.05);
    transform: translateY(-2px);
}

.next-step-icon {
    width: 40px;
    height: 40px;
    background-color: #f1f5f9;
    border-radius: 8px;
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.2rem;
}
/* Social Sharing Buttons */
.share-container {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px dashed var(--border-color);
}

.share-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    flex: 1;
    min-width: 120px;
}

.share-btn ion-icon {
    font-size: 1.2rem;
}

.share-btn.whatsapp { background-color: #25d366; }
.share-btn.facebook { background-color: #1877f2; }
.share-btn.twitter { background-color: #1da1f2; }
.share-btn.linkedin { background-color: #0077b5; }
.share-btn.instagram { background-color: #e4405f; }
.share-btn.native { background-color: var(--primary); }

.share-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Infographic Card (Shareable Visual Summary) */
.infographic-card {
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    color: white;
    padding: 30px;
    border-radius: 20px;
    margin: 30px 0;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.infographic-card::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: var(--primary);
    filter: blur(80px);
    opacity: 0.3;
}

.info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 15px;
}

.info-brand {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
}

.info-brand .highlight { color: var(--primary-light); }

.info-badge {
    background-color: var(--secondary);
    color: white;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

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

.info-item {
    text-align: center;
}

.info-val {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    color: var(--primary-light);
    line-height: 1.2;
}

.info-label {
    font-size: 0.8rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.info-footer {
    margin-top: 25px;
    text-align: center;
    font-size: 0.8rem;
    color: #64748b;
}

@media (max-width: 480px) {
    .share-buttons {
        flex-direction: column;
    }
    .share-btn {
        width: 100%;
    }
}
