/* ── Hide sidebar nav ── */
.md-sidebar {
  display: none;
}

/* ── Single header bar: logo left, nav right ── */
.md-header__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.md-header__nav {
  margin-left: auto;
}

.md-header__nav ul {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.md-header__nav ul li a {
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.85;
  transition: opacity 0.2s;
}

.md-header__nav ul li a:hover,
.md-header__nav ul li a.active {
  opacity: 1;
  color: #a5d6a7;
}

/* Header social icons */
.md-header__nav .md-social__link svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: currentColor;
  vertical-align: middle;
}

/* Hide the default tabs bar */
.md-tabs {
  display: none;
}

/* ── Hamburger button — hidden on desktop ── */
.md-header__hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 2rem;
  height: 1.4rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-left: auto;
  flex-shrink: 0;
}

.md-header__hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* Animate to X when open */
.md-header__hamburger.is-open span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}
.md-header__hamburger.is-open span:nth-child(2) {
  opacity: 0;
}
.md-header__hamburger.is-open span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* ── Mobile nav drawer ── */
.md-header__mobile-nav {
  display: none;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.md-header__mobile-nav.is-open {
  max-height: 400px;
  padding: 0.5rem 0 1rem;
}

.md-header__mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.md-header__mobile-nav ul li a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  color: #fff;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.85;
  transition: opacity 0.2s, background 0.2s;
}

.md-header__mobile-nav ul li a svg {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
  flex-shrink: 0;
}

.md-header__mobile-nav ul li a:hover,
.md-header__mobile-nav ul li a.active {
  opacity: 1;
  color: #a5d6a7;
  background: rgba(255,255,255,0.05);
}

@media (max-width: 760px) {
  /* Hide desktop nav, show hamburger */
  .md-header__nav {
    display: none;
  }

  .md-header__hamburger {
    display: flex;
  }

  .md-header__mobile-nav {
    display: block;
  }

  .md-header__title {
    display: none;
  }

  /* Force badge/logo to show on mobile */
  .md-header__button.md-logo {
    display: inline-block !important;
  }
}

/* ── Full-page background via fixed pseudo-element ── */
/* This approach works correctly on all devices including iOS,
   and covers the full page even when content is taller than the viewport */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

body.home::before    { background-image: url('../images/home-bg.jpg'); }
body.about::before   { background-image: url('../images/about-bg.jpg'); }
body.contact::before { background-image: url('../images/contact-bg.jpg'); }

/* ── Transparent site chrome ── */
.md-header,
.md-footer {
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
}

/* Footer link colour consistency */
html .md-footer-meta.md-typeset a,
.md-footer a,
.md-footer-meta a {
  color: rgba(255,255,255,0.85);
}

html .md-footer-meta.md-typeset a:hover,
html .md-footer-meta.md-typeset a:focus,
.md-footer a:hover,
.md-footer-meta a:hover {
  color: #a5d6a7;
}

.md-footer .md-social__link {
  color: rgba(255,255,255,0.85);
}

.md-footer .md-social__link:hover {
  color: #a5d6a7;
}

.md-footer .md-social__link svg {
  fill: currentColor;
}

/* Make main content area transparent so background shows through */
.md-main__inner {
  background: transparent;
  display: block;
  max-width: 100%;
  padding-top: 0;
}

.md-content {
  background: transparent;
  max-width: 1080px;
  margin: 0 auto;
}

.md-main {
  background: transparent;
}

/* ── Content wrapper — transparent, centres frosted panels ── */
.md-content__inner {
  background: transparent;
  max-width: 1080px;
  margin: 0.5rem auto 2rem;
  padding: 0 1rem;
}

/* ── Frosted glass panels ── */
.frosted-panel {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 2rem;
  margin: 1.5rem auto;
  max-width: 1080px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  text-align: center;
}

/* Left-align paragraphs on About page only */
body.about .frosted-panel p {
  text-align: left;
}

/* Lists inside frosted panels: centre the block, left-align text with bullets */
.frosted-panel ul {
  display: inline-block;
  text-align: left;
  margin: 1rem 0;
  padding-left: 1.5em;
}

/* ── Text contrast on frosted panels ── */
.frosted-panel,
.frosted-panel h1,
.frosted-panel h2,
.frosted-panel h3,
.frosted-panel p,
.frosted-panel li {
  color: #fff;
}

.frosted-panel a {
  color: #a5d6a7;
}

/* ── Nav link contrast ── */
.md-header__title,
.md-nav__link,
.md-nav__title {
  color: #fff !important;
}

/* ── Page title hero area ── */
.frosted-panel h1 {
  font-size: 2.4rem;
  font-weight: 700;
  text-align: center;
  margin: 0 0 0.5rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

.frosted-panel h2 {
  text-align: center;
  margin-top: 0;
}

/* ── Card grid (home page) ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.card {
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  border-radius: 10px;
  overflow: hidden;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  color: #fff;
  display: block;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  color: #fff;
}

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

.card-body {
  padding: 1rem;
}

.card-body h3 {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
  color: #fff;
}

.card-body p {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.8);
}

/* ── Photo grid (about page) ── */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.photo-grid img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 8px;
}

/* ── Contact links ── */
.contact-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.contact-link {
  display: flex;
  align-items: center;
  padding: 1.5rem;
  color: #fff;
  text-decoration: none;
  font-size: 1rem;
  transition: background 0.2s ease;
  text-align: left !important;
}

.contact-link:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #a5d6a7;
}

.contact-text {
  flex: 1;
}

.contact-text h3 {
  margin: 0 0 0.3rem;
  font-size: 1.1rem;
  color: #fff;
}

.contact-text p {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.8);
}

.contact-icon {
  flex-shrink: 0;
  width: 2.5rem;
  margin-left: 1.5rem;
}

.contact-icon svg {
  width: 100%;
  height: auto;
  fill: rgba(255,255,255,0.85);
  transition: fill 0.2s ease;
}

.contact-link:hover .contact-icon svg {
  fill: #a5d6a7;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .card-grid,
  .photo-grid,
  .contact-links {
    grid-template-columns: 1fr;
  }
  
  /* Reduce panel padding on mobile */
  .frosted-panel {
    padding: 1.5rem 1rem;
    margin: 1rem auto;
  }
  
  /* Smaller heading sizes on mobile */
  .frosted-panel h1 {
    font-size: 1.8rem;
  }
  
  .frosted-panel h2 {
    font-size: 1.4rem;
  }
  
  /* Better photo grid on mobile */
  .photo-grid img {
    height: 200px;
  }
  
  /* Stack contact link content better */
  .contact-link {
    padding: 1rem;
  }
  
  .contact-icon {
    width: 2rem;
    margin-left: 1rem;
  }
}

/* Mobile-specific improvements for very small screens */
@media (max-width: 480px) {
  /* Even smaller padding */
  .frosted-panel {
    padding: 1rem 0.75rem;
    border-radius: 8px;
  }
  
  /* Smaller headings */
  .frosted-panel h1 {
    font-size: 1.5rem;
  }
  
  .frosted-panel h2 {
    font-size: 1.2rem;
  }
  
  /* Tighter content spacing */
  .md-content__inner {
    padding: 0 0.5rem;
  }
  
  /* Make header more compact */
  .md-header__inner {
    padding: 0.5rem;
  }
  
  .md-header__nav ul {
    gap: 0.75rem;
    font-size: 0.75rem;
  }
}
