/* PF Calculator - Tool Styles */
/* All classes prefixed with pf- to avoid collisions */

/* Calculator Section */
.pf-calculator-section {
    padding: 40px 0 80px;
}

.pf-calculator-section .container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Reveal Animation */
.pf-reveal {
    animation: pfReveal 0.4s ease-out;
}

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

/* Card Container */
.pf-card {
    background: var(--bg-card, #fff);
    border: 1px solid var(--border-color, #e2e0dc);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.pf-card h2 {
    font-family: 'Bricolage Grotesque', serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary, #1a1715);
    margin-bottom: 8px;
}

.pf-card h2 + p {
    color: var(--text-secondary, #6b6560);
    margin-bottom: 32px;
    font-size: 15px;
}

/* Form Layout */
.pf-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.pf-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pf-form-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #1a1715);
}

.pf-form-group label .pf-required {
    color: var(--primary, #f1643f);
}

.pf-form-group input[type="text"],
.pf-form-group input[type="number"] {
    padding: 10px 14px;
    border: 1px solid var(--border-color, #e2e0dc);
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Hanken Grotesk', sans-serif;
    color: var(--text-primary, #1a1715);
    background: var(--bg-card, #fff);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
    width: 100%;
    box-sizing: border-box;
}

.pf-form-group input:focus {
    border-color: var(--primary, #f1643f);
    box-shadow: 0 0 0 3px rgba(241, 100, 63, 0.1);
}

.pf-input-hint {
    font-size: 12px;
    color: var(--text-secondary, #6b6560);
    margin-top: 2px;
}

/* Toggle Switch */
.pf-toggle-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
}

.pf-toggle-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary, #1a1715);
}

.pf-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.pf-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.pf-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--border-color, #d1d0cc);
    border-radius: 24px;
    transition: background 0.2s ease;
}

.pf-toggle-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.pf-toggle input:checked + .pf-toggle-slider {
    background: var(--primary, #f1643f);
}

.pf-toggle input:checked + .pf-toggle-slider::before {
    transform: translateX(20px);
}

/* Section Divider */
.pf-section-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 40px 0 24px;
}

.pf-section-divider::before,
.pf-section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color, #e2e0dc);
}

.pf-section-divider span {
    font-family: 'Bricolage Grotesque', serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary, #f1643f);
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

/* Summary Cards */
.pf-summary-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.pf-summary-card {
    text-align: center;
    padding: 24px 16px;
    border-radius: 12px;
    border: 1px solid var(--border-color, #e2e0dc);
    background: var(--bg-card, #fff);
}

.pf-summary-card .pf-summary-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}

.pf-summary-card .pf-summary-icon.employee-epf {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.pf-summary-card .pf-summary-icon.employer-epf {
    background: rgba(168, 85, 247, 0.1);
    color: #a855f7;
}

.pf-summary-card .pf-summary-icon.eps {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.pf-summary-card .pf-summary-icon.total {
    background: rgba(241, 100, 63, 0.1);
    color: var(--primary, #f1643f);
}

.pf-summary-card .pf-summary-icon svg {
    width: 20px;
    height: 20px;
}

.pf-summary-card .pf-summary-number {
    font-family: 'Bricolage Grotesque', serif;
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 4px;
    color: var(--text-primary, #1a1715);
}

.pf-summary-card .pf-summary-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary, #6b6560);
}

/* Breakdown Table */
.pf-breakdown-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 32px;
    border: 1px solid var(--border-color, #e2e0dc);
    border-radius: 12px;
    overflow: hidden;
}

.pf-breakdown-table thead {
    background: rgba(0, 0, 0, 0.03);
}

.pf-breakdown-table th {
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary, #6b6560);
    text-align: left;
    border-bottom: 1px solid var(--border-color, #e2e0dc);
}

.pf-breakdown-table th:not(:first-child) {
    text-align: right;
}

.pf-breakdown-table td {
    padding: 12px 16px;
    font-size: 14px;
    color: var(--text-primary, #1a1715);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.pf-breakdown-table td:not(:first-child) {
    text-align: right;
    font-family: 'Bricolage Grotesque', serif;
    font-weight: 600;
}

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

.pf-breakdown-table .pf-row-total {
    background: rgba(241, 100, 63, 0.04);
    font-weight: 700;
}

.pf-breakdown-table .pf-row-total td {
    font-weight: 700;
    color: var(--primary, #f1643f);
    border-top: 2px solid var(--border-color, #e2e0dc);
}

.pf-breakdown-table .pf-row-total td:first-child {
    color: var(--text-primary, #1a1715);
}

.pf-row-label-note {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-secondary, #6b6560);
    display: block;
    margin-top: 2px;
}

/* Stacked Contribution Bar */
.pf-bar-section {
    margin-bottom: 32px;
}

.pf-bar-title {
    font-family: 'Bricolage Grotesque', serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary, #1a1715);
    margin-bottom: 16px;
}

.pf-stacked-bar {
    display: flex;
    height: 48px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 16px;
}

.pf-bar-segment {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    transition: width 0.6s ease-out;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
}

.pf-bar-segment.employee-epf {
    background: #3b82f6;
}

.pf-bar-segment.employer-epf {
    background: #a855f7;
}

.pf-bar-segment.eps {
    background: #16a34a;
}

.pf-bar-segment.edli {
    background: #f97316;
}

.pf-bar-segment.admin {
    background: #6b7280;
}

.pf-bar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.pf-bar-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary, #6b6560);
}

.pf-bar-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    flex-shrink: 0;
}

.pf-bar-legend-dot.employee-epf { background: #3b82f6; }
.pf-bar-legend-dot.employer-epf { background: #a855f7; }
.pf-bar-legend-dot.eps { background: #16a34a; }
.pf-bar-legend-dot.edli { background: #f97316; }
.pf-bar-legend-dot.admin { background: #6b7280; }

/* ===== SEO CONTENT ===== */
.pf-seo-content {
    padding: 80px 0;
    background: rgba(0, 0, 0, 0.02);
}

.pf-seo-content h2 {
    font-family: 'Bricolage Grotesque', serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary, #1a1715);
    margin-bottom: 12px;
    text-align: center;
}

.pf-seo-content > .container > p {
    text-align: center;
    color: var(--text-secondary, #6b6560);
    max-width: 700px;
    margin: 0 auto 40px;
    line-height: 1.7;
    font-size: 15px;
}

.pf-seo-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.pf-seo-card {
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--border-color, #e2e0dc);
    background: var(--bg-card, #fff);
}

.pf-seo-card h3 {
    font-family: 'Bricolage Grotesque', serif;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary, #1a1715);
}

.pf-seo-card p {
    font-size: 14px;
    color: var(--text-secondary, #6b6560);
    line-height: 1.6;
    margin: 0;
}

/* ===== FAQ SECTION ===== */
.pf-faq-section {
    padding: 80px 0;
}

.pf-faq-section h2 {
    font-family: 'Bricolage Grotesque', serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary, #1a1715);
    margin-bottom: 32px;
    text-align: center;
}

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

.pf-faq-item {
    border: 1px solid var(--border-color, #e2e0dc);
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-card, #fff);
}

.pf-faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    padding: 18px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Hanken Grotesk', sans-serif;
    color: var(--text-primary, #1a1715);
    text-align: left;
    transition: background 0.2s ease;
}

.pf-faq-question:hover {
    background: rgba(0, 0, 0, 0.02);
}

.pf-faq-question i,
.pf-faq-question svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--text-secondary, #6b6560);
    transition: transform 0.2s ease;
}

.pf-faq-item.open .pf-faq-question i,
.pf-faq-item.open .pf-faq-question svg {
    transform: rotate(180deg);
}

.pf-faq-answer {
    display: none;
    padding: 0 20px 18px;
}

.pf-faq-item.open .pf-faq-answer {
    display: block;
}

.pf-faq-answer p {
    font-size: 14px;
    color: var(--text-secondary, #6b6560);
    line-height: 1.7;
    margin: 0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 809px) {
    .pf-card {
        padding: 24px 20px;
    }

    .pf-form-grid {
        grid-template-columns: 1fr;
    }

    .pf-summary-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .pf-seo-grid {
        grid-template-columns: 1fr;
    }

    .pf-breakdown-table th,
    .pf-breakdown-table td {
        padding: 10px 12px;
        font-size: 13px;
    }

    .pf-bar-legend {
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .pf-calculator-section {
        padding: 0 0 48px;
    }

    .pf-card {
        padding: 20px 16px;
        border-radius: 12px;
    }

    .pf-card h2 {
        font-size: 20px;
    }

    .pf-summary-cards {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .pf-summary-card {
        padding: 16px 12px;
    }

    .pf-summary-card .pf-summary-number {
        font-size: 22px;
    }

    .pf-stacked-bar {
        height: 40px;
    }

    .pf-bar-segment {
        font-size: 10px;
    }

    .pf-bar-legend {
        gap: 8px;
    }

    .pf-bar-legend-item {
        font-size: 12px;
    }

    .pf-seo-content {
        padding: 48px 0;
    }

    .pf-seo-content h2 {
        font-size: 22px;
    }

    .pf-faq-section {
        padding: 48px 0;
    }

    .pf-faq-section h2 {
        font-size: 22px;
    }

    .pf-faq-question {
        padding: 14px 16px;
        font-size: 14px;
    }

    .pf-faq-answer {
        padding: 0 16px 14px;
    }

    .pf-section-divider {
        margin: 32px 0 20px;
    }

    .pf-breakdown-table th,
    .pf-breakdown-table td {
        padding: 8px 10px;
        font-size: 12px;
    }
}
