/* ==========================================================================
   IINO WATARU – Trans Atlas Running (Single Page Bilingual Clone)
   Reference: https://tabirun.run/world/ & https://tabirun.run/world/en/
   ========================================================================== */

:root {
  --hestia-primary: #39ceab;
  --tar-teal: #57C2AD;
  --tar-dark-footer: #233135;
  --tar-heading-color: #3C4858;
  --tar-text-color: #3C4858;
  --tar-red: #FF0000;
  --container-max-width: 1140px;
  --navbar-height: 70px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  padding-top: var(--navbar-height);
  font-family: "Roboto", "Noto Sans JP", Helvetica, Arial, sans-serif;
  color: var(--tar-text-color);
  background-color: #FFFFFF;
  line-height: 1.618;
  overflow-x: hidden;
}

a {
  color: var(--hestia-primary);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover,
a:focus {
  color: var(--hestia-primary);
  text-decoration: none;
}

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

/* Language Toggle Visibility */
html[lang="ja"] [data-lang="en"] {
  display: none !important;
}

html[lang="en"] [data-lang="ja"] {
  display: none !important;
}

/* ==========================================================================
   1. Fixed Top Navbar (Hestia Theme Style)
   ========================================================================== */
.header {
  position: relative;
  z-index: 1030;
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  min-height: var(--navbar-height);
  background-color: #FFFFFF;
  color: #555555;
  box-shadow: 0 1px 10px -6px rgba(0, 0, 0, 0.42), 0 1px 10px 0 rgba(0, 0, 0, 0.12), 0 4px 5px -2px rgba(0, 0, 0, 0.1);
  z-index: 1030;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
}

.navbar .container {
  width: 100%;
  max-width: 1170px;
  margin: 0 auto;
  padding: 0 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.navbar-brand {
  display: inline-flex;
  align-items: center;
  padding: 10px 15px 10px 0;
  color: #555555;
}

.navbar-brand:hover {
  color: #555555;
}

.hestia-title-with-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hestia-logo img {
  max-height: 50px;
  width: auto;
  object-fit: contain;
}

.hestia-title-tagline-wrap {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hestia-title-tagline-wrap .site-title {
  font-family: "Roboto", sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: #3C4858;
  line-height: 1.1;
  margin-top: 4px;
}

.hestia-title-tagline-wrap small {
  font-size: 12px;
  color: #777777;
  font-weight: 400;
  line-height: 1.3;
  margin-top: 3px;
}

/* Mobile Toggle Button */
.navbar-toggle-wrapper {
  display: none;
}

.navbar-toggle {
  background: transparent;
  border: none;
  padding: 9px 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-radius: 4px;
}

.navbar-toggle .icon-bar {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 1px;
  background-color: #555555;
  transition: all 0.25s ease;
}

.navbar-toggle:hover .icon-bar {
  background-color: var(--hestia-primary);
}

/* Navigation Menu */
.navbar-collapse {
  display: flex;
  align-items: center;
}

.nav.navbar-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-evenly;
}

.navbar .navbar-nav li {
  position: relative;
}

.navbar .navbar-nav li a {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Roboto", sans-serif;
  font-size: 14px;
  font-weight: 400;
  text-transform: uppercase;
  color: #555555;
  text-align: center;
  line-height: 23px;
  padding: 15px 10px;
  transition: color 0.2s ease;
}

.navbar .navbar-nav li:hover > a,
.navbar .navbar-nav li.active > a {
  color: var(--hestia-primary);
}

/* Social Icons in Navbar */
.navbar .navbar-nav li.social-item a {
  padding: 12px 8px;
}

.navbar .navbar-nav li.social-item img,
.navbar .navbar-nav li.social-item svg {
  width: 25px;
  height: 25px;
  object-fit: contain;
  display: block;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.navbar .navbar-nav li.social-item a:hover img,
.navbar .navbar-nav li.social-item a:hover svg {
  opacity: 0.8;
  transform: translateY(-1px);
}

/* Language Switcher Flags in Navbar */
.navbar .navbar-nav li.lang-item-ja {
  margin-left: 16px;
}

.navbar .navbar-nav li.polylang-item a {
  padding: 12px 10px;
  cursor: pointer;
}

.pll-switcher-flag {
  display: inline-block;
  flex-shrink: 0;
  width: 18px;
  height: 12px;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.32), 0 1px 3px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.polylang-item.current-lang .pll-switcher-flag {
  box-shadow: 0 0 0 2px var(--hestia-primary), 0 0 6px rgba(0, 0, 0, 0.35);
}

.polylang-item a:hover .pll-switcher-flag {
  transform: scale(1.12);
}

.mobile-nav-break {
  display: none;
}

/* ==========================================================================
   2. Common Elementor-like Containers & Spacers
   ========================================================================== */
.e-con-boxed {
  width: 100%;
  padding-left: 10px;
  padding-right: 10px;
}

.e-con-inner {
  max-width: var(--container-max-width);
  margin: 0 auto;
  width: 100%;
}

.spacer-10 { height: 10px; }
.spacer-20 { height: 20px; }
.spacer-30 { height: 30px; }
.spacer-40 { height: 40px; }

/* ==========================================================================
   3. Top Kibidango Banner & Intro Section (TAR Map & Total Distance)
   ========================================================================== */
.section-top-spacer {
  background-color: #FFFFFF;
}

.section-kibidango {
  background-color: #FFFFFF;
  padding: 10px 0 0 0;
}

.section-kibidango .kibidango-link {
  display: block;
  width: 100%;
}

.section-kibidango .kibidango-link img {
  width: 100%;
  height: auto;
  margin: 0 auto;
}

.section-intro {
  background-color: #FFFFFF;
  padding: 10px 0 20px 0;
}

.section-intro .e-con-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#content-from-php {
  width: 100%;
}

#content-from-php iframe {
  width: 100% !important;
  max-width: 1140px !important;
  display: block;
  margin: 0 auto;
}

.intro-heading {
  font-family: "Noto Serif JP", serif;
  font-size: 40px;
  font-weight: 600;
  color: var(--tar-heading-color);
  text-align: center;
  margin: 0;
  padding: 5px 0;
  line-height: 1.3;
}

.intro-distance {
  font-family: "Noto Serif JP", serif;
  font-size: 40px;
  font-weight: 600;
  color: var(--tar-red);
  text-align: center;
  margin: 0;
  padding: 5px 0;
  line-height: 1.3;
}

.intro-gps-heading {
  font-family: "Noto Serif JP", serif;
  font-size: 30px;
  font-weight: 400;
  color: #000000;
  text-align: center;
  margin: 15px 0 0 0;
}

.intro-image-wrap {
  width: 100%;
  margin-bottom: 10px;
}

.intro-image-wrap img {
  width: 100%;
  height: auto;
  margin: 0 auto;
}

/* ==========================================================================
   4. Hero Section (#home)
   ========================================================================== */
.section-hero-desktop {
  min-height: auto;
  height: auto;
  max-height: 770px;
  aspect-ratio: 16 / 7.2;
  background-image: url("images/home_image.jpg");
  background-position: 62% 76%;
  background-repeat: no-repeat;
  background-size: 112% auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  scroll-margin-top: var(--navbar-height);
}

.section-hero-desktop .e-con-inner {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
}

.hero-title-desktop {
  font-family: "Bebas Neue", "Bayon", sans-serif;
  font-size: clamp(140px, 11vw, 180px);
  line-height: 0.695em;
  color: #FFFFFF;
  text-align: right;
  margin: 0 0 -0.082em 0;
  font-weight: 400;
  letter-spacing: 1px;
  user-select: none;
}

html[lang="en"] .hero-title-desktop {
  font-family: "Bebas Neue", "Bayon", sans-serif;
  margin-right: 0;
}

.section-hero-mobile {
  display: none;
  min-height: 410px;
  background-image: url("images/home_image.jpg");
  background-position: 60% bottom;
  background-repeat: no-repeat;
  background-size: 215% auto;
  flex-direction: column;
  justify-content: flex-end;
  scroll-margin-top: var(--navbar-height);
}

.hero-title-mobile {
  font-family: "Bebas Neue", "Bayon", sans-serif;
  font-size: clamp(84px, 24vw, 104px);
  line-height: 0.695em;
  color: #FFFFFF;
  text-align: right;
  margin: 0 5px -0.082em 0;
  font-weight: 400;
  user-select: none;
}

/* ==========================================================================
   5. Profile, Bio, Highlights & Accordion Section
   ========================================================================== */
.section-profile {
  background-color: #FFFFFF;
  padding: 50px 0;
}

.section-profile > .e-con-inner {
  display: flex;
  flex-direction: column;
}

/* Top Bio Overlapping Row */
.profile-top-row {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  width: 100%;
  padding: 10px;
}

.profile-photo-col {
  width: 50%;
  flex-shrink: 1;
  padding: 10px;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
}

.profile-photo-col img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  object-position: top center;
}

