/*
Theme Name: Taniguchi Clinic
Theme URI: https://example.com/
Author: あなたの名前
Author URI: https://example.com/
Description: 谷口クリニック用のオリジナルWordPressテーマ
Version: 1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: taniguchi-clinic
*/

:root {
  --wide-width: 1430px;
  --thin-width: 1430px;
}

html {
  margin-top: 0px !important;
}

.br-pc {
  display: none;
}

.br-sp {
  display: none;
}

body,
html {
  margin: 0;
  padding: 0;
  width: 100%;
}

.icon {
  margin-right: 8px;
  font-size: 18px;
}

h1 {
  font-size: 4vw;
  color: #fff;
  margin-bottom: 40px;
  text-align: left;
}

/* --- ボタン共通 --- */
.web {
  background-color: #fff;
  color: #68b4b3;
  border: 1px solid transparent;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition:
    background-color 0.3s ease,
    color 0.3s ease,
    border-color 0.3s ease;
  text-decoration: none;
}

/* ホバー時に色反転 */
.web:hover {
  background-color: #fff;
  color: #68b4b3;
  border: 1px solid #96d0c0;
}

/* --- header --- */
.header {
  position: absolute;
  top: 30px;
  left: 30px;
}

#header .logo-box {
  display: block;
  z-index: 1000;
}

.logo {
  font-size: 24px;
}

.logo-sp {
  display: none;
}

.logo-pc {
  display: block;
}

.logo-box {
  width: 33%;
  max-width: 500px;
  height: auto;
  position: absolute;
  top: 10px;
  left: 20px;
}

.site-logo {
  width: 100%;
  height: auto;
}

/* --- Navigation --- */
.nav-links {
  background: #fff;
  padding: 0px;
  position: relative;
}

.nav-links ul {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: baseline;
  position: relative;
}

.nav-links li {
  margin: 0 25px;
  padding: 4vh 0px;
  color: #646868;
}

.nav-links a {
  text-decoration: none;
  gap: 16px;
  color: #646868;
  font-size: 14px;
}

.organ-item-origin {
  gap: 0 !important;
}

.nav-links a:hover {
  transition:
    background-color 0.3s ease,
    color 0.3s ease,
    border-color 0.3s ease;
}

/* --- サブメニュー全体をホバー対象に含める --- */
.has-submenu:hover .header-organ-submenu,
.header-organ-submenu:hover {
  display: block;
  opacity: 1;
  visibility: visible;
}

/* グリッドレイアウト */
.header-organ-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 0 auto;
  width: 100%;
  max-width: 940px;
  padding: 10px 16px;
  text-align: center;
  justify-content: center;
}

.header-search-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0 auto;
  width: 100%;
  max-width: 940px;
  padding: 10px 16px;
  text-align: center;
  justify-content: center;
}

/* サブメニュー本体 */
.header-organ-submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #eaf7f5;
  z-index: 999;
  padding: 24px 0;
  width: 100%;
  max-width: 100%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition:
    background-color 0.3s ease,
    color 0.3s ease,
    border-color 0.3s ease;
}

.header-search-submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #eaf7f5;
  z-index: 999;
  padding: 24px 0;
  width: 100%;
  max-width: 100%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition:
    opacity 0.1s ease,
    visibility 0.1s ease;
}

/* メニュー項目 */
.header-organ-item {
  background: #fff;
  border-radius: 8px;
  padding: 40px 8px 25px;
  text-decoration: none;
  transition: transform 0.1s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #333;
}

.header-organ-item img {
  width: 45px;
  height: 40px;
  margin: 10px 0 10px;
  transition: transform 0.3s ease;
}

.header-organ-item:hover img {
  transform: scale(1.2);
}

.header-organ-item span {
  display: block;
  font-size: 14px;
  line-height: 1.4;
}

.global-nav li {
  display: inline-block;
  color: #646868;
  cursor: pointer;
  transition: color 0.1s ease;
  font-size: 0.8vw;
}

.global-nav li:hover::after {
  width: 100%;
}

/* --- PCナビゲーションリンク --- */
.nav-links-pc {
  display: flex;
}

/* ---END header --- */

@media screen and (max-width: 1023px) {
  .br-pc {
    display: block !important;
  }

  .br-sp {
    display: block !important;
  }
  #header .logo-box {
    display: block;
    height: auto;
  }

  .site-logo {
    width: 100%;
    height: inherit;
  }

  .logo-sp {
    display: block;
  }

  .logo-pc {
    display: none;
  }

  .nav-links {
    display: none;
  }

  .tel-text-sp {
    font-size: 14px;
    color: #444;
  }

  .tel-number-sp {
    color: #00a2a8;
  }

  .btn-sp.web-btn-sp {
    background-color: #fff;
    border: 1px solid #00a2a8;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    display: flex;
    align-items: center;
    color: #00a2a8;
    text-decoration: none;
  }

  .btn-sp .icon-sp {
    margin-right: 6px;
  }

  .btn-sp .icon-sp img {
    width: 18px;
    height: 18px;
  }

  .contact-sp {
    position: absolute;
    right: 0;
    text-align: right;
    display: flex;
    gap: 5px;
    width: 100%;
    background: #95d0c0;
    align-items: center;
    justify-content: center;
    bottom: auto;
  }

  .contact-sp p {
    background: #fff;
    padding: 24px 20px;
    border-radius: 8px;
    color: #6f7373;
    font-size: 38px;
  }

  .contact-sp a {
    text-decoration: none;
    color: #68b4b3;
    font-size: 40px;
  }

  .contact-sp > .buttons-sp {
    display: flex;
    gap: 5px;
    justify-content: center;
    align-items: center;
    margin: 0;
  }

  .buttons-sp a {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    font-size: 14px;
    padding: 52px 20px;
  }

  .buttons-sp a {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    font-size: 40px !important;
    padding: 54px 40px;
  }

  .buttons-sp .btn .icon {
    width: 50px;
  }

  .buttons-sp .btn .icon img {
    width: 100%;
  }
}

@media screen and (max-width: 479px) {
  .contact-sp {
    flex-wrap: wrap;
  }
  .contact-sp p,
  .contact-sp a,
  .buttons-sp a {
    font-size: 1rem !important;
  }
  .buttons-sp a {
    min-height: 44px;
    padding: 12px;
  }
}
