/* ===============================
   Color
=============================== */

:root {
  --color-text: #333333;
  --color-bg: #fffcf6;

  --color-accent: #e04513;

  --color-header: #da876a;
  --color-header-text: #fffcf6;

  --color-white: #ffffff;
  --color-line: #eadbd5;

  /* Section separation and the padding inside a colored band are distinct. */
  --cotomaru-section-space-y: 180px;
  --cotomaru-section-space-y-mobile: 112px;
  --cotomaru-section-gap: var(--cotomaru-section-space-y);
  --cotomaru-section-half: calc(var(--cotomaru-section-gap) / 2);
  --cotomaru-band-inset: var(--cotomaru-section-half);
  --cotomaru-subpage-space-top: 210px;
  --cotomaru-subpage-space-top-mobile: 150px;
  --cotomaru-fixed-header-height: 76px;
}

@media (max-width: 767px) {
  :root {
    --cotomaru-section-gap: var(--cotomaru-section-space-y-mobile);
  }
}

/* ===============================
   Base
=============================== */

html,
body {
  margin: 0 !important;
  padding: 0 !important;
}

body {
  color: var(--color-text);
  background: var(--color-bg);

  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Helvetica Neue",
    Arial,
    sans-serif;
}

#page,
.site,
.site-content,
.ast-container,
.entry-content {
  margin: 0 !important;
  padding: 0 !important;
  max-width: 100% !important;
}

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover {
  opacity: 0.8;
}
.site-main,
.hentry,
.post,
.page,
.entry-content > * {
  max-width: 100% !important;
}
/* admin bar adjustment */
body.admin-bar .cotomaru-header {
  top: 32px;
}

@media (max-width: 782px) {
  body.admin-bar .cotomaru-header {
    top: 46px;
  }
}

/* page title hide */
.entry-header,
h1.entry-title,
.page .entry-title,
.ast-single-post .entry-title {
  display: none !important;
}
/* ===============================
   Button
=============================== */

.cotomaru-btn,
.cotomaru-select-btn,
.cotomaru-facility-panel__btn,
.cotomaru-dog-btn,
.cotomaru-reserve-cta__faq-button,
.cotomaru-reserve-card__link {
  display: inline-block;

  padding: 10px 22px;

  border: 1px solid var(--color-accent);

  background: var(--color-accent);

  color: var(--color-bg) !important;

  font-size: 13px;
  letter-spacing: 0.08em;

  text-decoration: none !important;

  transition: 0.25s ease;
}

.cotomaru-btn--outline,
.cotomaru-select-btn--outline,
.cotomaru-reserve-cta__faq-button {
  background: transparent;
  color: var(--color-accent) !important;
}

.cotomaru-btn:hover,
.cotomaru-select-btn:hover,
.cotomaru-facility-panel__btn:hover,
.cotomaru-dog-btn:hover,
.cotomaru-reserve-cta__faq-button:hover,
.cotomaru-reserve-card__link:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);

  color: var(--color-bg) !important;

  text-decoration: none !important;

  opacity: 0.85;
}

/* ===============================
   Header
=============================== */
.cotomaru-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 99999;

  background: var(--color-header);

  opacity: 0;
  transform: translateY(-20px);
  pointer-events: none;

  transition: 0.5s ease;
}

.cotomaru-header.is-visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.cotomaru-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 24px 40px;
}

.cotomaru-header__logo img {
  width: 110px;
  height: auto;
  display: block;
}

/* WordPress menu */

.cotomaru-header__nav ul {
  display: flex;
  align-items: center;
  gap: 28px;

  margin: 0;
  padding: 0;

  list-style: none;
}

.cotomaru-header__nav li {
  position: relative;
}

.cotomaru-header__nav a {
  color: var(--color-bg);

  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;

  text-decoration: none;

  transition: 0.3s ease;
}

.cotomaru-header__nav a:hover {
  color: var(--color-accent);
}

