/* ========================================= */
/* --- TABLE CONTAINERS AND RESPONSIVE FIXES --- */
/* ========================================= */

 
  .navmenu .active {
    color: #ffffff;
  }

  .sitename{
    color: #0f9b32;
  }

  .main {
    margin-top: 100px;
  }
/* --- Container and Title --- */
.table-container {
    /* FIX: Increased max-width and added width for better desktop usage */
    max-width: 900px;
    width: 90%; 

    /* FIX: Reduced top margin for better spacing with the page header */
    margin: 15px auto 40px auto; 

    background-color: #ffffff;
    padding: 25px;
    /* Nice Border Design (Rounded corners and shadow) */
    border-radius: 15px;
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.1);
    border: 3px solid #0f9b32; /* Gombe Line Accent Green */
    overflow-x: auto; /* Ensures table scrolls if it exceeds max-width */
    box-sizing: border-box; /* Ensures padding/border don't affect total width */
}

.table-title {
    text-align: center;
    color: #333;
    margin-bottom: 25px;
    font-weight: 600;
    /* Added alignment for the bus icon */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Optional: Icon for the title */
.table-title::before {
    content: "🚌"; 
    font-size: 1.2em;
}

/* --- Table Styling (Desktop/General) --- */
.responsive-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed; /* Helps with fixed column widths */
}

/* 🎯 FIX: Set a fixed, small width for the first column (SN) */
.responsive-table th:first-child,
.responsive-table td:first-child {
    width: 8%; /* SN column width */
    text-align: center;
}

/* Ensure the Route column takes the majority of the remaining space */
.responsive-table th:nth-child(2),
.responsive-table td:nth-child(2) {
    width: 60%; 
}
/* The Cost column (3rd child) automatically takes the remaining space */

.responsive-table thead th {
    background-color: #0f9b32; /* Darker Green Header */
    color: #fff;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.responsive-table tbody tr {
    background-color: #f9f9f9;
    border-bottom: 1px solid #ddd;
    transition: background-color 0.3s ease;
}

.responsive-table tbody tr:hover {
    background-color: #e6ffe6; /* Light green hover effect */
}

.responsive-table tbody td {
    padding: 15px;
    text-align: left;
    color: #555;
}

/* Highlight the Cost column */
.responsive-table tbody tr td:last-child {
    font-weight: 600;
    color: #d9534f; /* Red color for cost */
}

/* Specific border for the table (inside the container's border) */
.responsive-table th:first-child {
    border-top-left-radius: 10px;
}

.responsive-table th:last-child {
    border-top-right-radius: 10px;
}


/* --- Responsive Adjustments (Mobile View) --- */
@media screen and (max-width: 600px) {

    .table-container {
        width: 95% !important; 
        padding: 15px !important;
        margin-top: 20px !important;
    }

    .responsive-table thead {
        display: none !important; /* Hide table header on small screens */
    }

    .responsive-table,
    .responsive-table tbody,
    .responsive-table tr,
    .responsive-table td {
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .responsive-table tr {
        margin-bottom: 15px !important;
        border: 1px solid #ccc !important;
        border-radius: 8px !important;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05) !important;
        padding: 10px !important;
    }

    /* GUARANTEED FIX: Force Content Separation and Visibility */
    .responsive-table td {
        text-align: left !important;
        
        /* *** CRITICAL FIX: Increased and forced padding-left to clear label *** */
        padding: 5px 10px 5px 150px !important; 
        
        position: relative !important;
        border-bottom: 1px dotted #ccc !important;
        min-height: 40px !important;
        line-height: 1.4 !important;
        white-space: normal !important;
        
        /* CRITICAL FIX: Use flex to enforce layout and clear internal conflicts */
        display: flex !important; 
        align-items: center !important; 
    }

    /* Label Styling (SN, Route, Cost) */
    .responsive-table td::before {
        content: attr(data-label) !important;
        position: absolute !important;
        left: 10px !important;
        
        /* *** CRITICAL FIX: Forced width for the label to reserve space *** */
        width: 130px !important; 
        
        top: 50% !important; 
        transform: translateY(-50%) !important; 
        white-space: nowrap !important;
        text-align: left !important;
        font-weight: 600 !important;
        color: #0f9b32 !important; 
        padding-right: 10px !important;
    }

    /* Ensure the price is strongly visible */
    .responsive-table tbody tr td:last-child {
        font-weight: 700 !important;
        color: #d9534f !important;
    }

    /* Remove separator on the last item within the card (Cost) */
    .responsive-table tr td:last-child {
        border-bottom: none !important;
    }
}