/* Header Section */
.comparison-header-section {
    background: linear-gradient(135deg, var(--fp-teal) 0%, var(--fp-green) 100%);
    padding: 20px 30px;
    border-radius: 16px;
    margin-bottom: 30px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    text-align: center;
}

.comparison-header-section h1 {
    color: white;
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.comparison-header-section p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.05rem;
    margin: 0;
}

/* Mobiles Overview */
.mobiles-overview {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 30px;
    align-items: center;
    background: white;
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    margin-bottom: 40px;
}

.mobile-overview-card {
    text-align: center;
}

.mobile-image-wrapper {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 20px;
    margin-bottom: 25px;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.mobile-image-wrapper:hover {
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    transform: scale(1.02);
}

.mobile-image-wrapper img {
    max-width: 100%;
    max-height: 250px;
    object-fit: contain;
}

.mobile-details {
    padding: 0 15px;
}

.mobile-brand {
    display: inline-block;
    background: linear-gradient(135deg, var(--fp-teal) 0%, var(--fp-green) 100%);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.mobile-details h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.mobile-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--fp-red);
    margin-bottom: 20px;
    display: flex;
    align-items: baseline;
    justify-content: center;
}

.mobile-price sup {
    font-size: 1.2rem;
    margin-right: 5px;
}

.btn-view-mobile {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--fp-teal) 0%, var(--fp-green) 100%);
    color: white;
    padding: 12px 28px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(16, 119, 122, 0.3);
    transition: all 0.3s ease;
}

.btn-view-mobile:hover {
    background: linear-gradient(135deg, var(--fp-green) 0%, var(--fp-teal) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 119, 122, 0.4);
}

.vs-badge-large {
    display: flex;
    align-items: center;
    justify-content: center;
}

.vs-badge-large span {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--fp-teal) 0%, var(--fp-green) 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 800;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    animation: pulse 2s ease-in-out infinite;
}

/* Specifications Comparison Container */
.specs-comparison-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.spec-category {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    animation: fadeInUp 0.6s ease;
}

