/* Basic styling for the Budapest map site */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f8f8f8;
}

header {
  /* The default header style is no longer used for the homepage, but
     retained for secondary pages. */
  background-color: #004080;
  color: #fff;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

header .logo {
  font-size: 1.5rem;
  font-weight: bold;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1rem;
}

nav ul li a {
  color: #fff;
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  transition: background-color 0.2s ease-in-out;
}

nav ul li a:hover,
nav ul li a:focus,
nav ul li a.active {
  background-color: rgba(255, 255, 255, 0.2);
}

.hero {
  position: relative;
  background-image: url('assets/hero.png');
  background-size: cover;
  background-position: center;
  height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 95%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

.hero h1 {
  position: relative;
  z-index: 2;
  font-size: 2.5rem;
  margin: 0 0 0.5rem 0;
}

.hero p {
  position: relative;
  z-index: 2;
  font-size: 1.2rem;
  margin: 0;
}

.container {
  width: 95%;
  max-width: 1600px;
  margin: 2rem auto;
}

/* Page content card styling
 *
 * In the reference layout the area containing the page heading, map and
 * descriptive text appears on a light card with a subtle border and
 * shadow, separated from the light background.  Apply these styles to
 * any <main> element with the class container to mimic that effect.
 */
main.container {
  background-color: #ffffff;
  padding: 2rem;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  margin-top: -1rem;
}

.map-container {
  width: 95%;
  height: 400px;
  margin: 1rem 0;
  border: 2px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
}

section {
  margin-bottom: 2rem;
}

section h2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  color: #004080;
}

ul.places-list {
  list-style: none;
  columns: 2;
  column-gap: 2rem;
}

ul.places-list li {
  margin-bottom: 0.5rem;
}

ul.places-list li a {
  color: #004080;
  text-decoration: none;
}

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

footer {
  background-color: #004080;
  color: #fff;
  padding: 1rem 2rem;
  text-align: center;
}

footer nav ul {
  list-style: none;
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 0.5rem;
}

footer nav ul li a {
  color: #fff;
  text-decoration: none;
}

footer nav ul li a:hover {
  text-decoration: underline;
}

footer p.small {
  font-size: 0.9rem;
}

@media (max-width: 600px) {
  nav ul {
    flex-direction: column;
    gap: 0.5rem;
  }
  .hero h1 {
    font-size: 2rem;
  }
  ul.places-list {
    columns: 1;
  }
}

/* New styles to replicate the reference layout */

/*
 * Top site header
 *
 * The screenshot provided by the user shows a white bar across the top of the page
 * containing the site name and tagline on the left and a horizontal menu on
 * the right.  The text in the header is coloured (turquoise for the site name,
 * medium grey for the tagline) and the menu items are uppercase.  The
 * currently active page uses a darker accent colour.
 */
.site-header {
  background-color: #ffffff;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 1px solid #e0e0e0;
}

.site-header .site-info h1 {
  font-size: 1.5rem;
  font-weight: bold;
  margin: 0;
  letter-spacing: 0.5px;
  color: #00a3d6; /* turquoise similar to reference */
  text-transform: uppercase;
}

.site-header .site-info p {
  font-size: 0.8rem;
  margin: 0.2rem 0 0;
  color: #666666;
}

.site-header nav ul {
  list-style: none;
  display: flex;
  gap: 1rem;
}

.site-header nav ul li a {
  color: #999999;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 0.8rem;
  font-weight: bold;
  transition: color 0.2s ease-in-out;
}

/* active menu item uses the darker accent colour */
.site-header nav ul li a.active {
  color: #004880;
}

.site-header nav ul li a:hover {
  color: #004880;
}

/*
 * Hero banner
 *
 * Beneath the header the reference site shows a wide banner image with
 * buildings at night.  The image covers the full width of the content
 * area and has a subtle dark overlay to improve contrast.  There is no text
 * displayed over the banner.
 */
.hero-banner {
  position: relative;
  background-image: url('assets/hero-header.png');
  background-size: cover;
  background-position: center;
  height: 220px;
}

.hero-banner::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 95%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.45);
}

/*
 * Main content and sidebar
 *
 * The two‑column layout remains the same, but the header section no longer
 * lives inside the hero.  We therefore remove the top margin for the
 * main content to ensure the heading sits closer to the banner as seen in
 * the reference.
 */
.main-layout {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

/* Sidebar styling for district pages and the home page
 *
 * The reference design positions the list of districts on a light card
 * alongside the main content.  The heading is uppercase and shares the
 * same dark blue accent colour used for section headings.  The list
 * itself is unbulleted and spaced evenly.  Links are coloured using
 * the primary accent colour and show an underline on hover.
 */
.sidebar h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: #004080;
  text-transform: uppercase;
}
.sidebar .sidebar-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sidebar .sidebar-list li {
  margin-bottom: 0.5rem;
}
.sidebar .sidebar-list li a {
  color: #004080;
  text-decoration: none;
}
.sidebar .sidebar-list li a:hover {
  text-decoration: underline;
}

