/* Custom Star SVGs for Consistency */
.star-rating>.star {
    background-size: 14px 14px !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    /* Full Star SVG (replacing default .star-active if applied, but default .star is blue so we override both states) */
}

/* 1. Empty Star (Orange Outline) */
.star-rating>.star.star-empty {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath fill='none' stroke='%23f60' stroke-width='1.5' d='M7 0L8.8 4.8L14 5.2L10 8.5L11.2 13.5L7 10.8L2.8 13.5L4 8.5L0 5.2L5.2 4.8L7 0Z'/%3E%3C/svg%3E") !important;
}

/* 2. Full Active Star (Orange Fill + Outline to match size) */
.star-rating>.star.star-active {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath fill='%23f60' stroke='%23f60' stroke-width='1.5' d='M7 0L8.8 4.8L14 5.2L10 8.5L11.2 13.5L7 10.8L2.8 13.5L4 8.5L0 5.2L5.2 4.8L7 0Z'/%3E%3C/svg%3E") !important;
}

/* 3. Half Star (Left Fill, Right Empty, Full Outline) */
.star-rating>.star.star-active.star-half {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cdefs%3E%3ClinearGradient id='h'%3E%3Cstop offset='50%25' stop-color='%23f60'/%3E%3Cstop offset='50%25' stop-color='transparent'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath fill='url(%23h)' stroke='%23f60' stroke-width='1.5' d='M7 0L8.8 4.8L14 5.2L10 8.5L11.2 13.5L7 10.8L2.8 13.5L4 8.5L0 5.2L5.2 4.8L7 0Z'/%3E%3C/svg%3E") !important;
}

