:root {
  --akf-red: #A42323;
  --akf-green: #2E8B57;
  --akf-red-dark: #b30000;
  --akf-black: #1a1a1a;
  --akf-gray: #555;
  --akf-light: #f6f6f6;
  --max-width: 1100px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  color: var(--akf-black);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a { color: var(--akf-red); xtext-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---- Header / nav ---- */
header.site-header {
  border-bottom: 1px solid #eee;
}

/* Homepage: header floats transparently over the hero image */
body.has-hero-header { position: relative; }
body.has-hero-header header.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  background: transparent;
  border-bottom: none;
}
body.has-hero-header main { padding-top: 0; }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.logo img { height: 44px; width: auto; display: block; }

.location-card h3 { margin: 0 0 0.25rem; color: var(--akf-black); }
.location-card p { margin: 0; color: var(--akf-gray); font-size: 0.9rem; }
.location-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.08); text-decoration: none; }

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

nav.main-nav > ul > li {
  position: relative;
}

nav.main-nav > ul > li > a {
  color: var(--akf-black);
  font-weight: 900;
  text-transform: uppercase;
  font-size: 1.1rem;
  letter-spacing: 0.03em;
}

nav.main-nav .dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  border: 1px solid #eee;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  min-width: 240px;
  padding: 0.5rem 0;
  z-index: 10;
}

nav.main-nav li:hover .dropdown { display: block; }

nav.main-nav .dropdown li a {
  display: block;
  padding: 0.5rem 1.25rem;
  font-weight: 400;
  text-transform: none;
  font-size: 0.95rem;
  color: var(--akf-black);
}

nav.main-nav .dropdown li a:hover { background: var(--akf-light); text-decoration: none; }

/* ---- Hero / generic sections ---- */
.hero {
  background: var(--akf-black);
  color: white;
  padding: 3rem 1.5rem;
  text-align: center;
}

.hero--image {
  background: url('/images/background.jpg') center / cover no-repeat;
  min-height: 428px;
  padding: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.hero-inner {
  padding: 0 1.5rem 4rem;
  text-align: center;
}

.hero-title {
  color: #fff;
  font-size: 3rem;
  font-weight: 700;
  margin: 0;
  text-shadow: 0 2px 10px rgba(0,0,0,0.6);
}

.btn-red {
  display: inline-block;
  background: var(--akf-red);
  color: white;
  padding: 0.75rem 1.75rem;
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.9rem;
  text-decoration: none;
}
.btn-red:hover { opacity: 0.92; }

/* ---- Home: programs ---- */
.programs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
  margin-bottom: 1rem;
}

.program {
  text-align: center;
}

.program h3 {
  text-transform: uppercase;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
}

.program .ages {
  white-space: nowrap;
}

.program-links {
  margin-top: 1rem;
  line-height: 1.9;
}

.section-title {
  text-align: center;
  color: var(--akf-red);
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 1.7rem;
  font-weight: 700;
  border-bottom: none;
  margin: 3rem 0 2rem;
}

/* thin divider rules between homepage sections */
.section-rule {
  border: none;
  border-top: 1px solid #e5e5e5;
  margin: 3rem 0 0;
}

main { padding: 0 3rem; flex: 1 0 auto; }

.breadcrumb {
  font-size: 1rem;
  color: var(--akf-gray);
  margin-bottom: 1.5rem;
}

.breadcrumb a { color: var(--akf-gray); }

/* ---- Location page ---- */
.map-embed {
  width: 100%;
  height: 320px;
  border: 0;
  margin-bottom: 1.5rem;
}

.venue-block h2 { margin-bottom: 0.25rem; }
.venue-block p { margin: 0; color: var(--akf-gray); }

.location-body img,
.resource-body img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

/* Float an image so text wraps to its right (e.g. Discover Our History) */
.resource-body img.float-left,
.location-body img.float-left {
  float: left;
  max-width: 320px;
  margin: 0.25rem 1.75rem 1rem 0;
  padding-bottom: 30px;
}
/* stop a heading from riding up alongside the float */
.resource-body h2 { clear: left; }

.location-body h2,
.resource-body h2 {
  border-bottom: 2px solid var(--akf-red);
  padding-bottom: 0.25rem;
  margin-top: 2.5rem;
  color: var(--akf-red);
}

.program-name { color: var(--akf-red); }

/* ---- Resource cards ---- */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.resource-card {
  border: 1px solid #eee;
  border-radius: 6px;
  padding: 1.5rem;
  transition: box-shadow 0.15s ease;
}

.resource-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.08); text-decoration: none; }
.resource-card h3 { margin-top: 0; color: var(--akf-black); }

/* Three "fists / mind / heart" images, side by side */
.resource-images {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin: 2rem 0;
}
.resource-images img {
  max-height: 400px;
  max-width: 100%;
  width: auto;
  height: auto;
  border-radius: 6px;
}

/* ---- Location index cards (home / dojo-locations) ---- */
.location-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.location-card {
  border: 1px solid #eee;
  border-radius: 6px;
  padding: 1.25rem;
  text-align: center;
}

/* ---- Events page ---- */
.event-list {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.25rem;
}

.event-card {
  position: relative;
  display: flex;
  gap: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 1.25rem 1.25rem 1rem;
}