.profile-bio-col {
  width: 60%;
  flex: 1 1 60%;
  background-color: var(--tar-teal);
  color: #FFFFFF;
  margin-top: -10px;
  margin-bottom: -10px;
  margin-left: -100px;
  margin-right: 0;
  padding: 0 30px 0 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.profile-name-title {
  font-family: "Zen Kaku Gothic Antique", sans-serif;
  font-size: 36px;
  font-weight: 400;
  color: #FFFFFF;
  text-align: right;
  margin: 0;
  line-height: 1.15;
}

.profile-name-kana {
  font-family: "Zen Kaku Gothic Antique", "Noto Sans JP", sans-serif;
  font-size: 14px;
  font-weight: 300;
  color: #FFFFFF;
  text-align: right;
  margin: 0 0 6px 0;
  letter-spacing: 0;
}

.profile-bio-text {
  font-family: "Zen Kaku Gothic Antique", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 23px;
  color: #FFFFFF;
  text-align: justify;
}

.profile-bio-text p {
  margin: 0 0 12px 0;
}

.profile-bio-text p:last-child {
  margin-bottom: 0;
}

/* Highlighted Results 2-Column Teal Box */
.profile-highlights-row {
  width: 95%;
  align-self: flex-end;
  display: flex;
  flex-direction: row;
  margin-top: -30px;
  margin-right: 10px;
  background-color: var(--tar-teal);
  position: relative;
  z-index: 0;
}

.highlights-col {
  width: 50%;
  background-color: var(--tar-teal);
  padding: 40px 20px 20px 20px;
  text-align: center;
  font-size: 16px;
  font-weight: 500;
  color: #FFFFFF;
  line-height: 1.65;
}

html[lang="en"] .highlights-col {
  font-size: 15px;
}

.highlights-col p {
  margin: 0 0 16px 0;
}

.highlights-col p:last-child {
  margin-bottom: 0;
}

.underline-year {
  text-decoration: underline;
}

/* Full Results Collapsible Accordion */
.profile-accordion-wrap {
  width: 100%;
  margin-top: 20px;
  text-align: center;
}

.accordion-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  border: none;
  padding: 15px 20px;
  cursor: pointer;
  color: var(--tar-teal);
  font-family: "Helvetica", "Noto Sans JP", sans-serif;
  font-size: 19px;
  font-weight: 600;
}

