* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #051b3a;
  --white: #ffffff;
  --text: #111827;
  --gray: #6b7280;
  --light: #f8f8f8;
}

body {
  font-family: "Inter", sans-serif;
  background: #fff;
  overflow-x: hidden;
}

/* ========================= */
/* PERFECT RTL FIX */
/* ========================= */

body.rtl {
  direction: rtl;
}

/* ========================= */
/* HEADER FIX */
/* ========================= */

body.rtl .navbar {
  display: flex !important;
  flex-direction: row-reverse !important;
}

/* LOGO AREA */

body.rtl .logo-wrapper {
  order: 1;

  display: flex !important;
  flex-direction: row-reverse !important;
  align-items: center;

  margin-right: 0 !important;
  margin-left: 70px !important;

  text-align: right;
}

/* NAV LINKS */

body.rtl .nav-links {
  display: flex !important;
  flex-direction: row-reverse !important;
}

/* LANGUAGE SWITCH */

body.rtl .language-switch .footer-language-switch {
  order: 3;

  margin-left: 0 !important;
  margin-right: 70px !important;
}

/* ========================= */
/* BUTTON RTL FIX */
/* ========================= */

body.rtl .btn-primary-custom,
body.rtl .btn-outline-custom,
body.rtl .community-btn,
body.rtl .learn-primary-btn,
body.rtl .learn-outline-btn,
body.rtl .learn-dark-btn,
body.rtl .explore-btn {
  direction: rtl !important;

  display: inline-flex !important;

  flex-direction: row-reverse !important;

  align-items: center;
  justify-content: center;

  gap: 12px;
}

/* ========================= */
/* COMMUNITY BUTTON */
/* ========================= */

body.rtl .community-btn svg {
  order: 2;
}

body.rtl .community-arrow {
  order: -1;
}

/* ========================= */
/* FOOTER FIX */
/* ========================= */

body.rtl .footer .row {
  flex-direction: row-reverse !important;
}

body.rtl .footer {
  text-align: right;
}

/* ========================= */
/* FAQ */
/* ========================= */

body.rtl .faq-question {
  flex-direction: row-reverse !important;
  text-align: right;
}

/* ========================= */
/* GENERAL TEXT */
/* ========================= */

body.rtl h1,
body.rtl h2,
body.rtl h3,
body.rtl h4,
body.rtl h5,
body.rtl p,
body.rtl a,
body.rtl li {
  direction: rtl;
}

/* ========================= */
/* HERO BG */
/* ========================= */

body.rtl .hero-bg {
  transform: scaleX(-1);
}

a {
  text-decoration: none;
}

.container {
  max-width: 1200px;
}

/* ========================= */
/* HEADER */
/* ========================= */

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  background: #fff;
  border-bottom: 1px solid #ececec;
}

.navbar {
  height: 80px;
  /* margin-left: -4px; */
}

/* ========================= */
/* HEADER LAYOUT FIX */
/* ========================= */

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;

  position: relative;
}

/* NAV COLLAPSE */

.navbar-collapse {
  flex-grow: 1;

  display: flex !important;
  align-items: center;
  justify-content: center;
}

/* NAV LINKS */

.nav-links {
  margin: auto;
}

/* LANGUAGE SWITCH */

.language-switch {
  margin-left: auto;

  position: relative;

  flex-shrink: 0;
}

.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo {
  width: 40px;
}

.logo-text {
  font-family: "Noto Serif JP", serif;
  font-size: 16px;
  font-weight: 500;
  margin-left: -2px;
  color: var(--primary);
}

.nav-links {
  gap: 17.2px;
}

.nav-link {
  color: var(--text) !important;
  font-size: 14px;
  font-weight: 500;
}

/* LANGUAGE */

/* ========================= */
/* LANGUAGE SWITCH */
/* ========================= */

.language-switch {
  display: flex;
  align-items: center;
  gap: 25px;

  padding: 20px 20px;

  border: 1px solid black;
  border-radius: 999px;

  background: #fff;

  height: 44px;
  /* margin-right: -7px;
  margin-left: 12px; */
}

.language-switch:hover {
  background-color: #051b3a;
}

.language-switch:hover .lang-btn.active {
  color: white;
}

/* BUTTON */

.lang-btn {
  border: none;
  background: none;

  padding: 0;

  font-size: 12px;
  font-weight: 600;

  color: #b6b6b6;

  cursor: pointer;

  transition: 0.3s ease;
}

/* HEADER ACTIVE */

.language-switch .lang-btn.active {
  color: #051b3a;
}

/* FOOTER ACTIVE */

.footer-language-switch .lang-btn.active {
  color: #ffffff;
}

/* DIVIDER */

.language-switch::before {
  content: "|";

  position: absolute;

  left: 50%;

  transform: translateX(-50%);

  color: #cbd5e1;

  font-size: 14px;

  font-weight: 400;
}

/* IMPORTANT */

.language-switch {
  position: relative;
}

.hero {
  position: relative;
  min-height: 100vh;
  padding-top: 10px;
  overflow: hidden;
  margin-bottom: 0px;
}

.hero-bg {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 85%;

  background-size: cover;
  background-position: center top;
}

.overlay {
  position: absolute;
  inset: 0;
  height: 85%;

  background: rgb(0 0 0 / 52%);

  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 5;
  text-align: center;

  color: #fff;

  padding-top: 110px;
}

.hero-subtitle {
  text-transform: uppercase;

  letter-spacing: 3px;

  font-size: 14px;
  font-weight: 700;

  margin-bottom: 26px;
  margin-top: -6px;
}

.hero-title {
  font-family: "Noto Serif JP", serif;

  font-size: 80px;
  line-height: 1;

  font-weight: 500;

  margin-bottom: 20px;
}

.hero-description {
  font-size: 20px;
  line-height: 1.8;

  max-width: 820px;

  margin: auto;

  color: rgba(240, 240, 240, 0.92);
}

.hero-description-two {
  font-size: 18px;

  max-width: 820px;
  padding-top: 10px;
  margin: auto;

  color: rgba(246, 246, 246, 0.945);
}

.hero-buttons {
  margin-top: 43px;

  display: flex;
  justify-content: center;
  gap: 20px;
}

.btn-primary-custom {
  background: var(--primary);
  color: #fff;

  padding: 16px 34px;

  border-radius: 999px;

  font-size: 15.5px;
  font-weight: 600;
}

.btn-outline-custom {
  border: 1px solid rgb(255, 255, 255);

  color: var(--primary);

  background-color: #fff;

  padding: 16px 34px;

  border-radius: 999px;

  font-size: 15.5px;
  font-weight: 600;
}

.btn-outline-custom {
  transition: 0.3s ease;
}

.btn-outline-custom:hover {
  background: #ffffff;
  color: #051b3a;
  border-color: #ffffff;
}

.scroll-down {
  position: absolute;

  left: 50%;
  bottom: 30px;

  transform: translateX(-50%);

  color: #fff;

  font-size: 34px;

  z-index: 5;
}

