:root {
    /* Core Palette - Premium Blue */
    --h: 221;
    --primary: hsl(var(--h), 83%, 53%);
    --primary-light: hsl(var(--h), 83%, 65%);
    --primary-dark: hsl(var(--h), 83%, 40%);
    
    /* Backgrounds */
    --bg-main: hsl(210, 40%, 98%);
    --bg-surface: hsl(0, 0%, 100%);
    --bg-glass: hsla(0, 0%, 100%, 0.7);
    
    /* Text */
    --text-header: hsl(221, 39%, 11%);
    --text-body: hsl(215, 16%, 47%);
    --text-muted: hsl(215, 13%, 63%);
    
    /* Decoration */
    --border: hsla(214, 32%, 91%, 1);
    --border-glass: hsla(0, 0%, 100%, 0.5);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    
    /* Shadows - Layered for depth */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    
    /* Glass Effect */
    --glass-blur: blur(12px);

    /* Fuel Semantic Colors */
    --color-gazole: #f59e0b; /* Amber 600 */
    --color-essence: #10b981; /* Emerald 500 */
    --color-elec: #0ea5e9; /* Sky 500 */
    
    /* Light variants for tags */
    --bg-gazole: #fffbeb;
    --bg-essence: #ecfdf5;
    --bg-elec: #f0f9ff;
}

/* Base resets & typography */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', system-ui, -apple-system, sans-serif;
    color: var(--text-body);
    background-color: var(--bg-main);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
.site-header {
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-glass);
    padding: 1.25rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 1.75rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    letter-spacing: -0.05em;
    text-transform: uppercase;
}

.main-nav a {
    color: var(--text-header);
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95rem;
}

.main-nav a:hover {
    color: var(--primary);
    transform: translateY(-1px);
}

/* Ads */
.ad-zone {
    background: var(--bg-main);
    border: 1px dashed var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.875rem;
    margin: 1rem auto;
}

.ad-header {
    width: 728px;
    height: 90px;
    max-width: 100%;
}

.ad-sidebar {
    width: 300px;
    height: 250px;
}

.ad-in-feed {
    width: 300px;
    height: 250px;
    margin: 1rem auto;
}

/* Main */
.site-main {
    flex: 1;
    padding: 2rem 0;
}

/* Hero Section */
.hero-section {
    padding: 8rem 1rem 6rem;
    text-align: center;
    background: 
        radial-gradient(at 0% 0%, hsla(221, 83%, 93%, 1) 0, transparent 50%), 
        radial-gradient(at 100% 100%, hsla(221, 83%, 93%, 1) 0, transparent 50%);
    position: relative;
    overflow: hidden;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    color: var(--text-header);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-body);
    max-width: 650px;
    margin: 0 auto 3.5rem;
}

.search-box {
    max-width: 700px;
    margin: 0 auto;
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-glass);
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.search-form {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 600px) {
    .search-form {
        flex-direction: column;
    }
}

.search-input {
    flex: 1;
    padding: 1rem 1.25rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    color: var(--text-header);
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px hsla(var(--h), 83%, 53%, 0.1);
    background: white;
}

.btn-primary, .btn-secondary, .btn-tel {
    padding: 0.875rem 1.75rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 12px hsla(var(--h), 83%, 53%, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px hsla(var(--h), 83%, 53%, 0.4);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    background: var(--bg-surface);
    color: var(--text-header);
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.btn-secondary:hover {
    background: var(--bg-main);
    border-color: var(--primary-light);
}

.btn-tel {
    background: var(--bg-surface);
    color: var(--primary);
    border: 1px solid var(--primary);
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-tel:hover {
    background: var(--primary);
    color: white;
}

.no-tel {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Results layout */
.layout-with-sidebar {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.main-content {
    flex: 1;
    min-width: 0;
}

@media (max-width: 900px) {
    .layout-with-sidebar {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        display: flex;
        justify-content: center;
    }
}

.results-header {
    margin-bottom: 2rem;
}

.results-header h2 {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--text-header);
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
}

.seo-context {
    color: var(--text-body);
    font-size: 1.15rem;
}

.seo-context strong {
    color: var(--primary);
    font-size: 1.25rem;
    font-weight: 900;
}
.seo-context span {
    font-weight: 600;
}

.filters-section {
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
    box-shadow: var(--shadow-md);
    margin-bottom: 2.5rem;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.filter-group select {
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    background-color: var(--bg-surface);
    outline: none;
    cursor: pointer;
}
.filter-group select:focus {
    border-color: var(--primary);
}

/* Table */
.table-container {
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    overflow-x: auto;
    border: 1px solid var(--border);
}

.results-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    text-align: left;
}

.results-table th, .results-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.results-table th {
    background: var(--bg-main);
    font-weight: 800;
    color: var(--text-header);
    white-space: nowrap;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
}

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

.results-table tbody tr {
    transition: background-color 0.2s;
}
.results-table tbody tr:hover {
    background-color: #f1f5f9;
}

.price-badge {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    color: #065f46;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-weight: 900;
    font-size: 1.2rem;
    display: inline-block;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(5, 150, 105, 0.1);
}

.d-mobile-only {
    display: none;
}

@media (max-width: 768px) {
    .d-mobile-only {
        display: table-row;
    }
    .ad-header {
        width: 100%;
        height: auto;
        min-height: 50px;
    }
    .results-table th, .results-table td {
        padding: 0.75rem 0.5rem;
    }
}

.no-results {
    background: var(--bg-surface);
    padding: 3rem;
    border-radius: var(--radius-md);
    text-align: center;
    color: var(--text-muted);
}

/* Footer */
.site-footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    padding: 4rem 0;
    text-align: center;
    color: var(--text-muted);
}

.site-footer p {
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
}

.footer-links a {
    color: var(--text-body);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary);
}

/* Top Centres Section (Home) */
.top-centres-section {
    padding: 4rem 0;
    background-color: #f1f5f9;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-header);
}

.top-centres-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.centre-card {
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-glass);
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.centre-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    opacity: 0;
    transition: opacity 0.3s;
}

.centre-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.centre-card:hover::after {
    opacity: 1;
}

.centre-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.centre-card-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-header);
}