.accordion-toggle-btn .accordion-title-text {
  text-decoration: underline;
  color: var(--tar-teal);
}

.accordion-toggle-btn svg {
  width: 12px;
  height: 19px;
  fill: var(--tar-teal);
  flex-shrink: 0;
}

.accordion-toggle-btn .icon-opened {
  display: none;
}

.accordion-toggle-btn[aria-expanded="true"] .icon-closed {
  display: none;
}

.accordion-toggle-btn[aria-expanded="true"] .icon-opened {
  display: inline-block;
}

.accordion-content {
  display: none;
  padding: 15px 20px 10px 20px;
  text-align: center;
  font-size: 18px;
  font-weight: 300;
  color: var(--tar-text-color);
  line-height: 1.75;
}

.accordion-content.is-open {
  display: block;
}

.accordion-content p {
  margin: 0 0 20px 0;
}

/* ==========================================================================
   6. TAR Section (#tar)
   ========================================================================== */
.section-tar {
  background-color: #F4F5F7;
  padding: 25px 0 30px 0;
  scroll-margin-top: var(--navbar-height);
}

.section-tar-title {
  font-family: "Urbanist", sans-serif;
  font-size: 36px;
  font-weight: 700;
  color: var(--tar-heading-color);
  text-align: center;
  margin: 20px 0;
}

