/* =========================================================
   ISKF Website Stylesheet
   Cleaned + consolidated version
   Notes:
   - Removed global body * z-index rule that interfered with Leaflet popups
   - Consolidated duplicate mobile rules
   - Consolidated duplicate news/features/Leaflet popup rules
   - Added solid Leaflet popup styling
   - Kept existing class names so current HTML should continue working
========================================================= */

/* ===== RESET / GLOBAL ===== */
* {
  box-sizing: border-box;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  background-color: #f2ebe3;
  font-family: 'Inter', sans-serif;
  color: #3a3a3a;
  margin: 0;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url('images/paper-texture.png');
  opacity: 0.10;
  pointer-events: none;
  z-index: 0;
}

.site-header,
.main-nav,
main,
.site-footer {
  position: relative;
  z-index: 1;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

input,
textarea {
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 5px;
  border: none;
  font-family: inherit;
}

/* ===== LAYOUT ===== */
.section {
  max-width: 1000px;
  margin: auto;
  padding: 40px 20px;
  text-align: center;
}

.section-alt .section {
  max-width: 1200px;
}

.mission-container {
  max-width: 1100px;
  margin: 0 auto;
}

.subtitle {
  color: #666;
  max-width: 600px;
  margin: auto;
}

/* ===== HEADINGS ===== */
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  text-align: center;
  position: relative;
  color: #2f4f6b;
}

.section-title::after {
  content: "";
  display: block;
  width: min(1040px, 90vw);
  height: 2px;
  margin: 14px auto 0;
  background: linear-gradient(
    to right,
    transparent 0%,
    #6e8aa3 20%,
    #6e8aa3 80%,
    transparent 100%
  );
}

.section-title.large {
  font-size: 28px;
}

.section-subtitle {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  color: #3f5f7a;
  margin-top: 30px;
  margin-bottom: 10px;
}

.values-title {
  text-align: center;
  margin-bottom: 30px;
  font-family: 'Playfair Display', serif;
}

.values-list h4 {
  margin-top: 20px;
  color: #2f4f6b;
}

.values-list p {
  margin-bottom: 15px;
  line-height: 1.6;
}

.edited-version {
  margin-top: 30px;
  font-size: 12px;
  color: #777;
}

/* ===== HEADER ===== */
.site-header {
  background:
    linear-gradient(rgba(20,40,60,0.75), rgba(20,40,60,0.65)),
    url('images/blue-pattern.jpg');
  background-size: cover;
  background-position: center;
  text-align: center;
  padding: 30px 20px;
  color: white;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
}

.site-header img {
  height: 100px;
  margin-bottom: 10px;
}

.header-text {
  text-align: left;
}

.site-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  margin: 0;
}

.site-header p {
  font-size: 12px;
  letter-spacing: 2px;
  opacity: 0.85;
}

/* ===== NAV ===== */
.main-nav {
  background: rgba(20,40,60,0.92);
  backdrop-filter: blur(4px);
  position: relative;
  z-index: 1000;
}

.nav-inner {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.nav-inner a,
.dropdown > a {
  color: #e9e5e1;
  padding: 14px 20px;
  text-decoration: none;
  font-weight: 500;
  position: relative;
  display: inline-block;
}

.nav-inner a::after {
  content: "";
  position: absolute;
  bottom: 6px;
  left: 50%;
  width: 0;
  height: 2px;
  background: #e9e5e1;
  transition: 0.3s;
  transform: translateX(-50%);
}

.nav-inner a:hover::after {
  width: 60%;
}

.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: rgba(20,40,60,0.95);
  min-width: 180px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: 0.25s;
  z-index: 9999;
}

.dropdown-menu a {
  display: block;
  padding: 12px 16px;
  color: #e9e5e1;
  text-decoration: none;
}

.dropdown-menu a:hover {
  background: rgba(255,255,255,0.08);
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ===== HERO ===== */
.hero {
  position: relative;
  width: 100%;
  height: 720px;
  overflow: hidden;
}

.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(0,0,0,.70) 0%,
    rgba(0,0,0,.45) 35%,
    rgba(0,0,0,.10) 75%,
    rgba(0,0,0,0) 100%
  );
}