.event-main { flex: 1 1 auto; min-width: 0; }

/* Calendar-tile icon: red month header over a large day number */
.event-cal {
  flex: 0 0 auto;
  width: 58px;
  align-self: flex-start;
  text-align: center;
  background: #fff;
  border: 1px solid #e2e2e2;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.event-cal-month {
  display: block;
  background: var(--akf-red);
  color: #fff;
  text-transform: uppercase;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.15rem 0;
}
.event-cal-day {
  display: block;
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--akf-black);
  padding: 0.15rem 0 0.25rem;
}

/* Category rendered as a fieldset-style legend sitting on the top border */
.event-category {
  position: absolute;
  top: 0;
  left: 1rem;
  transform: translateY(-50%);
  background: #fff;
  padding: 0 0.5rem;
  margin: 0;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--akf-red);
  font-weight: 700;
}

.event-card h2 { margin: 0 0 0.15rem; font-size: 1.3rem; }

.event-subtitle { color: var(--akf-gray); margin: 0 0 0.35rem; font-style: italic; }

.event-when { font-weight: 600; margin: 0.1rem 0; }

.event-where { color: var(--akf-gray); margin: 0.1rem 0; }

.event-fee { margin: 0.1rem 0; }

.event-body { margin-top: 0.5rem; }
.event-body p { margin: 0.35rem 0; }
.event-body p:first-child { margin-top: 0; }

.btn-green {
  display: inline-block;
  margin-top: 0.75rem;
  background: var(--akf-green);
  color: white;
  padding: 0.5rem 1.1rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
}
.btn-green:hover { opacity: 0.9; }
.event-main .btn-green { margin-top: 0; }

.past-events {
  margin-top: 2.5rem;
  border-top: 1px solid #eee;
  padding-top: 1.25rem;
}
.past-events summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--akf-gray);
}
.event-card--past { opacity: 0.7; padding: 1rem 1.25rem 0.75rem; }
.event-card--past .event-cal { width: 48px; }
.event-card--past .event-cal-day { font-size: 1.35rem; }
.event-card--past h2 { font-size: 1.05rem; }

/* ---- News ---- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
  margin-top: 2rem;
}

/* Homepage news: borderless columns (matches live site) */
.news-item h3 { margin: 0 0 0.25rem; }
.news-item h3 a { color: var(--akf-black); }
.news-item h3 a:hover { color: var(--akf-red); text-decoration: none; }
.news-item .news-meta { color: var(--akf-gray); font-size: 0.85rem; margin: 0 0 0.75rem; }
.news-item p:not(.news-meta) { margin: 0 0 0.75rem; }

/* Homepage "Why Join" — two-column text, no card borders (matches live site) */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem 3rem;
  margin-top: 2rem;
}
.why-item h3 {
  text-transform: uppercase;
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}
.why-item p { margin: 0 0 0.5rem; }
.why-item a { font-weight: 600; }

.news-list {
  display: grid;
  gap: 1.5rem;
  margin-top: 1.5rem;
  max-width: 760px;
}

.news-card {
  border: 1px solid #eee;
  border-radius: 6px;
  padding: 1.5rem;
}

.news-card h2, .news-card h3 { margin: 0 0 0.25rem; }
.news-card h2 a, .news-card h3 a { color: var(--akf-black); }
.news-card h2 a:hover, .news-card h3 a:hover { color: var(--akf-red); text-decoration: none; }

.news-meta {
  color: var(--akf-gray);
  font-size: 0.85rem;
  margin: 0 0 0.75rem;
}

.news-card p:not(.news-meta) { margin: 0 0 0.75rem; }

.read-more {
  font-weight: 600;
  font-size: 0.9rem;
}

.news-all {
  text-align: center;
  margin-top: 1.5rem;
}
.news-all a { font-weight: 600; }

/* ---- Kata video thumbnails ---- */
.kata-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0 2.5rem;
}

.kata-video {
  position: relative;
  display: block;
  border-radius: 6px;
  overflow: hidden;
  background: #000;
  line-height: 0;
}

.kata-video img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.kata-video:hover { text-decoration: none; }
.kata-video:hover img { transform: scale(1.04); opacity: 0.85; }

/* red play button (circle + triangle) */
.kata-video::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 54px;
  height: 54px;
  background: rgba(221, 51, 51, 0.92);
  border-radius: 50%;
  z-index: 1;
}
.kata-video::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-40%, -50%);
  border-style: solid;
  border-width: 11px 0 11px 18px;
  border-color: transparent transparent transparent #fff;
  z-index: 2;
}

.kata-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.5rem 0.75rem 0.6rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.78));
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.3;
  z-index: 3;
}

/* ---- Footer ---- */
footer.site-footer {
  background: #fff;
  border-top: 1px solid #e5e5e5;
  padding: 2rem 1.5rem;
  margin-top: 3rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-contact {
  margin: 0;
  color: var(--akf-red);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.footer-social { margin: 0; }
.footer-social a { color: var(--akf-black); margin-left: 1rem; font-weight: 600; }
.footer-social a:first-child { margin-left: 0; }

@media (max-width: 640px) {
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-social a { margin: 0 0.5rem; }
}