.why-japan {
  background: #fff;
}

.section-subtitle {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;

  color: var(--gray);

  margin-bottom: 15px;
}

.section-title {
  font-family: "Noto Serif JP", serif;

  font-size: 48px;
  line-height: 1;

  font-weight: 600;

  color: var(--primary);

  max-width: 900px;

  margin-bottom: 60px;
}

.feature-icon {
  font-size: 20px;
  margin-bottom: 22px;
}

.feature-box h3 {
  font-family: "Noto Serif JP", serif;

  font-size: 18px;
  font-weight: 600;

  color: var(--primary);

  margin-bottom: 14px;
}

.feature-box p {
  font-size: 16px;
  line-height: 1.3;

  color: #4b5563;
}

.explore-btn {
  margin-top: 40px;
  margin-bottom: 100px;

  display: inline-flex;
  align-items: center;
  gap: 5px;

  background: var(--primary);
  color: #fff;

  padding: 12px 30px;

  border-radius: 999px;

  font-size: 14px;
  font-weight: 500;
}

.explore-btn:hover {
  background-color: #051b3a;
}

.education-system {
  padding: 80px 0;
  background: var(--light);
  margin-top: -23px;
  /* margin-bottom: -100px; */
}

.education-subtitle {
  font-size: 12px;
  font-weight: 700;

  letter-spacing: 2.1px;
  line-height: 1.3;

  color: var(--gray);

  max-width: 700px;

  margin-bottom: 15px;
}

.education-title {
  font-family: "Noto Serif JP", serif;

  font-size: 35px;
  line-height: 1.02;

  font-weight: 600;

  color: var(--primary);

  max-width: 760px;

  margin-bottom: 50px;
}

.education-title1 {
  font-family: "Noto Serif JP", serif;

  font-size: 28px;
  line-height: 1.02;

  font-weight: 600;

  color: var(--primary);

  max-width: 760px;

  margin-bottom: 50px;
}

.education-img-title {
  font-family: "Noto Serif JP", serif;

  font-size: 19.7px;
  text-align: center;
  line-height: 1.05;

  font-weight: 600;

  color: var(--primary);

  margin-bottom: 23px;
  margin-top: 4px;
}

.education-card {
  background: #fff;

  border-radius: 22px;

  padding: 32px;
}

.education-image {
  width: 100%;
  border-radius: 12px;
  margin-bottom: -25px;
}

.education-info {
  background: hsl(0deg 0% 96.9% / 40%);

  border: 1px solid #e5e7eb;

  border-radius: 10px;

  padding-left: 10px;
  padding-top: 10px;

  height: 70px;
  width: 550px;

  font-size: 14px;
  line-height: 1.7;

  color: #051b3a;
}

/* Center education-info-card on all screen sizes */
.education-info-card {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.education-btn-wrapper {
  display: flex;
  justify-content: center;

  margin-top: -15px;
  margin-bottom: 0px;
}

/* ========================= */
/* RESPONSIVE */
/* ========================= */

/* 

 */

/* ========================= */
/* STUDY JAPAN */
/* ========================= */

.study-japan {
  margin-top: -100px;
  margin-bottom: -10px;
  padding: 120px 0;
  background: #fff;
}

.study-title {
  font-family: "Noto Serif JP", serif;

  font-size: 48px;
  line-height: 1.1;

  font-weight: 600;

  color: var(--primary);

  margin-bottom: 16px;
  margin-top: -10px;
}

.study-description {
  font-size: 18px;
  line-height: 1.5;

  color: #4b5563;

  max-width: 750px;

  margin-bottom: 60px;
}

/* CARD */

.study-card {
  border: 1px solid #ececec;
  background: #fff;
  height: 265px;
}

/* TOP */

.study-card-top {
  background: hsl(215 74% 14%);

  padding: 28px 25px;
  margin-right: 7px;

  height: 160px;

  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* HEADING */

.study-card-top h3 {
  font-family: "Noto Serif JP", serif;

  font-size: 24px;
  font-weight: 500;

  color: #fff;

  margin-bottom: 10px;
  margin-top: 2px;
}

/* TEXT */

.study-card-top p {
  font-size: 16px;
  line-height: 1.5;

  color: rgba(243, 243, 243, 0.92);
  font-size: 700;
}

/* BOTTOM */

.study-card-bottom {
  padding: 32px;
}

/* BUTTON */

.study-btn {
  width: 320px;

  height: 45px;

  border: 1px solid #051b3a;
  border-radius: 999px;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  color: hsl(350 100% 37%);

  font-size: 14px;
  font-weight: 500;

  margin-left: -8px;
}

.study-btn:hover {
  background: #051b3a;
  color: #fff;
}
/* 


 */

/* ========================= */
/* LEARN JAPANESE */
/* ========================= */

.learn-japanese {
  padding: 90px 0;
  background: #fafafa;
  margin-top: -100px;
  margin-bottom: 100px;
}

/* ========================= */
/* TITLES */
/* ========================= */

.learn-title {
  font-family: "Noto Serif JP", serif;

  font-size: 48px;
  line-height: 1.1;

  font-weight: 600;

  color: #051b3a;

  margin-bottom: 10px;
}

.learn-subtitle {
  font-family: "Noto Serif JP", serif;

  font-size: 24px;

  font-weight: 500;

  color: #051b3a;

  margin-bottom: 20px;
}

/* ========================= */
/* DESCRIPTION */
/* ========================= */

.learn-description {
  font-size: 18px;
  line-height: 1.6;

  color: #4b5563;

  max-width: 770px;

  margin-bottom: 18px;
}

/* ========================= */
/* IMAGE CARD */
/* ========================= */

.learn-image-heading {
  font-family: "Noto Serif JP", serif;

  font-size: large;
  font-weight: 600;

  text-align: center;
  margin-top: -7px;
  margin-bottom: 17px;
}

.learn-image-card {
  background: #fff;

  border-radius: 24px;

  padding: 40px;

  margin-top: 30px;
  margin-bottom: 50px;
}

/* IMAGE */

.learn-image {
  width: 100%;

  max-width: 770px;

  margin: auto;

  display: block;

  border-radius: 14px;
}

/* SOURCE */

.learn-image-source {
  margin-top: 30px;

  font-size: 13.5px;
  font-size: 700;
  line-height: 1.5;

  color: #6b7280;
  margin-bottom: -12px;
}

/* SOURCE LINK */

.learn-image-source a {
  color: hsl(350 100% 37%);

  word-break: break-word;
}

/* ========================= */
/* PRIMARY BUTTON */
/* ========================= */

.learn-primary-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;

  background: #d71a28;
  color: #fff;

  padding: 10px 30px;

  border-radius: 999px;

  font-size: 14px;
  font-weight: 500;

  border: 1px solid #d71a28;

  transition: 0.3s ease;
  margin-bottom: -10px;
}

/* HOVER */

.learn-primary-btn:hover {
  background: #d71a27ef;
  color: white;
}

/* NOTE */

.learn-note {
  margin-top: 18px;

  font-size: 12px;

  color: hsl(215 7% 40%);
}

/* ========================= */
/* SMALL CARDS */
/* ========================= */

.learn-card {
  margin-top: 60px;
  margin-right: 6.8px;

  border: 1px solid #ececec;

  background: #fff;
}

/* TOP */

.learn-card-top {
  background: #051b3a;

  padding: 20px 25px;

  height: 175px;
}

/* HEADING */

.learn-card-top h3 {
  font-family: "Noto Serif JP", serif;

  font-size: 24px;
  line-height: 1.3;

  font-weight: 500;

  color: #fff;

  margin-bottom: 7px;
  margin-top: 8px;
}

/* TEXT */

.learn-card-top p {
  font-size: 16px;
  line-height: 1.5;

  color: rgba(255, 255, 255, 0.814);
}

/* BOTTOM */

.learn-card-bottom {
  padding: 28px;
}

/* OUTLINE BUTTON */

.learn-outline-btn {
  width: 100%;

  height: 45px;

  border: 1px solid #051b3a;
  border-radius: 999px;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  background: #fff;
  color: #e11d48;

  font-size: 14px;
  font-weight: 550;

  transition: 0.3s ease;
}

/* HOVER */

.learn-outline-btn:hover {
  background: #051b3a;
  color: #fff;
}

/* ========================= */
/* DARK BOXES */
/* ========================= */

.learn-dark-box {
  margin-top: 60px;
  margin-bottom: 30px;
  margin-right: 6.8px;

  background: #fff;
  border: 1px solid #ececec;

  display: flex;
  flex-direction: column;

  height: auto;
}

/* TOP — navy text area (matches .learn-card-top so both cards align) */

.learn-dark-top {
  background: #051b3a;

  padding: 20px 25px;

  height: 175px;
}

/* TITLE */

.learn-dark-box h3 {
  font-family: "Noto Serif JP", serif;

  font-size: 24px;
  line-height: 1.3;

  font-weight: 500;

  color: #fff;

  margin-top: 8px;
  margin-bottom: 7px;
}

/* BADGE */

.learn-badge {
  padding: 3px 18px;
  margin-right: 5px;
  margin-top: -20px;

  border-radius: 999px;

  border: 1px solid rgba(255, 255, 255, 0.3);

  color: #fff;
  background-color: #40536d8c;

  font-size: 12px;
  font-weight: 600;
}

/* TEXT */

.learn-dark-box p {
  font-size: 16px;
  line-height: 1.5;

  color: rgba(255, 255, 255, 0.814);

  width: 100%;
  margin: 0;
}

/* BOTTOM — white button area (matches .learn-card-bottom) */

.learn-dark-bottom {
  background: #fff;

  padding: 24px 28px;

  flex: 0 0 auto;
}

/* Match the height of the first dark box on desktop only.
   On smaller screens the cards stack and this extra space breaks layout. */
@media (min-width: 992px) {
  #learn-dark-bottom-two {
    margin-bottom: 51.8px;
  }
}
@media (max-width: 991.98px) {
  #learn-dark-bottom-two {
    margin-bottom: 0 !important;
  }
}