.hero-content {
  position: absolute;
  left: 8%;
  top: 50%;
  transform: translateY(-50%);
  max-width: 700px;
  color: white;
}

.hero h1 {
  font-size: 4rem;
  line-height: 1.05;
  font-weight: 700;
  margin-bottom: 25px;
  text-transform: uppercase;
}

.hero p {
  font-size: 1.35rem;
  line-height: 1.7;
  color: #efefef;
  margin-bottom: 35px;
}

.hero-btn,
.btn {
  display: inline-block;
  background: #8b2e2e;
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.3s;
  text-decoration: none;
  font-weight: 600;
}

.hero-btn {
  background: #b30000;
  padding: 18px 40px;
  border-radius: 4px;
}

.btn:hover {
  background: #a83a3a;
}

.hero-btn:hover {
  background: #8d0000;
}

/* ===== WORLD MAP ===== */
.world-map-section {
  max-width: 1200px;
  margin: 40px auto;
  text-align: center;
  padding: 0 20px;
}

.map-wrap {
  position: relative;
}

#iskf-map {
  position: relative;
  z-index: 1;
  height: 430px;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.map-watermark {
  position: absolute;
  z-index: 500;
  pointer-events: none;
  opacity: 0.12;
  width: 180px;
}

.watermark-left {
  left: 30px;
  bottom: 120px;
}

.watermark-right {
  right: 30px;
  bottom: 120px;
}

.map-stats {
  display: flex;
  justify-content: center;
  gap: 70px;
  margin: 35px 0;
  flex-wrap: wrap;
}

.stat-card {
  min-width: 140px;
  text-align: center;
}

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  color: #1c3f72;
  line-height: 1;
}

.stat-label {
  margin-top: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #666;
}

/* Leaflet popup - solid and mobile-friendly */
.leaflet-popup-content-wrapper {
  background: #ffffff !important;
  opacity: 1 !important;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
}

.leaflet-popup-tip {
  background: #ffffff !important;
  opacity: 1 !important;
}

.leaflet-popup-content {
  margin: 14px 18px;
  min-width: 180px;
  max-width: 240px;
  white-space: normal;
  line-height: 1.5;
  text-align: center;
  background: transparent;
}

.leaflet-popup-content a {
  display: inline-block;
  margin-top: 6px;
  white-space: nowrap;
}

.popup-content {
  text-align: center;
}

.popup-flag {
  width: 46px;
  height: auto;
  display: block;
  margin: 0 auto 8px;
  border-radius: 3px;
}

/* ===== NEWS ===== */
.latest-news {
  max-width: 1200px;
  margin: 80px auto;
  padding: 0 25px;
}

