/* =========================
   Base / Global
========================= */

body{
    margin:0;
    font-family:Arial,sans-serif;
    background:#ffffff;
    color:#333;
}

h1,h2,h3{
    text-align:center;
    background:#ffffff;
}

h3{
    color:#7a7a7a;
}

/* =========================
   Page Layout
========================= */

.page-container{
    max-width:900px;
    margin:40px auto;
    padding:20px;
}

.content-card{
    background:#fff;
    border-radius:12px;
    padding:30px;
    box-shadow:0 4px 14px rgba(0,0,0,0.08);
    margin-bottom:20px;
}

.content-card h1{
    margin:0 0 20px;
}

.content-card p{
    line-height:1.6;
    margin-bottom:16px;
}

/* =========================
   Header
========================= */

.site-header{
    background:#fff;
    position:relative;
}

/* Header container */
.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between; /* logo left, hamburger right on mobile */
    position: relative;
    padding: 10px 20px;
    flex-wrap: wrap; /* allow menu to drop below on mobile */
}

/* Logo */
.logo img {
    height: 5rem;
}

/* Hamburger */
.hamburger {
    border: none;
    background: none;
    cursor: pointer;
    z-index: 1000;
}

/* Hamburger lines */
.hamburger span {
    display: block;
    width: 34px;
    height: 3px;
    background: #333;
    margin: 6px 0;
    border-radius: 2px;
    transition: 0.3s;
}

/* Mobile menu (default hidden) */
.nav-menu {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}

.nav-menu.active {
    display: flex;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-size: 18px;
    font-weight: 500;
    padding: 6px 10px;
    border-radius: 6px;
}

.nav-menu a:hover {
    background: #f5f5f5;
}

/* =========================
   Desktop
========================= */
@media (min-width: 768px) {

    /* Hide hamburger */
    .hamburger {
        display: none;
    }

    /* Header container remains flex */
    .header-container {
        justify-content: flex-start; /* logo left */
    }

    /* Center the menu in page using absolute */
    .nav-menu {
        display: flex;
        flex-direction: row;
        justify-content: center;
        gap: 20px;

        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        top: 50%;
        transform: translate(-50%, -50%); /* center vertically too */
        width: auto;
        margin-top: 0;
        background: none;
    }
}

.logo img{
    height: 5rem;
}

/* Hamburger */

.hamburger{
    position:absolute;
    right:20px;
    top:50%;
    transform:translateY(-50%);
    width:34px;
    height:26px;
    border:none;
    background:none;
    cursor:pointer;
    z-index:1000;
}

.hamburger span{
    position:absolute;
    left:0;
    width:100%;
    height:3px;
    background:#333;
    border-radius:2px;
    transition:.3s;
}

.hamburger span:nth-child(1){top:0;}
.hamburger span:nth-child(2){top:11px;}
.hamburger span:nth-child(3){top:22px;}

.hamburger.active span:nth-child(1){
    top:11px;
    transform:rotate(45deg);
}

.hamburger.active span:nth-child(2){
    opacity:0;
}

.hamburger.active span:nth-child(3){
    top:11px;
    transform:rotate(-45deg);
}

/* Default: hidden for mobile, flex-direction column */
.nav-menu {
    display: none;
    flex-direction: column;
    align-items: center;
    background: #ffffff;
    padding: 18px 0;
    gap: 22px;
}

/* Active (hamburger clicked) for mobile */
.nav-menu.active {
    display: flex;
}

/* Desktop styles */
@media (min-width: 768px) {
    .nav-menu {
        display: flex;          /* Show menu always */
        flex-direction: row;    /* Horizontal layout */
        justify-content: center;
        background: none;       /* Remove mobile background */
        padding: 0;             /* Remove mobile padding */
        gap: 20px;              /* Space between links */
    }

    /* Hide hamburger on desktop */
    .hamburger {
        display: none;
    }
}

.nav-menu a{
    text-decoration:none;
    color:#333;
    font-size:18px;
    font-weight:500;
    padding:6px 10px;
    border-radius:6px;
}

.nav-menu a:hover{
    background:#f5f5f5;
}

/* =========================
   Footer
========================= */

.site-footer{
    background:#4d4d4d;
    color:#fff;
    margin-top:40px;
}

.footer-container{
    max-width:1200px;
    margin:auto;
    padding:40px 20px;
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:40px;
}

.footer-column h3{
    margin-top:0;
}

.footer-column h4{
    margin-bottom:10px;
}

.footer-column ul{
    list-style:none;
    padding:0;
    margin:0;
}

.footer-column li{
    margin-bottom:6px;
}

.footer-column a{
    color:#d1d5db;
    text-decoration:none;
}

.footer-column a:hover{
    color:#fff;
}

.footer-divider{
    border:none;
    border-top:1px solid #a0a0a0;
    margin:0;
}