.tar-scroll-frame {
  width: 100%;
  height: 680px;
  overflow-y: auto;
  overflow-x: hidden;
  margin: 0 auto 20px auto;
  padding: 10px;
  -webkit-overflow-scrolling: touch;
}

.tar-slides-container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.tar-slide-item {
  display: block;
  width: 100%;
  cursor: zoom-in;
}

.tar-slide-item img {
  width: 100%;
  height: auto;
  display: block;
}

.tar-mobile-caption {
  display: none;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: var(--tar-heading-color);
  text-align: center;
  margin: 10px 0 20px 0;
}

/* ==========================================================================
   7. MEDIA Section (#media)
   ========================================================================== */
.section-media {
  background-color: var(--tar-teal);
  padding: 50px 0;
  min-height: 400px;
  scroll-margin-top: var(--navbar-height);
}

.section-media .e-con-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.media-video-wrapper {
  width: 98%;
  max-width: 1117px;
  aspect-ratio: 16 / 9;
  background-color: #000000;
  position: relative;
  overflow: hidden;
}

.media-video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Bento / Mosaic Photo Gallery below YouTube (#media) */
.media-gallery-desktop {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 0 10px;
}

.gallery-half-row {
  display: flex;
  flex-direction: row;
  gap: 5px;
  width: 100%;
}

.gallery-col-third {
  width: calc((100% - 10px) / 3);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.gallery-grid-2x3 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(3, 120px);
  gap: 5px;
}

.gallery-grid-2x2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 120px);
  gap: 5px;
}

.gallery-grid-2x1 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: 120px;
  gap: 5px;
}

.gallery-item {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: rgba(255, 255, 255, 0.18);
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transition: transform 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.03);
}

.gallery-item.h-375 {
  height: 370px;
}

.gallery-item.h-248 {
  height: 245px;
}

.gallery-item.h-120 {
  height: 120px;
}

.gallery-item.pos-bottom img {
  object-position: bottom center;
}

/* Mobile 3-col Grid Gallery */
.media-gallery-mobile {
  display: none;
  width: 100%;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
}

.media-gallery-mobile .gallery-item {
  aspect-ratio: 3 / 2;
  height: auto;
}

/* ==========================================================================
   8. SPONSORS Section (#sponser)
   ========================================================================== */
.section-sponsors {
  background-color: #FFFFFF;
  padding: 10px 0 70px 0;
  scroll-margin-top: var(--navbar-height);
}

.section-sponsors .e-con-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sponsors-heading {
  font-family: "Urbanist", sans-serif;
  font-size: 36px;
  font-weight: 700;
  color: var(--tar-heading-color);
  text-align: center;
  margin: 0;
}

.sponsor-row {
  width: 100%;
  margin: 0 auto;
  display: grid;
  align-items: center;
  justify-items: center;
}

.sponsor-row a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.sponsor-row a:hover {
  opacity: 0.82;
}

/* Row 1: 1 col (Gulliver USA) */
.sponsor-row-1 {
  max-width: 900px;
  grid-template-columns: 1fr;
}

.sponsor-row-1 img {
  height: 190px;
  width: 100%;
  object-fit: contain;
  object-position: center center;
}

/* Row 2: 2 cols (IBUKI, RUSH) */
.sponsor-row-2 {
  max-width: 900px;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 50px;
}

.sponsor-row-2 img {
  height: 120px;
  width: 100%;
  object-fit: cover;
  object-position: center center;
}

/* Row 3: 4 cols in JP (Itolator, Sakaiya, Kaketari, Hiroo Oyaji RC), 3 cols in EN */
.sponsor-row-3 {
  max-width: 1140px;
  grid-template-columns: repeat(4, 1fr);
  column-gap: 20px;
  margin: 18px auto;
}

html[lang="en"] .sponsor-row-3 {
  max-width: 980px;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 45px;
}

.sponsor-row-3 img {
  height: 120px;
  width: 100%;
  object-fit: cover;
  object-position: center center;
}

html[lang="en"] .sponsor-row-3 img {
  width: 92%;
  max-width: 92%;
}