.latest-news h2 {
  text-align: center;
  margin-bottom: 40px;
  font-size: 2.4rem;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

.news-card {
  background: white;
  padding: 28px;
  border-radius: 12px;
  border-left: 4px solid #2f4a63;
  box-shadow: 0 8px 25px rgba(0,0,0,.08);
  transition: 0.2s ease;
}

.news-card:hover {
  transform: translateY(-5px);
}

.news-date {
  display: block;
  color: #a00000;
  font-weight: 700;
  font-size: .85rem;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.news-card h3 {
  margin: 15px 0;
}

.news-card p {
  line-height: 1.6;
}

.news-card a {
  color: #8a0000;
  font-weight: 700;
  text-decoration: none;
}

/* ===== WELCOME / MISSION / VALUES ===== */
.welcome-section,
.welcome-centered {
  text-align: center;
}

.welcome-centered {
  max-width: 900px;
  margin: 0 auto;
}

.welcome-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
  align-items: center;
}

.welcome-text p,
.welcome-text.centered p {
  margin-bottom: 18px;
  line-height: 1.7;
}

.welcome-image {
  flex: 1;
}

.welcome-image img {
  width: 100%;
  max-width: none;
  height: auto;
}

.mission-vision {
  display: flex;
  gap: 30px;
  justify-content: center;
  margin-bottom: 50px;
  flex-wrap: wrap;
}

.mission-box,
.value-card {
  background: #ffffffcc;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.mission-box {
  padding: 25px 30px;
  max-width: 400px;
  text-align: center;
}

.mission-box h3 {
  margin-bottom: 10px;
  font-family: 'Playfair Display', serif;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.value-card {
  padding: 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.value-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

.value-card h4 {
  margin-bottom: 10px;
}

.japanese {
  font-size: 13px;
  color: #888;
  margin-bottom: 10px;
  font-style: italic;
}

.inline-link {
  color: #b30000;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid rgba(179,0,0,0.4);
  transition: all 0.2s ease;
}

.inline-link:hover {
  color: #800000;
  border-bottom-color: rgba(179,0,0,0.8);
}

/* ===== DOJO KUN ===== */
.dojo-kun-box {
  background: white;
  max-width: 700px;
  margin: 0 auto;
  padding: 30px;
  border-radius: 14px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.06);
}

.dojo-kun-box h3 {
  text-align: center;
  margin-bottom: 20px;
  font-family: 'Playfair Display', serif;
}

.dojo-kun-image {
  max-width: 700px;
  margin: 0 auto 30px;
  text-align: center;
}

.dojo-kun-image img {
  width: 100%;
  max-width: 500px;
  border-radius: 10px;
  opacity: 0.95;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
}

.kun-line {
  display: flex;
  flex-direction: column;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
}

.kun-line:last-child {
  border-bottom: none;
}

.kun-line strong {
  font-size: 16px;
}

.kun-line span {
  font-size: 13px;
  color: #777;
  font-style: italic;
}

/* ===== FEATURES / COMMUNITY ===== */
.features {
  display: flex;
  justify-content: center;
  gap: 60px;
  flex-wrap: wrap;
  text-align: center;
  margin-top: 40px;
}

.feature {
  max-width: 250px;
  width: 30%;
}

.feature h4 {
  margin-top: 10px;
}

.icon {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 15px;
  font-size: 30px;
}

.icon img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: block;
}

.features-horizontal {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 50px;
  margin-top: 50px;
  flex-wrap: nowrap;
}

.feature-horizontal {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  width: 300px;
  max-width: none;
  text-align: left;
}

.icon-circle {
  width: 82px;
  height: 82px;
  min-width: 82px;
  border-radius: 50%;
  background: rgba(0,0,0,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-circle img {
  width: 160px;
  height: 160px;
  object-fit: contain;
  display: block;
}

.feature-text h4 {
  margin: 0 0 10px;
  font-family: 'Playfair Display', serif;
  color: #2f4a63;
  font-size: 18px;
}

.feature-text p {
  margin: 0;
  line-height: 1.6;
}

/* ===== DIRECTORY / DOJO CARDS ===== */
.directory-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.directory-card {
  background: #f4efe9;
  border: 1px solid #d8d2c8;
  padding: 40px 20px;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s ease;
}

.directory-card h3 {
  font-family: 'Playfair Display', serif;
  color: #2f4a63;
}

.directory-card:hover {
  background: #2f4a63;
  transform: translateY(-5px);
}

.directory-card:hover h3 {
  color: #fff;
}

.regions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  margin-top: 40px;
}

.region-card {
  display: block;
  padding: 25px;
  text-align: center;
  background: #f4efe9;
  border: 1px solid #d8d2c8;
  text-decoration: none;
  color: #2f4a63;
  font-weight: 500;
  transition: 0.3s;
}

.region-card:hover {
  background: #2f4a63;
  color: white;
  transform: translateY(-4px);
}

.dojo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

.dojo-card {
  background: #f4efe9;
  border: 1px solid #d8d2c8;
  padding: 25px;
  transition: 0.3s;
}

.dojo-card:hover {
  transform: translateY(-5px);
}

.link-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0;
}

.link-item svg {
  width: 16px;
  height: 16px;
  fill: #2f4a63;
  flex-shrink: 0;
}

.link-item a {
  color: #2f4a63;
  text-decoration: none;
  border-bottom: 1px solid #2f4a63;
  font-size: 13px;
}

.link-item a:hover {
  color: #000;
  border-color: #000;
}

/* ===== OFFICERS / BOARDS ===== */
.officer {
  margin: 0 auto 80px;
  max-width: 900px;
  text-align: center;
  transition: transform 0.3s ease;
}

.officer:hover {
  transform: translateY(-5px);
}

.officer h3 {
  font-family: 'Playfair Display', serif;
  color: #2f4a63;
  margin-bottom: 5px;
}

.officer h4 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #8a8178;
  margin-bottom: 15px;
}

