/* ===========================================================
   IrishBuses.ie — stylesheet
   Palette: white (#ffffff) + deep green (#0d2d1a)
   =========================================================== */

:root {
  --green: #0d2d1a;
  --green-light: #17472b;
  --white: #ffffff;
  --off-white: #f6f5f1;
  --pale-sage: #eaf1ec;
  --text: #1a1a1a;
  --max-width: 1080px;
  --radius: 6px;
  --shadow: 0 4px 18px rgba(13, 45, 26, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 96px 0;
}

h1, h2, h3 {
  margin: 0 0 16px;
  font-weight: 700;
  color: var(--green);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--green);
  opacity: 0.75;
  margin-bottom: 10px;
  display: block;
}

.section-head {
  max-width: 640px;
  margin: 0 auto 48px;
  text-align: center;
}

.section-head h2 {
  font-size: 2.1rem;
}

.section-head p {
  color: #444;
  margin: 0;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 13px 30px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid var(--green);
  transition: all 0.2s ease;
  cursor: pointer;
  font-size: 0.95rem;
}

.btn-primary {
  background: var(--green);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--green-light);
  border-color: var(--green-light);
}

.btn-outline {
  background: transparent;
  color: var(--green);
}

.btn-outline:hover {
  background: var(--green);
  color: var(--white);
}

.btn-outline.on-dark {
  color: var(--white);
  border-color: var(--white);
}

.btn-outline.on-dark:hover {
  background: var(--white);
  color: var(--green);
}

/* ---------- Nav bar ---------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--green);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-logo img {
  height: 38px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--white);
  font-weight: 700;
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease;
}

.nav-links a:hover,
.nav-links a:focus {
  border-bottom-color: var(--white);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 26px;
  height: 3px;
  background: var(--white);
  border-radius: 2px;
}

/* ---------- Hero / About (merged) ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  color: var(--white);
  background: url("../images/hero/hero-depot.jpg") center 40% / cover no-repeat;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(13, 45, 26, 0.55) 0%, rgba(13, 45, 26, 0.35) 40%, rgba(13, 45, 26, 0.92) 100%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding-bottom: 90px;
  padding-top: 160px;
  max-width: var(--max-width);
}

.eyebrow.on-dark {
  color: var(--white);
  opacity: 0.85;
}

.hero-tagline {
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  color: var(--white);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 24px;
}

.hero-copy {
  background: rgba(13, 45, 26, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 24px;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.hero-copy p {
  font-size: 1.05rem;
  line-height: 1.75;
  color: #f4f7f5;
  margin: 0 0 16px;
}

.hero-copy p:last-child {
  margin-bottom: 0;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 12px;
}

/* ---------- Gallery (full-width auto-playing slider) ---------- */

#gallery {
  background: var(--off-white);
  padding-top: 0;
  padding-bottom: 0;
}

.gallery-scroller-wrap {
  position: relative;
  width: 100%;
}

.gallery-grid {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.gallery-grid::-webkit-scrollbar {
  display: none;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  flex: 0 0 100%;
  width: 100%;
  height: min(60vh, 520px);
  cursor: pointer;
  scroll-snap-align: start;
  border-radius: var(--radius);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 44px 32px 24px;
  background: linear-gradient(0deg, rgba(13, 45, 26, 0.88), transparent);
  color: var(--white);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.5;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(13, 45, 26, 0.55);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.4);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.gallery-nav:hover {
  background: rgba(13, 45, 26, 0.85);
}

.gallery-nav-prev {
  left: 24px;
}

.gallery-nav-next {
  right: 24px;
}

.gallery-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -40px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.gallery-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(13, 45, 26, 0.25);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.gallery-dot.active {
  background: var(--green);
  transform: scale(1.25);
}

/* Lightbox */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(13, 45, 26, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 32px;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 82vh;
  border-radius: var(--radius);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
  color: var(--white);
  text-align: center;
  margin-top: 16px;
  font-size: 0.95rem;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close {
  top: 24px;
  right: 24px;
}

.lightbox-prev {
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ---------- News ---------- */

.news {
  background: var(--off-white);
  border-top: 1px solid rgba(13, 45, 26, 0.08);
}

.news-scroller-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.news-grid {
  display: flex;
  gap: 26px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 4px 4px 12px;
  flex: 1;
  min-width: 0;
}

.news-grid::-webkit-scrollbar {
  display: none;
}

.news-nav {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.news-nav:hover {
  background: var(--green-light);
}

.news-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  flex: 0 0 320px;
  scroll-snap-align: start;
}

.news-card-media {
  aspect-ratio: 16 / 10;
  background: var(--green);
  overflow: hidden;
}

.news-card-media img,
.news-card-media iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: none;
}

.news-card-body {
  padding: 20px 22px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.news-date {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #888;
  font-weight: 700;
  margin-bottom: 8px;
}

.news-card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.news-excerpt {
  color: #444;
  font-size: 0.94rem;
  margin: 0 0 16px;
  flex: 1;
}

.news-readmore {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--green);
  text-decoration: none;
  border-bottom: 2px solid var(--green);
  align-self: flex-start;
}

.news-empty,
.news-error {
  text-align: center;
  color: #666;
  padding: 40px 20px;
  flex: 1 1 100%;
}

/* Article modal */

.article-modal {
  position: fixed;
  inset: 0;
  background: rgba(13, 45, 26, 0.7);
  display: none;
  align-items: flex-start;
  justify-content: center;
  z-index: 2100;
  padding: 60px 20px;
  overflow-y: auto;
}

.article-modal.open {
  display: flex;
}

.article-panel {
  background: var(--white);
  max-width: 760px;
  width: 100%;
  border-radius: var(--radius);
  padding: 40px;
  position: relative;
}

.article-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: var(--off-white);
  border: none;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  font-size: 1.2rem;
  cursor: pointer;
}

.article-panel .news-date {
  margin-bottom: 6px;
}

.article-panel h2 {
  margin-top: 4px;
}

.article-body {
  color: #333;
  margin-top: 18px;
}

.article-body img {
  border-radius: var(--radius);
  margin: 18px 0;
}

.article-body iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
  border-radius: var(--radius);
  margin: 18px 0;
}

