@charset "UTF-8";

/* =====================================================
   Theme: にじいろ内科クリニック 全ページ共通スタイル (theme.css)
===================================================== */

:root {
  /* Colors */
  --color-primary: #ea9999;
  --color-primary-dark: #d97878;
  --color-primary-light: #fbecec;
  --color-primary-pastel: #fff5f5;
  --color-secondary: #48bb78;
  --color-accent-blue: #4299e1;
  --color-accent-yellow: #ecc94b;
  --color-text-main: #333333;
  --color-text-muted: #666666;
  --color-text-light: #888888;
  --color-bg-base: #ffffff;
  --color-bg-sub: #faf8f5;
  --color-bg-alt: #fdf6f4;
  --color-border: #eee7e2;
  --color-border-dark: #d0c8c0;

  /* Rainbow Gradation */
  --grad-rainbow: linear-gradient(135deg, #f687b3 0%, #fbd38d 35%, #68d391 70%, #63b3ed 100%);
  --grad-soft-pink: linear-gradient(180deg, #fff7f7 0%, #ffffff 100%);

  /* Fonts */
  --font-base: "Kosugi Maru", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  --font-en: "Open Sans", "Roboto", sans-serif;

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(234, 153, 153, 0.15);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.08);

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
}

body {
  font-family: var(--font-base);
  color: var(--color-text-main);
  background-color: var(--color-bg-base);
  font-size: 16px;
  line-height: 1.8;
  letter-spacing: 0.03em;
  overflow-x: hidden;
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

@media screen and (min-width: 1200px) {
  .container {
    padding-left: 0;
    padding-right: 0;
  }
}

.container-narrow {
  max-width: 860px;
}

/* =====================================================
   Header
===================================================== */
.site-header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(8px);
  z-index: 1000;
  border-bottom: 2px solid var(--color-primary-light);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  transition: all 0.3s ease;
}

.header-top {
  padding: 12px 0 8px;
}

.header-top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Site Logo (logo.png + テキスト) */
.site-logo a {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.site-logo img {
  height: 48px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

.logo-main {
  font-family: 'Zen Maru Gothic', 'Kosugi Maru', var(--font-base);
  font-size: 1.55rem;
  font-weight: 800;
  color: #3b2822;
  letter-spacing: 0.04em;
  line-height: 1;
  white-space: nowrap;
}

.logo-sub {
  font-size: 0.72rem;
  font-family: var(--font-en);
  font-weight: 600;
  color: var(--color-primary-dark);
  letter-spacing: 0.12em;
}

/* Header Info */
.header-info {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-contact-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.header-hours {
  text-align: right;
  font-size: 0.8rem;
  line-height: 1.3;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.header-hours strong {
  color: var(--color-primary-dark);
  font-weight: 700;
}

.header-tel {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  color: var(--color-primary-dark);
  font-weight: 800;
  line-height: 1.1;
  text-decoration: none;
  margin-top: -5px;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.header-tel:hover {
  background: none;
  color: var(--color-primary);
  transform: none;
  box-shadow: none;
  opacity: 0.8;
}

.header-tel .tel-icon {
  font-size: 1.2rem;
  color: var(--color-primary-dark);
  line-height: 1;
}

.header-tel:hover .tel-icon {
  color: var(--color-primary);
}

.header-tel .tel-number {
  font-size: 1.55rem;
  font-family: var(--font-base);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: inherit;
  line-height: 1;
}

/* Main Navigation */
.main-nav {
  background: #ffffff;
  border-top: 1px solid #f3ece8;
}

.nav-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  padding: 0;
}

.nav-menu>li>a {
  display: block;
  padding: 10px 14px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text-main);
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-menu>li>a:hover,
.nav-menu>li.current-menu-item>a,
.nav-menu>li.current-menu-ancestor>a {
  color: var(--color-primary-dark);
  border-bottom-color: var(--color-primary);
}

/* Dropdown Menu (Desktop) */
.nav-menu>li.menu-item-has-children {
  position: relative;
}

.nav-menu>li.menu-item-has-children>a {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.nav-menu>li.menu-item-has-children>a::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-top: -3px;
  transition: transform 0.25s ease;
}

.nav-menu>li.menu-item-has-children:hover>a::after {
  transform: rotate(-135deg);
  margin-top: 3px;
}

.nav-menu .sub-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: #ffffff;
  min-width: 330px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  border-radius: 12px;
  padding: 8px 0;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 999;
  border: 1px solid #fadcd7;
}

.nav-menu>li.menu-item-has-children:hover .sub-menu,
.nav-menu>li.menu-item-has-children:focus-within .sub-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-menu .sub-menu li {
  width: 100%;
}

.nav-menu .sub-menu li a {
  display: block;
  padding: 10px 20px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-text-main);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
  border-bottom: 1px solid #fcf2f4;
}

.nav-menu .sub-menu li:last-child a {
  border-bottom: none;
}

.nav-menu .sub-menu li a:hover,
.nav-menu .sub-menu li.current-menu-item a {
  background: #fff0f3;
  color: var(--color-primary-dark);
  padding-left: 24px;
}

/* Mobile Nav Toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  width: 44px;
  height: 44px;
  position: relative;
  cursor: pointer;
  z-index: 1002;
}

.nav-toggle span {
  display: block;
  position: absolute;
  height: 3px;
  width: 26px;
  background: var(--color-text-main);
  border-radius: 3px;
  left: 9px;
  transition: all 0.3s ease;
}

.nav-toggle span:nth-child(1) {
  top: 12px;
}

.nav-toggle span:nth-child(2) {
  top: 20px;
}

.nav-toggle span:nth-child(3) {
  top: 28px;
}

.nav-toggle.is-active span:nth-child(1) {
  top: 20px;
  transform: rotate(45deg);
  background: var(--color-primary-dark);
}

.nav-toggle.is-active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-active span:nth-child(3) {
  top: 20px;
  transform: rotate(-45deg);
  background: var(--color-primary-dark);
}

/* Drawer Menu (SP) */
.drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(3px);
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.drawer-menu {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  height: 100vh;
  background: #ffffff;
  z-index: 1001;
  padding: 80px 24px 40px;
  box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
  overflow-y: auto;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.drawer-menu.is-active {
  right: 0;
}

.drawer-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 38px;
  height: 38px;
  background: var(--color-primary-pastel);
  border: 1.5px solid var(--color-primary);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.25s ease;
  z-index: 10;
}

.drawer-close-btn::before,
.drawer-close-btn::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 2px;
  background: var(--color-primary-dark);
  border-radius: 2px;
}

.drawer-close-btn::before {
  transform: rotate(45deg);
}

.drawer-close-btn::after {
  transform: rotate(-45deg);
}

.drawer-close-btn:hover {
  background: var(--color-primary);
}

.drawer-close-btn:hover::before,
.drawer-close-btn:hover::after {
  background: #ffffff;
}

.drawer-overlay.is-active {
  display: block;
  opacity: 1;
}

.drawer-nav ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.drawer-nav a {
  display: block;
  padding: 10px 0;
  font-size: 1rem;
  font-weight: 600;
  border-bottom: 1px solid #f1ece8;
  color: var(--color-text-main);
}

.drawer-nav a:hover {
  color: var(--color-primary-dark);
  padding-left: 6px;
}

/* Drawer Sub Menu */
.drawer-item-has-children {
  width: 100%;
  padding-top: 4px;
}

.drawer-parent-title {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-primary-dark);
  padding: 8px 0 6px;
  border-bottom: 2px solid #fadcd7;
  letter-spacing: 0.02em;
}

.drawer-sub-menu {
  list-style: none;
  padding: 6px 0 6px 12px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.drawer-sub-menu li a {
  display: block;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 1px dotted #f3ece8;
  line-height: 1.45;
}

.drawer-sub-menu li a:hover {
  color: var(--color-primary-dark);
}

.drawer-tel-btn {
  margin-top: 24px;
  display: block;
  text-align: center;
  background: var(--color-primary);
  color: #ffffff !important;
  font-weight: 700;
  padding: 14px 20px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-md);
}

/* =====================================================
   Page Title Header (template-parts/page_title)
===================================================== */
.page-header-banner {
  background: var(--grad-soft-pink);
  border-bottom: 3px solid var(--color-primary);
  padding: 40px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header-banner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--grad-rainbow);
}