/* sub menu */

.cotomaru-header__nav .sub-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;

  display: block;

  min-width: 220px;
  padding: 10px 0;

  background: var(--color-header);

  opacity: 0;
  visibility: hidden;

  transform: translate(-50%, 8px);

  transition: 0.25s ease;
}

.cotomaru-header__nav li:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.cotomaru-header__nav .sub-menu li {
  width: 100%;
}

.cotomaru-header__nav .sub-menu a {
  display: block;
  padding: 10px 18px;

  color: var(--color-bg);
  white-space: nowrap;
}

.cotomaru-header__nav .sub-menu a:hover {
  background: var(--color-accent);
  color: var(--color-bg);
}
/* 3階層目 */

.cotomaru-header__nav .sub-menu .sub-menu {
  top: 0;
  left: 100%;

  transform: translate(0, 0);

  margin-left: 0;
}

.cotomaru-header__nav .sub-menu li:hover > .sub-menu {
  opacity: 1;
  visibility: visible;

  transform: translate(0, 0);
}
/* reserve button */

.cotomaru-header__nav > ul > li > a[href*="/reservation/"],
.cotomaru-header__nav > ul > li > a[href$="/reservation"] {
  padding: 10px 18px;
  border: 1px solid #fff;
}

.cotomaru-header__nav > ul > li > a[href*="/reservation/"]:hover,
.cotomaru-header__nav > ul > li > a[href$="/reservation"]:hover,
.cotomaru-header__nav > ul > li > a[href*="/reservation/"]:focus-visible,
.cotomaru-header__nav > ul > li > a[href$="/reservation"]:focus-visible {
  background: #fff;
  color: var(--color-header);
  opacity: 1;
}

/* mobile */

@media (max-width: 768px) {
  .cotomaru-header__inner {
    padding: 18px 20px;
  }

  .cotomaru-header__logo img {
    width: 92px;
  }

  .cotomaru-header__nav {
    display: none;
  }
}

/* mobile */

@media (max-width: 768px) {

  .cotomaru-header__inner {
    padding: 18px 20px;
  }

  .cotomaru-header__logo img {
    width: 92px;
  }

  .cotomaru-header__nav {
    display: none;
  }

}

/* sub menu */

.main-header-menu .sub-menu,
.ast-builder-menu .main-navigation .sub-menu {
  background: var(--color-header) !important;
  border: none !important;
}

.main-header-menu .sub-menu a,
.ast-builder-menu .main-navigation .sub-menu a {
  color: var(--color-bg) !important;
  background: var(--color-header) !important;

  font-size: 13px !important;
}

.main-header-menu .sub-menu a:hover,
.ast-builder-menu .main-navigation .sub-menu a:hover {
  color: var(--color-bg) !important;
  background: var(--color-accent) !important;
}

/* Astra site title hide */
.site-title,
.site-title a,
.site-description {
  display: none !important;
}

/* header layout fix */
.ast-site-identity {
  margin-left: 0 !important;
  padding-left: 0 !important;
}

.site-branding {
  display: flex !important;
  align-items: center !important;
}

.custom-logo-link {
  margin-left: 20px;
  display: block !important;
}

.custom-logo-link img,
.site-logo-img img {
  max-height: 56px !important;
  width: auto !important;
  display: block !important;
}

/* menu alignment */
.ast-builder-menu .main-navigation {
  display: flex !important;
  align-items: center !important;
}

.ast-builder-menu .main-navigation > ul {
  display: flex !important;
  align-items: center !important;
}

/* logo */

.custom-logo-link {
  margin-left: 20px;
}

.custom-logo-link img,
.site-logo-img img {
  max-height: 56px !important;
  width: auto !important;
}

.ast-primary-header-bar {
  min-height: 76px !important;
}

.ast-builder-grid-row-container {
  padding-left: 10px !important;
  padding-right: 10px !important;
}

/* mobile */

