/* Apple-inspired competition table styles */
.competition-section {
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.competition-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 80%, rgba(0, 114, 227, 0.03), transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(103, 58, 183, 0.03), transparent 50%);
    z-index: 0;
}

.competition-section .container {
    position: relative;
    z-index: 1;
}

.competition-section h2 {
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 1.5rem;
    font-size: 3rem;
    background: linear-gradient(90deg, #fff, #bbb);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
}

.competition-section .lead {
    color: #86868b;
    font-size: 1.25rem;
    font-weight: 400;
    margin-bottom: 2rem;
    line-height: 1.5;
}

/* Competition Table Container */
.competition-table-container {
    max-width: 100%;
    margin: 0 auto;
}

.competition-table {
    background: rgba(30, 30, 32, 0.8);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.table-responsive {
    overflow-x: auto;
    border-radius: 20px;
}

/* Table Styles */
.comparison-table {
    width: 100%;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Override any Bootstrap table styles */
.comparison-table th,
.comparison-table td {
    border: none !important;
    position: relative;
}

.comparison-table thead th {
    background: rgba(0, 114, 227, 0.1);
    border-bottom: 2px solid rgba(0, 114, 227, 0.2);
    padding: 1.5rem 1rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.95rem;
    color: #fff;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 10;
}

.comparison-table thead th:first-child {
    text-align: left;
    border-top-left-radius: 20px;
    padding-left: 1rem;
}

.comparison-table thead th:last-child {
    border-top-right-radius: 20px;
}

.comparison-table tbody tr {
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.comparison-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
    transform: translateY(-1px);
}

.comparison-table tbody tr:last-child {
    border-bottom: none;
}

.comparison-table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 20px;
}

.comparison-table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 20px;
}

/* Amtecco Row Highlighting */
.amtecco-row {
    background: linear-gradient(90deg, rgba(0, 114, 227, 0.1), rgba(103, 58, 183, 0.1)) !important;
    border: 1px solid rgba(0, 114, 227, 0.2);
    position: relative;
}

.amtecco-row:hover {
    background: linear-gradient(90deg, rgba(0, 114, 227, 0.15), rgba(103, 58, 183, 0.15)) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 114, 227, 0.2);
}

/* Table Cells */
.comparison-table td {
    padding: 1.25rem 1rem;
    vertical-align: middle;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.comparison-table td:last-child {
    border-right: none;
}

/* Provider Column */
.provider-column {
    width: 200px;
    min-width: 200px;
    text-align: left !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

/* Specific alignment for provider column header vs content */
.comparison-table thead .provider-column {
    vertical-align: middle;
}

.comparison-table tbody .provider-column {
    vertical-align: middle;
}

.feature-column {
    width: 180px;
    min-width: 150px;
    text-align: center !important;
}

/* Feature Value Cells */
.feature-value {
    text-align: center !important;
    vertical-align: middle;
}

.provider-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-left: 0;
    margin-left: 0;
}

.provider-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #86868b;
}

.provider-logo.competitor {
    background: rgba(255, 255, 255, 0.05);
}

.amtecco-provider .provider-logo {
    background: linear-gradient(135deg, #007FFF, #673AB7);
    color: #fff;
}

.provider-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.provider-details .name {
    font-weight: 600;
    font-size: 1rem;
    color: #fff;
}

.provider-details .service-type {
    font-size: 0.8rem;
    color: #86868b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.recommended-badge {
    background: linear-gradient(45deg, #007FFF, #673AB7);
    color: #fff;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* Feature Values */
.value-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
}

.value-number {
    font-weight: 600;
    font-size: 0.95rem;
    color: #fff;
    white-space: nowrap;
}

.amtecco-value .value-number {
    color: #007FFF;
    font-weight: 700;
}

/* Value Indicators */
.value-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 0.8rem;
}

.value-indicator.best {
    background: linear-gradient(135deg, #34C759, #30D158);
    color: #fff;
    animation: glow-green 2s infinite alternate;
}

.value-indicator.good {
    background: linear-gradient(135deg, #007FFF, #0A84FF);
    color: #fff;
}

.value-indicator.average {
    background: linear-gradient(135deg, #FF9500, #FFB340);
    color: #fff;
}

.value-indicator.poor {
    background: linear-gradient(135deg, #FF3B30, #FF6961);
    color: #fff;
}

@keyframes glow-green {
    0% { box-shadow: 0 0 5px rgba(52, 199, 89, 0.5); }
    100% { box-shadow: 0 0 20px rgba(52, 199, 89, 0.8); }
}

/* Complexity Dots */
.complexity-dots {
    display: flex;
    gap: 4px;
    justify-content: center;
}

.complexity-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.complexity-dots.simple .dot.active {
    background: linear-gradient(135deg, #34C759, #30D158);
    box-shadow: 0 0 8px rgba(52, 199, 89, 0.5);
}

.complexity-dots.complex .dot.active {
    background: linear-gradient(135deg, #FF3B30, #FF6961);
    box-shadow: 0 0 8px rgba(255, 59, 48, 0.5);
}

/* Table Legend */
.table-legend {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 1.5rem;
    background: rgba(20, 20, 22, 0.8);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #86868b;
}

.legend-indicator {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
}

.legend-indicator.best {
    background: linear-gradient(135deg, #34C759, #30D158);
    color: #fff;
}

.legend-indicator.good {
    background: linear-gradient(135deg, #007FFF, #0A84FF);
    color: #fff;
}

.legend-indicator.average {
    background: linear-gradient(135deg, #FF9500, #FFB340);
    color: #fff;
}

.legend-indicator.poor {
    background: linear-gradient(135deg, #FF3B30, #FF6961);
    color: #fff;
}

/* Summary Section */
.competition-summary {
    background: rgba(30, 30, 32, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 3rem 2rem;
    text-align: center;
    margin-top: 3rem;
}

.competition-summary h3 {
    font-weight: 700;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(90deg, #fff, #bbb);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.competition-summary .lead {
    color: #86868b;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.competition-cta .btn {
    background: linear-gradient(135deg, #007FFF, #673AB7);
    border: none;
    border-radius: 12px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 127, 255, 0.3);
}

.competition-cta .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(0, 127, 255, 0.4);
    background: linear-gradient(135deg, #0A84FF, #7B68EE);
}

/* Responsive Design */
@media (max-width: 768px) {
    .competition-section h2 {
        font-size: 2rem;
    }
    
    .comparison-table {
        font-size: 0.85rem;
    }
    
    .comparison-table thead th,
    .comparison-table td {
        padding: 1rem 0.75rem;
    }
    
    .provider-column {
        width: 160px;
        min-width: 160px;
    }
    
    .feature-column {
        width: 140px;
        min-width: 120px;
    }
    
    .table-legend {
        gap: 1rem;
        padding: 1rem;
    }
    
    .legend-item {
        font-size: 0.8rem;
    }
    
    .competition-summary {
        padding: 2rem 1rem;
    }
    
    .competition-summary h3 {
        font-size: 1.8rem;
    }
}

@media (max-width: 576px) {
    .provider-info {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .provider-logo {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
    
    .table-legend {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .comparison-table thead th,
    .comparison-table td {
        padding: 0.75rem 0.5rem;
    }
}