/* Which Bach Cantata - Global Styles */
/* Consolidated from custom.css and embedded Astro styles */

/* === TYPOGRAPHY === */
body {
  font-size: 20px;
  line-height: 30px;
  color: #212529;
  font-family: 'Vollkorn', 'Times New Roman', serif;
  background-color: #fff;
}

@media (max-width: 767px) {
  body {
    font-size: 16px;
    line-height: 1.6;
  }
  p {
    margin: 16px 0;
  }
}

html {
  background-color: #fff;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 800;

}

p {
  line-height: 1.5;
  margin: 30px 0;
}

ul {
  padding-left: 20px;
}

li {
  padding-bottom: 10px;
}

.lightweight {
  font-weight: 400 !important;
}

.font-weight-black {
  font-weight: 800 !important;
}

.text-muted {
  color: #6c757d !important;
  font-weight: 400 !important;
}

.small {
  font-size: 80% !important;
}

/* === LINKS === */
a,
a:visited {
  color: #212529;
  text-decoration: underline;
  -webkit-text-decoration-color: #bfbfbf !important;
  text-decoration-color: #bfbfbf !important;
  transition: all 0.2s;
  outline: none;
}

a:hover {
  color: #0085A1 !important;
  -webkit-text-decoration-color: #0085A1 !important;
  text-decoration-color: #0085A1 !important;
}

a:focus {
  outline: none;
}

.nodecoration {
  text-decoration: none !important;
}

.caption-link {
  text-decoration: none !important;
}

.caption-link:hover small {
  text-decoration: underline;
}

/* === SCROLL BEHAVIOR === */
html,
body {
  width: auto !important;
  overflow-x: hidden !important;
  scroll-behavior: smooth;
}

/* === NAVIGATION === */
#mainNav {
  position: absolute;
  border-bottom: 1px solid #e9ecef;
  background-color: white;
  font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  padding-top: 0;
  padding-bottom: 0;
}

#mainNav .navbar-brand {
  font-weight: 300;
  color: #343a40;
  font-size: 20px;
  line-height: 1;
  margin: 0 16px 0 0;
}

#mainNav .navbar-toggler {
  font-size: 12px;
  font-weight: 800;
  padding: 13px;
  text-transform: uppercase;
  color: #343a40;
}

#mainNav .nav-link {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  line-height: 1.1;
  text-transform: uppercase;
  text-decoration: none;
}

@media only screen and (min-width: 992px) {
  #mainNav {
    border-bottom: 1px solid transparent;
    background: transparent;
  }

  #mainNav .navbar-brand {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    color: #fff;
  }

  #mainNav .navbar-brand:hover {
    color: rgba(255, 255, 255, 0.8);
  }

  #mainNav .nav-link {
    padding: 10px 12px;
    color: #fff;
    white-space: nowrap;
  }

  /* Ensure every nav-item centres its content vertically even when neighbour wraps */
  #mainNav .navbar-nav > .nav-item {
    display: flex;
    align-items: center;
    align-self: stretch;
  }

  #mainNav .navbar-nav > .nav-item > .nav-link {
    display: flex;
    align-items: center;
  }

  #mainNav .nav-link:hover {
    color: rgba(255, 255, 255, 0.8);
  }

  #mainNav.is-fixed {
    position: fixed;
    top: -67px;
    transition: transform 0.2s;
    border-bottom: 1px solid white;
    background-color: rgba(255, 255, 255, 0.9);
  }

  #mainNav.is-fixed .navbar-brand {
    color: #212529;
  }

  #mainNav.is-fixed .navbar-brand:hover {
    color: #0085A1;
  }

  #mainNav.is-fixed .nav-link {
    color: #212529;
  }

  #mainNav.is-fixed .nav-link:hover {
    color: #0085A1;
  }

  #mainNav.is-visible {
    transform: translate3d(0, 100%, 0);
  }

  /* Search and language icons */
  #mainNav .nav-link i {
    font-size: 14px;
    vertical-align: middle;
  }

  /* Lang switcher: fill the full li height so inner flex centres the button */
  #mainNav .navbar-nav > .nav-item > .lang-switcher {
    height: 100%;
  }
}

