/*
 * Stylesheet for the Bruces Bikes intranet.
 *
 * A clean and modern look built with simple CSS. All components scale
 * gracefully across devices thanks to flexible layouts. Feel free to
 * adjust colours and spacing to match your organisation’s branding.
 */

/* Reset margins and paddings */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}

body {
  line-height: 1.6;
  background-color: #f8f9fa;
  color: #333;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Utility container to constrain content width */
.container {
  width: 90%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 1rem;
}

/* Header */
.site-header {
  background-color: #1a73e8;
  color: #ffffff;
  border-bottom: 3px solid #0f5bb5;
}

.site-title {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.nav-link {
  color: #ffffff;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
}

.nav-link.current::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 100%;
  height: 2px;
  background-color: #fff;
}

.nav-link:hover {
  text-decoration: underline;
}

/* Cards Grid */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.card {
  background-color: #ffffff;
  padding: 1.25rem;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card h2 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: #1a73e8;
}

.card p {
  flex-grow: 1;
  margin-bottom: 1rem;
}

/* Button style for links */
.button {
  display: inline-block;
  background-color: #1a73e8;
  color: #ffffff;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  text-decoration: none;
  transition: background-color 0.2s ease-in-out;
}

.button:hover,
.button:focus {
  background-color: #0f5bb5;
}

/* Footer */
.site-footer {
  background-color: #1a73e8;
  color: #ffffff;
  margin-top: auto;
}

.site-footer p {
  text-align: center;
  padding: 1rem 0;
  font-size: 0.9rem;
}

/* Layout for pages with sidebars */
.layout {
  display: flex;
  flex-direction: row;
  gap: 2rem;
  margin-top: 2rem;
}

/* Sidebar styling */
.sidebar {
  flex: 0 0 220px;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  padding: 1rem;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
}

.sidebar h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: #1a73e8;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 0.25rem;
}

.sidebar ul {
  list-style: none;
  margin-bottom: 1rem;
}

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

.sidebar a {
  color: #333;
  text-decoration: none;
  font-size: 0.95rem;
}

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

/* Main content area when sidebar present */
.main-content {
  flex: 1;
}

/* Hero section styling */
.hero {
  width: 100%;
  overflow: hidden;
  border-radius: 8px;
  margin-top: 1rem;
}

.hero img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

/* Generic page images used inside content sections */
.page-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1rem 0;
}

/* Responsive adjustments */
@media (max-width: 800px) {
  .layout {
    flex-direction: column;
  }
  .sidebar {
    flex: none;
    width: 100%;
    max-height: none;
    margin-bottom: 1rem;
  }
}