/* ===================================
   COMPARISON TABLE STYLES
   =================================== */

.comparison-section {
    margin: 3rem 0;
    padding: 2rem 0;
}

.comparison-section h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Table wrapper for horizontal scroll on mobile */
.comparison-table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 2rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    background: white;
}

/* Main comparison table */
.visual-comparison {
    width: 100%;
    min-width: 800px;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    font-size: 14px;
    border-radius: 12px;
    overflow: hidden;
}

/* Table header */
.visual-comparison thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.visual-comparison th {
    padding: 1.25rem 1rem;
    text-align: center;
    font-weight: 600;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    vertical-align: middle;
    position: relative;
}

.visual-comparison th:last-child {
    border-right: none;
}

/* Feature column (sticky on mobile) */
.visual-comparison th.feature-col {
    text-align: left;
    background: linear-gradient(135deg, #4c51bf 0%, #5a379b 100%);
    min-width: 140px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: sticky;
    left: 0;
    z-index: 10;
}

/* Platform column headers */
.platform-col {
    min-width: 130px;
}

.platform-col.current-platform {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

/* Platform header content */
.platform-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.platform-header-link {
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease;
}

.platform-header-link:hover .platform-header {
    transform: scale(1.05);
}

/* Logo styling */
.platform-logo-img {
    height: 45px;
    width: auto;
    max-width: 100px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    transition: transform 0.2s ease;
}

.platform-header:hover .platform-logo-img {
    transform: scale(1.1);
}

/* Platform name */
.platform-name {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.025em;
}

/* Current badge */
.current-badge {
    background: rgba(255, 255, 255, 0.9);
    color: #059669;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Table body */
.visual-comparison tbody tr {
    transition: background-color 0.15s ease;
}

.visual-comparison tbody tr:nth-child(even) {
    background-color: #f9fafb;
}

.visual-comparison tbody tr:hover {
    background-color: #e0e7ff;
}

/* Table cells */
.visual-comparison td {
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
    border-right: 1px solid #e5e7eb;
    vertical-align: middle;
    font-size: 14px;
}

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

/* Feature name column (sticky) */
.visual-comparison td.feature-name {
    text-align: left;
    font-weight: 600;
    color: #374151;
    background: #f9fafb;
    font-size: 13px;
    position: sticky;
    left: 0;
    z-index: 5;
    border-right: 2px solid #e5e7eb;
}

/* Data cells */
.visual-comparison td.data-cell {
    color: #4b5563;
}

/* Checkmarks and crosses */
.check {
    color: #10b981;
    font-size: 1.5rem;
    font-weight: bold;
    display: inline-block;
    animation: checkPulse 0.3s ease;
}

.cross {
    color: #ef4444;
    font-size: 1.5rem;
    font-weight: bold;
    display: inline-block;
}

/* Pricing styling */
.pricing {
    font-weight: 700;
    color: #6366f1;
    font-size: 16px;
}

/* Star ratings */
.visual-comparison .star-rating {
    color: #f59e0b;
    font-size: 16px;
}

/* Comparison tip */
.comparison-tip {
    margin: 2rem 0;
    padding: 1.25rem;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-left: 4px solid #0ea5e9;
    border-radius: 0 8px 8px 0;
    color: #0c4a6e;
    font-size: 14px;
    line-height: 1.6;
}

.comparison-tip strong {
    color: #0284c7;
    font-weight: 700;
}

/* Animations */
@keyframes checkPulse {
    0% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .comparison-section {
        margin: 2rem 0;
        padding: 1rem 0;
    }
    
    .comparison-section h2 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .comparison-table-wrapper {
        margin: 1rem -1rem;
        border-radius: 0;
        box-shadow: none;
        border-top: 1px solid #e5e7eb;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .visual-comparison {
        min-width: 650px;
        font-size: 12px;
        border-radius: 0;
    }
    
    .visual-comparison th {
        padding: 0.75rem 0.5rem;
        font-size: 12px;
    }
    
    .visual-comparison td {
        padding: 0.625rem 0.5rem;
        font-size: 12px;
    }
    
    .platform-logo-img {
        height: 35px;
    }
    
    .platform-name {
        font-size: 12px;
    }
    
    .current-badge {
        font-size: 9px;
        padding: 2px 6px;
    }
    
    .check,
    .cross {
        font-size: 1.25rem;
    }
    
    .pricing {
        font-size: 14px;
    }
    
    /* Add scroll indicator */
    .comparison-table-wrapper::after {
        content: "← Scroll horizontally to see all platforms →";
        display: block;
        text-align: center;
        padding: 0.75rem;
        color: #6b7280;
        font-size: 11px;
        font-style: italic;
        background: linear-gradient(90deg, transparent, rgba(249, 250, 251, 0.9), transparent);
    }
}

/* Ultra-small devices */
@media (max-width: 375px) {
    .visual-comparison {
        min-width: 600px;
        font-size: 11px;
    }
    
    .visual-comparison th,
    .visual-comparison td {
        padding: 0.5rem 0.375rem;
        font-size: 11px;
    }
    
    .platform-logo-img {
        height: 30px;
    }
    
    .platform-name {
        font-size: 11px;
    }
    
    .check,
    .cross {
        font-size: 1.125rem;
    }
}

/* Print styles */
@media print {
    .comparison-table-wrapper {
        overflow: visible;
        box-shadow: none;
    }
    
    .visual-comparison {
        min-width: 100%;
    }
    
    .comparison-table-wrapper::after {
        display: none;
    }
}