.pricing-comparison {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.pricing-comparison h2 {
    text-align: center;
    font-size: 2rem;
    color: #333;
    margin-bottom: 10px;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 40px;
}

.the-price-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Table Wrapper for Horizontal Scroll on Mobile */
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    /* Smooth scroll on iOS */
    border-radius: 8px;
    border: 1px solid var(--clr-primary-blue);
    padding: 1rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
    /* Ensures table doesn't crush on small screens */
}

/* Header Styling */
thead th {
    background-color: var(--clr-neutral-100);
    padding: 25px;
    text-align: center;
    border-bottom: 2px solid var(--clr-neutral-100);
    vertical-align: top;
    position: relative;
}

/* The first column (Features list) */
.feature-header {
    text-align: left;
    width: 20%;
    vertical-align: middle;
    font-size: 1.1rem;
    color: var(--clr-primary-orange);
    font-family: var(--ff-secondary);
}

.plan-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #222;
    margin-bottom: 10px;
    margin-top: 10px;
}

.plan-price {
    font-size: clamp(16px, 4vw, 24px);
    font-family: var(--ff-secondary);
    color: var(--clr-primary-orange);
    font-weight: 800;
    margin-bottom: 8px;
}

.plan-desc {
    font-size: clamp(12px, 3vw, 14px);
    color: var(--clr-primary-blue);
    font-weight: 400;
    line-height: 1.4;
}

/* Highlight "Popular" Column */
th.popular {
    background-color: #fff7f0ea;
    border-top: 4px solid var(--clr-secondary-orange);
}

.badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--clr-secondary-orange);
    color: var(--clr-neutral-100);
    font-family: var(--ff-primary);
    font-size: clamp(8px, 2vw, 10px);
    font-weight: 500;
    padding: 10px 5px;
    border-radius: 20px;
    text-transform: uppercase;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Body Styling */
tbody td {
    padding: 10px 5px;
    text-align: center;
    border-bottom: 1px solid #eee;
    color: #555;
    font-size: clamp(14px, 3vw, 18px);
}

/* Left align the first column labels */
tbody td.feature-label {
    text-align: left;
    font-weight: 600;
    color: #333;
    background-color: #fff;
    /* Ensures sticky column covers scroll */
}

/* Alternate row colors for readability */
tbody tr:nth-child(even) td {
    background-color: #fcfcfc;
}

/* Highlight the popular column in the body too */
tbody tr td:nth-child(3) {
    background-color: #fffbf0;
}

tbody tr:nth-child(even) td:nth-child(3) {
    background-color: #fff8e1;
}

/* Checkmarks and Crosses */
.check {
    color: #28a745;
    font-weight: bold;
    font-size: 1.2rem;
}

.cross {
    color: #dc3545;
    font-weight: bold;
    font-size: 1.2rem;
    opacity: 0.5;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid #ddd;
    color: var(--clr-primary-blue);
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: var(--clr-primary-blue);
    color: var(--clr-neutral-100);
}

.btn-primary {
    background-color: var(--clr-secondary-orange);
    color: white;
    border-color: var(--clr-primary-blue);
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
}

.btn-primary:hover {
    background-color: var(--clr-primary-orange);
}

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 768px) {

    .pricing-comparison {
        padding: 20px 0;
    }

    .the-price-container h2 {
        font-size: 1.5rem;
    }

    /* Sticky First Column Logic */
    .table-wrapper {
        margin: 0 15px;
        box-shadow: inset -10px 0 10px -10px rgba(0, 0, 0, 0.1);
        /* Shadow hint for scrolling */
    }

    table {
        border-collapse: separate;
        /* Required for sticky to work nicely with borders */
        border-spacing: 0;
    }

    th.feature-header,
    td.feature-label {
        position: sticky;
        left: 0;
        z-index: 2;
        background-color: white;
        border-right: 2px solid #eee;
        min-width: 140px;
        /* Keep label readable */
    }

    th.feature-header {
        z-index: 3;
        /* Header needs to be higher than body rows */
    }

    /* Adjust popular highlights for sticky */
    tbody tr td:nth-child(3) {
        background-color: rgba(255, 193, 7, 0.05);
    }
}