/* BUTTON GROUP — stacked, full-width pills */

.learn-dark-buttons {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 12px;
}

/* OUTLINE BUTTON — white bg, red text (matches .learn-outline-btn) */

.learn-dark-btn,
.learn-dark-btn-two {
  width: auto;

  height: 40px;
  padding: 0 18px;

  border: 1px solid #051b3a;
  border-radius: 999px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  background: #fff;
  color: #e11d48;

  font-size: 14px;
  font-weight: 550;

  text-decoration: none;

  transition: 0.3s ease;
}

/* HOVER */

.learn-dark-btn:hover,
.learn-dark-btn-two:hover {
  background: #051b3a;
  color: #fff;
}

/* ========================= */
/* RESPONSIVE */
/* ========================= */
/* 


 */

/* ========================= */
/* FAQ SECTION */
/* ========================= */

.faq-section {
  padding: 10px 0 120px;
  background: #fff;
  margin-top: 0;
}

/* TITLE */

.faq-title {
  font-family: "Noto Serif JP", serif;

  font-size: 47px;
  line-height: 1.1;

  font-weight: 600;

  color: #051b3a;

  margin-bottom: 55px;
  margin-top: -11px;
}

/* CATEGORY */

.faq-category {
  font-family: "Noto Serif JP", serif;

  font-size: 20px;
  font-weight: 600;

  color: #051b3a;

  margin-bottom: 10px;
}

/* FAQ ITEM */

.faq-item {
  border-bottom: 1px solid #e5e7eb;
}

/* QUESTION */

.faq-question {
  width: 100%;

  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;

  padding: 28px 0;

  background: none;
  border: none;

  text-align: left;

  cursor: pointer;
  margin-bottom: -15px;
  margin-top: -5px;
}

/* QUESTION TEXT */

.faq-question span:first-child {
  font-size: 17.7px !important;
  line-height: 1.7;

  color: #111827;

  font-weight: 500;

  max-width: 90%;
}

/* PLUS */

.faq-icon {
  font-size: 0px;
  line-height: 1;

  color: #051b3a;

  margin-top: -4px;
}

/* LINK WRAPPER */

.faq-link-wrapper {
  margin-top: 50px;
}

/* LINK */

.faq-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;

  color: #428127;

  font-size: 17px;
  font-weight: 500;

  transition: 0.3s ease;
}

/* HOVER */

.faq-link:hover {
  color: #051b3a;
}

/* NOTE */

.faq-note {
  margin-top: -10px;

  font-size: -2px;
  font-style: italic;

  color: #6b7280;
}

/* ========================= */
/* RESPONSIVE */
/* ========================= */

/* 

 */

/* ========================= */
/* COMMUNITY SECTION */
/* ========================= */

.community-section {
  padding: 110px 0;

  background: #f8f8f8;

  text-align: center;

  margin-top: -25px;
}

/* TITLE */

.community-title {
  font-family: "Noto Serif JP", serif;

  font-size: 47.8px;
  line-height: 1;

  font-weight: 600;

  color: #051b3a;

  margin-bottom: 15px;
}

/* DESCRIPTION */

.community-description {
  font-size: 18px;
  line-height: 1.8;

  color: #6b7280;

  margin-bottom: 30px;
}

/* BUTTON */

.community-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  background: #051b3a;
  color: #fff;

  padding: 8px 23px;

  border-radius: 999px;

  border: 1px solid #051b3a;

  font-size: 14px;
  font-weight: 600;

  transition: 0.3s ease;
}

/* HOVER */

.community-btn:hover {
  background: #051b3ae9;
  color: white;
}

/* SANA CTA — sits below Instagram button */
.community-cta-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.sana-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  background: #fff;
  color: #d71a28;

  padding: 8px 23px;
  border-radius: 999px;
  border: 1px solid #051b3a;

  font-size: 14px;
  font-weight: 600;

  transition: 0.3s ease;
  cursor: pointer;
}

