/* Responsive layout for Penicuik Community Theatre Group site.
   Loaded after wpstyles.css; works alongside each page's own <style> block,
   which still supplies text colours/fonts (the .C-*, .P-*, .Body classes). */

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

html, body {
  overflow-x: hidden;
  max-width: 100%;
}

body {
  margin: 0;
  background: #eef0f2;
}

#divMain {
  width: 100%;
  max-width: 960px;
  margin: 20px auto;
  position: relative;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

@media (max-width: 600px) {
  #divMain {
    margin: 0 auto;
    border-radius: 0;
    box-shadow: none;
  }
}

img {
  max-width: 100%;
  height: auto;
}

/* ---------- Header + navigation ---------- */

.site-header {
  padding: 12px 16px 0;
}

.site-header-top {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.site-logo {
  width: 90px;
  height: auto;
  flex-shrink: 0;
}

.site-title {
  font-family: "Arial Rounded MT Bold", sans-serif;
  font-weight: normal;
  font-size: clamp(22px, 5.5vw, 40px);
  line-height: 1.15;
  color: #f50000;
  margin: 4px 0;
}

.site-title-accent {
  color: #000000;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 8px;
  padding: 0;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-width: 90px;
  padding: 10px 14px;
  background: #f50000;
  color: #ffffff;
  font-family: "Arial Rounded MT Bold", sans-serif;
  font-size: 15px;
  text-align: center;
  text-decoration: none;
  border-radius: 8px;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  transition: background-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.nav-link:link, .nav-link:visited {
  color: #ffffff;
  text-decoration: none;
}

.nav-link:hover {
  background: #c40000;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.nav-link.is-current {
  background: #000000;
}

/* ---------- Page content ---------- */

.page-container {
  padding: 20px 16px 40px;
}

.content-block {
  margin-bottom: 14px;
}

.content-heading {
  font-family: "Arial Black", sans-serif;
  font-weight: 700;
  color: #d22600;
  background: #ffffff;
  font-size: clamp(20px, 5vw, 27px);
  letter-spacing: 0.5px;
  margin: 0 0 6px;
  padding-bottom: 10px;
  border-bottom: 3px solid #f50000;
  display: inline-block;
}

/* Photo gallery grids (photo collage pages) */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin: 16px 0;
  list-style: none;
  padding: 0;
}

.gallery img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.gallery img:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
}

/* Stacked poster/graphic pages */

.poster-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin: 16px 0;
}

.poster-stack img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.poster-stack img.poster-shadow {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Simple two-column layout (text + side image), stacks on narrow screens */

.text-with-side-images {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.text-with-side-images .main-text {
  flex: 3 1 380px;
  min-width: 0;
}

.text-with-side-images .side-images {
  flex: 1 1 200px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 160px;
  max-width: 240px;
}

.side-images img {
  width: 100%;
  height: auto;
}

@media (max-width: 600px) {
  .site-header-top {
    justify-content: center;
    text-align: center;
  }

  .site-title {
    text-align: center;
    width: 100%;
  }

  .nav-link {
    flex: 1 1 42%;
  }

  .text-with-side-images .side-images {
    max-width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .side-images img {
    width: calc(50% - 6px);
  }
}
