/* Edmonds Ferry Schedule: replaces the Astra 4.1.3 theme and WordPress block CSS with only what the
   pages use. Astra's breakpoints: header switches to the mobile layout at 921px, footer stacks at 544px. */

:root {
  --blue: #046bd2;
  --blue-dark: #045cb4;
  --heading: #1e293b;
  --text: #334155;
  --light: #f9fafb;
  --border: #eaeaea;
}

*, *::before, *::after { box-sizing: border-box; }

html { font-size: 100%; }
@media (max-width: 921px) { html { font-size: 91.2%; } }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

/* Short pages keep the footer at the bottom of the window, as Astra did. */
body { display: flex; flex-direction: column; min-height: 100vh; }
.site-main { flex-grow: 1; width: 100%; }

a { color: var(--blue); text-decoration: none; }
a:hover, a:focus { color: var(--blue-dark); }
a:focus-visible, button:focus-visible { outline: thin dotted; }

img { max-width: 100%; height: auto; }

.screen-reader-text, .skip-link {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  word-wrap: normal !important;
}
.skip-link:focus {
  z-index: 100000;
  top: 5px;
  left: 5px;
  width: auto;
  height: auto;
  padding: 15px 23px 14px;
  clip: auto;
  background: #f1f1f1;
  color: #21759b;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: normal;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header .header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 80px;
}
.site-header { border-bottom: 1px solid var(--border); }
.site-title {
  margin: 0;
  padding: 1rem 0;
  font-size: 1.625rem;
  font-weight: 600;
  line-height: 1.4;
}
.site-title a { color: #222; line-height: 1.2; }
.site-title a:hover, .site-title a:focus { color: var(--blue-dark); }

.desktop-nav ul, .mobile-nav ul, .site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.desktop-nav ul { display: flex; }
.desktop-nav a {
  display: block;
  padding: 0 1em;
  line-height: 80px;
  color: var(--text);
}
.desktop-nav a:hover, .desktop-nav a:focus, .desktop-nav a[aria-current] { color: var(--blue-dark); }

.menu-toggle, .mobile-nav { display: none; }

@media (max-width: 921px) {
  .site-header { border-bottom: 0; }
  .site-header .header-bar {
    max-width: none;
    border-bottom: 1px solid var(--border);
  }
  .site-title { line-height: 1.2; }
  .desktop-nav { display: none; }
  .menu-toggle {
    display: flex;
    flex: none;
    padding: 0.5em;
    border: 0;
    border-radius: 2px;
    background: none;
    color: var(--blue);
    font-size: 1.5rem;
    cursor: pointer;
  }
  .menu-toggle svg { width: 20px; height: 20px; fill: currentColor; }
  .menu-toggle .icon-close, .menu-toggle[aria-expanded="true"] .icon-bars { display: none; }
  .menu-toggle[aria-expanded="true"] .icon-close { display: block; }
  .mobile-nav.toggled { display: block; }
  .mobile-nav a {
    display: block;
    padding: 0 20px;
    line-height: 3;
    color: var(--text);
  }
  .mobile-nav a:hover, .mobile-nav a:focus, .mobile-nav a[aria-current] {
    color: var(--blue-dark);
    background: var(--light);
  }
}

/* Content */
.site-main { margin: 60px auto; }
@media (max-width: 921px) { .site-main { margin: 0 auto; } }

.entry-header { margin-bottom: 1.5em; }
h1, h2 {
  color: var(--heading);
  font-weight: 600;
}
.entry-title {
  margin: 0 0 0.5em;
  font-size: 2rem;
  line-height: 1.2;
}
.entry-content { overflow-wrap: break-word; }
.entry-content h2 {
  margin: 0 0 20px;
  font-size: 2rem;
  line-height: 1.25;
}
@media (max-width: 921px) { .entry-content h2 { font-size: 25px; } }
.entry-content p { margin: 0 0 1.6em; }
.entry-content > :last-child { margin-bottom: 0; }
.entry-content a { text-decoration: underline; }

figure { margin: 0 0 1em; }
.wp-block-image img { vertical-align: bottom; }
.wp-block-image.aligncenter { display: table; margin-left: auto; margin-right: auto; }

.wp-block-table { overflow-x: auto; }
.wp-block-table table {
  width: 100%;
  margin: 0 0 1.5em;
  border-collapse: collapse;
}
.wp-block-table thead { border-bottom: 3px solid; }
.wp-block-table th, .wp-block-table td {
  padding: 0.5em;
  border: 1px solid;
  word-break: normal;
}
.has-text-align-left { text-align: left; }
.wp-block-table figcaption { margin: 0; }

/* Footer */
.site-footer {
  padding: 20px 0;
  min-height: 60px;
  background: #eee;
}
.footer-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 50px;
  max-width: 1200px;
  margin: 0 auto;
}
.footer-copyright { text-align: center; }
.footer-copyright p { margin: 0; }
@media (max-width: 921px) {
  .footer-section { margin-bottom: 10px; }
}
@media (max-width: 544px) {
  .footer-row { grid-template-columns: 1fr; }
}

/* Scroll to top */
.scroll-top {
  position: fixed;
  right: 30px;
  bottom: 30px;
  z-index: 99;
  width: 2.1em;
  height: 2.1em;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: var(--blue);
  color: #fff;
  font-size: 0.9375rem;
  line-height: 2.1;
  cursor: pointer;
}
.scroll-top:hover, .scroll-top:focus { background: var(--blue-dark); }
.scroll-top[hidden] { display: none; }
.scroll-top svg {
  width: 1em;
  vertical-align: middle;
  fill: currentColor;
  transform: translate(0, -20%) rotate(180deg);
}