.article-body p {
  margin: 0 0 14px;
}

/* ---------- Contact ---------- */

.contact {
  background: var(--green);
  color: var(--white);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.contact .section-head h2,
.contact .eyebrow,
.contact-info h2 {
  color: var(--white);
}

.contact .section-head p {
  color: #cfe0d5;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: start;
}

.contact-info h3 {
  color: var(--white);
  font-size: 1.2rem;
}

.contact-info p {
  color: #cfe0d5;
  margin: 0 0 22px;
}

.contact-detail {
  margin-bottom: 18px;
}

.contact-detail strong {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9fc2ac;
  margin-bottom: 4px;
}

.contact-detail a {
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
}

.contact-detail a:hover {
  text-decoration: underline;
}

/* FAQ accordion */

.faq-list {
  margin-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.faq-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 34px 18px 0;
  position: relative;
  font-weight: 700;
  color: var(--white);
  font-size: 1rem;
  line-height: 1.4;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 2px;
  top: 16px;
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--white);
  transition: transform 0.25s ease;
  transform-origin: center;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item p {
  color: #cfe0d5;
  margin: 0 0 20px;
  padding-right: 20px;
  font-size: 0.95rem;
  line-height: 1.7;
}

.faq-contact-note {
  margin-top: 24px !important;
  font-size: 0.9rem;
}

.faq-contact-note a {
  color: var(--white);
  font-weight: 700;
  text-decoration: underline;
}

.contact-form {
  background: var(--white);
  border-radius: var(--radius);
  padding: 34px;
  color: var(--text);
}

.form-row {
  margin-bottom: 18px;
}

.form-row label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--green);
}

.form-row input,
.form-row textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d5d5d5;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
}

.form-row input:focus,
.form-row textarea:focus {
  outline: 2px solid var(--green);
  outline-offset: 1px;
}

.contact-form button {
  width: 100%;
}

.form-note {
  font-size: 0.8rem;
  color: #777;
  margin-top: 12px;
  text-align: center;
}

/* ---------- Footer ---------- */

.site-footer {
  background: #081d11;
  color: #b9c9bf;
  padding: 36px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.85rem;
}

.site-footer a {
  color: var(--white);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .news-card {
    flex-basis: 280px;
  }

  .gallery-item {
    height: 60vh;
  }

  .gallery-nav {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
  }

  .gallery-nav-prev {
    left: 12px;
  }

  .gallery-nav-next {
    right: 12px;
  }
}

@media (max-width: 720px) {
  section {
    padding: 64px 0;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--green);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px 28px;
    gap: 18px;
    display: none;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  }

  .nav-links.open {
    display: flex;
  }

  .hero-inner {
    padding-top: 130px;
  }

  .news-card {
    flex-basis: 78vw;
  }

  .news-nav {
    width: 38px;
    height: 38px;
    font-size: 1.2rem;
  }

  .gallery-item {
    height: 42vh;
  }

  .gallery-caption {
    padding: 36px 20px 20px;
    font-size: 0.85rem;
  }

  .gallery-nav {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
  }

  .article-panel {
    padding: 26px 20px;
  }
}