.price-tag {
    background-color: #dcfce7;
    color: #166534;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-weight: 800;
    font-size: 1.25rem;
    white-space: nowrap;
}

.centre-card-location {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.centre-card-address {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex: 1;
}

.btn-outline {
    display: block;
    text-align: center;
    padding: 0.75rem;
    border: 2px solid var(--primary);
    border-radius: var(--radius-sm);
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    transition: all 0.2s;
}

.btn-outline:hover {
    background-color: var(--primary);
    color: white;
}

/* Fuel Comparison Grid */
.fuel-comparison-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.fuel-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.fuel-col-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-header);
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--border);
    margin-bottom: 0.5rem;
}

.top-centres-grid-v2 {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.centre-card.mini-card {
    padding: 1.5rem;
}

.centre-card.mini-card h3 {
    font-size: 1.1rem;
}

/* Fuel Semantic Themes */
.fuel-col-gazole .fuel-col-title { border-color: var(--color-gazole); }
.fuel-col-gazole .price-tag { background: var(--bg-gazole); color: var(--color-gazole); }
.fuel-col-gazole .centre-card::after { background: var(--color-gazole); }

.fuel-col-essence .fuel-col-title { border-color: var(--color-essence); }
.fuel-col-essence .price-tag { background: var(--bg-essence); color: var(--color-essence); }
.fuel-col-essence .centre-card::after { background: var(--color-essence); }

.fuel-col-elec .fuel-col-title { border-color: var(--color-elec); }
.fuel-col-elec .price-tag { background: var(--bg-elec); color: var(--color-elec); }
.fuel-col-elec .centre-card::after { background: var(--color-elec); }

@media (max-width: 1024px) {
    .fuel-comparison-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Results Page Enhancements */
.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

#map-container {
    transition: all 0.3s ease;
}

.sortable {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s;
}

.sortable:hover {
    background-color: #cbd5e1 !important;
}

.sortable svg {
    margin-left: 5px;
    opacity: 0.5;
}

.sortable.asc svg, .sortable.desc svg {
    opacity: 1;
    color: var(--primary);
}

/* Breadcrumbs */
.breadcrumbs-container {
    padding-top: 1rem;
    padding-bottom: 0;
}

.breadcrumbs ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.breadcrumbs li {
    display: flex;
    align-items: center;
}

.breadcrumbs a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs .separator {
    margin: 0 0.5rem;
    color: var(--border);
}

@media (max-width: 600px) {
    .breadcrumbs-container {
        display: none;
    }
}

/* Centre Detail Page */
.centre-detail-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 3rem;
    gap: 2rem;
}

.centre-detail-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.centre-location {
    font-size: 1.25rem;
    color: var(--text-muted);
}

.cta-btn {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
}

.prices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.price-card {
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    padding: 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    text-align: center;
    border: 1px solid var(--border-glass);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.price-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary);
}

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

.price-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.price-value {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-header);
}

.chart-section {
    background: var(--bg-surface);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    margin-bottom: 4rem;
}

.chart-header {
    margin-bottom: 2rem;
}

.chart-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
}

.chart-container-inner {
    height: 400px;
    position: relative;
}

.centre-info-footer {
    margin-top: 4rem;
    padding: 2rem 0;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .centre-detail-header-flex {
        flex-direction: column;
        gap: 1.5rem;
    }
    .centre-detail-header h1 {
        font-size: 2rem;
    }
    .chart-section {
        padding: 1.5rem;
    }
    .chart-container-inner {
        height: 300px;
    }
}

/* Stats Dashboard */
.stats-section {
    padding: 5rem 0;
    background: white;
    position: relative;
    z-index: 10;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 3rem;
    text-align: center;
}

.stat-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 2rem;
    transition: transform 0.3s;
}

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

.stat-value {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--text-header);
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.stat-card.highlight {
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-glass);
    box-shadow: var(--shadow-lg);
}

.stat-card.highlight .stat-value {
    color: var(--primary);
}

/* Dept Cards */
.depts-section {
    padding: 6rem 0;
    background: var(--bg-main);
}

.depts-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    justify-content: center;
    margin-top: 3rem;
}

.dept-badge {
    background: var(--bg-surface);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-sm);
}

.dept-badge:hover {
    transform: translateY(-4px) scale(1.05);
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    z-index: 1;
}

.dept-code {
    background: var(--primary);
    color: white;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-weight: 800;
    font-size: 0.95rem;
    box-shadow: 0 4px 6px hsla(var(--h), 83%, 53%, 0.2);
}

.dept-price {
    font-weight: 800;
    color: var(--text-header);
    font-size: 1.25rem;
    letter-spacing: -0.01em;
}

/* Scroll to Top */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3.5rem;
    height: 3.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 99;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-5px);
    box-shadow: 0 15px 30px -5px hsla(var(--h), 83%, 53%, 0.4);
}
