/* =========================================
   CÔR MEIBION CAERWYS - COMPLETE STYLESHEET
   Responsive choir website
========================================= */

/* -----------------------------------------
   1. COLOURS AND GLOBAL SETTINGS
----------------------------------------- */

:root {
  --navy: #172d3b;
  --navy-light: #284554;
  --gold: #c6a66b;
  --cream: #f8f5ee;
  --white: #ffffff;
  --text: #35434a;
  --muted: #6c777b;
  --border: #e4dfd4;

  /* Sidebar sizing */
  --sidebar-width: 16%;
  --sidebar-min-width: 150px;
  --sidebar-max-width: 210px;

  /* Navigation colours */
  --sidebar-bg: #9fdbd8;
  --sidebar-link: #176308;
  --sidebar-hover: #c6a66b;
}

/* Reset */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 2rem;
}

body {
  margin: 0;

  padding-left: clamp(
    var(--sidebar-min-width),
    var(--sidebar-width),
    var(--sidebar-max-width)
  );

  font-family: Georgia, "Times New Roman", serif;
  color: var(--text);
  background: linear-gradient(
    90deg,
    rgba(101, 193, 230, 0.6) 0%,
    rgba(87, 199, 133, 0.6) 50%,
    rgba(88, 83, 237, 0.6) 100%
  );
  line-height: 1.7;

  overflow-x: hidden;
}

h1,
h2,
h3 {
  color: var(--navy);
  line-height: 1.2;
  font-weight: normal;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
}

h2 {
  font-size: clamp(2rem, 3vw, 3rem);
  margin-bottom: 1.5rem;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 0.8rem;
}
h4 {
  text-align: center;
}

