.table-container {
    max-width: 1100px;
    margin-top: clamp(1.875rem, 0.5625rem + 7vw, 6.25rem);
}

.responsive-table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    font-size: clamp(0.625rem, 0.55rem + 0.4vw, 0.875rem);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
    /* This property ensures the table respects the container width */
    table-layout: fixed;
}

.sell-cols {
    font-size: clamp(0.875rem, 0.7556rem + 0.597vw, 1.125rem);
    font-weight: 600;
}

.responsive-table thead tr {
    background-color: #b28a58;
    color: #ffffff;
    text-align: left;
    font-family: 'Playfair Display', serif;
    font-weight: bold;
}

.responsive-table th,
.responsive-table td {
    padding: 12px 15px;
    /* This allows long words to break and wrap */
    word-wrap: break-word;
}

.responsive-table tbody tr {
    border-bottom: 1px solid #dddddd;
}

.responsive-table tbody tr:nth-of-type(even) {
    background-color: #f3f3f3;
}

.responsive-table tbody tr:last-of-type {
    border-bottom: 2px solid #b28a58;
}

td[data-label="Description"] {
    font-size: clamp(0.875rem, 0.7556rem + 0.597vw, 1.125rem);
    font-weight: 600;
}

.sub-cell-high {
    margin-top: 4px;
    font-size: 0.95em;
    color: #b28a58;
    font-weight: 500;
    display: block;
    line-height: 1.2;
    letter-spacing: 0.5px;
}

.sub-cell-high small {
    font-size: 0.95em;
    color: #b28a58;
    font-weight: 500;
}

.sub-cell-high span {
    font-weight: 400;
    color: #222;
}

@media (max-width: 399px) {
    .table-container {
        padding-left: 2px !important;
        padding-right: 2px !important;
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        /* adjust as needed to align with screen edge */
        margin-right: 0;
    }

    .responsive-table {
        width: 100%;
        min-width: 0;
    }
}

/* Responsive adjustments for small screens */
@media (max-width: 575px) {
    .sub-cell-high {
        font-size: 0.85em;
        margin-top: 2px;
    }

    .responsive-table td {
        padding-bottom: 8px;
    }
}

/* Mobile specific adjustments */
@media screen and (max-width: 768px) {
    .responsive-table {
        font-weight: 100;
        /* Adjust font size for better readability on mobile */
    }

    .responsive-table th,
    .responsive-table td {
        padding: 10px 5px;
        /* Reduce padding to give content more space */
    }
}

/* Price movement color indicators */
.up-color {
    background-color: rgba(16, 185, 129, 0.08);
    /* soft green bg */
    color: #059669;
    /* emerald green text */
    transition: background-color 250ms ease, color 250ms ease;
}

.down-color {
    background-color: rgba(239, 68, 68, 0.08);
    /* soft red bg */
    color: #dc2626;
    /* red text */
    transition: background-color 250ms ease, color 250ms ease;
}

/* Optional: make the small high-value span darker while preserving movement color */
.up-color .sub-cell-high span,
.down-color .sub-cell-high span {
    color: inherit;
}

/* Animate mobile menu open/close: use max-height + opacity for smooth transition */
#mobile-menu {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transform: translateY(-8px);
    transition: max-height 320ms ease, opacity 320ms ease, transform 320ms ease;
}

#mobile-menu.open {
    max-height: 600px;
    /* large enough to show menu items; adjust if you add more links */
    opacity: 1;
    transform: translateY(0);
}

.page-experiences {
    padding: clamp(4rem, 8vw, 7rem) max(6vw, calc((100vw - 1180px) / 2));
    background: #f1e9dc;
    color: #362419;
}

.page-experiences-heading {
    max-width: 640px;
    margin: 0 auto 2.5rem;
    text-align: center;
}

.page-experiences-heading > p,
.page-experiences-grid a > span {
    color: #9a7446;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .16em;
}

.page-experiences-heading h2 {
    margin: .8rem 0;
    color: #800000;
    font: 700 clamp(2rem, 4vw, 3.25rem)/1.1 'Playfair Display', serif;
}

.page-experiences-heading > span {
    color: #70665a;
    font-size: .95rem;
    line-height: 1.7;
}

.page-experiences-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: .85rem;
}

.page-experiences-grid a {
    min-height: 160px;
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: #fffdf8;
    border: 1px solid #e7dccb;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.page-experiences-grid a:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px #36241912;
}

.page-experiences-grid a > span {
    font-size: .56rem;
}

.page-experiences-grid strong {
    color: #362419;
    font: 600 1.1rem/1.3 'Playfair Display', serif;
}

.page-experiences-grid b {
    align-self: flex-end;
    color: #9a7446;
    font-size: 1rem;
    font-weight: 400;
}

@media (max-width: 900px) {
    .page-experiences-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .page-experiences-grid a:last-child {
        grid-column: span 2;
        min-height: 125px;
    }
}

@media (max-width: 480px) {
    .page-experiences-grid {
        grid-template-columns: 1fr;
    }

    .page-experiences-grid a,
    .page-experiences-grid a:last-child {
        min-height: 125px;
        grid-column: auto;
    }
}