.page-header-en {
  display: block;
  font-family: var(--font-en);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--color-primary-dark);
  margin-bottom: 6px;
}

.page-header-title {
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--color-text-main);
  line-height: 1.35;
}

/* Breadcrumbs */
.breadcrumbs {
  background: #fdfaf8;
  border-bottom: 1px solid #f3ece8;
  padding: 10px 0;
  font-size: 0.85rem;
  color: var(--color-text-light);
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.breadcrumbs li+li::before {
  content: ">";
  margin-right: 8px;
  color: #ccc;
}

.breadcrumbs a {
  color: var(--color-text-muted);
}

.breadcrumbs a:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

/* =====================================================
   Buttons & Badges
===================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  transition: all 0.25s ease;
  box-shadow: var(--shadow-sm);
}

.btn-primary {
  background: var(--color-primary);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  box-shadow: 0 6px 16px rgba(234, 153, 153, 0.4);
  transform: translateY(-2px);
}

.btn-outline {
  border: 2px solid var(--color-primary);
  color: var(--color-primary-dark);
  background: #ffffff;
}

.btn-outline:hover {
  background: var(--color-primary);
  color: #ffffff;
  transform: translateY(-2px);
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
}

/* =====================================================
   Footer
===================================================== */
.site-footer {
  background: #fffafa;
  border-top: 4px solid var(--color-primary);
  padding: 60px 0 20px;
  position: relative;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--grad-rainbow);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 50px;
}

