* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #050b14;
    color: #e2e8f0;
}

.pricing-integration {
    background-color: #030510;
    /* Very dark background fallback */
    background-image:
        linear-gradient(rgba(3, 5, 16, 0.88), rgba(3, 5, 16, 0.88)),
        url('hero-bg-no-boys.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
    padding: 60px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    width: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Poppins', sans-serif;
}

.header {
    text-align: center;
    margin-bottom: 50px;

}

.header h1 {
    font-size: 2.75rem;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 16px;
}

.header h1 span {
    color: #3b82f6;
}

.header p {
    color: #94a3b8;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.table-scroll {
    width: 100%;
    overflow-x: auto;
    padding: 24px 10px;
    /* Give space for MOST POPULAR tag to show without clipping */
    max-width: 1600px;
}

.table-wrapper {
    width: 100%;
    max-width: 1200px;
    min-width: max-content; /* Ensure it expands to fit the grid-table so borders don't end early */
    margin: 0 auto;
    background-color: #0f172a;
    border-radius: 16px;
    border: 1px solid #1e293b;
    padding: 1px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.grid-table {
    display: grid;
    grid-template-columns: 24% 19% 19% 19% 19%;
    background-color: #0b1120;
    border-radius: 15px;
    position: relative;
    padding-bottom: 16px;
    min-width: 900px;
}

.highlight-backdrop {
    position: absolute;
    top: 0;
    bottom: 16px;
    /* align above the bottom padding */
    left: 43%;
    width: 19%;
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.12) 0%, rgba(37, 99, 235, 0.02) 100%);
    border: 2px solid #2563eb;
    border-radius: 16px;
    box-shadow: 0 0 30px rgba(37, 99, 235, 0.25);
    z-index: 0;
    transform: scaleY(1.02);
}

.most-popular {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background-color: #2563eb;
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 16px;
    border-radius: 12px;
    letter-spacing: 0.5px;
    z-index: 2;
    white-space: nowrap;
        top: -14px;

}

.cell {
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 1;
    font-size: 0.95rem;
    text-align: center;
    color: #cbd5e1;
}

/* Remove bottom border for the last 5 cells (the last row) */
.cell:nth-last-child(-n+5) {
    border-bottom: none;
}

.th {
    flex-direction: column;
    padding: 32px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.th-features {
    align-items: flex-start;
    justify-content: flex-end;
    font-size: 1.25rem;
    font-weight: 600;
    color: #f8fafc;
    padding-bottom: 32px;
}

.th h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #f8fafc;
    margin-bottom: 6px;
}

.th p {
    font-size: 0.85rem;
    color: #94a3b8;
}

.feature-name {
    justify-content: flex-start;
    color: #94a3b8;
    text-align: left;
}

/* Checkmark pure CSS implementation */
.check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background-color: #22c55e;
    border-radius: 50%;
}

.check::after {
    content: '';
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

/* Feature left alignment inside center-justified cells */
.traditional-feature {
    display: inline-block;
    width: 110px;
    text-align: left;
}

.cloudmate-feature {
    display: inline-block;
    width: 170px;
    text-align: left;
}

/* Dash implementation */
.dash {
    color: #475569;
    font-weight: 700;
    font-size: 1.1rem;
}

/* Pricing Cards Styles */
.container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.pricing-cards-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
    margin-bottom: 80px;
    width: 100%;
}