.footer-bottom{
    text-align:center;
    padding:15px;
    font-size:.9em;
    color:#9ca3af;
    opacity:.9;
}

/* =========================
   Search Controls
========================= */

#controls{
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    gap:10px;
    padding:10px;
}

#controls input,
#controls select{
    background:#f0f0f0;
    border:none;
    border-radius:8px;
    padding:10px;
    font-weight:bold;
    cursor:pointer;
}

#controls button{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:6px;
    background:#1e90ff;
    color:#fff;
    border:none;
    border-radius:8px;
    padding:10px;
    font-weight:bold;
    cursor:pointer;
    min-height:44px;
}

#controls button:hover{
    background:#187bdb;
}

#controls button:active{
    transform:scale(.97);
}

/* =========================
   Map Layout
========================= */

#main{
    display:flex;
    height:65vh;
}

#map{
    width:60%;
    margin-left:1%;
    height:65vh;
}

#results{
    width:40%;
    overflow-y:auto;
    margin-left:1%;
    margin-right: 1%;
    
}

/* =========================
   Station Cards
========================= */

.station-card {
    border: 1px solid #ddd;
    border-radius: 10px;
    margin-bottom: 10px;
    padding: 10px;
    cursor: pointer;
    background: #fff;
    transition: 0.2s;
}

.station-card:hover {
    background: #f9f9f9;
}

.card-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.station-logo {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.station-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.station-info {
    flex: 1;
    margin-left: 12px;
    margin-right: 6px;
    min-width: 0;
}

.station-name {
    font-weight: bold;
    font-size: 16px;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.station-price {
    box-shadow: inset 0 0 5px rgba(0,0,0,0.5);
}

.station-location {
    font-size: 13px;
    color: #666;
}

.station-price {
    background: #111;
    color: rgb(255, 238, 0);
    padding: 6px 10px;
    border-radius: 6px;
    font-family: monospace;
    min-width: 90px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    line-height: 1.1;
}

.station-price.cheapest {
    background: #0a0;
    color: #fff;
}

.fuel-type {
    font-size: 10px;
    color: #666;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.price-value {
    font-size: 22px;
    font-weight: bold;
}

.price-decimal {
    font-size: 11px;
    position: relative;
    top: -8px;
    left: 2px;
}

.price-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.station-updated {
    font-size: 10px;
    color: #666;
    margin-top: 4px;
}


/* =========================
   Responsive
========================= */

@media (max-width:768px){

    .content-card{
        padding:20px;
    }

    .footer-container{
        grid-template-columns:1fr;
        gap:25px;
        text-align:center;
    }

    .nav-menu{
        flex-direction:column;
    }

    #controls{
        display:grid;
        grid-template-columns:1fr 1fr;
    }

    #controls input,
    #controls button{
        grid-column:1/-1;
    }

    #main{
        flex-direction:column;
        height:auto;
    }

    #map{
        width:98%;
        height:40vh;
    }

    #results{
        width:100%;
        border-left:none;
    }
}

@media (min-width:768px){
    .nav-menu{
        flex-direction:row;
        justify-content:center;
    }
}

/* =========================
   How it works section
========================= */

.how-it-works{
    max-width:900px;
    margin:20px auto;
    padding:20px;
}

.how-it-works h2{
    text-align:center;
    margin-bottom:30px;
}

.steps{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:30px;
}

.step{
    text-align:center;
}

.step-intro{
    text-align:center;
    margin-bottom:30px;
}

.step-number{
    width:70px;
    height:70px;
    margin:0 auto 15px;
    border-radius:50%;
    background:#1e90ff;
    color:white;
    font-size:32px;
    font-weight:bold;
    display:flex;
    align-items:center;
    justify-content:center;
}

.step p{
    font-size:16px;
    line-height:1.5;
}

/* Plaatsnamen */
.city-letter{
font-size:24px;
margin-bottom:10px;
border-bottom:2px solid #eee;
padding-bottom:5px;
}

.city-list{
display:grid;
grid-template-columns:repeat(auto-fill,minmax(200px,1fr));
gap:10px;
list-style:none;
padding:0;
}

.city-list li{
background:#fff;
padding:10px;
border-radius:6px;
border:1px solid #ddd;
}

.city-list a{
text-decoration:none;
color:#333;
display:block;
}

.city-list li:hover{
background:#f5f5f5;
}

.alphabet-nav{
display:flex;
flex-wrap:wrap;
gap:8px;
margin-bottom:20px;
justify-content: center;
}

.alphabet-nav a{
background:#fff;
border:1px solid #ddd;
padding:6px 10px;
border-radius:4px;
text-decoration:none;
color:#333;
font-weight:600;
}

.alphabet-nav a:hover{
background:#f5f5f5;
}

.city-letter{
font-size:24px;
margin-bottom:10px;
border-bottom:2px solid #eee;
padding-bottom:5px;
}

.station-updated {
    font-size: 12px;
    color: #777;
    margin-top: 4px;
}