/* Horsepower Calculator Specific Styles */

/* Mode Tabs */
.mode-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e0e0e0;
    flex-wrap: wrap;
}

.tab-btn {
    flex: 1;
    min-width: 150px;
    padding: 1rem 1.5rem;
    background: var(--bg-color);
    border: none;
    border-bottom: 3px solid transparent;
    color: #666;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.tab-btn:hover {
    background: #f8f9fa;
    color: var(--primary-color);
}

.tab-btn.active {
    color: var(--primary-color);
    background: #e8f0ff;
    border-bottom-color: var(--primary-color);
}

.tab-icon {
    font-size: 1.5rem;
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.mode-description {
    background: linear-gradient(135deg, #e8f4f8 0%, #ffffff 100%);
    padding: 1rem;
    border-left: 4px solid var(--accent-color);
    border-radius: 4px;
    margin-bottom: 1.5rem;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Form Layout */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    color: var(--text-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-group input,
.form-group select {
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1);
}

/* Button Group */
.button-group {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-calculate {
    flex: 1;
    padding: 1rem 2rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    box-shadow: var(--shadow);
}

.btn-calculate:hover {
    background: #004080;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 51, 102, 0.2);
}

.btn-reset {
    padding: 1rem 2rem;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-reset:hover {
    background: #5a6268;
}

/* Results Section */
.result-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 2rem;
    border-radius: 4px;
    margin-top: 2rem;
    border: 2px solid var(--primary-color);
    box-shadow: var(--shadow);
}

.result-title {
    color: var(--primary-color);
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 700;
}

/* Power Badge */
.result-main {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.power-badge {
    background: linear-gradient(135deg, var(--primary-color), #004080);
    color: white;
    padding: 2rem 3rem;
    border-radius: 4px;
    text-align: center;
    box-shadow: 0 6px 20px rgba(0, 51, 102, 0.3);
    min-width: 250px;
}

.badge-value {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.badge-unit {
    font-size: 1.5rem;
    font-weight: 500;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Power Conversions */
.power-conversions {
    background: white;
    padding: 1.5rem;
    border-radius: 4px;
    margin-bottom: 2rem;
    border: 1px solid #e0e0e0;
}

.power-conversions h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

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

.conversion-item {
    background: var(--bg-color);
    padding: 1rem;
    border-radius: 4px;
    border-left: 4px solid var(--accent-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.conversion-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.conversion-label {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

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

/* Step-by-Step */
.step-by-step {
    background: white;
    padding: 1.5rem;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

.step-by-step h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.step {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    border-left: 4px solid var(--accent-color);
}

.step:last-child {
    margin-bottom: 0;
}

.step h4 {
    color: var(--text-color);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.step .katex-formula {
    background: white;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    border: 1px solid #e0e0e0;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: center;
}

.btn-secondary {
    padding: 0.75rem 2rem;
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 51, 102, 0.2);
}

/* Educational Section */
.educational-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 2rem;
    border-radius: 4px;
    margin-top: 3rem;
    border: 1px solid #ccc;
    box-shadow: var(--shadow);
}

.educational-section h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.educational-section p {
    color: #555;
    line-height: 1.8;
    font-size: 1rem;
}

/* Formula Section */
.formula-section {
    background: white;
    padding: 2rem;
    border-radius: 4px;
    margin-top: 3rem;
    border: 1px solid #ccc;
    box-shadow: var(--shadow);
}

.formula-section h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 2rem;
    font-weight: 700;
    text-align: center;
}

.formula-block {
    background: var(--bg-color);
    padding: 2rem;
    border-radius: 4px;
    margin-bottom: 2rem;
    border: 1px solid #e0e0e0;
}

.formula-block:last-child {
    margin-bottom: 0;
}

.formula-block h3 {
    color: var(--primary-color);
    font-size: 1.4rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.formula-block > p {
    color: #555;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.formula-display {
    background: white;
    padding: 1.5rem;
    border-radius: 4px;
    margin: 1rem 0;
    border: 2px solid var(--primary-color);
}

.formula-display h4 {
    color: var(--text-color);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.katex-formula {
    text-align: center;
    font-size: 1.2rem;
    overflow-x: auto;
    padding: 0.5rem;
}

.formula-note {
    background: #fff9e6;
    padding: 1rem;
    border-radius: 4px;
    border-left: 4px solid #ffc107;
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-top: 1rem;
}

/* Examples Section */
.examples-section {
    background: white;
    padding: 2rem;
    border-radius: 4px;
    margin-top: 3rem;
    border: 1px solid #ccc;
    box-shadow: var(--shadow);
}

.examples-section h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 2rem;
    font-weight: 700;
    text-align: center;
}

.example-block {
    background: var(--bg-color);
    padding: 2rem;
    border-radius: 4px;
    margin-bottom: 2rem;
    border: 1px solid #e0e0e0;
}

.example-block:last-child {
    margin-bottom: 0;
}

.example-block h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.example-problem {
    background: #e8f4f8;
    padding: 1rem;
    border-radius: 4px;
    border-left: 4px solid #2196F3;
    color: #333;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.example-steps {
    background: white;
    padding: 1.5rem;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

.example-steps p {
    color: #555;
    line-height: 1.8;
    margin: 1rem 0;
    font-size: 1rem;
}

.example-answer {
    background: #e8f5e9;
    padding: 1rem;
    border-radius: 4px;
    border-left: 4px solid #4caf50;
    color: #2e7d32;
    font-weight: 700;
    margin-top: 1.5rem;
}

/* FAQs Section */
.faq-section {
    background: white;
    padding: 2rem;
    border-radius: 4px;
    margin-top: 3rem;
    border: 1px solid #ccc;
    box-shadow: var(--shadow);
}

.faq-heading {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 2rem;
    font-weight: 700;
    text-align: center;
}

.faq-item {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    border: 1px solid #e0e0e0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.faq-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.faq-item:last-child {
    margin-bottom: 0;
}

.faq-question {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.faq-answer {
    color: #555;
    line-height: 1.8;
    font-size: 1rem;
}

/* Expert Verification Section */
.expert-verification {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 2rem;
    border-radius: 4px;
    margin-top: 3rem;
    border: 2px solid var(--primary-color);
    box-shadow: var(--shadow);
}

.expert-heading {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    text-align: center;
}

.expert-content {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.expert-image {
    flex-shrink: 0;
}

.expert-image img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.expert-info {
    flex: 1;
}

.expert-name {
    color: var(--primary-color);
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.expert-designation {
    color: var(--accent-color);
    font-size: 1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.expert-bio {
    color: #555;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.expert-linkedin {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #0077b5;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.expert-linkedin:hover {
    color: #005885;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mode-tabs {
        flex-direction: column;
    }

    .tab-btn {
        min-width: 100%;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .button-group {
        flex-direction: column;
    }

    .power-badge {
        padding: 1.5rem 2rem;
        min-width: 200px;
    }

    .badge-value {
        font-size: 2.5rem;
    }

    .badge-unit {
        font-size: 1.2rem;
    }

    .conversion-grid {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
    }

    .expert-content {
        flex-direction: column;
        text-align: center;
    }

    .expert-image img {
        width: 120px;
        height: 120px;
    }

    .expert-linkedin {
        justify-content: center;
    }

    /* KaTeX formulas on mobile */
    .katex {
        font-size: 0.9em !important;
    }
}

@media (max-width: 480px) {
    .power-badge {
        padding: 1rem 1.5rem;
    }

    .badge-value {
        font-size: 2rem;
    }

    .badge-unit {
        font-size: 1rem;
    }

    .formula-display {
        padding: 1rem;
    }

    .katex {
        font-size: 0.8em !important;
    }
}