.officer-grid,
.officer-grid-2 {
  display: grid;
  gap: 40px;
  margin-top: 40px;
}

.officer-grid {
  grid-template-columns: repeat(3, 1fr);
}

.officer-grid-2,
.board-grid,
.eccku-grid {
  grid-template-columns: repeat(2, 1fr);
}

.board-grid,
.eccku-grid {
  display: grid;
  gap: 12px 40px;
  margin-top: 20px;
}

.eccku-grid {
  gap: 25px;
}

.simple-list {
  margin-top: 15px;
}

.simple-list p,
.simple-list li {
  margin: 6px 0;
  font-size: 16px;
}

.officer-photo {
  width: 220px;
  height: 280px;
  object-fit: cover;
  object-position: top center;
  border-radius: 16px;
  display: block;
  margin: 0 auto 25px;
  border: 4px solid rgba(255,255,255,0.85);
  box-shadow:
    0 8px 30px rgba(0,0,0,0.18),
    0 2px 8px rgba(0,0,0,0.12);
  transition: transform 0.3s ease;
}

.officer-photo:hover {
  transform: scale(1.03);
}

/* ===== TIMELINE / MASTERS ===== */
.timeline {
  position: relative;
  max-width: 900px;
  margin: 60px auto;
}

.timeline::after {
  content: '';
  position: absolute;
  width: 2px;
  background: #6e8aa3;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  width: 50%;
  padding: 20px 40px;
}

.timeline-item.left {
  left: 0;
}

.timeline-item.right {
  left: 50%;
}

.timeline-content {
  background: #f4efe9;
  border: 1px solid #d8d2c8;
  padding: 20px;
  transition: 0.3s;
}

.timeline-content:hover {
  transform: translateY(-4px);
}

.timeline-item::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  right: -7px;
  background: #2f4a63;
  border-radius: 50%;
  top: 28px;
  z-index: 1;
}

.timeline-item.right::after {
  left: -7px;
}

.timeline-content h3 {
  font-family: 'Playfair Display', serif;
  color: #2f4a63;
  margin-bottom: 8px;
}

.master-card {
  padding: 25px;
}

.master-profile {
  display: flex;
  align-items: center;
  gap: 20px;
}

.master-profile img {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #2f4a63;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  filter: grayscale(100%) contrast(1.05);
}

.master-profile h3 {
  font-family: 'Playfair Display', serif;
  color: #2f4a63;
  margin-bottom: 4px;
}

.master-years {
  font-size: 12px;
  letter-spacing: 1px;
  color: #8a8178;
  margin-bottom: 8px;
}

.timeline-item.right .master-profile {
  flex-direction: row-reverse;
  text-align: right;
}

.master-card:hover {
  transform: translateY(-5px);
}

/* ===== EVENTS / PDFS ===== */
.events-grid {
  width: 100%;
}

.event-card {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
  border-bottom: 2px solid #cfc7bd;
}

.event-content {
  padding: 20px;
  text-align: left;
}

.event-content h3 {
  margin: 0 0 8px;
  font-family: 'Playfair Display', serif;
  color: #2f4a63;
}

.event-meta {
  font-size: 13px;
  color: #8a8178;
  margin-bottom: 15px;
}

.event-links a,
.video-link,
.pdf-link {
  display: inline-block;
  color: #2f4a63;
  text-decoration: none;
  border-bottom: 1px solid #2f4a63;
  transition: all 0.2s ease;
}

.event-links a {
  margin-right: 10px;
  font-size: 13px;
}

.video-link,
.pdf-link {
  margin-top: 6px;
  font-size: 14px;
}