.ast-mobile-menu-trigger-fill,
.ast-button-wrap .menu-toggle {
  background: transparent !important;
  color: var(--color-bg) !important;
  border-color: var(--color-bg) !important;
}

.ast-mobile-header-content,
.ast-mobile-popup-drawer,
.ast-mobile-popup-content {
  background: var(--color-header) !important;
}

.ast-mobile-header-content a,
.ast-mobile-popup-content a {
  color: var(--color-bg) !important;
}

/* ===============================
   Floating CTA
=============================== */

.cotomaru-floating-cta {
  position: fixed !important;

  right: 30px !important;
  bottom: 30px !important;

  z-index: 99999 !important;

  display: flex !important;
  flex-direction: column;
  align-items: flex-end;

  opacity: 0;

  pointer-events: none;

  transition: opacity 0.35s ease;
}

:root .cfd-launcher-wrap {
  transition: transform .56s cubic-bezier(.22, .72, .18, 1), opacity .5s ease, visibility 0s linear;
}

:root.cotomaru-footer-in-view .cfd-launcher-wrap {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transition: transform .56s cubic-bezier(.22, .72, .18, 1), opacity .5s ease, visibility 0s linear .5s;
}

@media (prefers-reduced-motion: reduce) {
  :root .cfd-launcher-wrap,
  :root.cotomaru-footer-in-view .cfd-launcher-wrap {
    transition: none !important;
  }
}

