/* Payroll Tax Calculator Specific Styles */
:root {
    --primary-color: #204080;
    --secondary-color: #5AC8FA;
    --dark-color: #0056CC;
    --light-color: #E3F2FD;
    --success-color: #48bb78;
    --payroll-color: #16537e;
    --employee-color: #3B82F6;
    --employer-color: #059669;
    --fica-color: #8B5CF6;
    --warning-color: #EF4444;
    --error-color: #e53e3e;
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --border-color: #e2e8f0;
    --shadow-light: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-medium: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-heavy: 0 10px 25px rgba(0,0,0,0.15);
    --gradient-primary: linear-gradient(135deg, #204080 0%, #5AC8FA 100%);
    --gradient-payroll: linear-gradient(135deg, #16537e 0%, #3B82F6 100%);
    --gradient-employee: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);
    --gradient-employer: linear-gradient(135deg, #059669 0%, #10B981 100%);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
}

h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 1.5rem;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

h4 {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

h5 {
    font-size: 1.125rem;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

/* Hero Section */
.hero-section {
    background: var(--gradient-primary);
    color: white;
    padding: 4rem 0;
    text-align: center;
    margin-bottom: 2rem;
}

.hero-section h1 {
    color: white;
    background: none;
    -webkit-text-fill-color: unset;
    margin-bottom: 1rem;
    font-size: 3rem;
}

.hero-section p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto;
    color: white;
}

/* Calculator Section */
.calculator-section {
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.calculator-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-heavy);
    border: 1px solid var(--border-color);
}

/* Section Headers */
.section-header {
    margin: 2rem 0 1.5rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--light-color);
}

.section-header h3 {
    color: var(--primary-color);
    margin-bottom: 0;
}

/* Form Styles */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.input-group {
    margin-bottom: 1rem;
}

.input-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.input-label.required::after {
    content: " *";
    color: var(--error-color);
    font-weight: bold;
}

.input-field, .select-field {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.input-field:focus, .select-field:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(32, 64, 128, 0.1);
}

.input-field.error, .select-field.error {
    border-color: var(--error-color);
    animation: shake 0.5s ease-in-out;
}

.help-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    line-height: 1.4;
}

.error-message {
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    font-weight: 500;
}

/* Checkbox Styles */
.checkbox-group {
    margin: 1.5rem 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-primary);
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    margin-right: 0.75rem;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 14px;
}

/* Button Styles */
.calculate-btn {
    background: var(--gradient-payroll);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 1rem;
    box-shadow: var(--shadow-medium);
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-heavy);
}

.calculate-btn:active {
    transform: translateY(0);
}

/* Results Section */
.results-section {
    display: none;
    margin-top: 2rem;
    padding: 2rem;
    background: white;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-medium);
}

.results-section.show {
    display: block;
    animation: slideInUp 0.5s ease-out;
}

.results-section h3 {
    background: var(--gradient-payroll);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    margin-bottom: 1.5rem;
}

