/* Shared styling for the recreated Markham Seniors site */
:root {
  --page-width: 1120px;
  --ink: #13212a;
  --muted: #4e5f69;
  --line: #b7c8d1;
  --panel: #eff7f4;
  --soft: #f1e2cf;
  --accent: #0a8d8a;
  --accent-strong: #073743;
  --accent-warm: #e07a1f;
  --accent-warm-soft: #f8d7b4;
  --tint: #dff2ee;
  --shadow-lg: 0 20px 52px rgba(14, 26, 34, 0.18);
  --shadow-md: 0 12px 28px rgba(14, 26, 34, 0.14);
  --shadow-sm: 0 5px 14px rgba(14, 26, 34, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(10, 141, 138, 0.26), transparent 30%),
    radial-gradient(circle at top right, rgba(224, 122, 31, 0.22), transparent 28%),
    radial-gradient(circle at bottom right, rgba(7, 55, 67, 0.2), transparent 32%),
    linear-gradient(180deg, #e8f4f1 0%, #cfe4df 100%);
  min-height: 100vh;
}

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

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

.site {
  width: min(var(--page-width), calc(100% - 24px));
  margin: 0 auto;
  background: var(--panel);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(199, 212, 222, 0.72);
  border-radius: 18px;
  overflow: hidden;
  position: relative;
}

.header {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(239,249,249,0.98), rgba(223,239,239,0.96));
}

.banner-placeholder {
  width: 100%;
  height: 200px;
  background: url("banner_top.png") center 40%/cover no-repeat;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.banner-placeholder::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0.08), transparent 25%, transparent 75%, rgba(255,255,255,0.08));
}

.menu-wrap {
  padding: 12px 18px 18px;
}

.menu-toggle {
  font-size: 20px;
  line-height: 1;
  color: var(--accent-strong);
  margin: 0 0 6px;
  width: fit-content;
  padding: 3px 10px 4px;
  border-radius: 999px;
  background: rgba(27, 106, 143, 0.08);
}

.menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 12px;
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-strong);
}

.menu > li {
  position: relative;
}

.menu > li::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 22px;
}

.menu > li > a {
  white-space: nowrap;
}

.menu .submenu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  list-style: none;
  margin: 0;
  padding: 8px;
  min-width: 220px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.99), rgba(238,246,246,0.99));
  border: 1px solid #d6e1ea;
  box-shadow: var(--shadow-lg);
  display: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease 0.1s, transform 0.2s ease 0.1s, visibility 0s linear 0.1s;
  z-index: 10;
}

.menu .submenu::before {
  content: "";
  position: absolute;
  left: 20px;
  top: -7px;
  width: 14px;
  height: 14px;
  background: inherit;
  border-left: 1px solid #d6e1ea;
  border-top: 1px solid #d6e1ea;
  transform: rotate(45deg);
}

.menu > li:hover .submenu,
.menu > li:focus-within .submenu {
  display: block;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition-delay: 0s;
}

.menu .submenu li + li {
  margin-top: 6px;
}

.menu .submenu a {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #f3f9f8);
  box-shadow: none;
  border: 1px solid #e2ebf2;
  text-transform: none;
  letter-spacing: 0;
}