:root.cotomaru-footer-in-view .cotomaru-floating-cta {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.cotomaru-floating-cta.is-visible {
  opacity: 1 !important;
  pointer-events: auto;
}

/* ===============================
   Side Banner
=============================== */

.cotomaru-side-banner {
  position: relative;

  display: block;

  width: 112px;

  aspect-ratio: 4 / 3;

  margin-bottom: 8px;
}

.cotomaru-side-banner a {
  display: block;

  width: 100%;
  height: 100%;
}

.cotomaru-side-banner img {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;
}

.cotomaru-side-banner__close {
  position: absolute;

  top: 4px;
  right: 4px;

  z-index: 10;

  border: none;
  background: transparent;

  color: #fff;

  font-size: 18px;
  line-height: 1;

  cursor: pointer;

  padding: 0;

  opacity: 0.7;

  transition: opacity 0.3s ease;
}

.cotomaru-side-banner__close:hover {
  opacity: 1;
}

.cotomaru-side-banner.is-hidden {
  display: none;
}

/* ===============================
   CTA Buttons
=============================== */

.cotomaru-floating-cta__btn {
  width: 96px !important;
  height: 96px !important;

  padding: 0 !important;

  display: flex !important;
  align-items: center;
  justify-content: center;

  text-align: center;

  background: var(--color-accent) !important;

  color: var(--color-bg) !important;

  border: 1px solid var(--color-accent) !important;
  border-radius: 0 !important;

  text-decoration: none !important;

  font-size: 14px !important;
  font-weight: 600 !important;

  line-height: 1.4;
  letter-spacing: 0.04em;

  transition:
    background 0.3s ease,
    color 0.3s ease;
}

.cotomaru-floating-cta__btn--outline {
  background: transparent !important;
  color: var(--color-accent) !important;
}

.cotomaru-floating-cta__btn:hover,
.cotomaru-floating-cta__btn--outline:hover {
  background: var(--color-accent) !important;
  color: var(--color-bg) !important;
}

.cotomaru-floating-cta__btn::before,
.cotomaru-floating-cta__btn::after {
  display: none !important;
  content: none !important;
}

/* ===============================
   Footer
=============================== */

/* Astra footer hide */

.site-footer,
.ast-footer-copyright,
.ast-builder-footer-grid-columns,
.site-primary-footer-wrap,
.site-below-footer-wrap {
  display: none !important;
}

/* cotomaru footer */

.cotomaru-footer {
  background: var(--color-header) !important;

  color: var(--color-bg) !important;

  padding: 56px 40px 28px !important;
}

.cotomaru-footer,
.cotomaru-footer * {
  color: var(--color-bg) !important;
}

.cotomaru-footer__inner {
  max-width: 1180px;

  margin: 0 auto;

  display: grid;

  grid-template-columns: 1.2fr 1fr;

  gap: 80px;
}

.cotomaru-footer__logo {
  width: 136px;

  margin-bottom: 22px;
}

.cotomaru-footer__copy {
  margin-bottom: 36px;

  font-size: 13px;

  line-height: 1.8;
}

.cotomaru-footer__subscription {
  border-left: 1px solid rgba(255, 252, 246, 0.7) !important;
  padding-left: 20px !important;
}

.cotomaru-footer__sub-title {
  margin: 0 0 16px !important;
  font-size: 12px !important;
  letter-spacing: 0.12em !important;
}

.cotomaru-footer__subscription ul {
  margin: 0 !important;
  padding-left: 18px !important;
}

.cotomaru-footer__subscription li {
  margin-bottom: 10px !important;
  font-size: 13px !important;
  line-height: 1.6 !important;
}

.cotomaru-footer__nav {
  display: grid;

  grid-template-columns: repeat(3, 1fr);

  gap: 32px;
}

.cotomaru-footer__nav ul,
.cotomaru-footer__menu {
  list-style: none;

  margin: 0;
  padding: 0;
}

.cotomaru-footer__nav li {
  margin-bottom: 12px;
}

.cotomaru-footer__nav a {
  font-size: 13px;

  line-height: 1.6;
}

.cotomaru-footer__dogfield-button {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  margin-top: 18px;
  padding: 13px 18px;
  border: 1px solid rgba(255, 252, 246, 0.9);
  color: var(--color-bg) !important;
  font-family: inherit;
  font-size: 13px;
  font-weight: inherit;
  letter-spacing: inherit;
  line-height: 1.5;
  text-align: center;
  transition: opacity 0.2s ease, background-color 0.2s ease;
}

.cotomaru-footer__dogfield-button:hover {
  background: rgba(255, 252, 246, 0.12);
  opacity: 0.85;
}

.cotomaru-footer__copyright {
  max-width: 1180px;

  margin: 44px auto 0;

  font-size: 11px;

  opacity: 0.8;
}

/* ===============================
   Responsive
=============================== */

@media (max-width: 767px) {

  .cotomaru-floating-cta {
    right: 16px !important;
    bottom: 16px !important;
  }

  .cotomaru-side-banner {
    width: 92px;
  }

  .cotomaru-floating-cta__btn {
    width: 82px !important;
    height: 82px !important;

    font-size: 12px !important;
  }

  .cotomaru-footer {
    padding: 44px 24px 24px !important;
  }

  .cotomaru-footer__inner {
    grid-template-columns: 1fr;

    gap: 36px;
  }

  .cotomaru-footer__nav {
    grid-template-columns: 1fr;

    gap: 8px;
  }

  .cotomaru-footer__logo {
    width: 118px;
  }

}
body:not(.home) .cotomaru-header {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

/* Keep edge-to-edge facility heroes below the fixed site header. */
body:not(.home) .cotomaru-facility-page--design {
  margin-top: var(--cotomaru-fixed-header-height);
}

/* Use an external gap so background transitions cannot hide the separation. */
.cdf-page,
.cvlp,
.cotomaru-facility-page--design,
.cotomaru-content-hub,
body.home .entry-content {
  display: flow-root;
}

.cdf-page > section:not(.cdf-hero),
.cvlp > section:not(.cvlp-hero):not(.cvlp-glance),
.cotomaru-facility-page--design > section:not(.cotomaru-facility-hero),
.cotomaru-content-hub > .cotomaru-content-hub__inner,
body.home .entry-content > :is(.cotomaru-concept-section, .cotomaru-dog-section, .cotomaru-villa-section, .cotomaru-select-section, .cotomaru-experience, .cotomaru-reserve-cta, .cotomaru-subscription, .cotomaru-facility-panel-section) {
  margin-top: var(--cotomaru-section-gap) !important;
  margin-bottom: 0 !important;
}

.cdf-page > :is(.cdf-sizes, .cdf-amenities, .cdf-faq, .cdf-panels, .cdf-stay, .cdf-reserve),
.cvlp > :is(.cvlp-details, .cvlp-dog-friendly, .cvlp-access),
.cotomaru-facility-page--design > :is(.cotomaru-facility-villas, .cotomaru-facility-select, .cotomaru-facility-faq),
body.home .entry-content > :is(.cotomaru-villa-section) {
  padding-block: var(--cotomaru-band-inset) !important;
}

.cdf-page > .cdf-nearby,
.cvlp > :is(.cvlp-story, .cvlp-gallery, .cvlp-plans, .cvlp-rules, .cvlp-faq),
.cotomaru-facility-page--design > :is(.cotomaru-facility-concept, .cotomaru-facility-strip, .cotomaru-facility-experience),
.cotomaru-content-hub > .cotomaru-content-hub__inner,
body.home .entry-content > :is(.cotomaru-concept-section, .cotomaru-dog-section, .cotomaru-select-section, .cotomaru-reserve-cta, .cotomaru-facility-panel-section) {
  padding-block: 0 !important;
}

.cdf-page,
.cvlp,
.cotomaru-facility-page--design,
body.home .entry-content {
  padding-bottom: var(--cotomaru-section-gap);
}

.cotomaru-content-hub > .cotomaru-content-hub__inner {
  padding-bottom: var(--cotomaru-section-gap) !important;
}

/* The TOP dog grid and terminal paragraphs must not add a second outer gap. */
body.home .cotomaru-dog-inner { padding-top: 0; }
body.home .cotomaru-concept-content > :last-child,
body.home .cotomaru-select-buttons { margin-bottom: 0; }

/* Editor content uses the same rhythm, including full-width pages and posts. */
:where(body:not(.home) .entry-content, .cotomaru-article__body, .cotomaru-qa-answer) > h2:not(:first-child),
:where(body:not(.home) .entry-content, .cotomaru-article__body, .cotomaru-qa-answer) > section + section,
:where(body:not(.home) .entry-content, .cotomaru-article__body, .cotomaru-qa-answer) > .wp-block-group + .wp-block-group,
:where(body:not(.home) .entry-content, .cotomaru-article__body, .cotomaru-qa-answer) > .wp-block-columns + .wp-block-columns,
:where(body:not(.home) .entry-content, .cotomaru-article__body, .cotomaru-qa-answer) > .policy + .policy {
  margin-top: var(--cotomaru-section-gap) !important;
}

:where(body:not(.home) .entry-content, .cotomaru-article__body, .cotomaru-qa-answer) > .wp-block-spacer {
  height: var(--cotomaru-section-gap) !important;
  margin-block: 0 !important;
}

:where(body:not(.home) .entry-content, .cotomaru-article__body, .cotomaru-qa-answer) > :has(+ .wp-block-spacer),
:where(body:not(.home) .entry-content, .cotomaru-article__body, .cotomaru-qa-answer) > .policy > :last-child {
  margin-bottom: 0 !important;
}

.cotomaru-qa-lead { margin-bottom: 0; }

/* Discourage casual saving; server rules separately restrict external embeds. */
:where(.cotomaru-header img, main img, .entry-content img, .cotomaru-footer img, .cotomaru-fv-slider__slide, .cotomaru-facility-hero__background) {
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  user-select: none;
}

:where(body:not(.home) .entry-content, .cotomaru-article__body, .cotomaru-qa-answer) > .wp-block-spacer + :is(h2, section, .wp-block-group, .wp-block-columns, .policy) {
  margin-top: 0 !important;
}