/* Row 4: 4 cols (Margotto, Moriya Ganka, Gokigen, Running Drunkers) */
.sponsor-row-4 {
  max-width: 1140px;
  grid-template-columns: repeat(4, 1fr);
  column-gap: 20px;
  margin: 18px auto;
}

.sponsor-row-4 img {
  height: 140px;
  width: 100%;
  object-fit: cover;
  object-position: center center;
}

/* Row 5: 4 cols (HOKA, OLENO, FIELDS, Ippachi) */
.sponsor-row-5 {
  max-width: 1140px;
  grid-template-columns: repeat(4, 1fr);
  column-gap: 20px;
  margin: 18px auto;
}

.sponsor-row-5 img {
  height: 140px;
  width: 100%;
  object-fit: cover;
  object-position: center center;
}

/* Row 6: 4 cols (Asuka Foods, Wedge Holdings, LUC+, Tabirun Tour) */
.sponsor-row-6 {
  max-width: 980px;
  grid-template-columns: repeat(4, 1fr);
  column-gap: 10px;
  margin: 18px auto;
}

.sponsor-row-6 img {
  height: 125px;
  width: 100%;
  object-fit: cover;
  object-position: center center;
}

/* ==========================================================================
   9. Footer Section
   ========================================================================== */
.section-footer {
  background-color: var(--tar-dark-footer);
  min-height: 70px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 5px 15px 0 15px;
  text-align: center;
  color: #FFFFFF;
  font-size: 14px;
}

/* ==========================================================================
   10. Lightbox Modal (for TAR Slides & Media Gallery)
   ========================================================================== */
.lightbox-modal {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.88);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox-modal.is-active {
  display: flex;
}

