/* ============================================
   Homeoffice Equipment AfA-Tabelle
   Data-Rich Table and Search Interface Styles
   ============================================ */

/* ============================================
   Quick Stats Section
   ============================================ */
.quick-stats-section {
    margin-bottom: 48px;
}

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

.stat-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 2px solid #e2e8f0;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.stat-primary {
    border-color: #4299e1;
}

.stat-success {
    border-color: #48bb78;
}

.stat-info {
    border-color: #9f7aea;
}

.stat-warning {
    border-color: #ed8936;
}

.stat-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #003366;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: #718096;
    font-weight: 600;
}

/* ============================================
   Search and Filter Section
   ============================================ */
.search-filter-section {
    background: #ffffff;
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 48px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.search-container {
    max-width: 1200px;
    margin: 0 auto;
}

.search-box {
    position: relative;
    margin-bottom: 24px;
}

.search-input {
    width: 100%;
    padding: 16px 56px 16px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f7fafc;
}

.search-input:focus {
    outline: none;
    border-color: #003366;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(0, 51, 102, 0.1);
}

.search-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: #003366;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    background: #004080;
}

.filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
    margin-bottom: 20px;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
}

.filter-select {
    width: 100%;
    padding: 10px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: #003366;
    box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1);
}

.btn-reset {
    padding: 10px 20px;
    background: #e2e8f0;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-reset:hover {
    background: #cbd5e0;
}

.results-info {
    padding: 12px 16px;
    background: #f7fafc;
    border-left: 4px solid #d69e2e;
    border-radius: 8px;
    font-size: 14px;
    color: #2d3748;
}

.results-info strong {
    color: #003366;
    font-weight: 700;
}

/* ============================================
   AfA Table Section
   ============================================ */
.afa-table-section {
    margin-bottom: 48px;
}

.table-wrapper {
    overflow-x: auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 24px;
}

.afa-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.afa-table thead {
    background: linear-gradient(135deg, #003366 0%, #004080 100%);
    color: #ffffff;
}

.afa-table th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}

.afa-table th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 32px;
}

.afa-table th.sortable:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sort-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.5;
    transition: all 0.3s ease;
}

.afa-table th.sort-asc .sort-icon,
.afa-table th.sort-desc .sort-icon {
    opacity: 1;
}

.afa-table th.sort-asc .sort-icon::after {
    content: "▲";
}

.afa-table th.sort-desc .sort-icon::after {
    content: "▼";
}

.afa-table tbody tr {
    border-bottom: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.afa-table tbody tr:hover {
    background: #f7fafc;
}

.afa-table tbody tr.hidden {
    display: none;
}

.afa-table td {
    padding: 16px;
}

.afa-table td:first-child {
    font-weight: 600;
    color: #003366;
}

.category-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.category-computer {
    background: #bee3f8;
    color: #1a365d;
}

.category-furniture {
    background: #c6f6d5;
    color: #22543d;
}

.category-communication {
    background: #e9d8fd;
    color: #44337a;
}

.category-software {
    background: #fed7d7;
    color: #742a2a;
}

.category-lighting {
    background: #feebc8;
    color: #7c2d12;
}

.category-other {
    background: #e2e8f0;
    color: #2d3748;
}

.duration-highlight {
    font-weight: 700;
    color: #d69e2e;
}

.rate-value {
    font-weight: 600;
    color: #48bb78;
}

.example-calc {
    font-size: 13px;
    color: #4a5568;
}

.table-legend {
    background: #f7fafc;
    border-radius: 8px;
    padding: 20px;
}

.table-legend h4 {
    font-size: 16px;
    font-weight: 700;
    color: #003366;
    margin: 0 0 12px 0;
}

.table-legend ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.table-legend li {
    padding: 8px 0;
    font-size: 14px;
    color: #4a5568;
}

.table-legend strong {
    color: #003366;
}

/* ============================================
   Quick Calculator Section
   ============================================ */
.quick-calculator-section {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-radius: 16px;
    padding: 40px 32px;
    margin-bottom: 48px;
}

.quick-calculator-section h2 {
    text-align: center;
    margin-bottom: 12px;
}

.section-description {
    text-align: center;
    color: #4a5568;
    margin-bottom: 32px;
}

.quick-calc-form {
    max-width: 900px;
    margin: 0 auto;
}

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

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

.calc-label {
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
}

.calc-select,
.calc-input {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    background: #ffffff;
    transition: all 0.3s ease;
}

.calc-select:focus,
.calc-input:focus {
    outline: none;
    border-color: #003366;
    box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1);
}

.btn-calculate {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 32px;
    background: #003366;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 auto;
}

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