/* Ensure fixed nav respects site width */
@media only screen and (min-width: 1200px) {

  #mainNav.fixed-top .container,
  .container {
    max-width: 1140px;
  }
}

/* === MASTHEAD/HERO === */
header.masthead {
  margin-bottom: 20px;
  background: no-repeat center center;
  background-color: #868e96;
  background-attachment: scroll;
  position: relative;
  background-size: cover;
}

header.masthead .overlay {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background-color: #212529;
  opacity: 0.5;
}

header.masthead .container {
  position: relative;
  z-index: 1;
}

/* site-heading: used on cantata pages */
header.masthead .site-heading {
  padding: 100px 0 75px;
  color: white;
  text-align: center;
}

@media only screen and (min-width: 768px) {
  header.masthead .site-heading {
    padding: 100px 0;
  }
}

header.masthead .site-heading h1 {
  color: white;
}

/* page-heading and post-heading: used on other pages */
header.masthead .site-heading,
header.masthead .page-heading,
header.masthead .post-heading {
  color: white;
  text-align: center;
}

@media only screen and (min-width: 768px) {

  header.masthead .page-heading,
  header.masthead .post-heading {
    padding: 100px 0;
  }
}

header.masthead .site-heading h1,
header.masthead .page-heading h1,
header.masthead .post-heading h1 {
  color: white;
}

/* is-home special case */
header.masthead.is-home {
  height: 438px;
}