.event-links a:hover,
.video-link:hover,
.pdf-link:hover {
  color: #000;
  border-color: #000;
}

.pdf-link::before {
  content: "📄 ";
}

.event-media,
.event-image {
  text-align: center;
}

.event-media {
  margin-top: 15px;
}

.event-media img {
  width: 100%;
  max-width: 420px;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.event-image {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
}

.event-image img {
  width: 500px;
}

.event-video {
  width: 50%;
}

.results-section {
  padding-top: 20px;
}

.pdf-list {
  max-width: 950px;
  margin: 0 auto;
}

.pdf-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 18px 22px;
  margin-bottom: 14px;
  background: rgba(255,255,255,0.65);
  border: 1px solid rgba(30,60,85,0.15);
  border-radius: 6px;
}

.pdf-title {
  font-size: 0.98rem;
  line-height: 1.4;
  color: #333;
  text-align: left;
}

.pdf-actions {
  display: flex;
  gap: 10px;
  white-space: nowrap;
}

.pdf-actions .btn {
  min-width: 145px;
  text-align: center;
}

/* ===== SCHEDULE ===== */
.schedule-wrapper {
  margin-top: 25px;
}

.schedule-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.schedule-card {
  width: 140px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 500;
  color: white;
  border: 1px solid black;
}

.schedule-card.adult {
  background: #1e6fa8;
}

.schedule-card.youth {
  background: #e60000;
}

.schedule-card.dark {
  background: #111;
}

.schedule-image {
  max-width: 900px;
  margin: 40px auto 0;
  text-align: center;
}

.schedule-image img {
  width: 100%;
  max-width: 900px;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
}

/* ===== HQ IMAGE ===== */
.hq-image {
  width: 100%;
  display: flex;
  justify-content: center;
}

.hq-image img {
  display: block;
  width: 220px;
  max-width: 90%;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
}