.lightbox-content-wrap {
  position: relative;
  max-width: 94vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-image {
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 2px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: fixed;
  background: rgba(0, 0, 0, 0.45);
  color: #FFFFFF;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  z-index: 10000;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(0, 0, 0, 0.8);
}

.lightbox-close {
  top: 20px;
  right: 25px;
  width: 44px;
  height: 44px;
  font-size: 28px;
  border-radius: 50%;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  font-size: 24px;
  border-radius: 50%;
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

.lightbox-counter {
  position: fixed;
  top: 28px;
  left: 25px;
  color: #DDDDDD;
  font-size: 14px;
  font-family: "Roboto", sans-serif;
}

/* ==========================================================================
   11. Responsive Breakpoints (Tablet / iPad Pro 13 <= 1376px & Mobile <= 767px)
   ========================================================================== */
@media (max-width: 1376px) {
  :root {
    --container-max-width: 960px;
  }

  .section-kibidango {
    padding: 15px 48px 0 48px;
  }

  .section-intro {
    padding: 10px 48px 25px 48px;
  }

  .section-hero-desktop {
    min-height: auto;
    height: auto;
    max-height: none;
    aspect-ratio: 16 / 7.8;
    background-size: 118% auto;
    background-position: 68% 80%;
  }

  .hero-title-desktop,
  html[lang="en"] .hero-title-desktop {
    font-family: "Bebas Neue", "Bayon", sans-serif;
    font-size: clamp(120px, 14vw, 160px);
    line-height: 0.695em;
    margin: 0 20px -0.082em 0;
  }

  .profile-top-row {
    align-items: stretch;
  }

  .profile-bio-col {
    margin-top: -10px;
    margin-bottom: -10px;
    margin-left: -100px;
    padding: 25px 30px 25px 120px;
  }

  .profile-bio-text {
    font-size: 15px;
    line-height: 1.45em;
  }

  .profile-highlights-row {
    margin-top: -50px;
    margin-right: 10px;
  }

  .highlights-col {
    padding: 50px 20px 20px 20px;
    font-size: 15px;
  }

  .accordion-content {
    font-size: 15px;
  }

  .media-video-wrapper {
    width: 100%;
    max-width: 900px;
  }

  .media-gallery-desktop {
    max-width: 900px;
    padding: 0;
  }

  .gallery-item.h-375 {
    height: 305px;
  }

  .gallery-item.h-248 {
    height: 202px;
  }

  .gallery-item.h-120 {
    height: 99px;
  }

  .gallery-grid-2x3 {
    grid-template-rows: repeat(3, 99px);
  }

  .gallery-grid-2x2 {
    grid-template-rows: repeat(2, 99px);
  }

  .gallery-grid-2x1 {
    grid-template-rows: 99px;
  }

  .section-sponsors {
    padding: 10px 48px 70px 48px;
  }

  .sponsors-heading {
    font-size: 32px;
  }

  .sponsor-row-1 {
    max-width: 840px;
  }

  .sponsor-row-1 img {
    height: 155px;
    max-width: 92%;
    object-fit: contain;
  }

  .sponsor-row-2 {
    max-width: 820px;
    column-gap: 40px;
    margin: 10px auto;
  }

  .sponsor-row-2 img {
    height: 108px;
    max-width: 96%;
    object-fit: contain;
  }

  .sponsor-row-3 {
    column-gap: 20px;
    margin: 10px auto;
  }

  html[lang="en"] .sponsor-row-3 {
    max-width: 880px;
    column-gap: 36px;
  }

  .sponsor-row-3 img {
    height: 92px;
    max-width: 96%;
    object-fit: contain;
  }

  html[lang="en"] .sponsor-row-3 img {
    height: 115px;
    width: 92%;
    max-width: 92%;
    object-fit: cover;
  }

  .sponsor-row-4 {
    column-gap: 20px;
    margin: 10px auto;
  }

  .sponsor-row-4 img {
    height: 105px;
    max-width: 96%;
    object-fit: contain;
  }

  .sponsor-row-5 {
    column-gap: 20px;
    margin: 10px auto;
  }

  .sponsor-row-5 img {
    height: 100px;
    max-width: 96%;
    object-fit: contain;
  }

  .sponsor-row-6 {
    max-width: 860px;
    column-gap: 16px;
    margin: 10px auto;
  }

  .sponsor-row-6 img {
    height: 96px;
    max-width: 96%;
    object-fit: contain;
  }
}

@media (max-width: 767px) {
  :root {
    --container-max-width: 767px;
  }

  .section-kibidango {
    padding: 10px 10px 0 10px;
  }

  .section-intro {
    padding: 10px 10px 20px 10px;
  }

  .section-sponsors {
    padding: 10px 20px 70px 20px;
  }

  .navbar .container {
    flex-wrap: wrap;
  }

  .navbar-header {
    width: 100%;
  }

  .navbar-toggle-wrapper {
    display: block;
  }

  .navbar-toggle {
    gap: 6px;
    padding: 9px 10px;
  }

  .navbar-toggle .icon-bar {
    width: 33px;
    height: 2px;
  }

  .navbar-collapse {
    display: none;
    width: 100%;
    background-color: #FFFFFF;
    border-top: 1px solid #EEEEEE;
    padding: 10px 0 15px 0;
  }

  .navbar-collapse.is-open {
    display: block;
  }

  /* Group social icons on one row and language flags on the next row below */
  .nav.navbar-nav {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2px;
  }

  .navbar .navbar-nav li {
    width: 100%;
    text-align: center;
  }

  .navbar .navbar-nav li.nav-section-item {
    width: 100%;
  }

  .navbar .navbar-nav li.social-item,
  .navbar .navbar-nav li.polylang-item {
    width: auto;
    display: inline-block;
    margin-left: 0;
  }

  .navbar .navbar-nav li.mobile-nav-break {
    display: block;
    width: 100%;
    height: 0;
    margin: 0;
    padding: 0;
  }

  .intro-heading,
  .intro-distance {
    font-size: 32px;
  }

  .intro-gps-heading {
    font-size: 24px;
  }

  .intro-image-wrap.tar-map-all img {
    height: 275px;
    object-fit: contain;
  }

  .section-hero-desktop {
    display: none;
  }

  .section-hero-mobile {
    display: flex;
    min-height: 410px;
    background-size: 215% auto;
    background-position: 60% bottom;
  }

  .hero-title-mobile {
    font-family: "Bebas Neue", "Bayon", sans-serif;
    font-size: clamp(84px, 24vw, 104px);
    line-height: 0.695em;
    margin: 0 5px -0.082em 0;
  }

  .section-profile {
    padding: 20px 0;
  }

  .profile-top-row {
    flex-direction: column;
    padding: 10px 0 0 0;
  }

  .profile-photo-col {
    width: 100%;
    padding: 10px 25px;
  }

  .profile-photo-col img {
    width: 100%;
    height: auto;
    object-fit: cover;
  }

  .profile-bio-col {
    width: 100%;
    margin-top: -155px;
    margin-bottom: 0;
    margin-left: 0;
    margin-right: 0;
    padding: 170px 25px 15px 25px;
  }

  .profile-bio-text {
    line-height: 1.4em;
  }

  .profile-highlights-row {
    width: 100%;
    align-self: center;
    flex-direction: column;
    margin-top: -2px;
    margin-right: 0;
    padding: 0 15px;
  }

  .highlights-col {
    width: 100%;
    font-size: 14px;
    padding: 15px 10px 0 10px;
  }

  .highlights-col:last-child {
    padding: 0 10px 20px 10px;
  }

  .accordion-content {
    font-size: 14px;
  }

  .tar-scroll-frame {
    height: 380px;
    max-width: 421px;
  }

  .tar-mobile-caption {
    display: block;
  }

  .section-media {
    padding: 30px 10px;
  }

  .media-gallery-desktop {
    display: none;
  }

  .media-gallery-mobile {
    display: block;
    position: relative;
    width: 100%;
    margin-top: 15px;
  }

  .mobile-carousel-viewport {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 4px;
  }

  .mobile-carousel-track {
    display: flex;
    width: 100%;
    transition: transform 0.45s cubic-bezier(0.25, 0.8, 0.25, 1);
  }

  .media-gallery-mobile .gallery-item {
    flex: 0 0 100%;
    width: 100%;
    aspect-ratio: 4 / 3;
    height: auto;
  }

  .media-gallery-mobile .gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .mobile-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.45);
    color: #FFFFFF;
    font-size: 18px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    transition: background 0.2s ease;
  }

  .mobile-carousel-btn:hover,
  .mobile-carousel-btn:active {
    background: rgba(0, 0, 0, 0.75);
  }

  .mobile-carousel-prev {
    left: 10px;
  }

  .mobile-carousel-next {
    right: 10px;
  }

  .mobile-carousel-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
    padding: 0 10px;
  }

  .mobile-carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    padding: 0;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
  }

  .mobile-carousel-dot.is-active {
    background: #FFFFFF;
    transform: scale(1.3);
  }

  .sponsors-heading {
    font-size: 27px;
  }

  .sponsor-row-1,
  .sponsor-row-2,
  .sponsor-row-3,
  html[lang="en"] .sponsor-row-3,
  .sponsor-row-4,
  .sponsor-row-5,
  .sponsor-row-6 {
    grid-template-columns: 1fr;
    row-gap: 18px;
    margin: 9px auto;
  }

  /* Match all sponsor logo visual widths to IBUKI (~214px visual logo width / 240px canvas) */
  .sponsor-row-1 img,
  .sponsor-row-2 img,
  .sponsor-row-3 img,
  html[lang="en"] .sponsor-row-3 img,
  .sponsor-row-4 img,
  .sponsor-row-5 img,
  .sponsor-row-6 img {
    width: 240px;
    max-width: 240px;
    height: 95px;
    object-fit: cover;
    object-position: center center;
  }

  /* Adjust logos with taller emblems or extra side padding inside their PNG canvas so their visual width matches IBUKI */
  .sponsor-row img[src*="gokigen"],
  .sponsor-row img[src*="hiroo_oyaji"],
  .sponsor-row img[src*="running-drunkers"],
  .sponsor-row img[src*="ippachi"],
  .sponsor-row img[src*="fields"] {
    width: 250px;
    max-width: 250px;
    height: 115px;
    object-fit: contain;
  }

  .sponsor-row img[src*="tabirun_tour"],
  .sponsor-row img[src*="wedge"] {
    width: 285px;
    max-width: 285px;
    height: 130px;
    object-fit: contain;
  }

  .sponsor-row img[src*="oleno"],
  .sponsor-row img[src*="moriyaganka"],
  .sponsor-row img[src*="asukafood"],
  .sponsor-row img[src*="margotto-hawaii"] {
    width: 320px;
    max-width: 92vw;
    height: 145px;
    object-fit: cover;
  }
}