header.masthead .site-heading h1,
header.masthead .page-heading h1,
header.masthead .post-heading h1 {
  font-size: clamp(36px, 9vw, 80px);
  font-weight: 300;
  margin-top: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

header.masthead .site-heading .subheading {
  font-size: clamp(16px, 4vw, 24px);
  font-weight: 300;
  line-height: 1.1;
  display: block;
  margin: 10px 0 0;
  font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

header.masthead .site-heading .close-icon {
  font-size: 16px;
  margin-right: 8px;
}

.cantata-day-listing {
  border-bottom: 1px solid #e9ecef;
  padding-bottom: 2rem;
}

.cantata-day-listing:last-child {
  border-bottom: none;
}

.cantata-day-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.cantata-day-title a {
  color: #212529;
  text-decoration: none;
}

.cantata-day-title a:hover {
  color: #0085a1;
}

.cantata-day-name {
  font-family: 'Vollkorn', 'Times New Roman', serif;
  font-size: 22px;
}

.cantata-list {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

.cantata-list li {
  padding-bottom: 0.25rem;
}

.placeholder-image {
  width: 100%;
  padding-top: 75%;
  background-color: #e9ecef;
}

/* Styles from cantata-days/index.astro refinements */
.cantata-day-post h3 a:hover {
  color: #0085a1 !important;
}

/* Styles from upcoming-cantatas.astro */
.upcoming-cantatas {
  margin-top: 1rem;
}

.upcoming-cantatas h5 {
  color: #0d6efd;
  margin-bottom: 1rem;
}

.upcoming-cantatas a {
  color: inherit;
  transition: color 0.2s;
}

.upcoming-cantatas a:hover {
  color: #0d6efd;
}

/* === SECTIONS === */
.section-heading {
  font-size: 36px;
  font-weight: 700;
  margin-top: 16px;
  margin-bottom: 8px;
  text-transform: none;
}

.cantata-content p {
  margin-bottom: 1.5rem;
}

.metadata-section,
.cantata-content {
  font-family: 'Vollkorn', 'Times New Roman', serif;
  font-size: 20px;
  line-height: 1.6;
}

/* === BUTTONS === */
.btn {
  font-size: 14px;
  font-weight: 800;
  padding: 15px 25px;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 0;
  font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  text-decoration: none;
}

.btn-primary {
  background-color: #0085A1;
  border-color: #0085A1;
  color: #fff;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: #00657b !important;
  border-color: #00657b !important;
  color: #fff;
}

.btn-outline-primary {
  color: #0085A1;
  border-color: #0085A1;
}

.btn-outline-primary:hover {
  background-color: #0085A1;
  border-color: #0085A1;
  color: #fff;
}

.btn-outline-dark {
  border-color: #dee2e6;
  color: #212529;
  transition: all 0.2s;
}

.btn-outline-dark:hover {
  background-color: #f8f9fa;
  border-color: #0085a1;
  color: #0085a1;
}

/* === CANTATA LISTS / TABLES === */
.cantata-row {
  cursor: pointer;
}

.cantata-row:hover {
  background-color: transparent !important;
}

.cantata-row:hover a {
  color: #0085A1 !important;
  -webkit-text-decoration-color: #0085A1 !important;
  text-decoration-color: #0085A1 !important;
  text-decoration: none !important;
}

.cantata-row:hover .date-badge {
  color: white !important;
  background-color: #0085A1 !important;
}

/* === CANTATA DAY ITEMS === */
.cantata-day-item {
  border-bottom: 1px solid #e9ecef;
}

.cantata-day-item:last-child {
  border-bottom: none;
}

.card {
  transition: transform 0.2s ease-in-out;
}

.card:hover {
  transform: translateY(-5px);
}

.cantata-day-item img,
.square-thumbnail img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 4px;
  /* Subtle rounding */
}

.cantata-day-item .placeholder-image,
.square-thumbnail .placeholder-image {
  width: 150px;
  height: 150px;
  background-color: #e9ecef;
}

.cantata-day-item h6 {
  font-size: 14px;
  color: #868e96;
  margin-bottom: 4px;
}

.cantata-day-item a:hover h6,
.cantata-day-item a:hover p {
  color: #0085A1;
}

.streaming-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 30px;
  margin-top: 30px;
}

.streaming-logos img {
  height: 40px;
  width: auto;
  transition: opacity 0.2s;
}

.streaming-logos img:hover {
  opacity: 0.7;
}

/* === FOOTER === */
footer {
  padding: 50px 0 65px;
  /* Matches clean-blog.css */
  background-color: #f8f9fa;
  border-top: 1px solid #e9ecef;
}

footer .bach-seal {
  max-width: 150px;
  height: auto;
}

footer .list-inline {
  margin: 0;
  padding: 0;
}

footer .fa-stack {
  color: #212529;
}

footer .fa-stack:hover {
  color: #0085A1;
}

footer .copyright {
  font-size: 14px;
  margin-bottom: 20px;
  text-align: center;
}

footer .upcoming-list {
  font-size: 12px;
  line-height: 1.8;
}

footer .upcoming-list a {
  color: #868e96;
}

footer .upcoming-list a:hover {
  color: #0085A1;
}

/* === NEWSLETTER SECTION === */
.newsletter-section {
  padding: 30px;
  background-color: #fff;
  border: 1px solid #e9ecef;
  border-radius: 4px;
}

#signup-message {
  display: none;
  margin-top: 1em;
  align-items: center;
  /* vertical alignment */
  gap: 1em;
  /* space between spinner and text */
  font-weight: 500;
  color: #0f5132;
  /* Bootstrap alert-success text color */
  background-color: #d1e7dd;
  /* Bootstrap alert-success bg */
  border: 1px solid #badbcc;
  border-radius: 0.25rem;
  padding: 0.75rem 1rem;
}

label {
  margin-top: 10px;
  margin-bottom: 10px;
}

/* === RESPONSIVE === */
@media (max-width: 991.98px) {
  .content-desktop {
    display: none;
  }

  .content-mobile {
    display: block;
  }
}

@media (min-width: 992px) {
  .content-desktop {
    display: block;
  }

  .content-mobile {
    display: none;
  }
}

/* === SELECTION === */
::selection {
  color: #fff;
  background: #0085A1;
  text-shadow: none;
}

::-moz-selection {
  color: #fff;
  background: #0085A1;
  text-shadow: none;
}

/* === BREADCRUMB === */
.wbc-breadcrumb {
  background: none;
  padding: 0;
  margin: 0 0 0.75rem 0;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color: #495057;
}

.wbc-breadcrumb a {
  color: #495057;
  text-decoration: none;
}

