/* ============================================
   FITQURO TDEE & MACRO CALCULATOR STYLES
   ============================================ */

.calc-section {
    padding: 140px 0 80px;
    min-height: 100vh;
}

.calc-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px;
}

.calc-header {
    text-align: center;
    margin-bottom: 50px;
}

.calc-tag {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(79, 70, 229, 0.15);
    color: #818cf8;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 16px;
    border: 1px solid rgba(79, 70, 229, 0.3);
}

.calc-title {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 16px;
}

.calc-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary, #9ca3af);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Calculator Grid */
.calc-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
    align-items: start;
    margin-bottom: 60px;
}

@media (max-width: 900px) {
    .calc-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* Glassmorphic Form Card */
.calc-card {
    background: var(--bg-card, rgba(13, 27, 50, 0.5));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.calc-group-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

@media (max-width: 480px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary, #9ca3af);
}

/* Form Inputs */
.form-input, .form-select {
    width: 100%;
    padding: 14px 16px;
    background: rgba(10, 22, 40, 0.7);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.form-input:focus, .form-select:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 12px rgba(79, 70, 229, 0.3);
    background: rgba(10, 22, 40, 0.9);
}

/* Custom Segmented Control (Gender / Goal) */
.gender-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: rgba(10, 22, 40, 0.7);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 4px;
    gap: 4px;
}

.gender-btn {
    padding: 10px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-secondary, #9ca3af);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.gender-btn.active {
    background: #4f46e5;
    color: #fff;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
}

/* Button Submit */
.calc-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.calc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.4);
}

/* Results Card */
.results-card {
    background: linear-gradient(135deg, rgba(20, 35, 65, 0.7) 0%, rgba(13, 27, 50, 0.7) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 32px;
    position: sticky;
    top: 100px;
    display: none; /* Shown dynamically via JS */
    animation: fadeIn 0.5s ease forwards;
}

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

.result-placeholder {
    background: var(--bg-card, rgba(13, 27, 50, 0.5));
    border: 1px dotted rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    padding: 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    min-height: 350px;
    color: var(--text-secondary, #9ca3af);
    position: sticky;
    top: 100px;
}

.result-placeholder-icon {
    font-size: 3.5rem;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Results Numbers */
.result-header {
    text-align: center;
    margin-bottom: 24px;
}

.result-val {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    margin: 8px 0;
    background: linear-gradient(135deg, #818cf8, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.result-desc {
    font-size: 0.95rem;
    color: var(--text-secondary, #9ca3af);
    line-height: 1.5;
}

/* Details List */
.result-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 28px;
    background: rgba(10, 22, 40, 0.5);
    border-radius: 16px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
}

.detail-label {
    color: var(--text-secondary, #9ca3af);
}

.detail-value {
    font-weight: 600;
    color: #fff;
}

/* Macro Breakdown */
.macro-box {
    margin-bottom: 28px;
}

.macro-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: #fff;
    display: flex;
    justify-content: space-between;
}

.macro-bars {
    display: flex;
    height: 12px;
    border-radius: 100px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.macro-bar {
    height: 100%;
    transition: width 0.5s ease;
}

.macro-bar.protein { background: #818cf8; }
.macro-bar.carbs { background: #34d399; }
.macro-bar.fats { background: #fbbf24; }

.macro-legend {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

.legend-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.legend-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary, #9ca3af);
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.legend-dot.protein { background: #818cf8; }
.legend-dot.carbs { background: #34d399; }
.legend-dot.fats { background: #fbbf24; }

.legend-val {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}

.legend-pct {
    font-size: 0.75rem;
    color: var(--text-secondary, #9ca3af);
}

/* CTA inside results */
.calc-cta {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.25) 0%, rgba(59, 130, 246, 0.1) 100%);
    border: 1px solid rgba(79, 70, 229, 0.3);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
}

.calc-cta-text {
    font-size: 0.9rem;
    color: #fff;
    margin-bottom: 12px;
    line-height: 1.4;
}

.calc-cta-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #4f46e5;
    color: #fff;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
}

.calc-cta-btn:hover {
    background: #6366f1;
    transform: translateY(-1px);
}

/* FAQ Section */
.faq-section {
    padding: 40px 0 80px;
}

.faq-title {
    font-size: 2rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 40px;
    background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    background: var(--bg-card, rgba(13, 27, 50, 0.5));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-question {
    width: 100%;
    padding: 22px 28px;
    background: transparent;
    border: none;
    text-align: left;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    outline: none;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0, 1, 0, 1);
    padding: 0 28px;
}

.faq-answer-inner {
    padding-bottom: 22px;
    color: var(--text-secondary, #9ca3af);
    line-height: 1.6;
    font-size: 0.95rem;
}

.faq-item.active {
    border-color: rgba(79, 70, 229, 0.3);
}

.faq-item.active .faq-answer {
    max-height: 1000px; /* Large enough height */
    transition: max-height 0.4s cubic-bezier(1, 0, 1, 0);
}

.faq-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
    color: #818cf8;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}
