:root {
  --primary-bg: #f4f6fa;
  --secondary-bg: #205081;
  --accent: #e3b505;
  --text-main: #222;
  --text-light: #fefefe;
  --btn-bg: #205081;
  --btn-accent: #e3b505;
  --btn-hover-bg: #e3b505;
  --btn-hover-text: #205081;
}

[data-theme='dark'] {
  --primary-bg: #181d23;
  --secondary-bg: #17233b;
  --accent: #e3b505;
  --text-main: #f4f6fa;
  --text-light: #fff;
  --btn-bg: #1c3557;
  --btn-accent: #e3b505;
  --btn-hover-bg: #e3b505;
  --btn-hover-text: #17233b;
}

/* Accessibility: Focus Outline */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

body {
  background: var(--primary-bg);
  color: var(--text-main);
  font-family: system-ui, Arial, sans-serif;
  margin: 0;
  padding: 0;
}

/* Links & Accents */
a, .accent {
  color: var(--accent);
  transition: color 0.2s;
}
a:hover, .accent:hover,
a:focus-visible, .accent:focus-visible {
  color: var(--btn-hover-bg);
  text-decoration: underline;
}

/* Skip Link for accessibility */
.skip-link {
  position: absolute;
  left: -1000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 1000;
}
.skip-link:focus {
  position: static;
  width: auto;
  height: auto;
  background: var(--accent);
  color: var(--text-light);
  padding: 0.5em 1em;
  border-radius: 4px;
}

/* Header styling */
.header {
  background-image: url("images/sailboats.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: var(--secondary-bg);
  border-bottom-left-radius: 10vw;
  border-bottom-right-radius: 10vw;
  min-height: 500px;
  color: var(--text-light);
  box-shadow: 0 4px 32px rgba(0,0,0,0.08);
}

.navbar-nav .nav-link.active, .nav-link:focus-visible {
  font-weight: bold;
  color: var(--accent) !important;
}

/* === Responsive Home Buttons === */
.home-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.2rem;
  max-width: 760px;
  margin: 3vw auto 2vw auto;
  width: 100%;
  padding: 0 1vw;
}

@media (max-width: 950px) and (min-width: 601px) {
  .home-buttons {
    grid-template-columns: 1fr 1fr !important;
    max-width: 480px;
  }
}

.home-btn-wrapper {
  display: flex;
  justify-content: center;
  align-items: stretch;
  width: 100%;
}

.home-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  aspect-ratio: 1/1;
  width: 100%;
  max-width: 180px;
  min-width: 120px;
  min-height: 120px;
  background: var(--btn-bg);
  color: var(--text-light);
  border: 3px solid var(--btn-accent);
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  transition: background 0.2s, color 0.2s, border 0.2s, box-shadow 0.2s;
  text-align: center;
  padding: 0.6em 0.5em 0.5em 0.5em;
  box-shadow: 0 2px 12px rgba(32,80,129,0.10);
  word-break: break-word;
  white-space: normal;
  cursor: pointer;
  outline: none;
}
.home-btn:hover, .home-btn:focus-visible {
  background: var(--btn-hover-bg);
  color: var(--btn-hover-text);
  border: 3px solid var(--btn-bg);
  box-shadow: 0 4px 18px rgba(227,181,5,0.13);
}

.home-btn i {
  font-size: clamp(1.2em, 4vw, 2.2em);
  margin-bottom: 0.2em;
}
.home-btn span {
  display: block;
  margin-top: 0.3em;
  font-size: clamp(0.96em, 1.5vw, 1.09em);
  line-height: 1.15;
  word-break: break-word;
}

/* Mobile: switch to pills with icon left */
@media (max-width: 600px) {
  .home-buttons {
    grid-template-columns: 1fr;
    max-width: 98vw;
    gap: 4vw;
  }
  .home-btn-wrapper {
    justify-content: center;
    align-items: center;
    width: 100%;
  }
  .home-btn {
    flex-direction: row;
    border-radius: 2em;
    width: 97vw;
    max-width: 400px;
    min-width: unset;
    min-height: 60px;
    aspect-ratio: unset;
    padding: 1em 1.2em;
    align-items: center;
    justify-content: flex-start;
    font-size: clamp(1em, 3vw, 1.1em);
  }
  .home-btn i {
    font-size: clamp(1.3em, 5vw, 1.8em);
    margin-bottom: 0;
    margin-right: 1em;
  }
  .home-btn span {
    margin-top: 0;
    font-size: clamp(1em, 2.5vw, 1.1em);
    text-align: left;
  }
}

/* === End Home Buttons === */

.home-text {
  line-height: 2;
  padding: 5%;
  font-size: 1.1rem;
  background: var(--primary-bg);
  color: var(--text-main);
  border-radius: 2vw;
}

/* === Header-like Responsive Home Image === */
.home-image-section {
  width: 100%;
  padding: 0;
  margin: 0 auto;
}

.home-image {
  width: 100%;
  min-height: 320px;
  aspect-ratio: 3 / 1;
  background-image: url("images/spring.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-top-left-radius: 10vw;
  border-top-right-radius: 10vw;
  box-shadow: 0 4px 32px rgba(32,80,129,0.12);
  margin: 0 auto;
  display: block;
}

@media (max-width: 900px) {
  .header {
    min-height: 350px;
    border-bottom-left-radius: 8vw;
    border-bottom-right-radius: 8vw;
  }
  .home-image {
    min-height: 180px;
    border-top-left-radius: 8vw;
    border-top-right-radius: 8vw;
  }
}

@media (max-width: 650px) {
  .header {
    min-height: 200px;
    border-bottom-left-radius: 5vw;
    border-bottom-right-radius: 5vw;
  }
  .home-image {
    min-height: 100px;
    border-top-left-radius: 5vw;
    border-top-right-radius: 5vw;
  }
  .home-text {
    padding: 7vw;
    font-size: 1em;
  }
}

/* === End Header-like Home Image === */

footer {
  color: var(--text-light);
  background: var(--secondary-bg);
  box-shadow: 0 -2px 14px rgba(32,80,129,0.08);
}
.footer-social .btn {
  border-radius: 50%;
  font-size: 1.3rem;
  margin-right: 0.3em;
}

/* Back to top button */
.back-to-top {
  display: none;
  position: fixed;
  bottom: 2vw;
  right: 2vw;
  z-index: 90;
  border-radius: 50%;
  padding: 0.7em 1em;
  font-size: 1.2rem;
  background: var(--accent);
  color: var(--btn-hover-text);
  border: none;
  box-shadow: 0 2px 8px rgba(32,80,129,0.10);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.back-to-top:focus-visible {
  outline: 2px solid var(--btn-accent);
}

/* Utility and typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--secondary-bg);
  font-family: 'Segoe UI', Verdana, Geneva, Tahoma, sans-serif;
  font-weight: 700;
  margin-top: 0;
}
[data-theme='dark'] h1,
[data-theme='dark'] h2,
[data-theme='dark'] h3,
[data-theme='dark'] h4,
[data-theme='dark'] h5,
[data-theme='dark'] h6 {
  color: var(--text-light);
}

::-webkit-scrollbar {
  width: 12px;
  background: var(--primary-bg);
}
::-webkit-scrollbar-thumb {
  background: var(--secondary-bg);
  border-radius: 6px;
}

hr {
  border: none;
  border-top: 2px solid var(--secondary-bg);
  margin: 2em 0;
}

/* Misc. improvements */
img, svg {
  max-width: 100%;
  height: auto;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

@media (max-width: 400px) {
  .home-text {
    font-size: 0.97em;
    padding: 10vw 2vw;
  }
}