.wbc-breadcrumb a:hover {
  color: #0085A1;
}

.bc-divider {
  display: inline-block;
  vertical-align: middle;
  margin: 0 0.35rem;
  transform: translateY(-0.05em);
  opacity: 0.6;
}

/* === CANTATA INFO SECTION === */
.cantata-info-section h2 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 8px;
}

.cantata-info-section h3 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 12px;
}

.cantata-info-prose {
  font-family: 'Vollkorn', 'Times New Roman', serif;
  font-size: 20px;
  line-height: 1.5;
  margin: 0;
}

/* === PLAYLIST / STREAMING BUTTONS === */
.playlist-section h2 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 4px;
}

.playlist-occasion {
  font-family: 'Vollkorn', 'Times New Roman', serif;
  font-size: 20px;
  margin: 0 0 16px;
}

.playlist-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 30px;
}

.playlist-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #212529;
  padding: 8px 16px;
  text-decoration: none !important;
  transition: opacity 0.2s;
  background: #fff;
  min-width: 170px;
  min-height: 70px;
}

.playlist-btn:hover {
  opacity: 0.75;
}

.playlist-btn img {
  max-height: 40px;
  max-width: 140px;
  width: auto;
  object-fit: contain;
}

/* === RESOURCES / INFO SOURCES SECTION === */
.resources-section h2 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 8px;
}

.resources-intro {
  font-family: 'Vollkorn', 'Times New Roman', serif;
  font-size: 20px;
  margin: 0 0 20px;
}

.info-icon-inline {
  font-size: 18px;
  color: #212529;
}

.resource-list {
  margin-bottom: 30px;
}

.resource-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.resource-item:last-child {
  border-bottom: none;
}

.resource-logo {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.resource-logo img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: 4px;
}

.resource-logo-placeholder {
  width: 80px;
  height: 80px;
  background-color: #e9ecef;
  border-radius: 4px;
}

.resource-content {
  flex: 1;
}

.resource-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.resource-link {
  font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-decoration: underline;
  text-decoration-color: #bfbfbf;
  color: #212529;
}

.resource-link:hover {
  color: #0085a1;
  text-decoration-color: #0085a1;
}

.info-toggle {
  background: none;
  border: none;
  padding: 0 4px;
  cursor: pointer;
  font-size: 20px;
  color: #868e96;
  line-height: 1;
  vertical-align: middle;
  text-decoration: none;
}

.info-toggle:hover {
  color: #0085a1;
}

.resource-description {
  font-family: 'Vollkorn', 'Times New Roman', serif;
  font-size: 18px;
  color: #495057;
  margin-top: 6px;
  line-height: 1.5;
}

/* === VIDEO LIST === */
.videos-section h2 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 20px;
}

.video-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.video-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.video-item:last-child {
  border-bottom: none;
}

.video-thumb {
  flex-shrink: 0;
}

.video-thumb img {
  width: 250px;
  height: auto;
  object-fit: cover;
  display: block;
}

.video-info {
  flex: 1;
  font-family: 'Vollkorn', 'Times New Roman', serif;
  font-size: 20px;
}

.video-title a {
  font-size: 20px;
  font-weight: 700;
  color: #0085a1;
  text-decoration: underline;
  text-decoration-color: #0085a1;
}

.video-title a:hover {
  color: #00657b;
}

.video-meta {
  font-size: 18px;
  color: #212529;
  margin-top: 4px;
}

.video-desc {
  font-size: 18px;
  color: #212529;
  margin-top: 4px;
}

@media (max-width: 600px) {
  .video-item {
    flex-direction: column;
  }

  .video-thumb img {
    width: 100%;
  }

  .playlist-btn {
    min-width: 100px;
  }
}

/* === FANCYBOX TWEAKS === */

.f-caption {
  font-size: 16px !important;
  text-align: center !important;
  padding-left: 10% !important;
  padding-right: 10% !important;
  font-style: italic !important;
  line-height: 1.5 !important;
}

/* === CANTATA LISTING TABLE === */

.cantata-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Vollkorn', 'Times New Roman', serif;
  font-size: 16px;
}