.spec-category h3 {
    background: linear-gradient(135deg, var(--fp-green) 0%, var(--fp-teal) 100%);
    color: white;
    padding: 10px 20px;
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.spec-table {
    display: flex;
    flex-direction: column;
}

.spec-row {
    display: grid;
    grid-template-columns: 2fr 3fr 3fr;
    border-bottom: 1px solid #e8e8e8;
    transition: background 0.2s ease;
}

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

.spec-row:not(.header-row):hover {
    background: #f9f9f9;
}

.header-row {
    background: #f5f5f5;
    font-weight: 700;
}

.header-row .spec-label,
.header-row .spec-value {
    color: var(--text-dark);
    font-weight: 700;
}

.spec-value {
    padding: 8px 10px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
}

.spec-label {
    padding: 10px 20px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    font-weight: 600;
    color: var(--text-dark);
    background: #fafafa;
    border-right: 2px solid #e8e8e8;
}

.spec-value {
    color: #555;
    justify-content: space-between;
}

.spec-value.better {
    background: linear-gradient(90deg, #e8f5e9 0%, transparent 100%);
    color: #2e7d32;
    font-weight: 600;
}

.spec-value.better i {
    color: #4caf50;
    font-size: 1.1rem;
}

.spec-value sup {
    font-size: 0.8rem;
    margin-right: 3px;
}

/* Mobile labels - hidden by default */
.spec-value::before {
    display: none;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 8px 30px rgba(16, 119, 122, 0.4);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .comparison-header-section h1 {
        font-size: 1.7rem;
    }
    
    .mobiles-overview {
        gap: 25px;
        padding: 30px 25px;
    }
    
    .mobile-image-wrapper {
        height: 240px;
    }
    
    .mobile-details h2 {
        font-size: 1.4rem;
    }
    
    .mobile-price {
        font-size: 1.7rem;
    }
}

@media (max-width: 768px) {
    .comparison-header-section {
        padding: 25px 20px;
        margin-bottom: 25px;
    }
    
    .comparison-header-section h1 {
        font-size: 1.4rem;
    }
    
    .comparison-header-section p {
        font-size: 0.95rem;
    }
    
    /* Keep mobiles side by side on mobile */
    .mobiles-overview {
        grid-template-columns: 1fr auto 1fr;
        gap: 15px;
        padding: 25px 15px;
        margin-bottom: 30px;
    }
    
    /* Make VS badge smaller */
    .vs-badge-large span {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    /* Adjust mobile card content */
    .mobile-image-wrapper {
        height: 180px;
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .mobile-image-wrapper img {
        max-height: 160px;
    }
    
    .mobile-brand {
        font-size: 0.7rem;
        padding: 4px 12px;
        margin-bottom: 8px;
    }
    
    .mobile-details {
        padding: 0 8px;
    }
    
    .mobile-details h2 {
        font-size: 1rem;
        margin: 0 0 10px 0;
    }
    
    .mobile-price {
        font-size: 1.3rem;
        margin-bottom: 12px;
    }
    
    .mobile-price sup {
        font-size: 0.9rem;
    }
    
    .btn-view-mobile {
        padding: 8px 16px;
        font-size: 0.85rem;
        gap: 6px;
    }
    
    .btn-view-mobile i {
        font-size: 0.85rem;
    }
    
    /* Keep table layout on tablet */
    .spec-row {
        grid-template-columns: 1.5fr 2fr 2fr;
    }
    
    .spec-label,
    .spec-value {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
    
    .spec-category h3 {
        font-size: 1.2rem;
        padding: 15px 20px;
    }
    
    .specs-comparison-container {
        gap: 25px;
    }
}

@media (max-width: 580px) {
    /* Specification tables - show mobile name with each value */
    .spec-row {
        grid-template-columns: 1fr;
        position: relative;
    }
    
    .spec-label {
        background: linear-gradient(135deg, var(--fp-green) 0%, var(--fp-teal) 100%);
        color: white;
        font-weight: 700;
        border-right: none;
        border-bottom: 2px solid white;
        padding: 12px 15px;
    }
    
    .spec-value {
        padding: 12px 15px;
        border-bottom: 1px solid #e8e8e8;
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    /* Add mobile name before each value */
    .spec-value::before {
        content: attr(data-mobile);
        display: block;
        font-size: 0.75rem;
        font-weight: 700;
        color: var(--fp-teal);
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-bottom: 3px;
    }
    
    .spec-value:nth-child(2) {
        background: #f9f9f9;
    }
    
    .spec-value:nth-child(3) {
        background: #ffffff;
    }
    
    .spec-value:last-child {
        border-bottom: none;
    }
    
    /* Adjust better indicator for mobile */
    .spec-value.better {
        background: linear-gradient(90deg, #e8f5e9 0%, #f0f0f0 100%);
    }
    
    .spec-value.better i {
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
    }
    
    /* Hide header row on mobile */
    .header-row {
        display: none;
    }
}

@media (max-width: 480px) {
    .comparison-header-section {
        padding: 20px 10px;
        border-radius: 12px;
        margin-bottom: 20px;
    }
    
    .comparison-header-section h1 {
        font-size: 1.05rem;
        line-height: 1.4;
        margin-bottom: 8px;
    }
    
    .comparison-header-section p {
        font-size: 0.8rem;
    }
    
    /* Keep side by side layout on small screens */
    .mobiles-overview {
        grid-template-columns: 1fr auto 1fr;
        padding: 15px 8px;
        gap: 8px;
        border-radius: 16px;
        margin-bottom: 25px;
    }
    
    .mobile-image-wrapper {
        height: 140px;
        padding: 8px;
        border-radius: 12px;
        margin-bottom: 10px;
    }
    
    .mobile-image-wrapper img {
        max-height: 120px;
    }
    
    .mobile-brand {
        font-size: 0.6rem;
        padding: 3px 8px;
        margin-bottom: 6px;
    }
    
    .mobile-details {
        padding: 0 5px;
    }
    
    .mobile-details h2 {
        font-size: 0.85rem;
        margin: 0 0 8px 0;
        line-height: 1.2;
    }
    
    .mobile-price {
        font-size: 1rem;
        margin-bottom: 10px;
    }
    
    .mobile-price sup {
        font-size: 0.7rem;
        margin-right: 2px;
    }
    
    .btn-view-mobile {
        padding: 6px 12px;
        font-size: 0.7rem;
        gap: 4px;
        border-radius: 20px;
    }
    
    .btn-view-mobile i {
        font-size: 0.75rem;
    }
    
    .vs-badge-large span {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
        font-weight: 700;
    }
    
    .spec-label,
    .spec-value {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
    
    .spec-value::before {
        font-size: 0.7rem;
    }
    
    .spec-category {
        border-radius: 12px;
    }
    
    .spec-category h3 {
        font-size: 1rem;
        padding: 12px 15px;
        gap: 8px;
    }
    
    .spec-category h3 i {
        font-size: 0.9rem;
    }
    
    .specs-comparison-container {
        gap: 20px;
    }
    
    .spec-value.better i {
        font-size: 1rem;
    }
}

/* Extra small screens */
@media (max-width: 360px) {
    .comparison-header-section h1 {
        font-size: 0.95rem;
    }
    
    .comparison-header-section p {
        font-size: 0.75rem;
    }
    
    .mobiles-overview {
        padding: 12px 6px;
        gap: 6px;
    }
    
    .mobile-image-wrapper {
        height: 120px;
        padding: 6px;
    }
    
    .mobile-image-wrapper img {
        max-height: 105px;
    }
    
    .mobile-details h2 {
        font-size: 0.75rem;
    }
    
    .mobile-price {
        font-size: 0.9rem;
    }
    
    .btn-view-mobile {
        padding: 5px 10px;
        font-size: 0.65rem;
    }
    
    .vs-badge-large span {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
    
    .mobile-brand {
        font-size: 0.55rem;
        padding: 2px 6px;
    }
}