.menu .submenu a:hover,
.menu .submenu a:focus-visible {
  background: linear-gradient(180deg, #ffffff, #e7f2f1);
}

.menu a {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid transparent;
  box-shadow: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

.menu a:hover,
.menu a:focus-visible,
.nav-links a:hover,
.nav-links a:focus-visible,
.office-group a:hover,
.office-group a:focus-visible {
  color: var(--accent-warm);
  outline: none;
  transform: translateY(-1px);
  background: transparent;
}

.content {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  background: linear-gradient(180deg, #eef7f4, #dfeeea);
}

.main,
.sidebar {
  padding: 22px;
}

.main {
  background: linear-gradient(180deg, rgba(239,249,249,0.98), rgba(231,244,242,0.98));
}

.main h1 {
  margin: 0 0 20px;
  font-size: clamp(2rem, 3vw, 2.7rem);
  line-height: 1.08;
  color: var(--accent-strong);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.article,
.page-section {
  font-size: 16px;
  line-height: 1.78;
  color: var(--ink);
}

.article::before,
.page-section::before {
  content: none;
}

.article p,
.page-section p {
  margin: 0 0 16px;
  max-width: 68ch;
}

.article h4,
.page-section h2,
.page-section h3 {
  margin: 22px 0 12px;
  line-height: 1.15;
}

.article h4 {
  font-size: 16px;
  font-weight: 700;
}

.page-section h2 {
  font-size: 31px;
}

.page-section h3 {
  font-size: 19px;
}

.article ol,
.page-section ol,
.page-section ul {
  margin: 0 0 18px 24px;
  padding: 0;
}

.article li,
.page-section li {
  margin-bottom: 10px;
}

.article li::marker,
.page-section li::marker {
  color: var(--accent-warm);
}

.email-image {
  margin-top: 14px;
  width: 310px;
  height: 48px;
  max-width: 100%;
  border: 1px solid #bfd0dc;
  background: linear-gradient(180deg, #eaf7f4, #c8e1dc);
  display: grid;
  place-items: center;
  color: var(--accent-strong);
  font-size: 14px;
  letter-spacing: 0.02em;
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(7, 55, 67, 0.12), rgba(255,255,255,0.00) 24%),
    #e9f5f2;
  position: relative;
}

.sidebar::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 18px;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent), var(--accent-warm));
  opacity: 0.25;
}

.sidebar .follow {
  margin: 0 0 8px;
  font-size: 16px;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.search input,
.form-grid input,
.form-grid textarea,
.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid #cdd9e3;
  border-radius: 10px;
  padding: 11px 12px;
  font: inherit;
  color: var(--ink);
  background: linear-gradient(180deg, #ffffff, #e8f4f1);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

.sidebar-image {
  height: 56px;
  margin: 8px 0 18px;
  border: 1px solid #d4e0e8;
  background: linear-gradient(180deg, #edf7f4, #cfe3df);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}

.office-group {
  margin-bottom: 18px;
}

.office-group h3 {
  margin: 0 0 8px;
  font-size: 18px;
  color: var(--ink);
  text-transform: uppercase;
  line-height: 1.15;
  letter-spacing: 0.02em;
}

.office-group ul {
  list-style: disc;
  margin: 0 0 0 20px;
  padding: 0;
}

.office-group li {
  margin-bottom: 8px;
  line-height: 1.45;
}

.office-group a {
  color: var(--accent-strong);
  text-decoration: underline;
}

.more-label {
  margin: 8px 0 14px;
  font-size: 15px;
  color: var(--muted);
}

.footer {
  border-top: 1px solid var(--line);
  padding: 16px 18px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: space-between;
  color: var(--muted);
  font-size: 14px;
  background: linear-gradient(180deg, rgba(235,246,246,0.92), rgba(208,229,227,0.98));
}

.to-top {
  font-size: 18px;
  color: var(--accent-warm);
  line-height: 1;
}

.page-title {
  margin: 0 0 16px;
  font-size: 32px;
  line-height: 1.15;
  color: var(--accent-strong);
  letter-spacing: -0.02em;
}

.page-intro {
  margin-bottom: 16px;
}

.info-box,
.card,
.form-card,
.table-card {
  border: 1px solid #d5e1ea;
  background: linear-gradient(180deg, #ffffff, #eaf5f2);
  border-radius: 14px;
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.cards,
.gallery-grid,
.download-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.cards.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.directors-card {
  margin-top: 18px;
}

.directors-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px 18px;
}

.directors-list li {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #e2ebf2;
  background: linear-gradient(180deg, #ffffff, #e5f2ef);
}

.card h3,
.form-card h3,
.info-box h3,
.table-card h3 {
  margin-top: 0;
  color: var(--accent-strong);
}

.card:hover,
.form-card:hover,
.info-box:hover,
.table-card:hover {
  box-shadow: var(--shadow-md);
}

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

.table-card table {
  width: 100%;
  border-collapse: collapse;
}

.table-card th,
.table-card td {
  border-bottom: 1px solid #dbe5ec;
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
}

.table-card th {
  background: linear-gradient(180deg, #dcedeb, #c9e0dc);
  color: var(--accent-strong);
}

.gallery-tile {
  min-height: 160px;
  border: 1px solid #d7e2ea;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(10, 141, 138, 0.2), rgba(224, 122, 31, 0.18)),
    linear-gradient(180deg, #e8f4f1, #cfe4df);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-strong);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  box-shadow: var(--shadow-sm);
}

.gallery-photo {
  width: 100%;
  height: auto;
  max-height: 260px;
  object-fit: contain;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.form-grid .full {
  grid-column: 1 / -1;
}

.contact-form {
  display: grid;
  gap: 12px;
}

.button {
  display: inline-block;
  border: 1px solid #b9cdd9;
  background: linear-gradient(180deg, #ffffff, #dbeeea);
  color: var(--accent-strong);
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  outline: none;
  background: linear-gradient(180deg, #ffffff, #c6e2dd);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  font-size: 13px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.nav-links a {
  color: var(--accent-strong);
}

.cards .card,
.download-grid .card,
.gallery-grid .gallery-tile,
.form-card,
.table-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cards .card:hover,
.download-grid .card:hover,
.gallery-grid .gallery-tile:hover,
.form-card:hover,
.table-card:hover {
  transform: translateY(-2px);
}

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

  .main {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .sidebar::before {
    display: none;
  }

  .cards.three,
  .cards,
  .gallery-grid,
  .download-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .menu .submenu {
    position: static;
    min-width: 0;
    margin-top: 8px;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
  }
}

@media (max-width: 640px) {
  .site {
    width: calc(100% - 12px);
    border-radius: 14px;
  }

  .main h1,
  .page-title {
    font-size: 26px;
  }

  .menu {
    gap: 8px 8px;
    font-size: 12px;
  }

  .menu a {
    padding: 7px 10px;
  }

  .main,
  .sidebar {
    padding: 16px;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
  }
}