.cantata-table thead th {
  font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #868e96;
  border-bottom: 2px solid #dee2e6;
  padding: 8px 4px;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.cantata-table thead th:hover {
  color: #0085A1;
}

.cantata-table thead th .sort-icon {
  display: inline-block;
  margin-left: 4px;
  opacity: 0.4;
  font-size: 10px;
}

.cantata-table thead th.sort-asc .sort-icon,
.cantata-table thead th.sort-desc .sort-icon {
  opacity: 1;
  color: #0085A1;
}

.cantata-table tbody tr {
  border-bottom: 1px solid #e9ecef;
  transition: background-color 0.15s;
}

.cantata-table tbody tr:hover {
  background-color: #f8f9fa;
}

.cantata-table tbody td {
  padding: 5px 4px;
  vertical-align: top;
}

.cantata-table .col-cantata {
  width: 42%;
}

.occasion-colour-text {
  text-decoration: underline;
  text-decoration-color: var(--day-colour);
  text-decoration-thickness: 3px;
  text-decoration-skip-ink: none;
}

.day-title-underline {
  text-decoration: underline;
  text-decoration-color: var(--day-colour);
  text-decoration-thickness: 8px;
  text-decoration-skip-ink: none;
}

.cantata-colour-swatch {
  display: inline-block;
  width: 0.8em;
  height: 0.8em;
  border-radius: 2px;
  margin-right: 6px;
  vertical-align: middle;
  flex-shrink: 0;
}

.cantata-table .col-occasion {
  width: 27%;
}

.cantata-table .col-kind {
  width: 15%;
}

.cantata-table .col-year {
  width: 16%;
}

.cantata-table .cantata-link {
  font-weight: 600;
  color: #212529;
  text-decoration: none;
}

.cantata-table .cantata-link:hover {
  color: #0085A1;
  text-decoration: underline;
  text-decoration-color: #0085A1;
}

.cantata-table .occasion-link {
  color: inherit;
  text-decoration: none;
}

.cantata-table .occasion-link:hover {
  color: #0085A1;
  text-decoration: underline;
  text-decoration-color: #0085A1;
}

.cantata-table .cantata-sub {
  font-size: 14px;
  color: #868e96;
  margin-top: 2px;
}

/* === LANGUAGE SWITCHER === */
.lang-switcher {
  position: relative;
  display: flex;
  align-items: center;
  /* height set to 100% on desktop via nav media query */
}

/* Trigger button – unstyled, inherits nav colours */
.lang-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  margin: 0;
  cursor: pointer;
  padding: 10px 12px;
  font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #fff;           /* default: nav is over hero (white text) */
  transition: color 0.2s;
  line-height: 1;
}

.lang-trigger:hover {
  color: rgba(255,255,255,0.8);
}

/* When nav is stuck (is-fixed) use dark text */
#mainNav.is-fixed .lang-trigger {
  color: #212529;
}

#mainNav.is-fixed .lang-trigger:hover {
  color: #0085A1;
}

/* On mobile the nav background is always white */
@media (max-width: 991.98px) {
  .lang-trigger {
    color: #212529;
    padding: 8px 16px;
  }
  .lang-trigger:hover {
    color: #0085A1;
  }
}

.lang-flag {
  font-size: 18px;
  line-height: 1;
}

.lang-chevron {
  font-size: 10px;
  transition: transform 0.2s ease;
}

.lang-chevron.is-up {
  transform: rotate(180deg);
}

/* Dropdown panel */
.lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: fit-content;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  list-style: none;
  margin: 0;
  padding: 4px 0;
  z-index: 9999;
}

.lang-dropdown.is-open {
  display: block;
  animation: langFadeIn 0.15s ease;
}

@keyframes langFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.lang-dropdown li {
  padding: 0;
  margin: 0;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 16px;
  text-decoration: none !important;
  color: #212529;
  font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: background 0.12s, color 0.12s;
  white-space: nowrap;
}

.lang-option:hover {
  background: #f4f8f9;
  color: #0085A1 !important;
  text-decoration: none !important;
}

.lang-option .lang-flag {
  font-size: 20px;
}