/* Top 5 Parking Table Styles */
.top5-parking-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-header h1 {
    color: #2c5aa0;
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.page-subtitle {
    color: #666;
    font-size: 1.125rem;
    margin-bottom: 10px;
}

.parking-table-wrapper {
    overflow-x: auto;
    margin: 20px 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.top5-parking-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.top5-parking-table thead {
    background: linear-gradient(135deg, #2c5aa0 0%, #1e3a6b 100%);
    color: white;
}

.top5-parking-table th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.top5-parking-table td {
    padding: 20px 16px;
    border-bottom: 1px solid #e8e8e8;
    vertical-align: middle;
}

.top5-parking-table tr:last-child td {
    border-bottom: none;
}

.top5-parking-table tbody tr {
    transition: background 0.2s;
}

.top5-parking-table tbody tr:hover {
    background: #f8f9fa;
}

.facility-cell {
    vertical-align: middle;
}

.facility-cell-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.lot-logo {
    width: 80px;
    height: auto;
    border-radius: 4px;
    object-fit: contain;
}

.lot-name-link {
    font-weight: 600;
    color: #2c5aa0;
    text-decoration: none;
    font-size: 16px;
}

.lot-name-link:hover {
    text-decoration: underline;
}

.price-cell {
    font-size: 24px;
    font-weight: 700;
    color: #27ae60;
}

.price-label {
    display: block;
    font-size: 12px;
    color: #666;
    font-weight: 400;
    margin-top: 4px;
}

.shuttle-info {
    color: #555;
    font-size: 14px;
}

.issues-cell {
    color: #404040;
    font-size: 14px;
    font-weight: 300;
}

/* Content Section */
.content-section {
    margin: 10px 0;
    line-height: 1.7;
}

.content-section h2 {
    color: #2c5aa0;
    margin-top: 20px;
    margin-bottom: 16px;
}

.content-section p {
    margin-bottom: 10px;
    color: #333;
}

.content-section ul {
    margin: 10px 0;
    padding-left: 30px;
}

.content-section li {
    margin: 5px 0;
}

/* Responsive */
@media (max-width: 768px) {
    .page-header h1 {
        font-size: 1.8rem;
    }

    .facility-cell {
        flex-direction: column;
        align-items: flex-start;
    }

    .lot-logo {
        width: 60px;
    }

    .price-cell {
        font-size: 20px;
    }

    .top5-parking-table th,
    .top5-parking-table td {
        padding: 12px 8px;
        font-size: 13px;
    }
}

/* Sort & Filter Controls - Two Blocks */
.sort-filter-bar {
    display: flex;
    flex-wrap: nowrap;
    gap: 24px;
    align-items: flex-start;
    justify-content: space-between;
    padding: 0;
    margin-bottom: 16px;
}

.sort-controls,
.filter-controls {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sort-controls {
    align-items: flex-start;
}

.filter-controls {
    align-items: flex-end;
}

.sort-label,
.filter-label {
    font-size: 10px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sort-buttons,
.filter-buttons {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
}

.sort-btn,
.filter-btn {
    padding: 4px 10px;
    border: 1px solid #ddd;
    border-radius: 12px;
    background: transparent;
    color: #666;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.sort-btn:hover,
.filter-btn:hover {
    border-color: #999;
    color: #333;
}

.sort-btn.active,
.filter-btn.active {
    background: #555;
    color: #fff;
    border-color: #555;
}

.sort-btn .arrow {
    font-size: 8px;
    margin-left: 2px;
}

.filter-count {
    font-size: 9px;
    opacity: 0.7;
    margin-left: 2px;
}

.filter-btn.active .filter-count {
    opacity: 0.9;
}

/* Parks List Container with Loading */
.parks-list-container {
    position: relative;
    min-height: 200px;
}

.loading-overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    z-index: 10;
    justify-content: center;
    align-items: center;
}

.loading-overlay.active {
    display: flex;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #e8e8e8;
    border-top-color: #666;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.lot-item.hidden {
    display: none !important;
}

/* Responsive Sort/Filter - Stack on mobile */
@media (max-width: 768px) {

    /* Fix 1: Reduce side padding to use more screen width */
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }

    .sort-filter-bar {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .sort-controls,
    .filter-controls {
        align-items: flex-start;
    }

    /* Fix 2: Move scrollbar lower with padding-bottom */
    .filter-buttons {
        overflow-x: auto;
        max-width: 100%;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 8px;
        margin-bottom: -4px;
    }

    /* Fix 3: Add spacing between lot cards and padding inside */
    .lot-item {
        margin-bottom: 12px;
        padding-bottom: 16px;
    }

    .lot-item .col-md-3 {
        padding-bottom: 10px;
    }
}

/* Related Articles Section */
.related-articles-section {
    border-top: 1px solid #eee;
    padding-top: 30px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.related-link {
    text-decoration: none !important;
    color: inherit !important;
}

.related-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
    height: 100%;
}

.related-card:hover {
    border-color: #2c5aa0;
    box-shadow: 0 4px 12px rgba(44, 90, 160, 0.1);
    transform: translateY(-2px);
}

.related-anchor {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    line-height: 1.4;
}

.related-arrow {
    color: #2c5aa0;
    font-weight: bold;
    margin-left: 10px;
    font-style: normal;
}

@media (max-width: 768px) {
    .related-grid {
        grid-template-columns: 1fr;
    }

    .related-card {
        padding: 12px 15px;
    }
}

/* Breadcrumbs */
.breadcrumbs {
    background: #f5f5f5;
    padding: 10px 0;
    font-size: 13px;
}

.breadcrumb-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
}

.breadcrumb-list li {
    color: #666;
    list-style: none;
    list-style-image: none !important;
    margin: 0;
    padding: 0;
}

.breadcrumb-list li+li::before {
    content: "›";
    margin: 0 8px;
    color: #999;
}

.breadcrumb-list li a {
    color: #2c5aa0;
    text-decoration: none;
}

.breadcrumb-list li a:hover {
    text-decoration: underline;
}

.breadcrumb-list li[aria-current="page"] {
    color: #333;
}