/* Payroll Results Styles */
.payroll-breakdown {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.payroll-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.summary-card {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.summary-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.summary-card.gross-pay {
    border-color: var(--primary-color);
}

.summary-card.net-pay {
    border-color: var(--success-color);
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}

.summary-card.total-taxes {
    border-color: var(--warning-color);
    background: linear-gradient(135deg, #fefce8 0%, #fef3c7 100%);
}

.summary-card.take-home {
    border-color: var(--employee-color);
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

.summary-card h4 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-card .amount {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Tax Breakdown Tables */
.tax-breakdown {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.breakdown-section {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
}

.breakdown-header {
    padding: 1rem 1.5rem;
    font-weight: 600;
    color: white;
    font-size: 1.1rem;
}

.breakdown-header.employee {
    background: var(--gradient-employee);
}

.breakdown-header.employer {
    background: var(--gradient-employer);
}

.breakdown-body {
    padding: 1.5rem;
}

.tax-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--light-color);
}

.tax-item:last-child {
    border-bottom: none;
    font-weight: 600;
    background: var(--light-color);
    margin: 0.75rem -1.5rem -1.5rem;
    padding: 1rem 1.5rem;
}

.tax-name {
    color: var(--text-primary);
    font-weight: 500;
}

.tax-amount {
    font-weight: 600;
    color: var(--primary-color);
}

.tax-rate {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-left: 0.5rem;
}

/* Pay Stub Display */
.pay-stub {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    font-family: 'Courier New', monospace;
    box-shadow: var(--shadow-medium);
}

.pay-stub-header {
    text-align: center;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.pay-stub-company {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.pay-stub-title {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.pay-stub-section {
    margin-bottom: 1.5rem;
}

.pay-stub-section h4 {
    background: var(--light-color);
    padding: 0.5rem 1rem;
    margin: 0 -2rem 1rem;
    color: var(--primary-color);
    font-size: 1rem;
}

.pay-stub-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 0.5rem;
    align-items: center;
}

.pay-stub-item {
    padding: 0.25rem 0;
    border-bottom: 1px dotted var(--border-color);
}

.pay-stub-item.header {
    font-weight: bold;
    background: var(--light-color);
    padding: 0.5rem 0.25rem;
    border-bottom: 2px solid var(--primary-color);
}

.pay-stub-total {
    border-top: 2px solid var(--primary-color);
    padding-top: 0.5rem;
    margin-top: 0.5rem;
    font-weight: bold;
}

/* Information Section */
.info-section {
    padding: 3rem 0;
    background: white;
    margin: 2rem 0;
}

.payroll-overview {
    margin-bottom: 3rem;
}

.tax-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.category-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-light);
}

.category-card h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.category-card ul {
    list-style: none;
    padding: 0;
}

.category-card li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(32, 64, 128, 0.1);
    line-height: 1.5;
}

.category-card li:last-child {
    border-bottom: none;
}

.category-card strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* Tax Rates Table */
.tax-rates-table {
    margin: 2rem 0;
}

.rates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.rate-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
}

.rate-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.rate-card h5 {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.rate-details {
    space-y: 0.5rem;
}

.rate-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--light-color);
}

.rate-item:last-child {
    border-bottom: none;
}

.rate-item span:first-child {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.rate-item span:last-child {
    font-weight: 600;
    color: var(--primary-color);
}

/* W-4 Steps */
.w4-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.step-card {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid var(--secondary-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.step-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.step-card h5 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.step-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* State Information */
.state-considerations {
    margin: 2rem 0;
}

.state-category {
    margin: 2rem 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, #fefce8 0%, #fef3c7 100%);
    border: 1px solid #fbbf24;
    border-radius: 12px;
}

.state-category h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.no-tax-states, .sdi-states {
    margin: 1rem 0;
}

.state-tag {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    margin: 0.25rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
}

.sdi-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(251, 191, 36, 0.3);
}

.sdi-item:last-child {
    border-bottom: none;
}

/* Pre-tax Impact */
.pretax-impact {
    margin: 2rem 0;
}

.calculation-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2rem 0;
    flex-wrap: wrap;
    gap: 1rem;
}

.calc-step {
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    min-width: 150px;
    flex: 1;
    max-width: 200px;
}

.calc-step h5 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.calc-step p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

.calc-arrow {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 0 0.5rem;
}

.pretax-benefits {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid var(--success-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.pretax-benefits h5 {
    color: var(--success-color);
    margin-bottom: 1rem;
}

.pretax-benefits ul {
    list-style: none;
    padding: 0;
}

.pretax-benefits li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(72, 187, 120, 0.2);
}

.pretax-benefits li:last-child {
    border-bottom: none;
}

/* Frequency Information */
.frequency-info {
    margin: 2rem 0;
}

.frequency-examples {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.freq-example {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow-light);
}

.freq-example h5 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.freq-example p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Employer Obligations */
.employer-obligations {
    margin: 2rem 0;
}

.employer-taxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.employer-tax-card {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid var(--secondary-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.employer-tax-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.employer-tax-card h5 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.employer-tax-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* Calculator Guidance */
.calculator-guidance {
    background: linear-gradient(135deg, #fefce8 0%, #fef3c7 100%);
    border: 1px solid #fbbf24;
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem 0;
}

.guidance-content ul {
    list-style: none;
    padding: 0;
}

.guidance-content li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.guidance-content li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

.important-note {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 1px solid var(--warning-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.important-note h4 {
    color: var(--warning-color);
    margin-bottom: 0.75rem;
}

.important-note p {
    color: var(--text-primary);
    margin: 0;
    font-weight: 500;
}

/* Related Calculators */
.related-calculators {
    padding: 3rem 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.related-calculators h2 {
    text-align: center;
    margin-bottom: 2rem;
}

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

.related-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-light);
}

.related-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-heavy);
    text-decoration: none;
    color: inherit;
}

.related-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.related-card p {
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* FAQ Section */
.faq-section {
    padding: 3rem 0;
    background: white;
}

.faq-section h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 1.5rem;
    background: white;
    border: none;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.faq-question:hover {
    background: var(--light-color);
}

.faq-question[aria-expanded="true"] {
    background: var(--light-color);
    border-bottom: 1px solid var(--border-color);
}

.faq-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: bold;
    transition: transform 0.3s ease;
}

.faq-question[aria-expanded="true"] .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    display: none;
    padding: 1.5rem;
    background: white;
    border-top: 1px solid var(--border-color);
}

.faq-answer p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-heavy);
    animation: modalSlideIn 0.3s ease-out;
}

.modal-header {
    padding: 1.5rem 2rem 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: var(--primary-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--light-color);
    color: var(--primary-color);
}

.modal-body {
    padding: 1.5rem 2rem;
}

.modal-footer {
    padding: 1rem 2rem 1.5rem;
    border-top: 1px solid var(--border-color);
    text-align: right;
}

.modal-button {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-button:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

/* Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .tax-breakdown {
        grid-template-columns: 1fr;
    }
    
    .calculation-flow {
        flex-direction: column;
    }
    
    .calc-arrow {
        transform: rotate(90deg);
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 3rem 0;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .hero-section p {
        font-size: 1.1rem;
    }
    
    .calculator-card {
        padding: 1.5rem;
        border-radius: 12px;
    }
    
    .form-grid {
        gap: 1rem;
    }
    
    .input-field, .select-field {
        padding: 0.875rem;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .payroll-summary {
        grid-template-columns: 1fr;
    }
    
    .summary-card .amount {
        font-size: 1.5rem;
    }
    
    .pay-stub {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .pay-stub-grid {
        grid-template-columns: 2fr 1fr;
        gap: 0.25rem;
    }
    
    .pay-stub-section h4 {
        margin: 0 -1rem 1rem;
    }
    
    .related-grid, .tax-categories, .rates-grid, .w4-steps, .frequency-examples, .employer-taxes {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .modal-header, .modal-body, .modal-footer {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (max-width: 480px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .calculator-card {
        padding: 1rem;
    }
    
    .section-header h3 {
        font-size: 1.25rem;
    }
    
    .summary-card {
        padding: 1rem;
    }
    
    .summary-card .amount {
        font-size: 1.25rem;
    }
    
    .breakdown-body {
        padding: 1rem;
    }
    
    .pay-stub {
        font-size: 0.875rem;
    }
    
    .pay-stub-company {
        font-size: 1.25rem;
    }
    
    .category-card, .rate-card, .step-card, .employer-tax-card {
        padding: 1rem;
    }
    
    .related-card {
        padding: 1.5rem;
    }
    
    .faq-question, .faq-answer {
        padding: 1rem;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000;
        --text-secondary: #333;
    }
    
    .input-field, .select-field {
        border-width: 2px;
    }
    
    .summary-card, .category-card, .rate-card {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
} 