/* Page-specific styles */

section.page-header{
    padding: 60px 0;
}

.comparison-section {
    padding: 0 0 60px 0;
}

/* CSS-only tabs using radio buttons (hidden) */
.tab-radio {
    display: none;
}

.comparison-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
}

.tab-label {
    padding: 15px 30px;
    background: none;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--light-text);
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
}

.tab-label:after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

/* When radio is checked, style the corresponding label */
#tab-miband:checked ~ .comparison-tabs .tab-label[for="tab-miband"],
#tab-huawei:checked ~ .comparison-tabs .tab-label[for="tab-huawei"],
#tab-amazfit:checked ~ .comparison-tabs .tab-label[for="tab-amazfit"] {
    color: var(--primary-color);
}

#tab-miband:checked ~ .comparison-tabs .tab-label[for="tab-miband"]:after,
#tab-huawei:checked ~ .comparison-tabs .tab-label[for="tab-huawei"]:after,
#tab-amazfit:checked ~ .comparison-tabs .tab-label[for="tab-amazfit"]:after {
    transform: scaleX(1);
}

/* Show the corresponding tab content when radio is checked */
.tab-content {
    display: none;
}

#tab-miband:checked ~ #miband-content,
#tab-huawei:checked ~ #huawei-content,
#tab-amazfit:checked ~ #amazfit-content {
    display: block;
}

/* Responsive styles for mobile */
@media (max-width: 768px) {
    .comparison-tabs {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        border-bottom: 1px solid var(--border-color);
        margin-bottom: 30px;
    }
    
    .tab-label {
        flex: 1 1 auto;
        min-width: 120px;
        text-align: center;
        padding: 12px 15px;
        margin: 0 5px 10px;
        border-radius: 8px 8px 0 0;
        background-color: var(--light-bg);
        font-size: 0.9rem;
    }
    
    /* Style active tab on mobile */
    #tab-miband:checked ~ .comparison-tabs .tab-label[for="tab-miband"],
    #tab-huawei:checked ~ .comparison-tabs .tab-label[for="tab-huawei"],
    #tab-amazfit:checked ~ .comparison-tabs .tab-label[for="tab-amazfit"] {
        background-color: var(--primary-color);
        color: white;
    }
    
    #tab-miband:checked ~ .comparison-tabs .tab-label[for="tab-miband"]:after,
    #tab-huawei:checked ~ .comparison-tabs .tab-label[for="tab-huawei"]:after,
    #tab-amazfit:checked ~ .comparison-tabs .tab-label[for="tab-amazfit"]:after {
        display: none;
    }
    
    /* Add some spacing between tab content sections */
    .tab-content {
        margin-bottom: 20px;
    }
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 30px;
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.comparison-table th, .comparison-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.comparison-table th {
    background-color: var(--light-bg);
    font-weight: 600;
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

.comparison-table tr:nth-child(even) {
    background-color: var(--light-bg);
}

.comparison-table td:first-child {
    font-weight: 600;
}

.comparison-table th:not(:first-child) {
    text-align: center;
}

.comparison-table td:not(:first-child) {
    text-align: center;
}

.check-icon {
    color: var(--success-color);
}

.x-icon {
    color: var(--danger-color);
}

.partial-icon {
    color: var(--warning-color);
}

.highlight-column {
    background-color: rgba(94, 114, 228, 0.05);
}

.highlight-column.header {
    background-color: var(--primary-color);
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Responsive table styles for mobile */
@media (max-width: 768px) {
    .comparison-table {
        font-size: 0.9rem;
    }
    
    .comparison-table th, 
    .comparison-table td {
        padding: 10px 8px;
    }
    
    .feature-note {
        font-size: 0.7rem;
    }
}

.feature-note {
    display: block;
    font-size: 0.8rem;
    color: var(--light-text);
    margin-top: 5px;
}

.comparison-footer {
    margin-top: 40px;
    padding: 20px;
    background-color: var(--light-bg);
    border-radius: 10px;
    font-size: 0.9rem;
    color: var(--light-text);
}

.comparison-footer p {
    margin-bottom: 5px;
}