.sana-btn:hover {
  background: #051b3a;
  color: #fff;
}

/* INSTAGRAM ICON */

.instagram-icon {
  width: 20px;
  height: 20px;

  flex-shrink: 0;
}

/* ARROW */

.community-arrow {
  font-size: 18px;
}

/* ========================= */
/* RESPONSIVE */
/* ========================= */

/* 

 */

.footer {
  background: #051b3a;

  padding-top: 22px;
  padding-bottom: 25px;
}

.footer-row {
  margin-top: 0px;
  margin-left: -15px;
}

/* LOGO WRAPPER */

.footer-logo-wrapper {
  margin-bottom: 28px;
}

/* LOGO */

.footer-logo {
  width: 80px;

  padding: 8px;
  margin-left: -5px;

  border-radius: 6px;

  margin-bottom: -15px;
}

/* TITLE */

.footer-title {
  font-family: "Noto Serif JP", serif;

  font-size: 20px;
  line-height: 1.4;

  font-weight: 500;

  color: #fff;

  margin-bottom: 15px;
}

/* TEXT */

.footer-text {
  font-size: 14px;
  line-height: 1.6;

  color: rgba(255, 255, 255, 0.716);

  max-width: 320px;
}

/* HEADING */

.footer-heading {
  font-family: "Noto Serif JP", serif;

  font-size: 15.9px;

  font-weight: 600;

  color: #fff;

  margin-top: 10px;
  margin-bottom: 25px;
}

/* LINKS */

.footer-links {
  list-style: none;

  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 15px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.81);

  font-size: 13.8px;

  transition: 0.3s ease;
}

/* HOVER */

.footer-links a:hover {
  color: #ffffff;
}

/* CONTACT */

.footer-contact {
  font-size: 13.5px;
  line-height: 1.5;

  color: rgba(255, 255, 255, 0.92);

  margin-bottom: 14px;
}

.footer-contact a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  transition: 0.3s ease;
}

.footer-contact a:hover {
  color: #ffffff;
}

/* LANGUAGE SWITCH */

.footer-language-switch {
  margin-top: 10px;

  display: inline-flex;
  align-items: center;
  gap: 8px;

  border: 1px solid rgba(255, 255, 255, 0.671);

  border-radius: 999px;

  padding: 13px 20px;
}

/* DIVIDER */

.footer-language-switch::before {
  content: "|";

  position: absolute;

  left: 50%;

  transform: translateX(-50%);

  color: #35649e74;

  font-size: 14px;

  font-weight: 400;
}

/* IMPORTANT */

.footer-language-switch {
  position: relative;
}

.footer-language-switch:hover {
  background-color: white;
}

.footer-language-switch:hover .lang-btn.active {
  color: #051b3a;
}

/* BOTTOM */

.footer-bottom {
  margin-top: 30px;

  padding-top: 28px;

  border-top: 1px solid rgba(255, 255, 255, 0.12);

  text-align: center;
}

/* COPYRIGHT */

.footer-bottom p {
  font-size: 12px;

  color: rgba(255, 255, 255, 0.75);

  margin: 0;
}

/* ========================= */
/* RESPONSIVE */
/* ========================= */

/*  */

/*  */

/* ========================= */
/* WHY JAPAN MODAL */
/* ========================= */

.why-japan-modal {
  position: fixed;

  top: 0;
  left: 0;

  width: 100%;
  height: 100vh;

  background: rgba(5, 27, 58, 0.45);

  display: flex;
  align-items: center;
  justify-content: center;

  opacity: 0;
  visibility: hidden;

  transition: 0.3s ease;

  z-index: 999999;
}

/* ACTIVE */

.why-japan-modal.active {
  opacity: 1;
  visibility: visible;
}

/* BOX */

.why-japan-modal-box {
  width: 100%;
  max-width: 500px;

  background: #ffffff;

  border-radius: 22px;

  overflow: hidden;

  display: flex;

  flex-direction: column;

  max-height: 55vh;
}

/* HEADER */

.why-modal-header {
  padding: 34px 38px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  border-bottom: 1px solid #ececec;
}

.why-modal-header h2 {
  font-size: 30px;
  font-family: "Noto Serif JP", serif;
  color: #051b3a;
  margin: 0;
}

/* CLOSE */

.why-modal-close {
  border: none;
  background: none;

  font-size: 25px;
  line-height: 1;

  cursor: pointer;

  color: #111827;
}

/* BODY */

.why-modal-body {
  padding: 36px;

  max-height: 70vh;
}

/* LINK */

