/* Percent Formulas Page Styles */
.percent-formulas-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    color: #334155;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

.percent-formulas-container h1 {
    color: #0f172a;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
}

.percent-formulas-container .subtitle {
    font-size: 1.25rem;
    color: #64748b;
    max-width: 800px;
    margin-bottom: 40px;
    line-height: 1.6;
}

.section-title {
    color: #0f172a;
    font-size: 1.875rem;
    font-weight: 700;
    margin: 50px 0 25px;
}

/* Features List */
.features-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin: 30px 0 40px;
}

.feature-item {
    background: #f8fafc;
    border-radius: 12px;
    padding: 24px;
    transition: transform 0.2s ease;
    border: 1px solid #e2e8f0;
}

.feature-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.feature-item h3 {
    color: #0f172a;
    font-size: 1.25rem;
    margin: 16px 0 12px;
    font-weight: 600;
}

.feature-item p {
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}

/* Info Badge */
.info-badge {
    background: #e0f2fe;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #bae6fd;
    margin: 25px 0;
}

.info-badge p {
    margin: 0;
    color: #0c4a6e;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.info-badge p strong {
    color: #075985;
}

/* Formulas Table */
.formulas-table-container {
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    margin: 30px 0;
}

.formulas-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

.formulas-table th {
    background: #f1f5f9;
    padding: 16px 20px;
    text-align: left;
    font-weight: 600;
    color: #0f172a;
    border-bottom: 2px solid #e2e8f0;
}

.formulas-table td {
    padding: 18px 20px;
    border-bottom: 1px solid #e2e8f0;
    color: #475569;
    vertical-align: top;
}

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

.formula-cell {
    position: relative;
    padding-right: 100px !important;
}

.formula-code {
    background: #f8fafc;
    padding: 12px 15px;
    border-radius: 8px;
    font-family: Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    display: inline-block;
    margin: 0;
    border: 1px solid #e2e8f0;
    word-break: break-word;
}

.copy-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: #e2e8f0;
    border: none;
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 0.875rem;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: #cbd5e1;
}

.copy-btn svg {
    width: 14px;
    height: 14px;
}

/* Examples Section */
.examples-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
    margin: 30px 0;
}

.example-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.example-card h3 {
    color: #0f172a;
    font-size: 1.25rem;
    margin: 0;
    padding: 16px 20px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.example-card p {
    padding: 0 20px;
    margin: 16px 0;
    line-height: 1.6;
}

.calculation-steps {
    padding: 0 20px 20px;
}

.step {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.step-number {
    background: #3b82f6;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: 600;
}

.step-content p {
    margin: 4px 0;
}

.result-box {
    background: #dcfce7;
    border-radius: 8px;
    padding: 12px 20px;
    margin: 0 20px 20px;
    font-weight: 600;
    color: #15803d;
    border-left: 4px solid #86efac;
}

/* FAQ Section */
.faq-container {
    margin: 30px 0;
}

.faq-item {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 12px;
}

.faq-question {
    padding: 16px 20px;
    background: #f8fafc;
    font-weight: 600;
    color: #0f172a;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s ease;
}

.faq-question::before {
    content: "+";
    font-weight: bold;
    color: #3b82f6;
    font-size: 1.2rem;
    min-width: 20px;
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-answer div {
    padding: 16px 0;
    line-height: 1.6;
}

.faq-item.active .faq-question::before {
    content: "−";
}

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

/* Calculator Links */
.calculator-links {
    margin-top: 50px;
}

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

.calculator-link {
    display: block;
    background: white;
    border-radius: 12px;
    padding: 24px;
    text-decoration: none;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
    color: #0f172a;
}

.calculator-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e1;
}

.calculator-link .icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.calculator-link h3 {
    font-size: 1.25rem;
    margin: 0 0 8px;
    font-weight: 600;
}

.calculator-link p {
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

/* Pro Tip */
.pro-tip {
    background: #fffbeb;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #fde68a;
    margin-top: 40px;
}

.pro-tip p {
    margin: 0;
    color: #92400e;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.pro-tip p strong {
    color: #b45309;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .percent-formulas-container {
        padding: 25px 15px;
    }
    
    .percent-formulas-container h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .formula-cell {
        padding-right: 120px !important;
    }
}