p {
  margin-bottom: 1rem;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
textarea {
  font: inherit;
}

/* -----------------------------------------
   2. GENERAL LAYOUT
----------------------------------------- */

.container {
  width: min(1100px, 90%);
  margin: 0 auto;
}

.section {
  padding: 5rem 0;
}

.section-light {
  background: var(--white);
}

.section-dark {
  /*background: var(--navy);*/
  background: linear-gradient(135deg, #0b6e6e, #a0dbdb);
  color: var(--white);
}

.section-dark h2,
.section-dark h3 {
  color: var(--white);
}
.eyeridge {
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 3px;
  font-family: Arial, sans-serif;
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.eyebrow {
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 3px;
  font-family: Arial, sans-serif;
  font-size: 0.75rem;
  margin-bottom: 1rem;
}

.center {
  text-align: center;
}

/* -----------------------------------------
   3. FIXED SIDEBAR
----------------------------------------- */

.side-header {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;

  width: clamp(
    var(--sidebar-min-width),
    var(--sidebar-width),
    var(--sidebar-max-width)
  );

  height: 100vh;
  height: 100dvh;

  padding: 2rem 1rem;

  background: var(--sidebar-bg);

  display: flex;
  flex-direction: column;

  z-index: 1000;

  border: none;
  box-shadow: none;
  outline: none;

  overflow-y: auto;
}

/* Choir name */

.side-header .logo {
  display: block;
  text-align: center;

  font-size: clamp(1.1rem, 1.5vw, 1.5rem);
  line-height: 1.3;

  background: linear-gradient(#166308, #0b6e6e);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
  margin-bottom: 3rem;
}
.side-header .sidebar-logo {
  display: block;
  width: 130px;
  max-width: 80%;
  height: auto;
  margin: 0 auto 2rem;
  object-fit: contain;
}
.side-header .logo span {
  color: var(--gold);
}

/* Navigation links */

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.side-nav a {
  display: block;

  padding: 0.8rem 0.75rem;

  color: var(--sidebar-link);
  background: transparent;

  font-family: Arial, sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.4;

  border: none;
  border-radius: 4px;

  transition:
    background 0.2s ease,
    color 0.2s ease;
}

/* Hover and current page */

.side-nav a:hover {
  color: var(--navy);
  background: var(--gold);
  border: none;
}

/* Keyboard accessibility */

.side-nav a:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 3px;
}

/* Sidebar footer */

.sidebar-footer {
  margin-top: auto;
  padding-top: 1.5rem;

  border-top: 1px solid rgba(255, 255, 255, 0.2);

 color: var(--sidebar-link);
  font-size: 0.75rem;
  text-align: center;
}

.sidebar-footer p {
  margin: 0;
}

/* -----------------------------------------
   4. BUTTONS
----------------------------------------- */

.button {
  display: inline-block;

  padding: 0.9rem 1.8rem;

  background: var(--gold);
  color: var(--navy);

  font-family: Arial, sans-serif;
  font-size: 0.85rem;
  font-weight: bold;

  border: 1px solid var(--gold);

  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.button:hover {
  background: transparent;
  color: var(--gold);
}

.button-outline {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}

.button-outline:hover {
  background: var(--white);
  color: var(--navy);
}

/* -----------------------------------------
   5. PARALLAX HERO
----------------------------------------- */

.hero {
  position: relative;

  min-height: 85vh;
  min-height: 85svh;

  display: flex;
  align-items: center;

  background-image:
    linear-gradient(90deg, rgba(23, 45, 59, 0.88), rgba(23, 45, 59, 0.35)),
    url("images/choir-hero2.webp");

  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;

  background-attachment: fixed;

  color: var(--white);
}

.hero-content {
  max-width: 750px;
  padding: 6rem 0;
}

.hero h1 {
  color: var(--white);
  max-width: 750px;
  margin-bottom: 1.5rem;
}

.hero p {
  color: var(--white);
  font-size: 1.2rem;
  max-width: 600px;
  margin-bottom: 2rem;
}

/* -----------------------------------------
   6. INTERNAL PAGE BANNERS
----------------------------------------- */

.page-banner {
  background-color: var(--navy);

  background-image:
    linear-gradient(rgba(23, 45, 59, 0.65), rgba(23, 45, 59, 0.85)),
    url("images/choir-hero2.webp");

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;

  color: var(--white);
  padding: 5rem 0;
}

.page-banner h1 {
  color: var(--white);
  margin-bottom: 1rem;
}

.page-banner p {
  max-width: 650px;
  color: var(--white);
}

/* -----------------------------------------
   7. TWO-COLUMN LAYOUT
----------------------------------------- */

.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.image-rounded {
  width: 100%;
  height: 420px;
  object-fit: cover;
}

/* -----------------------------------------
   8. CONTENT CARDS
----------------------------------------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  min-width: 0;
}

.card img {
  width: 100%;
  height: 230px;
  object-fit: cover;
}

.card-content {
  padding: 1.5rem;
}

.card p {
  color: var(--muted);
}

/* -----------------------------------------
   9. EVENTS
----------------------------------------- */

.event-list {
  display: grid;
  gap: 1.5rem;
}

.event {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 2rem;

  background: var(--white);
  padding: 2rem;

  border: 1px solid var(--border);
}

.event-date {
  text-align: center;
  color: var(--navy);

  border-right: 1px solid var(--border);
  padding-right: 1rem;
}

.event-date strong {
  display: block;
  font-size: 2rem;
  font-weight: normal;
}

.event-date span {
  text-transform: uppercase;
  font-family: Arial, sans-serif;
  font-size: 0.8rem;
  letter-spacing: 1px;
}

.event h3 {
  margin-bottom: 0.5rem;
}

.event p {
  margin-bottom: 0.5rem;
}

.event-meta {
  font-family: Arial, sans-serif;
  font-size: 0.85rem;
  color: var(--muted);
}
/* -----------------------------------------
   10. GALLERY
----------------------------------------- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem 1rem;
}

.gallery-grid figure {
  margin: 0;
  min-width: 0;
}

.gallery-grid img {
  width: 100%;
  height: 280px;
  object-fit: cover;

  transition: transform 0.3s ease;
}

.gallery-grid figure:hover img {
  transform: scale(1.02);
}

.gallery-grid figcaption {
  margin-top: 0.5rem;

  font-family: Arial, sans-serif;
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--muted);
  text-align: center;
}

/* -----------------------------------------
   11. CONTACT PAGE
----------------------------------------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 4rem;
}

.contact-details {
  background: var(--navy);
  color: var(--white);
  padding: 2.5rem;
}

.contact-details h2 {
  color: var(--white);
}

.contact-details h3 {
  color: var(--gold);
}

.contact-details a {
  color: var(--white);
}

.contact-details a:hover {
  color: var(--gold);
}
/* -----------------------------------------
   11b. CONTACT FORM
   Replaces ALL the existing ".contact-form ..." rules
   in section 11 of style.css (keep .contact-grid and
   .contact-details as they are).
----------------------------------------- */

.contact-form {
  display: grid;
  gap: 1.25rem;
  max-width: 640px;
  margin-top: 1.5rem;
}

.contact-form .form-row {
  display: grid;
  gap: 0.4rem;
}

.contact-form label {
  display: block;
  color: var(--navy);
  font-family: Arial, sans-serif;
  font-size: 0.9rem;
  font-weight: bold;
}

.contact-form .req {
  color: #a33a2a;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 0.85rem 0.9rem;

  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--white);

  color: var(--text);
  font: inherit;
}

.contact-form select {
  cursor: pointer;
}

.contact-form textarea {
  min-height: 160px;
  resize: vertical;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* Send button, styled like .button */
.contact-form .form-submit {
  justify-self: start;
  padding: 0.9rem 1.8rem;

  background: var(--gold);
  color: var(--navy);
  border: 1px solid var(--gold);

  font-family: Arial, sans-serif;
  font-size: 0.85rem;
  font-weight: bold;
  cursor: pointer;

  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.contact-form .form-submit:hover,
.contact-form .form-submit:focus-visible {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

/* Spam honeypot: invisible to people, still present for bots */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* -----------------------------------------
   12. FOOTER
----------------------------------------- */

.site-footer {
  background: #10222d;
  color: #d9e0e1;

  padding: 2rem 0;
  text-align: center;

  font-family: Arial, sans-serif;
  font-size: 0.85rem;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--gold);
}

.site-footer a:hover {
  color: var(--white);
}

/* -----------------------------------------
   13. TABLET RESPONSIVE LAYOUT
----------------------------------------- */

@media (max-width: 1000px) {
  :root {
    --sidebar-width: 19%;
    --sidebar-min-width: 150px;
    --sidebar-max-width: 190px;
  }

  .side-header {
    padding: 2rem 0.8rem;
  }

  .side-header .logo {
    font-size: 1.3rem;
  }

  .side-nav a {
    font-size: 0.8rem;
    padding: 0.7rem 0.6rem;
  }

  .hero {
    min-height: 75vh;
  }

  .two-column,
  .contact-grid {
    gap: 2.5rem;
  }

  .card-grid {
    gap: 1.2rem;
  }

  .card-content {
    padding: 1.2rem;
  }
}

/* -----------------------------------------
   14. MOBILE NAVIGATION AND LAYOUT
----------------------------------------- */

@media (max-width: 700px) {
  body {
    padding-left: 0;
    padding-top: 125px;
  }

  /* Sidebar becomes a top navigation bar */

  .side-header {
    top: 0;
    left: 0;
    right: 0;
    bottom: auto;

    width: 100%;
    height: 125px;

    padding: 0.75rem 1rem;

    justify-content: center;
    align-items: center;
    gap: 0.5rem;

    overflow: visible;
  }

  .side-header .logo {
    margin: 0;
    font-size: 1.3rem;
  }

  /* Horizontal navigation */

  .side-nav {
    flex-direction: row;
    flex-wrap: wrap;

    justify-content: center;
    align-items: center;

    gap: 0.25rem;
  }

  .side-nav a {
    padding: 0.45rem 0.6rem;

    font-size: 0.75rem;
    white-space: nowrap;
  }

  .sidebar-footer {
    display: none;
  }

  /* Disable parallax on mobile */

  .hero {
    min-height: 65vh;
    min-height: 65svh;

    background-attachment: scroll;
  }

  .page-banner {
    background-attachment: scroll;
  }

  .hero-content {
    padding: 3rem 0;
  }

  .hero h1 {
    font-size: clamp(2.2rem, 8vw, 3.5rem);
  }

  .hero p {
    font-size: 1rem;
  }

  /* Stack columns */

  .two-column,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .image-rounded {
    height: 320px;
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section {
    padding: 3.5rem 0;
  }

  .page-banner {
    padding: 3.5rem 0;
  }
}

/* -----------------------------------------
   15. SMALL MOBILE SCREENS
----------------------------------------- */

@media (max-width: 400px) {
  body {
    padding-top: 145px;
  }

  .side-header {
    height: 145px;
  }

  .side-nav {
    gap: 0.2rem;
  }

  .side-nav a {
    font-size: 0.7rem;
    padding: 0.4rem 0.5rem;
  }

  .hero {
    min-height: 60vh;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .card-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid img {
    height: 260px;
  }

  .event {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1.5rem;
  }

  .event-date {
    text-align: left;

    border-right: none;
    border-bottom: 1px solid var(--border);

    padding: 0 0 1rem;
  }

  .contact-details {
    padding: 1.5rem;
  }
}

/* -----------------------------------------
   16. REDUCED MOTION ACCESSIBILITY
----------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
/* -----------------------------------------
   17. GALLERY LIGHTBOX
   (paste at the end of style.css)
----------------------------------------- */

/* Photo buttons in the grid */
.gallery-item {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: zoom-in;
  overflow: hidden;
}

.gallery-item:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* Full-screen viewer */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(0, 0, 0, 0.92);
  padding: 1rem;
}

.lightbox[hidden] {
  display: none;
}

.lb-figure {
  max-width: min(1100px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lb-figure img {
  max-width: 100%;
  max-height: calc(100dvh - 7rem);
  width: auto;
  height: auto;
  object-fit: contain;
}

.lb-figure figcaption {
  margin-top: 0.75rem;
  color: var(--white);
  font-family: Arial, sans-serif;
  font-size: 0.95rem;
  text-align: center;
}

.lb-count {
  display: block;
  margin-top: 0.2rem;
  color: var(--gold);
  font-size: 0.8rem;
}

.lb-btn {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;

  width: 48px;
  height: 48px;

  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: var(--white);

  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;

  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.lb-btn:hover,
.lb-btn:focus-visible {
  background: var(--gold);
  color: var(--navy);
}

.lb-close {
  top: 1rem;
  right: 1rem;
  font-size: 2rem;
}

.lb-prev {
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

.lb-next {
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

/* On phones keep arrows small and tucked at the bottom corners */
@media (max-width: 700px) {
  .lb-btn {
    width: 42px;
    height: 42px;
  }

  .lb-prev,
  .lb-next {
    top: auto;
    bottom: 1rem;
    transform: none;
  }

  .lb-figure img {
    max-height: calc(100dvh - 10rem);
  }
}
/* Video gallery */
.gallery-item {
  position: relative;
  cursor: pointer;
} /* lets the play button sit on top */

.lb-figure video {
  max-width: 100%;
  max-height: calc(100dvh - 7rem);
  background: #000;
}

@media (max-width: 700px) {
  .lb-figure video {
    max-height: calc(100dvh - 10rem);
  }
}
/* -----------------------------------------
   18. MEMBERS PAGE
   Replaces the old global "ul" rules.
   Only applies to <ul class="members-nav">
----------------------------------------- */

.members-nav {
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;

  display: flex;
  flex-wrap: wrap;
  justify-content: center;

  background-color: #333333;
}

.members-nav li {
  margin: 0;
}

.members-nav a {
  display: block;
  padding: 14px 16px;

  color: var(--white);
  text-align: center;
  text-decoration: none;
}

.members-nav a:hover,
.members-nav a:focus-visible {
  background-color: #111111;
}