.btn-icon {
    font-size: 20px;
}

.calc-results {
    margin-top: 32px;
    animation: fadeIn 0.5s ease;
}

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

.result-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.result-header {
    background: linear-gradient(135deg, #003366 0%, #004080 100%);
    color: #ffffff;
    padding: 20px 24px;
}

.result-header h3 {
    margin: 0;
    font-size: 20px;
}

.result-body {
    padding: 24px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #f7fafc;
    border-radius: 8px;
    margin-bottom: 12px;
}

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

.result-main {
    background: linear-gradient(135deg, #d69e2e 0%, #f6ad55 100%);
}

.result-main .result-label,
.result-main .result-value {
    color: #ffffff;
}

.result-label {
    font-size: 14px;
    color: #4a5568;
    font-weight: 600;
}

.result-value {
    font-size: 20px;
    font-weight: 700;
    color: #003366;
}

.result-main .result-value {
    font-size: 28px;
}

.result-info {
    padding: 20px 24px;
    background: #f7fafc;
    border-top: 1px solid #e2e8f0;
}

.result-info p {
    margin: 0;
    font-size: 14px;
    color: #4a5568;
}

.calc-cta {
    text-align: center;
    margin-top: 24px;
}

.btn-detailed-calc {
    display: inline-block;
    padding: 12px 24px;
    background: #003366;
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-detailed-calc:hover {
    background: #004080;
    transform: translateY(-2px);
}

/* ============================================
   Key Information Section
   ============================================ */
.key-info-section {
    margin-bottom: 48px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.info-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.info-gwg {
    border-color: #ed8936;
}

.info-regular {
    border-color: #4299e1;
}

.info-mixed {
    border-color: #9f7aea;
}

.info-pool {
    border-color: #48bb78;
}

.info-icon {
    font-size: 48px;
    text-align: center;
    margin-bottom: 16px;
}

.info-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: #003366;
    margin: 0 0 12px 0;
}

.info-card p {
    font-size: 14px;
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 16px;
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-list li {
    padding: 8px 0;
    font-size: 14px;
    color: #2d3748;
}

/* ============================================
   BMF Update Section
   ============================================ */
.bmf-update-section {
    margin-bottom: 48px;
}

.update-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.update-header {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: #ffffff;
    padding: 24px 32px;
}

.update-badge {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
}

.update-header h3 {
    margin: 0;
    font-size: 24px;
}

.update-body {
    padding: 32px;
}

.comparison-table {
    margin: 24px 0;
}

.comparison-table table {
    width: 100%;
    border-collapse: collapse;
}

.comparison-table th {
    background: #f7fafc;
    padding: 12px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    border-bottom: 2px solid #e2e8f0;
}

.comparison-table td {
    padding: 12px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 14px;
}

.comparison-table td.highlight {
    background: #c6f6d5;
    color: #22543d;
    font-weight: 700;
}

.update-benefits {
    margin-top: 24px;
    padding: 20px;
    background: #f7fafc;
    border-left: 4px solid #48bb78;
    border-radius: 8px;
}

.update-benefits h4 {
    font-size: 16px;
    font-weight: 700;
    color: #003366;
    margin: 0 0 16px 0;
}

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

.update-benefits li {
    padding: 8px 0;
    font-size: 14px;
    color: #2d3748;
}

/* ============================================
   Category Details Section
   ============================================ */
.category-details-section {
    margin-bottom: 48px;
}

.category-accordion {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.accordion-item {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.accordion-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: #f7fafc;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.accordion-header:hover {
    background: #edf2f7;
}

.accordion-header.active {
    background: linear-gradient(135deg, #003366 0%, #004080 100%);
    color: #ffffff;
}

.accordion-icon {
    font-size: 24px;
    margin-right: 12px;
}

.accordion-title {
    flex: 1;
    font-size: 18px;
    font-weight: 700;
}

.accordion-toggle {
    font-size: 24px;
    font-weight: 700;
    transition: transform 0.3s ease;
}

.accordion-header.active .accordion-toggle {
    transform: rotate(45deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.accordion-content.active {
    max-height: 2000px;
}

.accordion-content > *:first-child {
    padding-top: 24px;
}

.accordion-content > *:last-child {
    padding-bottom: 24px;
}

.accordion-content p,
.accordion-content .equipment-list,
.accordion-content .software-types {
    padding-left: 24px;
    padding-right: 24px;
}

.equipment-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin: 16px 0;
}

.equipment-item {
    padding: 10px 16px;
    background: #f7fafc;
    border-left: 3px solid #d69e2e;
    border-radius: 6px;
    font-size: 14px;
    color: #2d3748;
}

.software-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin: 16px 0;
}

.software-category h4 {
    font-size: 15px;
    font-weight: 700;
    color: #003366;
    margin: 0 0 12px 0;
}

.category-note {
    padding: 16px;
    background: #fef5e7;
    border-left: 4px solid #f39c12;
    border-radius: 8px;
    font-size: 13px;
    color: #7c2d12;
    margin: 16px 24px;
}

.category-note strong {
    color: #7c2d12;
}

/* ============================================
   Examples Section
   ============================================ */
.examples-section {
    margin-bottom: 48px;
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
}

.example-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.example-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.example-header {
    background: linear-gradient(135deg, #003366 0%, #004080 100%);
    color: #ffffff;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.example-header h3 {
    margin: 0;
    font-size: 18px;
}

.example-badge {
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.badge-simple {
    background: #c6f6d5;
    color: #22543d;
}

.badge-medium {
    background: #feebc8;
    color: #7c2d12;
}

.badge-complex {
    background: #fed7d7;
    color: #742a2a;
}

.example-body {
    padding: 24px;
}

.example-data {
    margin-bottom: 20px;
}

.data-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
    font-size: 14px;
}

.data-row:last-child {
    border-bottom: none;
}

.example-calculation {
    padding: 20px;
    background: #f7fafc;
    border-radius: 8px;
}

.example-calculation h4 {
    font-size: 16px;
    font-weight: 700;
    color: #003366;
    margin: 0 0 12px 0;
}

.example-calculation p {
    font-size: 14px;
    color: #2d3748;
    line-height: 1.6;
    margin-bottom: 12px;
}

.calc-result-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: linear-gradient(135deg, #d69e2e 0%, #f6ad55 100%);
    border-radius: 8px;
    margin-top: 16px;
}

.calc-result-box span {
    color: #ffffff;
    font-size: 14px;
}

.result-amount {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
}

.calc-timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.timeline-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.timeline-item span {
    font-size: 12px;
    color: #718096;
    margin-bottom: 4px;
}

.timeline-item strong {
    font-size: 16px;
    color: #003366;
}

.example-note {
    padding: 12px;
    background: #fef5e7;
    border-left: 3px solid #f39c12;
    border-radius: 6px;
    margin-top: 16px;
}

.example-note strong {
    color: #7c2d12;
}

/* ============================================
   Tax Guide Section
   ============================================ */
.tax-guide-section {
    margin-bottom: 48px;
}

.tax-guide-content {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.guide-tabs {
    display: flex;
    background: #f7fafc;
    border-bottom: 2px solid #e2e8f0;
}

.guide-tab {
    flex: 1;
    padding: 16px 24px;
    border: none;
    background: transparent;
    font-size: 16px;
    font-weight: 600;
    color: #718096;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.guide-tab:hover {
    background: #edf2f7;
}

.guide-tab.active {
    color: #003366;
    border-bottom-color: #d69e2e;
    background: #ffffff;
}

.guide-panel {
    display: none;
    padding: 32px;
}

.guide-panel.active {
    display: block;
}

.guide-panel h3 {
    font-size: 20px;
    font-weight: 700;
    color: #003366;
    margin: 0 0 24px 0;
}

.guide-steps {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.guide-step {
    display: flex;
    gap: 20px;
}

.step-number {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #003366 0%, #004080 100%);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
}

.step-content {
    flex: 1;
}

.step-content h4 {
    font-size: 16px;
    font-weight: 700;
    color: #003366;
    margin: 0 0 8px 0;
}

.step-content p {
    font-size: 14px;
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 8px;
}

.step-content ul {
    margin: 8px 0;
    padding-left: 20px;
}

.step-content li {
    font-size: 14px;
    color: #2d3748;
    margin-bottom: 6px;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
    .afa-table {
        font-size: 13px;
    }

    .afa-table th,
    .afa-table td {
        padding: 12px 8px;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .filter-controls {
        flex-direction: column;
    }

    .filter-group {
        width: 100%;
    }

    .calc-row {
        grid-template-columns: 1fr;
    }

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

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

    .guide-tabs {
        flex-direction: column;
    }

    .guide-step {
        flex-direction: column;
    }

    .step-number {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .search-filter-section {
        padding: 20px;
    }

    .quick-calculator-section {
        padding: 24px 16px;
    }

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

    .stat-value {
        font-size: 24px;
    }

    .afa-table {
        font-size: 12px;
    }

    .afa-table th,
    .afa-table td {
        padding: 8px 4px;
    }

    .equipment-list {
        grid-template-columns: 1fr;
    }
}

