/* Modern Comparison Table Styles */
.comparison-section {
    padding: 4rem 5%;
    background: linear-gradient(180deg, #f9f9f9 0%, #fff 100%);
}

.comparison-container {
    max-width: 1000px;
    margin: 0 auto;
    overflow-x: auto;
    /* Allow scroll on very small screens if needed */
}

.comparison-table {
    width: 100%;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    /* Soft shadow */
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
    /* Subtle border */
    display: flex;
    flex-direction: column;
}

/* Rows */
.row {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    /* Feature column wider */
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

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

.row:hover:not(.header-row):not(.total-row) {
    background-color: #fcfcfc;
}

/* Header Row */
.header-row {
    background: #f8faff;
    font-weight: 800;
    color: var(--text-color);
    border-bottom: 2px solid #eef2ff;
}

.header-row .col {
    padding: 1.5rem;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.header-row .buy-col {
    color: #718096;
}

.header-row .rent-col {
    color: var(--primary-color);
    position: relative;
}

/* Columns */
.col {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    font-size: 1rem;
    line-height: 1.5;
}

.feature-col {
    color: #4a5568;
    font-weight: 600;
    gap: 12px;
}

.feature-col i {
    color: var(--secondary-color);
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
    opacity: 0.8;
}

.buy-col {
    background-color: #fffafa;
    /* Very light red tint */
    font-weight: 600;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    font-size: 1.05rem;
    border-left: 1px solid #f0f0f0;
}

.rent-col {
    background-color: #f0fff4;
    /* Very light green tint */
    font-weight: 700;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    font-size: 1.1rem;
    border-left: 1px solid #f0f0f0;
    position: relative;
}

/* Visual Indicators */
.negative {
    color: #e53e3e;
    /* Red */
}

.positive {
    color: #276749;
    /* Green */
}

/* Subtext */
.sub-text {
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: 4px;
    opacity: 0.8;
}

/* Total Row */
.total-row {
    background: #fff;
    border-top: 2px solid #e2e8f0;
}

.total-row .col {
    padding: 2rem 1.5rem;
}

.total-row .feature-col {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-color);
}

.total-row .buy-col {
    font-size: 1.5rem;
    color: #718096;
    text-decoration: line-through;
    /* Strikethrough for effect? Or just grey */
    text-decoration-color: #e53e3e;
    font-weight: 700;
}

.total-row .rent-col {
    font-size: 1.8rem;
    color: var(--primary-color);
    font-weight: 800;
    background: #e6fffa;
}

/* Saving Badge */
.saving-badge {
    background: #2ecc71;
    color: white;
    font-size: 0.85rem;
    padding: 4px 10px;
    border-radius: 50px;
    margin-top: 8px;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(46, 204, 113, 0.3);
    animation: pulse-soft 2s infinite;
}

@keyframes pulse-soft {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .comparison-section {
        padding: 3rem 1rem;
    }

    .comparison-table {
        border-radius: 12px;
    }

    .row {
        grid-template-columns: 1fr 1fr;
        /* Switch to 2 columns */
        grid-template-rows: auto auto;
        /* Multiple rows per item */
        padding: 1rem;
        gap: 0.5rem;
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .col {
        padding: 0;
        border: none;
        background: transparent !important;
        /* Remove background on mobile columns */
    }

    /* Feature takes full width */
    .feature-col {
        width: 100%;
        margin-bottom: 0.8rem;
        font-size: 1rem;
    }

    .buy-col,
    .rent-col {
        width: 48%;
        /* Side by side comparison */
        align-items: center;
        /* Center align for improved mobile look */
        text-align: center;
        padding: 0.8rem;
        border-radius: 10px;
    }

    .buy-col {
        background-color: #fff5f5 !important;
        border: 1px solid #fed7d7;
    }

    .rent-col {
        background-color: #f0fff4 !important;
        border: 1px solid #c6f6d5;
    }

    .header-row {
        display: none;
        /* Hide standard header on mobile */
    }

    /* Mobile Headers */
    .buy-col::before {
        content: 'Buying';
        font-size: 0.7rem;
        text-transform: uppercase;
        color: #e53e3e;
        margin-bottom: 4px;
        font-weight: 800;
    }

    .rent-col::before {
        content: 'Renting';
        font-size: 0.7rem;
        text-transform: uppercase;
        color: #276749;
        margin-bottom: 4px;
        font-weight: 800;
    }

    .total-row {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }

    .total-row .col {
        width: 100%;
    }

    .total-row .buy-col::before {
        content: 'Total Cost (Buying)';
    }

    .total-row .rent-col::before {
        content: 'Total Cost (Renting)';
    }
}