/* Sakurumii overrides on top of the Worthy template (css/style.css) */

/* Brand mark in the header (removed from the markup; hide just in case) */
.header .logo {
  display: none !important;
}

.header .navbar-toggle .icon-bar {
  background-color: #ffffff;
}

/* Banner hero ----------------------------------------------------- */
/* Fallback in case backstretch fails or its script is blocked. */
.banner {
  background-image: url('../images/banner.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.banner-caption {
  top: 50%;
  transform: translateY(-50%);
}

.banner-caption h1 {
  letter-spacing: 0.01em;
}

.hero-rule {
  width: 88px;
  height: 2px;
  margin: 22px auto 26px;
  border: 0;
  background: rgba(255, 255, 255, 0.78);
}

.hero-logo {
  max-width: 620px;
  margin: 0 auto 24px;
  padding: 0 16px;
}

.hero-logo img {
  display: block;
  width: 100%;
  height: auto;
  /* The source logo is solid black; the banner sits under a dark overlay. */
  filter: invert(1);
  opacity: 0.95;
}

/* Message board (Contact section) --------------------------------- */
.message-board .message-title {
  margin-top: 0;
  margin-bottom: 14px;
}

.message-list {
  max-height: 320px;
  overflow-y: auto;
  margin-bottom: 18px;
  padding-right: 6px;
}

.message-item {
  padding: 12px 0;
  border-bottom: 1px solid #eeeeee;
}

.message-item:last-child {
  border-bottom: 0;
}

.message-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  font-size: 13px;
  color: #333333;
}

.message-head strong {
  font-weight: 600;
}

.message-head time {
  color: #999999;
  font-size: 12px;
  white-space: nowrap;
}

.message-item p {
  margin: 6px 0 0;
  color: #555555;
  line-height: 1.65;
  word-break: break-word;
}

.message-empty {
  color: #999999;
  font-style: italic;
}

.message-status {
  min-height: 1.2em;
  margin: 10px 0 0;
  font-size: 13px;
}

.message-status.ok {
  color: #2e9e4f;
}

.message-status.err {
  color: #d64545;
}

/* Subfooter legal line -------------------------------------------- */
.subfooter-legal {
  margin-bottom: 0;
  font-size: 13px;
  color: #666666;
}

.subfooter-legal .sep {
  margin: 0 8px;
  color: #cccccc;
}

.subfooter-legal a {
  color: #339beb;
}

/* Responsive ------------------------------------------------------ */
@media (max-width: 767px) {
  .hero-logo {
    max-width: 88%;
  }
  .message-list {
    max-height: 260px;
  }
}

/* Brand is always left-aligned within its block */
.header .site-name,
.header .site-slogan,
.header .site-name a {
  text-align: left;
}

/* Mobile header: one row (brand left, hamburger right) ------------------ */
@media (max-width: 767px) {
  .header {
    padding: 10px 0;
  }

  /* Put the two Bootstrap columns on a single flex row. */
  .header .row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    margin-left: 0;
    margin-right: 0;
  }

  /* Bootstrap's .row clearfix pseudo-elements become flex items and push
     the brand towards the middle — remove them inside this flex row. */
  .header .row::before,
  .header .row::after {
    content: none;
    display: none;
  }

  .header .col-md-4,
  .header .col-md-8 {
    position: static;
    float: none;
    width: auto;
    padding-left: 0;
    padding-right: 0;
  }

  .header-left {
    float: none;
  }

  .site-name-and-slogan {
    float: none;
  }

  .site-name {
    font-size: 26px;
    line-height: 1.15;
  }

  .site-slogan {
    font-size: 11px;
  }

  .main-navigation {
    float: none;
  }

  /* Let the collapsed menu anchor to the header, not the navbar. */
  .header .navbar {
    position: static;
    min-height: 0;
    margin: 0;
    border: 0;
  }

  .header .navbar .container-fluid {
    padding-left: 0;
    padding-right: 0;
  }

  .header .navbar-header {
    float: none;
  }

  .header .navbar-toggle {
    float: none;
    display: inline-block;
    margin: 0;
    padding: 7px 10px;
  }

  /* Expanded menu: full-width panel right below the slim header. */
  .header .navbar-collapse {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin: 0;
    padding: 8px 20px 14px;
    background: rgba(0, 0, 0, 0.96);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    max-height: 70vh;
    overflow-y: auto;
  }

  .header .navbar-nav {
    float: none !important;
    margin: 0;
  }

  .header .navbar-nav > li {
    float: none;
  }

  .header .navbar-nav > li > a {
    padding: 12px 10px;
    text-align: left;
  }
}

@media (max-height: 640px) {
  .banner-caption {
    top: 46%;
  }
}
