/* --- 1. TABLE SETUP --- */
.subscription-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0; 
}

/* First column width */
.subscription-table .col-auto {
    width: 13%; 
}

/* Spacer column width */
.subscription-table .col-spacer {
    width: 20px;
}

/* --- 2. GENERAL CELL STYLING --- */
.subscription-table th,
.subscription-table td {
    padding: 20px;
    text-align: center;
    vertical-align: middle;
}

/* First column left-aligned */
.subscription-table th:first-child,
.subscription-table td:first-child {
    text-align: left;
    vertical-align: middle;
}

/* Spacer cells have no padding and transparent by default. */
.subscription-table .spacer-cell {
    padding: 0;
    background: transparent;
}

/* Ribbon styles */
.ribbon-wrapper { position: relative; }
.ribbon-img { 
    position: absolute; 
    top: -32px; 
    right: -50px; 
    width: 60px; 
    height: auto; 
    z-index: 2; 
}

/* --- 3. BORDERS & RADIUS --- */
/* THEAD BORDERS: Apply ONLY the top, left, and right borders. */
.subscription-table thead th:nth-child(n+2):not(.spacer-cell) {
    border-top: 1px solid var(--color-border-default);
    border-left: 1px solid var(--color-border-default);
    border-right: 1px solid var(--color-border-default);
}

/* TBODY BORDERS: Apply ONLY the left and right borders to create vertical lines. */
.subscription-table tbody td:nth-child(n+2):not(.spacer-cell) {
    border-left: 1px solid var(--color-border-default);
    border-right: 1px solid var(--color-border-default);
}

/* LAST ROW BORDER: Add the bottom border ONLY to the last row of the plans. */
.subscription-table tbody tr:last-child td:nth-child(n+2):not(.spacer-cell) {
    border-bottom: 1px solid var(--color-border-default);
}

/* BORDER RADIUS: Apply to the correct corners. This works due to 'border-collapse: separate'. */
/* Top corners on ALL plan headers */
.subscription-table thead th:nth-child(n+2):not(.spacer-cell) {
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}
/* Bottom corners on ALL plan cells in the LAST row */
.subscription-table tbody tr:last-child td:nth-child(n+2):not(.spacer-cell) {
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
}

/* --- 4. VERTICAL SPACING & ROW COLORING --- */
/* Style the empty spacer rows */
.subscription-table tbody tr.spacer-row td {
    padding: 0;
    height: 10px;
    background: transparent;
    border: none;
}
  
/* Apply background color to the ENTIRE row (tr) */
.subscription-table tbody tr:nth-child(2) {
    background-color: #ededed;
}
.subscription-table tbody tr:nth-child(4) {
    background-color: #dff9ec;
}
.subscription-table tbody tr:nth-child(6) {
    background-color: #458a67;
    color: var(--color-text-white);
}

/* Ensure text color change is inherited by all children elements in the colored row */
.subscription-table tbody tr:nth-child(6) * {
    color: var(--color-text-white);
}

.subscription-early-bird-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.subscription-early-bird-label .fa-circle-info {
    margin-left: 4px;
    flex-shrink: 0;
}

.subscription-discount-tag {
    display: inline-block;
    color: #ffd9ac;
    margin-bottom: 4px;
    padding: 5px;
    border-radius: 5px;
    background-color: var(--color-brand-secondary);
}

.subscription-discount-price {
    display: block;
}

.features-list {
    display: flex;
    flex-direction: column;
    text-align: left;
    gap: 20px;
}

.features-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.features-list li i {
    flex-shrink: 0;
    margin-top: 2px;
    font-size: 12px;
}

.subscribe-footer {
    border-top: 1px solid var(--color-border-default) !important;
}

.mobile-subscription-grid {
    display: none;
    flex-direction: column;
    gap: 20px;
}

.mobile-subscription-card {
    background-color: var(--color-bg-white);
    border-radius: 20px;
    border: 1px solid var(--color-border-default);
}

.mobile-subscription-card-header {
    background-color: var(--color-bg-secondary);
    color: var(--color-text-white);
    text-align: center;
    padding: 20px;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

.mobile-pricing-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
}

.long-term-discount {
    background-color: #dff9ec;
}

.early-bird-discount {
    background-color: #458a67;
    color: var(--color-text-white);
}

.mobile-subscription-card-body {
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding: 20px;
}

.mobile-subscription-btn {
    width: 100%;
}

/* Responsive Styles */
/* Mobile-only: 320px – 767px */
@media (max-width: 767px) {
    .mobile-subscription-grid {
        display: flex;
    }
}

/* Tablet-only: 768px – 1365px */
@media (min-width: 768px) and (max-width: 1365px) {
    .mobile-subscription-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    .mobile-subscription-grid > *:nth-last-child(1):nth-child(odd) {
        grid-column: 1 / -1;
        justify-self: center;
    }
}

/* Mobile and Tablet: 1365px below */
@media (max-width: 1365px) {
    .subscription-table {
        display: none;
    }
    
    .ribbon-img {
        top: -15px;
        right: -25px;
        width: 50px;
    }
}