.why-modal-link {
  width: 100%;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;

  padding: 22px 20px;

  border: 1px solid #e0e0e0;
  border-radius: 18px;

  margin-bottom: 16px;

  color: #111827;
  background: #fff;

  transition:
    background-color 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    color 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.why-modal-link:hover {
  background: #fbfbfb;
  border-color: #e0e0e0;
  color: #0b1220;
}

/* TEXT */

.why-modal-link span {
  font-size: 15px;
  font-weight: 500;
}

/* ARROW (the trailing ↗ span) */

.why-modal-link span:last-child {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  font-size: 18px;
  line-height: 1;
  color: #5a5f67;

  transition:
    color 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: center;
  will-change: transform;
}

.why-modal-link:hover span:last-child {
  color: #0b1220;
  transform: scale(1.18);
}

/* NOTE */

.why-modal-note {
  margin-top: 24px;

  font-size: 5px;
  color: #6b7280;
}

/* RESPONSIVE */

/*  */

/* ========================= */
/* DISCOVER MODAL FIX */
/* ========================= */

.discover-modal-box {
  max-height: 82vh;

  display: flex;
  flex-direction: column;
}

/* SCROLL AREA */

.discover-scroll-area {
  padding: 24px 36px;

  max-height: 55vh;

  overflow-y: auto;
}

/* FOOTER */

.discover-modal-footer {
  padding: 18px 36px 26px;

  border-top: 1px solid #ececec;

  background: #ffffff;

  flex-shrink: 0;
}

/* NOTE */

.discover-modal-footer .why-modal-note {
  margin: 0;

  font-size: 14px;
  color: #6b7280;
}

/* MOBILE */

/*  */

/* ========================= */
/* SCHOLARSHIP MODAL */
/* ========================= */

.why-japan-modal {
  position: fixed;

  top: 0;
  left: 0;

  width: 100%;
  height: 100vh;

  background: rgba(5, 27, 58, 0.45);

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 20px;

  opacity: 0;
  visibility: hidden;

  transition: 0.3s ease;

  z-index: 999999;
}

/* ACTIVE */

.why-japan-modal.active {
  opacity: 1;
  visibility: visible;
}

/* BOX */

.why-japan-modal-box {
  width: 100%;
  max-width: 500px;

  background: #ffffff;

  border-radius: 24px;

  overflow: hidden;
}

/* HEADER */

.why-modal-header {
  padding: 36px 36px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  border-bottom: 1px solid #ececec;
}

.why-modal-header h2 {
  margin: 0;

  font-size: 29.5px;

  color: #051b3a;

  font-family: "Noto Serif JP", serif;

  font-weight: 600;
}

/* CLOSE */

.why-modal-close {
  border: none;
  background: none;

  font-size: px;

  line-height: 1;

  cursor: pointer;

  color: #111827;
}

/* BODY */

.why-modal-body {
  padding: 36px;
}

/* LINK */

.why-modal-link {
  width: 100%;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;

  padding: 15px 15px;

  border: 1px solid #e0e0e0;
  border-radius: 18px;

  margin-bottom: 14px;

  background: #fefefe;

  text-decoration: none;

  color: #111827;

  transition:
    background-color 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    color 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

/* HOVER */

.why-modal-link:hover {
  background: #fbfbfb;
  border-color: #e0e0e0;
  color: #0b1220;
}

/* TEXT */

.why-modal-link span {
  font-size: 15.5px;
}

.why-modal-link span:last-child {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  color: #5a5f67;

  transition:
    color 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: center;
  will-change: transform;
}

.why-modal-link:hover span:last-child {
  color: #0b1220;
  transform: scale(1.18);
}

/* ========================= */
/* TBA BOX */
/* ========================= */

.tba-link {
  background: #f7f7f7;

  color: #8d8d8d;

  cursor: not-allowed;
}

/* BLOCK CURSOR */

.tba-link:hover {
  background: #f7f7f7 !important;

  color: #8d8d8d !important;

  border-color: #ececec !important;

  cursor: not-allowed;
}

/* NOTE */

.why-modal-note {
  margin-top: 26px;

  margin-bottom: 0;

  font-size: 12px;

  color: #6b7280;
}

/* RESPONSIVE */

/*  */

/* ========================= */
/* FAQ ITEM */
/* ========================= */

.faq-item {
  border-bottom: 1px solid #e5e7eb;
}

/* QUESTION */

.faq-question {
  width: 100%;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 20px;

  padding: 28px 0;

  background: none;
  border: none;

  cursor: pointer;

  text-align: left;
}

.faq-question span:first-child {
  font-size: 22px;
  line-height: 1.5;
  color: #051b3a;
  font-weight: 500;
}

.faq-icon {
  font-size: 38px;
  color: #051b3a;

  transition: 0.3s ease;

  flex-shrink: 0;
}

/* ANSWER */

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s ease;
  text-align: left;
}

.faq-answer-content {
  padding: 0 0 30px 0;
  text-align: left;
}

/* ACTIVE */

.faq-item.active .faq-answer {
  max-height: 1000px;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

/* TEXT */

.faq-answer p {
  font-size: 16px;
  line-height: 1.6;
  color: #4b5563;
  margin-bottom: 18px;
  text-align: left;
}

.faq-answer-note {
  font-size: 16px;
  line-height: 1.6;
  color: #39404a;
  font-weight: 550;
  text-align: left;
}

/* LINKS */

.faq-links p {
  margin-bottom: 10px;
  text-align: left;
}

.faq-links a {
  color: #dc2626;
  text-decoration: none;
}

.faq-links a:hover {
  text-decoration: underline;
}

/* NOTE */

.faq-note {
  font-size: 14px !important;
  font-style: italic;
  color: #6b7280 !important;

  margin-top: 18px;
}

/* MOBILE */

/*  */

.why-japan-modal-box {
  max-height: 88vh; /* override the old 55vh clip */
}
.why-modal-body {
  max-height: none; /* let the box drive scrolling */
  overflow-y: auto;
}

/* Size variants */
.why-japan-modal-box.modal-sm {
  max-width: 460px;
  max-height: 60vh;
}
.why-japan-modal-box.modal-md {
  max-width: 540px;
  max-height: 75vh;
}
.why-japan-modal-box.modal-lg {
  max-width: 640px;
  max-height: 82vh;
}
.why-japan-modal-box.modal-xl {
  max-width: 760px;
  max-height: 88vh;
}

/* Mobile: every modal becomes near-full-width but keeps its height tier */
/*  */

/* Note text was 5px (typo) — make it readable */
.why-modal-note {
  font-size: 12px;
  line-height: 1.5;
}

/* =========================================================
   MODAL CLOSE BUTTON — modern circular hover
   ========================================================= */
.why-modal-close {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: transparent;
  color: #111827;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.why-modal-close:hover {
  background-color: rgba(5, 27, 58, 0.032);
  color: #051b3a;
}

.why-modal-close:active {
  background-color: rgba(5, 27, 58, 0.15);
  transform: scale(0.94);
}

.why-modal-close:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(5, 27, 58, 0.18);
}

/* Blur the page behind the modal */
.why-japan-modal {
  background: rgba(5, 27, 58, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Lock scroll on the whole page while a modal is open.
   Works even if <html> is the scroller (iOS/Safari safe). */
html:has(.why-japan-modal.active),
body:has(.why-japan-modal.active) {
  overflow: hidden !important;
  touch-action: none;
}

/* ========================= */
/* MODAL LINK — single-line text */
/* ========================= */

/* Make the row text stay on ONE line and let the box grow as needed */
.why-modal-link {
  flex-wrap: nowrap;
}

.why-modal-link span:first-child {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1 1 auto;
  min-width: 0;
}

.why-modal-link span:last-child {
  flex: 0 0 auto;
}

/* Widen the modal box so long titles fit on one line */
.why-japan-modal-box.modal-lg {
  max-width: 880px; /* was narrower — bump up */
  width: 92%;
}

/* Scholarship Modal */
#scholarship-box {
  width: 90%;
  max-width: 750px !important;
}

/*  */

/* ========================= */
/* COMING SOON / TBA — muted disabled state */
/* ========================= */

.coming-soon-link,
.tba-link {
  background: #f3f4f6 !important;
  border-color: #e5e7eb !important;
  color: #9ca3af !important;
  cursor: not-allowed;
  pointer-events: auto; /* keep cursor visible */
}

.coming-soon-link:hover,
.tba-link:hover {
  background: #f3f4f6 !important;
  border-color: #e5e7eb !important;
  color: #9ca3af !important;
  cursor: not-allowed;
  box-shadow: none !important;
  transform: none !important;
}

/* Mute the title text inside */
.coming-soon-link span:first-child,
.tba-link span:first-child {
  color: #9ca3af;
}

/* Allow text wrapping for tba-link long text */
.tba-link span:first-child {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

/* "Coming Soon" / "TBA" badge — smaller, muted pill */
.coming-soon-badge,
.tba-link span:last-child {
  font-size: 12px !important;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e5e7eb;
  color: #6b7280 !important;
  white-space: nowrap;
  transform: none !important; /* cancel the hover scale */
}

.coming-soon-link:hover .coming-soon-badge,
.tba-link:hover span:last-child {
  transform: none !important;
  color: #6b7280 !important;
}

/* Match reference: lighter, smaller modal-link text */
.why-modal-link span:first-child {
  font-size: 16px;
  font-weight: 400;
  font-family: "Inter", sans-serif;
  color: #1f2937;
  letter-spacing: 0;
  line-height: 1.4;
}

/* Arrow icon — slightly thinner stroke feel, matches reference */
.why-modal-link span:last-child svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}

/* Modal title ("Why Choose Japan") — serif, regular weight like reference */
.why-modal-header h2 {
  font-family: "Noto Serif JP", serif;
  font-weight: 600;
  font-size: 29.8px;
  color: #0b1220;
}

/* Footer note — small muted gray as in reference */
.why-modal-note {
  font-size: 12px;
  font-weight: 400;
  color: #7a7d84;
}

#why-japan-box {
  width: 510px;
  height: 410px;
  overflow: hidden !important;
  overflow-x: hidden !important;
  max-height: none;
}

#japanese-language-box {
  max-width: 810px;
  max-height: 510px;
}

