/*
Theme Name: NVMTS 2026
Description: Custom theme for NVMTS 2026 (Bootstrap 5.3 included via CDN)
Author: AI
Version: 1.0.0
*/

/* =========================================
   Base & Variables
   ========================================= */
:root {
  --color-main: #00549F;
  --color-bg: #EEF7FF;
  --color-text: #1E2123;
  --color-accent: #DD5500;
  --color-white: #FFFFFF;
}

body {
  background: var(--color-bg);
  font-family: 'Instrument Sans', sans-serif;
  color: var(--color-text);
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.6;
  overflow-wrap: anywhere;
  word-break: break-word;
}

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

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--color-main);
}

a.disabled {
  opacity: 0.5;
  pointer-events: none;
  cursor: default
}

/* =========================================
   Header
   ========================================= */
.header {
  position: sticky;
  width: 100%;
  background: var(--color-main);
  z-index: 1000;
  top: 0;
  left: 0;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.header__logo {
  color: var(--color-white);
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  font-weight: 600;
}

.header__logo a {
  color: var(--color-white);
}

.header__logo a:hover {
  color: var(--color-white);
  opacity: 0.9;
}

/* Toggle Button */
.header__toggle {
  width: 40px;
  height: 22px;
  position: relative;
  border: none;
  background: none;
  cursor: pointer;
  z-index: 1100;
  display: none;
}

.header__toggle span {
  position: absolute;
  width: 100%;
  height: 2px;
  background: #fff;
  left: 0;
  transition: 0.3s;
}

.header__toggle span:nth-child(1) {
  top: 0;
}

.header__toggle span:nth-child(2) {
  top: 10px;
}

.header__toggle span:nth-child(3) {
  bottom: 0;
}

.header.is-open .header__toggle span:nth-child(1) {
  transform: rotate(45deg);
  top: 10px;
}

.header.is-open .header__toggle span:nth-child(2) {
  opacity: 0;
}

.header.is-open .header__toggle span:nth-child(3) {
  transform: rotate(-45deg);
  bottom: 10px;
}

/* Navigation - PC */
.header__nav {
  display: flex;
}

.nav__list {
  display: flex;
  gap: 2.2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__list a {
  color: var(--color-white);
  display: block;
  font-size: clamp(0.9rem, 1.5vw, 1rem);
  font-weight: 500;
}

.nav__list a:hover {
  color: var(--color-white);
  opacity: 0.8;
}

/* Dropdown */
.nav__list li {
  position: relative;
}

.nav__list li ul {
  display: none;
  position: absolute;
  background: var(--color-main);
  top: 100%;
  left: 0;
  min-width: 220px;
  padding: 0;
  margin: 0;
  list-style: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  /* Dropdown shadow allowed per normal UI rules */
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nav__list li ul li a {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav__list li ul li a:hover {
  background: rgba(255, 255, 255, 0.1);
}

.nav__list li ul li:last-child a {
  border-bottom: none;
}

.nav__list li:hover ul {
  display: block;
}

/* Dropdown Arrow (pseudo-element) */
.has-dropdown::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-left: 6px;
  vertical-align: 2px;
  transition: transform 0.2s;
}

.nav__list li:hover > .has-dropdown::after {
  transform: rotate(-135deg);
}

/* Navigation - SP */
@media (max-width: 991px) {

  /* トップページのSP表示時のみ、ヘッダー背景を透過して上に重ねる */
  .home .header,
  .page-template-page-home .header {
    position: absolute;
    top: 0;
    left: 0;
    background: transparent;
  }

  .header__inner {
    padding: 1rem;
    align-items: flex-start;
  }

  /* トップページのSP表示時はheader__logoを非表示（front-hero__logoと被るため） */
  .home .header__logo,
  .page-template-page-home .header__logo {
    display: none;
  }

  .header__toggle {
    display: block;
    position: fixed;
    top: 25px;
    right: 15px;
    z-index: 2000;
  }

  .header__nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: rgba(0, 84, 159, 0.95);
    /* Keep overlay background since text needs contrast */
    backdrop-filter: blur(8px);
    flex-direction: column;
    padding: 6rem 2rem 3rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    align-items: center;
  }

  .header.is-open .header__nav {
    right: 0;
  }

  .nav__list {
    flex-direction: column;
    gap: 0;
    align-items: stretch;
    width: 100%;
    max-width: 400px;
  }

  .nav__list > li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .nav__list > li:last-child {
    border-bottom: none;
  }

  .nav__list a {
    font-size: clamp(1.1rem, 4vw, 1.4rem);
    font-weight: 400;
    letter-spacing: 1px;
    padding: 1rem 1.2rem;
    text-align: left;
    transition: background-color 0.2s;
  }

  .nav__list a:hover,
  .nav__list a:active {
    background: rgba(255, 255, 255, 0.1);
    opacity: 1;
  }

  .nav__list li ul {
    position: static;
    display: block;
    box-shadow: none;
    background: transparent;
    margin-top: 0;
    border-top: none;
  }

  .nav__list li ul li a {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    padding: 0.8rem 1.2rem 0.8rem 2.5rem;
    border: none;
    text-align: left;
  }

  .nav__list li ul li a:hover,
  .nav__list li ul li a:active {
    color: var(--color-white);
    background: rgba(255, 255, 255, 0.08);
  }

  .nav__list li:hover ul {
    display: block;
  }
}

/* =========================================
   Main Layout
   ========================================= */
.main {
  /* Header offset */
}

@media (max-width: 991px) {
  .main {
    padding-top: 60px;
    /* SP Header offset */
  }
}

.container--main {
  max-width: 1200px;
  margin-top: 4rem;
  margin-bottom: 4rem;
}

.section__title {
  color: var(--color-main);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 500;
  margin-bottom: 1.5rem;
  /* 角丸禁止：すでに全体でなしだが念のため */
}

/* =========================================
   Hero Section
   ========================================= */
.front-hero {
  position: relative;
  background-color: var(--color-main);
  background-size: cover;
  background-position: left 53%;
  color: var(--color-white);
  padding: 8.5rem 2rem;
  display: flex;
  align-items: center;
  min-height: 700px;
}

.hero__credit {
  position: absolute;
  bottom: 10px;
  left: 2rem;
  font-size: clamp(0.7rem, 1vw, 0.8rem);
  color: rgba(255, 255, 255, 0.7);
  z-index: 10;
}

.front-hero__logo {
  position: absolute;
  top: 2rem;
  left: 2rem;
  width: 100%;
  max-width: 70px;
}

@media (max-width: 767px) {
  .front-hero {
    background-position: 60% center;
  }

  .front-hero__logo {
    top: 15px;
    right: 60px;
    /* hamburger navigation starts at 15px */
    max-width: 60px;
    left: 1rem;
  }

  .hero__inner {
    justify-content: center;
  }

  .front-hero {
    align-items: flex-end;
  }
}

.hero__inner {
  max-width: 1300px;
  margin: 0 auto;
  width: 100%;
  display: flex;
}

.hero__text-box {
  display: inline-block;
  text-align: center;
}

.hero__title {
  font-size: clamp(3rem, 7vw, 7rem);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 0;
}

.hero__subtitle {
  display: block;
  font-size: clamp(1.5rem, 3vw, 2.05rem);
  font-weight: 300;
}

.hero__info {
  margin-top: 2rem;
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 400;
  line-height: 1.5;
}

/* =========================================
   Card Base (角丸禁止・影あり)
   ========================================= */
.welcome__inner,
.news__inner,
.important__inner {
  background: var(--color-white);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  /* 軽い影 */
  border-radius: 0 !important;
  /* 角丸禁止 */
  padding: 3rem;
  height: 100%;
}

/* =========================================
   Welcome Section
   ========================================= */
.welcome {
  margin-bottom: 3rem;
}

.welcome__title {
  color: var(--color-main);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.welcome__text {
  font-size: clamp(1rem, 2vw, 1.1rem);
  color: var(--color-text);
  line-height: 1.8;
}

.welcome__text p {
  margin-bottom: 1.5rem;
}

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

.welcome__image {
  margin-top: 50px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.welcome-image-dummy {
  width: 100%;
  height: auto;
  max-width: 200px;
  background: #E0E0E0;
  /* ダミー画像がない場合の背景色 */
  min-height: 250px;
  margin-left: auto;
}

.welcome__image img {
  width: 100%;
  height: auto;
  max-width: 200px;
  background: #E0E0E0;
  /* ダミー画像がない場合の背景色 */
  min-height: 250px;
  object-fit: cover;
}

@media (max-width: 767px) {
  .welcome__inner {
    padding: 2rem;
  }

  .welcome__image {
    display: block;
    margin-top: 2rem;
  }
}

/* =========================================
   News & Important Groups
   ========================================= */
.section-group {
  margin-bottom: 3rem;
}

.section-group>div {
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .section-group>div {
    margin-bottom: 0;
  }
}

/* =========================================
   News Section
   ========================================= */
.news__list {
  display: flex;
  flex-direction: column;
}

.news__item {
  padding: 1.25rem 0;
  border-bottom: 1px solid #EBEBEB;
}

.news__item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.news__item:first-child {
  padding-top: 0;
}

.news__date {
  font-weight: 500;
  white-space: nowrap;
  font-size: clamp(0.9rem, 1.5vw, 1rem);
  color: #674749;
}

.news__text {
  font-size: clamp(0.9rem, 1.5vw, 1rem);
}

@media (max-width: 575px) {
  .news__item {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* =========================================
   Important Days Section
   ========================================= */
.important__list {
  display: flex;
  flex-direction: column;
}

.important__item {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid #EBEBEB;
}

.important__item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.important__item:first-child {
  padding-top: 0;
}

.important__label {
  font-weight: 500;
  font-size: clamp(0.9rem, 1.5vw, 1rem);
}

.important__date {
  color: var(--color-accent);
  font-weight: 600;
  text-align: right;
  font-size: clamp(0.9rem, 1.5vw, 1rem);
  white-space: nowrap;
}

@media (max-width: 575px) {
  .important__item {
    flex-direction: column;
    gap: 0.5rem;
  }

  .important__date {
    text-align: left;
  }
}

/* =========================================
   Sponsors Section
   ========================================= */
.sponsors {
  margin-top: 4rem;
  background-color: #ffffff;
  padding: 7rem 2rem;
  width: 100%;
}

.container--sponsors {
  max-width: 1200px;
  margin: 0 auto;
}

.sponsors__list {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: flex-start;
}

.sponsors__item {
  width: 200px;
  height: 100px;
  background: #E0E0E0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: #888;
}

/* =========================================
   Subpage Common
   ========================================= */
.subpage-header {
  background-color: var(--color-bg);
  padding: 4rem 2rem 2rem;
  border-bottom: 1px solid #EBEBEB;
  margin-bottom: 0;
}

.subpage-header__title.section__title {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 0;
}

.subpage-section__title {
  color: var(--color-main);
  font-weight: 500;
  font-size: clamp(1.3rem, 3vw, 1.5rem);
  border-bottom: 2px solid var(--color-main);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

.subpage-section__subtitle {
  color: var(--color-main);
  font-size: clamp(1rem, 2vw, 1.15rem);
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--color-main);
}

.subpage-section__subtitle span {
  font-weight: 500;
  font-size: clamp(1.3rem, 2.2vw, 1.5rem);
}

.subpage-content {
  line-height: 1.9;
}

.subpage-content p {
  margin-bottom: 1rem;
}

.subpage-content p:last-child {
  margin-bottom: 0;
}

.subpage-content a {
  color: var(--color-main);
  text-decoration: underline;
  word-break: break-all;
}

.subpage-content a:hover {
  color: var(--color-accent);
}

/* --- Access List --- */
.subpage-access-list {
  list-style: disc;
  padding-left: 1.5rem;
  margin: 0;
}

.subpage-access-list>li {
  padding: 0.6rem 0.8rem;
  font-size: clamp(1rem, 2vw, 1.1rem);
  line-height: 1.8;
  transition: background-color 0.2s;
}

.subpage-access-list>li:hover {
  background-color: rgba(0, 84, 159, 0.05);
}

.subpage-access-list>li::marker {
  font-size: 1.1em;
}

.subpage-access-list ul {
  list-style: circle;
  padding-left: 2rem;
  margin: 0.3rem 0 0;
}

.subpage-access-list ul li {
  padding: 0.2rem 0;
}

@media (max-width: 575px) {
  .subpage-access-list__item {
    flex-direction: column;
    gap: 0.3rem;
  }
}

/* --- Map Embed --- */
.subpage-map {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}

.subpage-map iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* --- Committee List --- */
.committee-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.committee-list__item {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid #EBEBEB;
  transition: background-color 0.2s;
}

.committee-list__item:last-child {
  border-bottom: none;
}

.committee-list__item:hover {
  background-color: rgba(0, 84, 159, 0.05);
}

.committee-list__name {
  font-weight: 600;
  font-size: clamp(1rem, 2vw, 1.1rem);
  white-space: nowrap;
}

.committee-list__affiliation {
  color: #666;
  font-size: clamp(0.9rem, 1.5vw, 1rem);
}

.committee-list__affiliation::before {
  content: "(";
}

.committee-list__affiliation::after {
  content: ")";
}

@media (max-width: 575px) {
  .committee-list__item {
    flex-direction: column;
    gap: 0.2rem;
  }

  .committee-list__name {
    white-space: normal;
  }
}

/* --- Subpage Utility --- */
.mb-5 {
  margin-bottom: 3rem;
}

/* =========================================
   Footer
   ========================================= */

footer {
  background-color: #FFFFFF;
  border-top: 1px solid #EBEBEB;
}

.footer__contact {
  text-align: center;
  padding: 3rem 0;
}

.footer__contact a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: clamp(1rem, 2vw, 1.1rem);
  font-weight: 500;
  color: var(--color-text);
}

.footer__contact a:hover {
  color: var(--color-main);
}

.footer__copyright {
  background: var(--color-main);
  color: var(--color-white);
  text-align: center;
  padding: 0.5rem 0;
  font-size: clamp(0.9rem, 1.5vw, 1rem);
}