/* ===========================
   Section styling
   =========================== */
section {
  padding: 30px 20px;
  margin-bottom: 30px;
  background-color: #f9f9f9;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* ===========================
   Global font baseline
   =========================== */
body {
  font-family: "Segoe UI", "DengXian", "Microsoft YaHei", "Noto Sans SC", "SimHei", Arial, sans-serif;
}

/* ===========================
   Headings
   =========================== */
h1, h2, h3, h4, h5, h6 {
  font-family: "DengXian Light", "DengXian", "Microsoft YaHei", "Noto Sans SC", "SimHei", Arial, sans-serif;
}

/* Unified headings inside sections */
section h1,
section h2 {
  font-size: 26px;
  margin-top: 0;
  color: #003366; /* Converse dark blue */
}

/* ===========================
   Paragraphs and lists
   =========================== */
section p,
section ul {
  font-size: 16px;
  line-height: 1.6;
  color: #333;
}

section ul {
  list-style-type: disc;
  padding-left: 20px;
}

/* ===========================
   Header layout
   =========================== */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
}

/* Desktop logo */
header .logo {
  max-width: 160px;
  height: auto;
  display: block;
}

/* ===========================
   Header backgrounds
   =========================== */
.site-header.en {
  background-image: url('/assets-images-header/header-en.png');
  background-size: cover;
  background-position: center;
  height: 600px;
  position: relative;
}

.site-header.es {
  background-image: url('/assets-images-header/header-es.png');
  background-size: cover;
  background-position: center;
  height: 600px;
  position: relative;
}

.site-header.cn {
  background-image: url('/assets-images-header/header-cn.png');
  background-size: cover;
  background-position: center;
  height: 600px;
  position: relative;
}

/* ===========================
   Language navigation overlay
   =========================== */
.language-nav {
  position: absolute;
  top: 20px;
  right: 20px;
}

.language-nav a {
  text-decoration: none;
  color: #003366; /* brand blue */
  font-size: 16px;
  margin-left: 15px;
  font-weight: 600;
}

.language-nav a.active {
  color: #cc0000; /* MJ red */
  text-decoration: underline;
}

/* ===========================
   Responsive adjustments
   =========================== */
@media (max-width: 768px) {
  .site-header.en,
  .site-header.es,
  .site-header.cn {
    height: 720px; /* taller crop for mobile */
  }

  .language-nav {
    position: static;
    text-align: center;
    margin-top: 10px;
  }

  .language-nav a {
    font-size: 18px;
    margin: 0 8px;
    color: #003366;
  }

  .language-nav a.active {
    color: #cc0000;
  }

  .site-header .logo {
    position: static;
    display: block;
    margin: 0 auto;
    max-width: 120px;
  }
}

@media (max-width: 600px) {
  header {
    flex-direction: column;
    align-items: center;
  }

  header .logo {
    max-width: 120px;
    height: auto;
    display: block;
    margin: 0 auto;
  }

  header nav {
    margin-top: 10px;
    text-align: center;
  }

  header nav a {
    font-size: 18px;
    margin: 0 8px;
    text-decoration: none;
    color: #003366;
  }

  section h1,
  section h2 {
    font-size: 22px;
    color: #003366;
  }

  section p,
  section ul {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
  }
}  

/* ===========================
   Mobile portrait header adjustment (final)
   =========================== */
@media screen and (max-width: 768px) and (orientation: portrait) {
  .site-header.en,
  .site-header.es,
  .site-header.cn {
    height: 55vh;              /* balanced portrait height */
    background-size: contain;  /* show full logo */
    background-repeat: no-repeat;
    background-position: center;
    background-color: #ffffff; /* clean side/top bands */
    margin-bottom: 20px;       /* breathing space before Welcome */
  }

  .language-nav {
    position: static;          /* sits below header image */
    text-align: center;        /* centered for portrait */
    margin-top: 10px;
  }
}

/* ===========================
   Mobile landscape header adjustment (final centered nav, lifted once more)
   =========================== */
@media screen and (max-width: 768px) and (orientation: landscape) {
  .site-header.en,
  .site-header.es,
  .site-header.cn {
    height: 60vh;              
    background-size: contain;  
    background-repeat: no-repeat;
    background-position: center;
    background-color: #ffffff; 
    margin-bottom: 25px;       
  }

  .language-nav {
    position: absolute;        
    top: -5px;                 /* lifted one more step above */
    left: 50%;                 
    transform: translateX(-50%);
    text-align: center;
    width: auto;
  }
}

/* ===========================
   Footer
   =========================== */
footer {
  text-align: center;
  font-size: 14px;
  color: #666;
  padding: 20px 10px;
  border-top: 1px solid #ddd;
  margin-top: 40px;
}

footer a {
  color: #003366;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* ===========================
   Taglines by language
   =========================== */
html[lang="en"] p.tagline {
  font-style: italic;
  font-size: 13px;
  color: #003366 !important;
  margin-top: 10px;
  font-weight: 500;
}

html[lang="zh-Hans"] p.tagline {
  font-style: italic;
  font-size: 13px;
  color: #0055aa !important;
  margin-top: 10px;
  font-weight: 500;
}

html[lang="es"] p.tagline {
  font-style: italic;
  font-size: 13px;
  color: #006699 !important;
  margin-top: 10px;
  font-weight: 500;
}

/* Universal fallback */
p.tagline {
  font-style: italic;
  font-size: 13px;
  color: #003366;
  margin-top: 10px;
  font-weight: 500;
}

/* EN tagline override */
p.tagline.en {
  font-family: "Open Sans", Arial, sans-serif;
  font-weight: bold;
  color: #003366 !important;
  font-size: 13px;
  margin-top: 10px;
}

/* ES tagline override */
p.tagline.es {
  font-family: "Open Sans", Arial, sans-serif;
  font-weight: bold;
  color: #003366 !important;
  font-size: 13px;
  margin-top: 10px;
}

/* CN tagline override */
p.tagline.cn {
  font-family: "DengXian", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  font-weight: bold;
  color: #003366 !important;
  font-size: 13px;
  margin-top: 10px;
}