.footer-brand .footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Zen Maru Gothic', 'Kosugi Maru', var(--font-base);
  font-size: 1.45rem;
  font-weight: 800;
  color: #3b2822;
  margin-bottom: 14px;
  text-decoration: none;
  letter-spacing: 0.04em;
  line-height: 1;
}

.footer-logo-img {
  height: 44px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

.footer-address {
  font-style: normal;
  font-size: 0.92rem;
  color: var(--color-text-muted);
  line-height: 1.8;
  margin-bottom: 16px;
}

.footer-tel-box {
  margin-top: 14px;
}

.footer-tel-label {
  font-size: 0.8rem;
  color: var(--color-text-light);
  white-space: nowrap !important;
}

.footer-tel-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.45rem;
  font-family: var(--font-base);
  font-weight: 700;
  color: var(--color-primary-dark);
}

.footer-tel-link .tel-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.footer-hours-box h4,
.footer-nav-box h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-text-main);
  border-left: 4px solid var(--color-primary);
  padding-left: 10px;
  margin-bottom: 18px;
}

.footer-hours-summary {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

.footer-hours-summary li {
  margin-bottom: 6px;
}

.footer-sitemap ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-sitemap a {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  display: inline-block;
  transition: all 0.2s ease;
}

.footer-sitemap a:hover {
  color: var(--color-primary-dark);
  padding-left: 6px;
}

.footer-bottom {
  border-top: 1px solid #eee2dc;
  padding-top: 20px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--color-text-light);
}

/* Page Top Button */
.pagetop-btn {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 48px;
  height: 48px;
  background: var(--color-primary);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  z-index: 990;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.pagetop-btn.is-visible {
  opacity: 1;
  visibility: visible;
}

.pagetop-btn:hover {
  background: var(--color-primary-dark);
  transform: translateY(-4px);
}

.pagetop-btn::before {
  content: "";
  width: 10px;
  height: 10px;
  border-top: 3px solid #ffffff;
  border-left: 3px solid #ffffff;
  transform: rotate(45deg);
  margin-top: 3px;
}

/* =====================================================
   Responsive Media Queries
===================================================== */
@media screen and (max-width: 991px) {
  .header-hours {
    display: none;
  }

  .header-contact-wrap {
    display: flex;
    flex-direction: row;
    align-items: center;
  }

  .main-nav {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

@media screen and (max-width: 600px) {
  .header-top-inner {
    gap: 8px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .site-logo {
    min-width: 0;
    flex: 1 1 auto;
  }

  .site-logo a {
    gap: 6px;
  }

  .site-logo img {
    height: 34px;
    width: auto;
  }

  .logo-main {
    font-size: clamp(0.92rem, 3.8vw, 1.15rem);
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .header-info {
    gap: 8px;
    flex-shrink: 0;
  }

  /* スマホでは電話ボタンをアイコン化してコンパクトに収める */
  .header-tel {
    width: 38px;
    height: 38px;
    padding: 0;
    margin-top: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .header-tel .tel-number {
    display: none;
  }

  .header-tel .tel-icon {
    font-size: 1.15rem;
    line-height: 1;
    margin: 0;
  }

  .nav-toggle {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
  }

  .logo-sub {
    font-size: 0.65rem;
  }

  .page-header-title {
    font-size: 1.4rem;
  }

  /* Page Top Button (Mobile) */
  .pagetop-btn {
    right: 14px;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    width: 40px;
    height: 40px;
  }

  .pagetop-btn::before {
    width: 8px;
    height: 8px;
    border-width: 2.5px;
  }
}

/* Responsive display helper defaults */
.sp-only {
  display: none !important;
}

.pc-only {
  display: inline !important;
}

@media screen and (max-width: 768px) {
  .sp-only {
    display: inline !important;
  }

  .pc-only {
    display: none !important;
  }
}

/* Accessibility */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}