/* ===== CONTACT / FOOTER ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  margin-bottom: 10px;
}

.site-footer {
  background:
    linear-gradient(rgba(20,40,60,0.85), rgba(20,40,60,0.75)),
    url('images/blue-pattern.jpg');
  background-size: cover;
  background-position: center;
  color: #e9e5e1;
  padding: 60px 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  max-width: 1000px;
  margin: auto;
}

.footer-grid div {
  border-left: 1px solid rgba(255,255,255,0.15);
  padding-left: 20px;
}

.footer-grid div:first-child {
  border-left: none;
}

footer h4 {
  color: white;
  font-size: 30px;
}

.footer-bottom {
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.5px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.7);
  white-space: nowrap;
}

.social-icons {
  display: flex;
  gap: 18px;
  margin-top: 12px;
}

.social-icons a {
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
  transition: all 0.25s ease;
}

.social-icons a:hover {
  background: rgba(255,255,255,0.16);
  transform: translateY(-2px);
}

.social-icons svg {
  width: 22px;
  height: 22px;
  fill: white;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1000px) {
  .features-horizontal {
    flex-wrap: wrap;
    gap: 30px;
  }

  .feature-horizontal {
    width: 100%;
    max-width: 420px;
  }
}

@media (max-width: 900px) {
  .hero {
    height: 500px;
  }

  .hero-content {
    left: 30px;
    right: 30px;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .hero-btn {
    padding: 14px 28px;
  }

  .news-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 800px) {
  .regions-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pdf-item {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .pdf-title {
    text-align: center;
  }

  .pdf-actions {
    justify-content: center;
    flex-wrap: wrap;
  }
}

@media (max-width: 768px) {
  main,
  .section {
    padding-left: 12px;
    padding-right: 12px;
  }

  h1,
  h2,
  h3,
  h4,
  p,
  a {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .site-header img {
    height: 60px;
  }

  .header-inner {
    flex-direction: column;
    gap: 10px;
  }

  .header-text {
    text-align: center;
  }

  .site-header h1 {
    font-size: 22px;
  }

  .nav-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-inner a,
  .dropdown > a {
    display: block;
    width: 100%;
    padding: 14px;
    text-align: left;
  }

  .dropdown {
    width: 100%;
  }

  .dropdown-menu {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    background: rgba(20,40,60,0.95);
    display: none;
  }

  .dropdown:hover .dropdown-menu {
    display: block;
  }

  .dropdown-menu a {
    padding-left: 25px;
  }

  .section-title::after {
    width: 90%;
    max-width: 320px;
  }

  .welcome-grid,
  .contact-grid,
  .footer-grid,
  .directory-grid,
  .dojo-grid,
  .officer-grid,
  .officer-grid-2,
  .board-grid,
  .eccku-grid,
  .regions-grid {
    grid-template-columns: 1fr !important;
  }

  .welcome-image img {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    display: block;
  }

  .features {
    flex-direction: column;
    gap: 25px;
    align-items: center;
  }

  .feature {
    width: 100%;
  }

  .region-card,
  .region-box,
  .region-item,
  .dojo-card,
  .card {
    width: 90%;
    max-width: 400px;
    margin: 0 auto 16px;
    box-sizing: border-box;
    text-align: center;
  }

  .link-item a {
    overflow-wrap: anywhere;
  }

  .timeline {
    padding-left: 0;
  }

  .timeline::after {
    left: 20px;
  }

  .timeline-item {
    width: 100%;
    left: 0 !important;
    padding-left: 50px;
    padding-right: 15px;
    box-sizing: border-box;
  }

  .timeline-content {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 18px;
    box-sizing: border-box;
  }

  .timeline-item::after,
  .timeline-item.right::after {
    left: 13px;
  }

  .master-profile,
  .timeline-item.right .master-profile {
    flex-direction: column;
    text-align: center;
  }

  .officer-photo {
    width: 170px;
    height: 170px;
    margin-bottom: 20px;
  }

  .schedule-card {
    width: 45%;
    height: 70px;
    font-size: 14px;
  }

  .schedule-image {
    max-width: 100%;
    margin-top: 25px;
    overflow-x: auto;
  }

  .schedule-image img {
    min-width: 650px;
  }

  .hq-image img {
    width: 90% !important;
    max-width: none !important;
  }

  .map-watermark {
    width: 90px;
    opacity: 0.08;
  }

  .watermark-left {
    left: 10px;
    bottom: 10px;
  }

  .watermark-right {
    right: 10px;
    bottom: 10px;
  }

  .map-stats {
    gap: 30px;
    margin: 25px 0;
  }

  .stat-number {
    font-size: 2.2rem;
  }

  .stat-label {
    font-size: 0.9rem;
  }

  .leaflet-popup-content-wrapper {
    max-width: 260px;
  }

  .leaflet-popup-content {
    min-width: 190px;
    max-width: 220px;
    font-size: 14px;
  }

  .leaflet-popup-content a {
    white-space: normal;
  }

  .footer-bottom {
    white-space: normal;
  }
}

@media (max-width: 500px) {
  .regions-grid {
    grid-template-columns: 1fr;
  }

  .pdf-actions {
    flex-direction: column;
  }

  .pdf-actions .btn {
    width: 85%;
  }
}

@media (max-width: 480px) {
  .event-image img,
  .event-video {
    max-width: 260px;
  }
}

.group-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 35px;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.group-btn {
  padding: 16px 20px;
  background: #2f4a63;
  color: #fff;
  border: none;
  text-align: left;
  font-size: 16px;
  cursor: pointer;
  border-radius: 4px;
}

.group-btn:hover,
.group-btn.active {
  background: #1f3346;
}

.dojo-group {
  display: none;
  margin-top: 35px;
}

.dojo-group.active {
  display: block;
}

.group-heading {
  font-family: 'Playfair Display', serif;
  color: #2f4a63;
  text-align: center;
  margin-bottom: 20px;
}
.country-flag {
    width: 120px;          /* make it smaller */
    height: auto;
    display: block;
    margin: 0 auto 20px;   /* centers it and adds space below */
    border-radius: 8px;    /* optional */
}

.officer-featured {
    max-width: 420px;
    margin: 0 auto;
    transform: scale(1.03);
}