#study-pathway-box {
  max-width: 650px;
  max-height: 510px;
}

#search-study-box,
#discover-box,
#scholarship-box,
#easy-japanese-box,
#living-box,
#learning-box {
  max-width: 650px;
  max-height: 510px;
}

/* ============================================================
   RESPONSIVE — TABLET & MOBILE
   Desktop styles above are NOT modified.
   ============================================================ */

/* ---------- TABLET  (≤ 991.98px) ---------- */
@media (max-width: 991.98px) {
  /* GLOBAL */
  html,
  body {
    overflow-x: hidden;
    max-width: 100%;
  }
  .container {
    padding-left: 18px;
    padding-right: 18px;
  }
  img,
  svg {
    max-width: 100%;
    height: auto;
  }

  /* HEADER — single row: logo + title + language + toggle (always visible) */
  .header .navbar {
    height: auto;
    min-height: 70px;
    margin-left: 0;
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
  }
  .navbar-brand.logo-wrapper {
    order: 1;
    flex: 1 1 auto;
    min-width: 0;
    margin: 0 !important;
    gap: 8px;
    overflow: hidden;
  }
  .logo {
    width: 34px;
    flex-shrink: 0;
  }
  .logo-text {
    font-size: 12.5px;
    line-height: 1.2;
    margin-left: 0;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Language switch sits inline (JS moves it out of .collapse) */
  .header .navbar > .language-switch {
    order: 2;
    height: 36px;
    padding: 4px 12px !important;
    gap: 10px;
    margin: 0 !important;
    flex-shrink: 0;
  }
  .header .navbar > .language-switch .lang-btn {
    font-size: 11px;
  }

  /* Toggle button — always visible */
  .navbar-toggler {
    order: 3;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 38px;
    padding: 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    font-size: 20px;
    line-height: 1;
    flex-shrink: 0;
  }

  /* Collapse drawer (nav links only) */
  .navbar-collapse {
    order: 99;
    flex-basis: 100%;
    width: 100%;
    max-width: 100%;
    margin-top: 10px;
    padding: 0;
    background: #fff;
    border-top: 1px solid #ececec;
    box-shadow: none;
  }
  .navbar-collapse:not(.show) {
    display: none !important;
    height: 0 !important;
    padding: 0 !important;
    border-top: 0 !important;
  }
  .navbar-collapse.show {
    display: block !important;
    height: auto !important;
    padding: 12px 4px !important;
  }
  .navbar-collapse.show .nav-links {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start;
    gap: 4px;
    margin: 0 !important;
    width: 100%;
    height: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: static !important;
  }
  .navbar-collapse.show .nav-item {
    display: block !important;
    width: 100%;
    height: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
  .navbar-collapse.show .nav-link {
    display: block !important;
    padding: 10px 6px;
    width: 100%;
    font-size: 15px;
    line-height: 1.4;
    color: #111827 !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  /* RTL header */
  body.rtl .header .navbar {
    flex-direction: row !important;
  }
  body.rtl .navbar-brand.logo-wrapper {
    flex-direction: row !important;
    margin: 0 !important;
    text-align: right;
  }
  body.rtl .navbar-collapse .nav-links {
    flex-direction: column !important;
    align-items: flex-end;
  }

  /* HERO */
  .hero {
    min-height: auto;
    padding: 110px 0 80px;
    margin-bottom: 32px;
  }
  .hero-bg {
    height: 100%;
  }
  .hero-content {
    text-align: center;
  }
  .hero-title {
    font-size: clamp(28px, 5vw, 44px);
    line-height: 1.2;
  }
  .hero-subtitle {
    font-size: 14px;
  }
  .hero-description,
  .hero-description-two {
    font-size: 15px;
    line-height: 1.6;
  }
  .hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
  }

  /* LEARN-JAPANESE split layout → stack */
  .learn-japanese .row > .col-lg-6 {
    flex: 0 0 100%;
    max-width: 100%;
  }
  .learn-image-card {
    margin-top: 24px;
  }

  .why-japan {
    text-align: center;
  }

  .education-system h2,
  .education-system p {
    text-align: center;
    margin-left: 11%;
  }

  .education-system p {
    margin-left: 14.5%;
  }

  .education-info {
    text-align: center;
    margin-left: 38%;
  }

  .study-japan {
    text-align: center;
  }

  .study-description {
    margin-left: auto;
  }

  .study-card-bottom {
    margin-left: auto;
  }

  .learn-japanese {
    text-align: center;
  }

  .learn-description {
    margin-left: 11%;
  }

  .learn-dark-box {
    text-align: left;
  }

  .faq-title {
    text-align: center;
  }
}

/* ---------- MOBILE  (≤ 768.98px) ---------- */
@media (max-width: 768.98px) {
  /* HEADER */
  .header .navbar {
    min-height: 62px;
    gap: 6px;
  }
  .logo {
    width: 30px;
  }
  .logo-text {
    font-size: 11.5px;
  }
  .header .navbar > .language-switch {
    height: 32px;
    padding: 3px 9px !important;
    gap: 7px;
  }
  .header .navbar > .language-switch .lang-btn {
    font-size: 10.5px;
  }
  .navbar-toggler {
    width: 38px;
    height: 34px;
    font-size: 18px;
  }

  /* HERO */
  .hero {
    padding: 95px 0 50px;
  }
  .hero-title {
    font-size: clamp(24px, 7vw, 34px);
  }
  .hero-subtitle {
    font-size: 12.5px;
    letter-spacing: 1px;
  }
  .hero-description,
  .hero-description-two,
  .study-description,
  .learn-description {
    font-size: 14px;
    text-align: center;
  }
  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-buttons .btn-primary-custom,
  .hero-buttons .btn-outline-custom {
    width: 100%;
    justify-content: center;
  }

  /* SECTION TITLES */
  .section-title,
  .study-title,
  .education-title,
  .learn-title,
  .faq-title,
  .community-title {
    font-size: clamp(22px, 6vw, 30px);
    line-height: 1.25;
    text-align: center;
  }
  .section-subtitle,
  .education-subtitle,
  .learn-subtitle {
    font-size: 13px;
    line-height: 1.6;
    text-align: center;
  }

  /* All multi-col grids → single column */
  .why-japan .row > [class*="col-"],
  .study-japan .row > [class*="col-"],
  .education-system .row > [class*="col-"],
  .learn-japanese .row > [class*="col-"],
  .footer .row > [class*="col-"] {
    flex: 0 0 100%;
    max-width: 100%;
  }

  /* CARDS — generic */
  .education-card,
  .study-card,
  .learn-card,
  .feature-box {
    padding: 18px;
    border-radius: 14px;
    overflow: hidden;
    text-align: center;
  }
  .learn-dark-box {
    padding: 0;
    border-radius: 14px;
    overflow: hidden;
    text-align: center;
  }

  /* EDUCATION SYSTEM */
  .education-system {
    padding: 55px 0;
    margin-top: 0;
  }
  .education-card {
    padding: 16px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }
  .education-image {
    width: 100%;
    height: auto;
    max-height: 220px;
    object-fit: contain;
    margin-bottom: 0;
  }
  .education-card .row {
    margin-left: 0;
    margin-right: 0;
  }
  .education-img-title {
    font-size: 16px;
    line-height: 1.35;
    margin-bottom: 14px;
  }
  .education-info {
    width: 100% !important;
    height: auto !important;
    min-height: 0;
    font-size: 13px;
    line-height: 1.55;
    padding: 12px;
    word-wrap: break-word;
    overflow-wrap: anywhere;
  }
  .education-info strong {
    display: block;
    margin-bottom: 4px;
  }

  /* JLPT IMAGE CARD (Learn Japanese) */
  .learn-image-card {
    padding: 16px;
    border-radius: 14px;
    overflow: hidden;
  }
  .learn-image-heading {
    font-size: 14.5px;
    line-height: 1.4;
  }
  .learn-image {
    width: 100%;
    height: auto;
    object-fit: contain;
  }
  .learn-image-source p,
  .learn-image-source a {
    font-size: 12px;
    word-break: break-word;
    overflow-wrap: anywhere;
  }
  .learn-primary-btn {
    display: flex !important;
    width: 100%;
    justify-content: center;
    text-align: center;
    padding: 12px 14px;
    font-size: 13.5px;
    white-space: normal;
    word-break: break-word;
  }
  .learn-note {
    font-size: 12px;
    text-align: center;
  }

  /* LEARN DARK BOX (JLPT / Learning Japanese in Japan) */
  .learn-dark-box {
    padding: 0;
    height: auto !important;
    min-height: 0;
    margin-right: 0;
    overflow: hidden;
    text-align: center;
  }
  .learn-dark-top {
    padding: 22px 20px;
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
  .learn-dark-bottom {
    padding: 18px 20px 22px;
  }
  .learn-badge {
    margin: 0;
  }
  .learn-dark-box p {
    width: 100% !important;
    margin-top: 0;
    margin-bottom: 0;
  }
  .learn-dark-buttons {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100%;
  }
  .learn-dark-btn,
  .learn-dark-btn-two {
    display: flex !important;
    width: 100%;
    max-width: 100%;
    margin: 0 !important;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 12px 16px;
    font-size: 13.5px;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  /* CARD IMAGES */
  .study-card-top img,
  .learn-image-card img {
    width: 100%;
    max-height: 220px;
    object-fit: cover;
    border-radius: 12px;
  }

  /* CARD BUTTONS */
  .education-btn-wrapper {
    justify-content: center;
  }
  .study-btn,
  .explore-btn,
  .learn-primary-btn,
  .learn-outline-btn,
  .community-btn {
    width: 100%;
    justify-content: center;
    padding: 12px 16px;
    font-size: 13.5px;
  }

  /* FAQ */
  .faq-section {
    padding: 40px 0;
  }
  .faq-title {
    font-size: 24px;
    margin-bottom: 18px;
  }
  .faq-category {
    font-size: 13px;
    text-align: center;
  }
  .faq-item {
    margin-bottom: 10px;
    border-radius: 10px;
    overflow: hidden;
  }
  .faq-question {
    width: 100%;
    padding: 14px 14px 20px 14px;
    gap: 10px;
    align-items: flex-start;
    justify-content: space-between;
    line-height: 1.4;
    text-align: left;
  }
  .faq-question span:first-child,
  .question {
    flex: 1 1 auto;
    min-width: 0;
    max-width: calc(100% - 34px);
    font-size: 14px !important;
    line-height: 1.45;
    word-break: break-word;
    overflow-wrap: anywhere;
  }
  .faq-icon {
    font-size: 20px;
    flex-shrink: 0;
    line-height: 1;
  }
  .faq-answer {
    padding: 0 14px;
    line-height: 1.55;
    text-align: left;
  }
  .faq-item.active .faq-answer {
    max-height: none;
    overflow: visible;
  }
  .faq-answer-content {
    padding: 0 0 14px 0;
    word-break: break-word;
    overflow-wrap: anywhere;
  }
  .faq-answer p {
    font-size: 13px;
    line-height: 1.55;
  }
  .faq-link-wrapper {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .faq-links {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 8px;
  }
  .faq-link {
    width: 100%;
    font-size: 12.5px;
    word-break: break-word;
    overflow-wrap: anywhere;
  }
  .faq-note {
    font-size: 12px;
    line-height: 1.5;
  }

  /* MODALS — bottom-sheet */
  .why-japan-modal {
    padding: 0;
  }
  .why-japan-modal-box {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 92vh;
    border-radius: 16px 16px 0 0;
    margin: auto 0 0 0 !important;
    align-self: flex-end;
  }
  .why-modal-header {
    padding: 14px 16px;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 2;
  }
  .why-modal-header h2,
  .why-modal-header h3 {
    font-size: 17px;
  }
  .why-modal-body {
    padding: 14px 16px 24px;
    max-height: 75vh;
    overflow-y: auto;
  }
  .why-modal-close {
    width: 36px;
    height: 36px;
    font-size: 22px;
  }
  .why-modal-link {
    font-size: 13px;
    padding: 10px 12px;
    word-break: break-word;
  }

  /* COMMUNITY */
  .community-section {
    padding: 50px 0;
    text-align: center;
  }
  .community-description {
    font-size: 14px;
  }

  /* FOOTER */
  .footer {
    padding: 40px 0 20px;
    text-align: left;
  }
  .footer-row {
    text-align: left;
  }
  .footer-logo-wrapper {
    display: flex;
    justify-content: left !important;
    align-items: left;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
  }
  .footer-logo {
    width: 50px !important;
    height: auto;
    margin: 0 !important;
    padding: 4px;
    flex-shrink: 0;
  }
  .footer-title {
    font-size: 14px;
    text-align: left;
    margin-bottom: 10px;
  }
  .footer-text,
  .footer-contact,
  .footer-links {
    font-size: 13px;
  }
  .footer-heading {
    font-size: 14px;
  }
  .footer-links,
  .footer-contact {
    align-items: left;
    text-align: left;
    word-break: break-word;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 10px;
    text-align: left;
  }
  .footer-language-switch {
    margin: 10px auto 0;
  }
  body.rtl .footer {
    text-align: left;
  }
  body.rtl .footer .row {
    flex-direction: row !important;
  }
  body.rtl .footer-logo-wrapper,
  body.rtl .footer-links,
  body.rtl .footer-contact {
    align-items: left;
    text-align: left;
  }
}

/* ---------- SMALL MOBILE  (≤ 480px) ---------- */
@media (max-width: 480px) {
  .container {
    padding-left: 14px;
    padding-right: 14px;
  }

  /* Header — keep all 4 visible */
  .logo {
    width: 28px;
  }
  .logo-text {
    font-size: 10.5px;
  }
  .header .navbar > .language-switch {
    height: 30px;
    padding: 2px 7px !important;
    gap: 5px;
  }
  .header .navbar > .language-switch .lang-btn {
    font-size: 9.5px;
  }
  .navbar-toggler {
    width: 34px;
    height: 30px;
    font-size: 16px;
  }

  /* Hero */
  .hero {
    padding: 90px 0 58px;
    margin-bottom: 28px;
  }
  .hero-title {
    font-size: 24px;
  }

  /* Education + JLPT cards */
  .education-card,
  .learn-image-card {
    padding: 14px;
  }
  .education-info {
    font-size: 12.5px;
    padding: 10px;
    line-height: 1.5;
  }
  .learn-image-heading {
    font-size: 13.5px;
  }
  .learn-dark-box {
    padding: 0;
  }
  .learn-dark-top {
    padding: 18px 16px;
  }
  .learn-dark-bottom {
    padding: 14px 16px 18px;
  }
  .learn-dark-box h3 {
    font-size: 20px;
  }
  .learn-dark-box p {
    font-size: 13px;
  }
  .learn-dark-btn,
  .learn-dark-btn-two {
    min-height: 44px;
    padding: 10px 12px;
    font-size: 12.5px;
  }

  /* FAQ */
  .faq-question {
    font-size: 13px;
    padding: 12px 12px 28px 12px;
    text-align: left;
  }
  .faq-icon {
    font-size: 18px;
  }
  .faq-answer {
    font-size: 12.5px;
    padding: 0 12px;
    text-align: left;
  }

  /* Footer logo */
  .footer-logo {
    width: 36px !important;
  }
}

/* ---------- EXTRA-SMALL  (≤ 360px) ---------- */
@media (max-width: 360px) {
  .logo-text {
    font-size: 9.5px;
  }
  .header .navbar > .language-switch {
    padding: 2px 5px !important;
    gap: 4px;
  }
  .header .navbar > .language-switch .lang-btn {
    font-size: 9px;
  }
  .hero-title {
    font-size: 22px;
  }
}

/* ========================= */
/* SHORT HEIGHT SCREEN FIX */
/* ========================= */

@media (max-height: 700px) {
  .hero-section {
    min-height: 700px;
  }

  .hero-content {
    padding-top: 120px;
    padding-bottom: 80px;
  }

  .hero-title {
    font-size: 72px;

    line-height: 0.95;
  }

  .hero-buttons {
    margin-top: 32px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 18px;

    flex-wrap: wrap;
  }

  .hero-btn {
    min-width: 180px;

    height: 54px;

    padding: 0 28px;

    white-space: nowrap;
  }
}

/* ============================================================ */
/* RESPONSIVE FIXES — 992px–1212px (cards/buttons overflow fix) */
/* ============================================================ */
@media (min-width: 992px) and (max-width: 1212.98px) {
  /* Buttons must not exceed their card */
  .study-btn,
  .learn-outline-btn,
  /* .learn-primary-btn, */
  .learn-dark-btn,
  .learn-dark-btn-two
  /* .explore-btn, */
  /* .community-btn  */ {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding-left: 16px;
    padding-right: 16px;
    box-sizing: border-box;
    white-space: normal;
    text-align: center;
  }

  /* Cards: tighter padding & flexible heights */
  .study-card,
  .learn-card {
    height: auto;
  }
  .study-card-bottom,
  .learn-card-bottom {
    padding: 22px 18px;
  }
  .study-card-top,
  .learn-card-top,
  .learn-dark-top {
    padding: 22px 20px;
    height: auto;
    min-height: 150px;
  }
  .study-card-top h3,
  .learn-card-top h3,
  .learn-dark-box h3 {
    font-size: 20px;
  }
  .study-card-top p,
  .learn-card-top p,
  .learn-dark-box p {
    font-size: 14.5px;
  }
  .learn-dark-bottom {
    padding: 22px 18px;
  }
  #learn-dark-bottom-two{
    margin-bottom: 102px;
  }
  .learn-dark-box {
    height: auto;
  }


  /* Education info: fixed 550px overflows narrow column */
  .education-info {
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 70px;
    padding: 12px 14px;
  }

  .education-card {
    padding: 24px;
  }

  /* Learn image card padding shrink */
  .learn-image-card {
    padding: 28px;
  }
}

/* ============================================================ */
/* ≤ 991px — center-align everything                            */
/* ============================================================ */
@media (max-width: 991.98px) {
  /* Generic centering for all main content */
  .why-japan,
  .why-japan *,
  .education-system,
  .education-system *,
  .study-japan,
  .study-japan *,
  .learn-japanese,
  .learn-japanese *,
  .faq-section,
  .community-section,
  .community-section * {
    text-align: center;
  }

  /* Exclude FAQ questions and answers from centering */
  .faq-section .faq-question,
  .faq-section .faq-answer {
    text-align: left !important;
  }

  /* Reset heavy left margins from the existing 991 block */
  .education-system h2,
  .education-system p,
  .education-info,
  .study-description,
  .study-card-bottom,
  .learn-description {
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* Center buttons inside cards & sections */
  .study-btn,
  .learn-outline-btn,
  .learn-primary-btn,
  /* .learn-dark-btn, */
  /* .learn-dark-btn-two, */
  /* .explore-btn, */
  .community-btn,
  .btn-primary-custom,
  .btn-outline-custom {
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    max-width: 360px;
    box-sizing: border-box;
  }

  .education-btn-wrapper,
  .hero-buttons {
    justify-content: center;
  }

  /* FAQ — keep questions readable on the left, but center title/links */
  .faq-section .faq-question,
  .faq-section .faq-answer,
  .faq-section .faq-answer * {
    text-align: left;
  }
  body.rtl .faq-section .faq-question,
  body.rtl .faq-section .faq-answer,
  body.rtl .faq-section .faq-answer * {
    text-align: right;
  }

  /* "Find more FAQs" — now sits below all FAQs, centered */
  .faq-link-wrapper {
    margin-top: 40px;
    text-align: center;
  }
  .faq-link {
    justify-content: center;
  }
  .faq-link-wrapper .faq-note {
    margin-top: 8px;
    text-align: center;
  }

  .learn-dark-box {
    text-align: left;
  }

  .learn-dark-top {
    justify-content: flex-start;
  }

  .learn-dark-top p {
    text-align: left;
  }

  .learn-dark-box p {
    width: 100% !important;
    text-align: left !important;
  }
}