.pricing-card {
    background-color: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 16px;
    padding: 32px 24px;
    width: calc(25% - 18px);
    min-width: 280px;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.pricing-card:hover {
    transform: translateY(-5px);
    border-color: #3b82f6;
}

.highlighted-card {
    background-color: #1e293b;
    border: 2px solid #3b82f6;
    transform: scale(1.05);
    z-index: 1;
}

.highlighted-card:hover {
    transform: scale(1.05) translateY(-5px);
}

.pricing-card h2 {
    font-size: 1.5rem;
    color: #f8fafc;
    margin-bottom: 8px;
}

.plan-desc {
    color: #94a3b8;
    font-size: 0.95rem;
    margin-bottom: 24px;
    min-height: 44px;
}

.price {
    font-size: 2.5rem;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 8px;
    display: flex;
    align-items: flex-start;
}

.currency {
    font-size: 1.25rem;
    margin-top: 8px;
    margin-right: 4px;
    color: #cbd5e1;
    font-weight: 500;
}

.billing-term {
    font-size: 0.9rem;
    color: #94a3b8;
    margin-bottom: 4px;
}

.normal-price {
    font-size: 0.85rem;
    color: #64748b;
    text-decoration: line-through;
    margin-bottom: 24px;
    min-height: 20px;
}

.btn-primary {
    background-color: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-bottom: 32px;
    width: 100%;
}

.btn-primary:hover {
    background-color: #1d4ed8;
}

.highlighted-card .btn-primary {
    background-color: #3b82f6;
}

.highlighted-card .btn-primary:hover {
    background-color: #2563eb;
}

.features-list {
    flex-grow: 1;
}

.features-section {
    margin-bottom: 24px;
}

.features-section:last-child {
    margin-bottom: 0;
}

.features-section h3 {
    color: #e2e8f0;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
}

.features-section ul {
    list-style: none;
    padding: 0;
}

.features-section li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
    font-size: 0.95rem;
    color: #cbd5e1;
    line-height: 1.4;
}

.check-icon-blue {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background-color: rgba(59, 130, 246, 0.2);
    border-radius: 50%;
    margin-right: 12px;
    margin-top: 2px;
    flex-shrink: 0;
}

.check-icon-blue::after {
    content: '';
    width: 4px;
    height: 8px;
    border: solid #3b82f6;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

/* --- Responsive & Mobile Swipeable Design --- */
@media (max-width: 1024px) {
    .pricing-card {
        width: calc(50% - 12px);
    }

    .highlighted-card {
        transform: scale(1);
    }

    .highlighted-card:hover {
        transform: translateY(-5px);
    }

    .grid-table {
        min-width: 800px;
    }
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 2.2rem;
    }

    .pricing-card {
        width: 100%;
        max-width: 400px;
    }

    /* Horizontally Swappable Plan Column Stack */
    .table-scroll {
        padding-left: 0;
        padding-right: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        /* Scroll padding matches the new feature column width */
        scroll-padding-left: clamp(140px, 45vw, 240px);
    }

    .grid-table {
        grid-template-columns: repeat(5, clamp(140px, 45vw, 240px));
        min-width: max-content;
    }

    .th:not(.th-features), 
    .cell:not(.feature-name) {
        scroll-snap-align: start;
    }

    .th-features,
    .feature-name {
        position: sticky;
        left: 0;
        background-color: #0b1120; /* Match table background so it hides scrolling content */
        z-index: 10;
        border-right: 1px solid rgba(255, 255, 255, 0.1);
        /* Drop shadow on right, AND solid shadow on left to hide subpixel bleeds */
        box-shadow: 
            -4px 0 0 #0b1120,
            6px 0 10px -5px rgba(0,0,0,0.6);
    }

    .th-features {
        z-index: 11;
    }

    .highlight-backdrop {
        grid-column: auto;
        grid-row: auto;
        left: calc(clamp(140px, 45vw, 240px) * 2); 
        right: auto;
        top: 0;
        bottom: 0;
        transform: none; 
    }
    
    .most-popular {
        font-size: 0.7rem;
    }

    .cell {
        font-size: 20px;
        padding: 14px 10px;
    }

    .th {
        padding: 24px 12px;
    }
}

/* Compare Grid specific for 3 columns */
.grid-table.compare-grid {
    grid-template-columns: 34% 33% 33%;
    min-width: 700px;
}

.grid-table.compare-grid .cell:nth-last-child(-n+3) {
    border-bottom: none;
}

@media (max-width: 768px) {
    .grid-table.compare-grid {
        grid-template-columns: repeat(3, clamp(160px, 45vw, 240px));
        min-width: max-content;
    }
}