/* Layout for the main content and sidebar */
.main-layout {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.content-col {
  flex: 3;
  min-width: 95%;
}

.sidebar {
  flex: 1;
  min-width: 250px;
}

.sidebar h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: #637786;
  text-transform: uppercase;
  font-weight: bold;
}

.sidebar-list {
  list-style: none;
  padding-left: 0;
}

.sidebar-list li {
  margin-bottom: 0.25rem;
}

.sidebar-list li a {
  color: #00a3d6;
  text-decoration: none;
}

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

/* Footer lists section */
.footer-lists {
  background-color: #1f2d3a; /* dark slate blue similar to reference */
  color: #ffffff;
  padding: 2rem 0;
  margin-top: 2rem;
}

.lists-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.list-column {
  flex: 1;
  min-width: 200px;
}

.list-column h3 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
  color: #b9c5d1;
  text-transform: uppercase;
  font-weight: bold;
}

/* Add a subtle horizontal rule before each column heading */
.list-column h3::before {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background-color: #405066;
  margin-bottom: 0.5rem;
}

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

.list-column ul li {
  margin-bottom: 0.25rem;
}

.list-column ul li a {
  color: #00a3d6;
  text-decoration: none;
}

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

/* Site footer adjustments */
.site-footer {
  background-color: #192837;
  color: #a6b0b9;
  padding: 1rem 0;
}

.site-footer p {
  margin: 0.25rem 0;
  font-size: 0.8rem;
  text-align: center;
}

/* Site footer */
.site-footer {
  background-color: #00264d;
  color: #fff;
  padding: 1rem 0;
}

.site-footer p {
  margin: 0.25rem 0;
  font-size: 0.85rem;
  text-align: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .main-layout {
    flex-direction: column;
  }
  .content-col, .sidebar {
    min-width: 95%;
  }
  .lists-container {
    flex-direction: column;
  }
  .list-column {
    min-width: 95%;
  }
  .hero-header .hero-content {
    flex-direction: column;
    align-items: flex-start;
  }
  .top-nav ul {
    margin-top: 1rem;
    flex-direction: column;
  }
}

/* Styles for route planning buttons.  These provide spacing and a
   neutral background for the "Útvonal ide" buttons without forcing
   particular colours. */
.route-buttons {
  margin-top: 1rem;
}
.route-buttons button {
  padding: 0.5rem 0.75rem;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.05);
}
.route-buttons button + button {
  margin-left: 0.5rem;
}

/* Styles for the BKK bus routes table and buttons */
.bkk-table {
    width: 100%;
    border-collapse: collapse;
}
.bkk-table th {
    background-color: #0085a3;
    color: #fff;
    padding: 0.5rem;
    text-align: left;
}
.bkk-table td {
    padding: 0.5rem;
    border-bottom: 1px solid #ddd;
}
.bkk-table tr:nth-child(even) td {
    background-color: #f9f9f9;
}
.bkk-table tr:hover td {
    background-color: #f1f1f1;
}
.btn-more {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border: none;
    background-color: #00a3d6;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
}
.btn-more:hover {
    background-color: #0085a3;
}

/* Layout for displaying route stops as vertical diagrams.  Each route page
   uses two columns to show stops in both directions.  A vertical line is
   drawn beside each column and circles mark individual stops. */
.route-stops {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}
.route-stops .column {
  flex: 1;
  min-width: 200px;
}
.route-stops ul {
  list-style: none;
  margin: 0;
  padding-left: 1.5rem;
  position: relative;
}
/* draw a vertical line for each column */
.route-stops ul:before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: #00a3d6;
}
.route-stops ul li {
  position: relative;
  margin-bottom: 0.5rem;
}
.route-stops ul li:before {
  content: '';
  position: absolute;
  left: -1rem;
  top: 0.35rem;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background-color: #ffffff;
  border: 2px solid #00a3d6;
}


/* Colour coding for BKK route labels */
.route-label {
  padding: 0.2rem 0.5rem;
  border-radius: 0.25rem;
  font-weight: 600;
  display: inline-block;
}
.route-label.metro-m1 { background-color: #FFD700; color: #000000; }
.route-label.metro-m2 { background-color: #E10600; color: #ffffff; }
.route-label.metro-m3 { background-color: #0072CE; color: #ffffff; }
.route-label.metro-m4 { background-color: #009E49; color: #ffffff; }
.route-label.metro-m5 { background-color: #800020; color: #ffffff; }
.route-label.villamos { background-color: #FFD700; color: #000000; }
.route-label.busz { background-color: #0078D4; color: #ffffff; }


/* Colour coding for BKK route labels */
.route-label {
  padding: 0.2rem 0.5rem;
  border-radius: 0.25rem;
  font-weight: 600;
  display: inline-block;
}
.route-label.metro-m1 { background-color: #FFD700; color: #000000; }
.route-label.metro-m2 { background-color: #E10600; color: #ffffff; }
.route-label.metro-m3 { background-color: #0072CE; color: #ffffff; }
.route-label.metro-m4 { background-color: #009E49; color: #ffffff; }
.route-label.metro-m5 { background-color: #800020; color: #ffffff; }
.route-label.villamos { background-color: #FFD700; color: #000000; }
.route-label.busz { background-color: #0078D4; color: #ffffff; }
