/*
Theme Name: 介護屋みらい Sunshine
Theme URI: https://kaigoyamirai.com/
Description: Twenty Twenty-Fiveを親テーマにした、介護屋みらい専用の明るく親しみやすいブロック子テーマです。
Author: 介護屋みらい
Version: 2.0.5
Template: twentytwentyfive
Requires at least: 6.7
Requires PHP: 8.1
Text Domain: kaigoyamirai-sunshine
*/

:root {
  --kym-radius-sm: 14px;
  --kym-radius-md: 24px;
  --kym-radius-lg: 38px;
  --kym-shadow: 0 18px 50px rgba(60, 67, 81, .10);
  --kym-shadow-soft: 0 10px 28px rgba(60, 67, 81, .08);
}

html { scroll-behavior: smooth; }
body { overflow-x: hidden; }
body, button, input, textarea, select { -webkit-font-smoothing: antialiased; }

a { text-underline-offset: .18em; text-decoration-thickness: .08em; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--wp--preset--color--sunshine);
  outline-offset: 3px;
}

.kym-site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  background: rgba(255,249,238,.94);
  border-bottom: 1px solid rgba(60,67,81,.08);
}
.admin-bar .kym-site-header { top: 32px; }
.kym-site-header .wp-block-site-logo img { max-height: 58px; width: auto; }
.kym-site-header .wp-block-navigation-item__content { font-weight: 700; }
.kym-site-header .wp-block-navigation__responsive-container.is-menu-open {
  padding: 28px;
  background: var(--wp--preset--color--cream);
}

.kym-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 18%, rgba(255,216,92,.62) 0 7%, transparent 7.3%),
    linear-gradient(135deg, #fff9ee 0%, #fff3d2 48%, #dff4ff 100%);
}
.kym-hero::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 130px;
  z-index: -1;
  background: url("assets/images/rainbow-dots.svg") center bottom / cover no-repeat;
}
.kym-hero__copy { position: relative; z-index: 2; }
.kym-hero__photo { position: relative; }
.kym-hero__photo img {
  border-radius: var(--kym-radius-lg);
  box-shadow: var(--kym-shadow);
  aspect-ratio: 6 / 5;
  object-fit: cover;
}
.kym-hero__photo::after {
  content: "☀️";
  position: absolute;
  right: -20px;
  top: -28px;
  font-size: clamp(3.5rem, 8vw, 6.5rem);
  filter: drop-shadow(0 8px 12px rgba(60,67,81,.12));
  transform: rotate(8deg);
}
.kym-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .45em;
  padding: .55em .9em;
  border-radius: 999px;
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(60,67,81,.08);
  font-weight: 800;
  letter-spacing: .05em;
}
.kym-lead { max-width: 39rem; }

.kym-section { position: relative; }
.kym-section--sky { background: var(--wp--preset--color--sky); }
.kym-section--cream { background: var(--wp--preset--color--cream); }
.kym-section--mint { background: var(--wp--preset--color--mint); }
.kym-section--sun { background: #fff3c5; }
.kym-bubble-heading { position: relative; display: inline-block; }
.kym-bubble-heading::after {
  content: "";
  display: block;
  height: 10px;
  margin-top: -8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffd85c, #ff9d8f, #79c99e);
  opacity: .52;
}

.kym-card {
  height: 100%;
  border: 1px solid rgba(60,67,81,.08);
  border-radius: var(--kym-radius-md);
  background: #fff;
  box-shadow: var(--kym-shadow-soft);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.kym-card:hover { transform: translateY(-4px); box-shadow: var(--kym-shadow); }
.kym-card .wp-block-post-featured-image img,
.kym-card > .wp-block-image img { aspect-ratio: 16 / 10; object-fit: cover; }
.kym-card__body { padding: clamp(20px, 3vw, 30px); }
.kym-card--yellow { background: #fffaf0; }
.kym-card--sky { background: #f4fbff; }
.kym-card--mint { background: #f3fcf6; }
.kym-card--coral { background: #fff7f5; }

.kym-icon-bubble {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: var(--wp--preset--color--sunshine);
  font-size: 1.65rem;
  box-shadow: 0 8px 20px rgba(253,186,45,.28);
}

.kym-query-grid .wp-block-post-template { align-items: stretch; }
.kym-query-grid .wp-block-post { height: 100%; }
.kym-query-grid .wp-block-post > .wp-block-group {
  height: 100%;
  border: 1px solid rgba(60,67,81,.08);
  border-radius: var(--kym-radius-md);
  background: #fff;
  overflow: hidden;
  box-shadow: var(--kym-shadow-soft);
}
.kym-query-grid .wp-block-post-featured-image { margin: 0; }
.kym-query-grid .wp-block-post-featured-image img { aspect-ratio: 16/10; object-fit: cover; }
.kym-query-grid .wp-block-post-title a { text-decoration: none; }
.kym-query-grid .wp-block-post-title a:hover { color: var(--wp--preset--color--coral); }

.kym-photo-frame { position: relative; }
.kym-photo-frame img { border-radius: var(--kym-radius-lg); box-shadow: var(--kym-shadow); }
.kym-photo-frame::before {
  content: "🌈";
  position: absolute;
  left: -24px;
  bottom: -26px;
  z-index: 2;
  font-size: 4rem;
  transform: rotate(-8deg);
}

.kym-cta {
  position: relative;
  overflow: hidden;
  border-radius: var(--kym-radius-lg);
  background: linear-gradient(135deg, #ffefb1, #dff4ff 60%, #dff5e8);
  box-shadow: var(--kym-shadow);
}
.kym-cta::after {
  content: "☀️  🌼  ✨  🌈";
  position: absolute;
  right: 4%;
  bottom: 8%;
  font-size: clamp(1.8rem, 5vw, 3.4rem);
  opacity: .7;
  transform: rotate(-5deg);
}

.wp-block-button__link {
  transition: transform .18s ease, box-shadow .18s ease;
  box-shadow: 0 8px 20px rgba(60,67,81,.10);
}
.wp-block-button__link:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(60,67,81,.15); }

.kym-archive-hero {
  background: linear-gradient(135deg, #fff7dc, #e9f8ff);
  border-bottom: 1px solid rgba(60,67,81,.06);
}
.kym-article-shell {
  background: #fff;
  border: 1px solid rgba(60,67,81,.08);
  border-radius: var(--kym-radius-md);
  box-shadow: var(--kym-shadow-soft);
}
.kym-article-shell .wp-block-post-content > *:not(.alignwide):not(.alignfull) { max-width: 760px; margin-left: auto; margin-right: auto; }
.kym-article-shell .wp-block-post-content img { border-radius: 18px; }
.kym-article-shell .wp-block-post-content h2 { margin-top: 1.8em; }
.kym-article-shell .wp-block-post-content table { font-size: .95em; }

.kym-footer { background: #3c4351; color: #fff; }
.kym-footer a { color: #fff; }
.kym-footer .wp-block-site-logo img { filter: drop-shadow(0 4px 10px rgba(0,0,0,.16)); }

@media (max-width: 900px) {
  .admin-bar .kym-site-header { top: 46px; }
  .kym-hero__photo::after { right: 0; top: -20px; }
  .kym-cta::after { position: static; display: block; margin-top: 20px; }
}
@media (max-width: 600px) {
  .kym-site-header { position: relative; top: auto; }
  .admin-bar .kym-site-header { top: auto; }
  .kym-hero__photo::after { font-size: 3.5rem; }
  .kym-photo-frame::before { left: -5px; bottom: -20px; font-size: 3rem; }
  .wp-block-buttons { gap: 10px; }
  .wp-block-button { width: 100%; }
  .wp-block-button__link { width: 100%; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

.kym-illus-frame,
.kym-illus-panel {
  position: relative;
}
.kym-illus-frame img,
.kym-illus-panel img {
  border-radius: var(--kym-radius-lg);
  box-shadow: var(--kym-shadow);
  background: #fff;
}
.kym-illus-panel {
  padding: 18px;
  border-radius: calc(var(--kym-radius-lg) + 4px);
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(60,67,81,.08);
  box-shadow: var(--kym-shadow-soft);
}
.kym-illus-caption {
  color: rgba(60,67,81,.78);
}
.kym-soft-card {
  padding: clamp(18px, 3vw, 28px);
  border-radius: var(--kym-radius-md);
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(60,67,81,.08);
  box-shadow: var(--kym-shadow-soft);
}
.kym-soft-card h3,
.kym-soft-card p:last-child {
  margin-bottom: 0;
}
.kym-soft-card ul { margin: 0; padding-left: 1.25em; }
.kym-archive-hero .wp-block-columns { align-items: center; }


/* Fixed-page starter design v1.2 */
.kym-page-intro {
  padding: clamp(24px, 4vw, 46px);
  margin-bottom: var(--wp--preset--spacing--50);
  border: 1px solid rgba(60,67,81,.08);
  border-radius: var(--kym-radius-lg);
  background: linear-gradient(135deg, #fff8df, #effaff 68%, #f2fbf5);
  box-shadow: var(--kym-shadow-soft);
}
.kym-page-intro--quiet { background: linear-gradient(135deg, #fff, #f4fbff); }
.kym-page-label {
  margin-bottom: .55rem;
  color: var(--wp--preset--color--coral);
  font-weight: 800;
  letter-spacing: .08em;
}
.kym-page-section {
  margin-top: clamp(42px, 6vw, 72px);
}
.kym-page-section > h2:first-child,
.kym-page-section .kym-section-title {
  padding-bottom: .45em;
  border-bottom: 4px solid rgba(255,216,92,.65);
}
.kym-feature-grid > .wp-block-column,
.kym-office-grid > .wp-block-column {
  display: flex;
}
.kym-info-card,
.kym-document-card,
.kym-recruit-card {
  width: 100%;
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid rgba(60,67,81,.08);
  border-radius: var(--kym-radius-md);
  background: #fff;
  box-shadow: var(--kym-shadow-soft);
}
.kym-info-card--yellow { background:#fffaf0; }
.kym-info-card--sky { background:#f3faff; }
.kym-info-card--mint { background:#f3fbf6; }
.kym-info-card--coral { background:#fff6f3; }
.kym-message-quote {
  padding: clamp(22px, 4vw, 42px);
  border: 0;
  border-left: 7px solid var(--wp--preset--color--sunshine);
  border-radius: 0 var(--kym-radius-md) var(--kym-radius-md) 0;
  background: #fffaf0;
  font-size: clamp(1.15rem, 2.2vw, 1.55rem);
  line-height: 1.9;
}
.kym-message-quote cite { display:block; margin-top:1rem; font-size:.82em; }
.kym-data-table table { border-collapse: separate; border-spacing: 0; overflow: hidden; border-radius: 18px; }
.kym-data-table td, .kym-data-table th { padding: 15px 18px; border-color: rgba(60,67,81,.10); }
.kym-data-table tr:nth-child(even) { background:#f8fbfc; }
.kym-data-table td:first-child { width: 28%; font-weight: 700; background: rgba(223,244,255,.42); }
.kym-page-note {
  padding: 18px 22px;
  border-radius: 16px;
  background: #fff8dc;
  border: 1px solid rgba(253,186,45,.35);
}
.kym-contact-form-shell {
  padding: clamp(24px, 4vw, 46px);
  border-radius: var(--kym-radius-lg);
  background:#fff;
  border:1px solid rgba(60,67,81,.08);
  box-shadow:var(--kym-shadow-soft);
}
.kym-document-card .wp-block-file { margin-bottom:0; }
.kym-document-card .wp-block-file__button { background:var(--wp--preset--color--coral); color:#fff; }
@media (max-width: 700px) {
  .kym-data-table td:first-child { width:auto; }
  .kym-data-table table, .kym-data-table tbody, .kym-data-table tr, .kym-data-table td { display:block; width:100%; }
  .kym-data-table tr { margin-bottom:14px; border:1px solid rgba(60,67,81,.08); border-radius:14px; overflow:hidden; }
}

/* 公開資料ページ：Coreプラグインの自動PDF一覧との統合 */
.kym-page-intro + .kym-info-card + .wp-block-kaigoyamirai-document-list,
.kym-page-intro + .kym-info-card + .kym-documents {
  margin-top: var(--wp--preset--spacing--50);
}
.wp-block-kaigoyamirai-document-list {
  margin-top: var(--wp--preset--spacing--50);
  margin-bottom: var(--wp--preset--spacing--50);
}

/* BEGIN KYM 2.0.1 LIGHT FOOTER */
.kym-footer {
  background: linear-gradient(135deg, #fff8df 0%, #effaff 58%, #f2fbf5 100%);
  color: #26343b;
  border-top: 1px solid rgba(60, 67, 81, .08);
}
.kym-footer a {
  color: #355d66;
  font-weight: 600;
}
.kym-footer a:hover,
.kym-footer a:focus {
  color: #c9564e;
}
.kym-footer .wp-block-separator {
  background: #cadde2 !important;
  color: #cadde2 !important;
  border: 0 !important;
  height: 1px;
}
.kym-footer .wp-block-site-logo img {
  filter: drop-shadow(0 4px 10px rgba(60, 67, 81, .08));
}
/* END KYM 2.0.1 LIGHT FOOTER */

/* BEGIN KYM 2.0.2 FRONTEND REFINEMENT */

/* Imported featured images: stable card rendering once uploads are reachable. */
.kym-query-grid .wp-block-post-featured-image {
  margin: 0;
  overflow: hidden;
  background: linear-gradient(135deg, #fffaf0, #f4fbff);
}
.kym-query-grid .wp-block-post-featured-image a {
  display: block;
}
.kym-query-grid .wp-block-post-featured-image img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

/* Archive headings should not split awkwardly on ordinary desktop widths. */
.kym-archive-hero .wp-block-heading.has-xx-large-font-size {
  max-width: none;
  font-size: clamp(2.45rem, 4vw, 3.45rem) !important;
  line-height: 1.18;
  letter-spacing: -.025em;
  overflow-wrap: normal;
  word-break: keep-all;
}

/* Let the home page use the desktop width instead of squeezing 3 cards
   into the normal article text measure. */
.kym-section > .wp-block-group.alignwide {
  width: min(1120px, calc(100% - 40px));
  max-width: 1120px;
}
.kym-section > .wp-block-group.alignwide > .wp-block-columns {
  width: 100%;
  max-width: 1120px !important;
}
.kym-section .wp-block-columns {
  column-gap: clamp(18px, 2.5vw, 34px);
}
.kym-section .kym-card__body {
  height: 100%;
}

/* Fixed pages may use a wider two-column composition while long prose
   remains at the comfortable 760px reading width. */
.kym-article-shell .wp-block-post-content > .wp-block-columns {
  width: min(980px, 100%);
  max-width: 980px !important;
}
.kym-contact-form-shell input:not([type="checkbox"]):not([type="radio"]),
.kym-contact-form-shell select,
.kym-contact-form-shell textarea {
  max-width: 100%;
  box-sizing: border-box;
}

/* Maintain the light footer introduced in 2.0.1. */
.kym-footer {
  background: linear-gradient(135deg, #fff8df 0%, #effaff 58%, #f2fbf5 100%);
  color: #26343b;
  border-top: 1px solid rgba(60, 67, 81, .08);
}
.kym-footer a {
  color: #355d66;
  font-weight: 600;
}
.kym-footer a:hover,
.kym-footer a:focus {
  color: #c9564e;
}

@media (max-width: 780px) {
  .kym-section > .wp-block-group.alignwide {
    width: min(100% - 28px, 1120px);
  }
  .kym-archive-hero .wp-block-heading.has-xx-large-font-size {
    font-size: clamp(2.1rem, 10vw, 2.8rem) !important;
    word-break: normal;
  }
}
/* END KYM 2.0.2 FRONTEND REFINEMENT */

/* BEGIN KYM 2.0.4 BRAND HEADER */
.kym-site-header {
  position: relative;
  z-index: 20;
}
.kym-header-brand {
  flex: 0 0 auto;
  gap: 12px;
}
.kym-header-brand .wp-block-site-logo {
  margin: 0;
}
.kym-header-brand .wp-block-site-logo a {
  display: flex;
  align-items: center;
}
.kym-header-brand .wp-block-site-title {
  margin: 0;
  white-space: nowrap;
  font-weight: 800;
  line-height: 1.2;
}
.kym-header-brand .wp-block-site-title a {
  color: #3c4351;
  text-decoration: none;
}
.kym-header-brand .wp-block-site-title a:hover,
.kym-header-brand .wp-block-site-title a:focus {
  color: #2f9862;
}
.kym-header-actions {
  flex: 1 1 auto;
  justify-content: flex-end;
  gap: 18px;
  min-width: 0;
}
.kym-legacy-home-header {
  background: #fffdf7;
  border-bottom: 1px solid rgba(60,67,81,.08);
  padding: 12px 20px 16px;
}
.kym-legacy-home-header__inner {
  max-width: 1120px !important;
}
.kym-legacy-home-header__image {
  margin: 0 auto;
  text-align: center;
}
.kym-legacy-home-header__image img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 300px;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
}

@media (max-width: 1240px) {
  .kym-header-brand .wp-block-site-title {
    display: none;
  }
}
@media (max-width: 980px) {
  .kym-site-header > .wp-block-group {
    gap: 10px;
  }
  .kym-header-brand .wp-block-site-logo img {
    max-width: 96px;
    height: auto;
  }
  .kym-header-actions .wp-block-buttons {
    display: none;
  }
}
/* END KYM 2.0.4 BRAND HEADER */

/* BEGIN KYM 2.0.5 LAYOUT */
html,
body {
  overflow-x: clip;
}

/* Header: the logo artwork already includes the company/service name. */
.kym-header-brand {
  gap: 0;
  flex: 0 0 auto;
}
.kym-header-brand .wp-block-site-logo {
  margin: 0;
}
.kym-header-brand .wp-block-site-logo img {
  display: block;
  width: auto;
  height: auto;
  max-height: 58px;
  max-width: 250px;
}
.kym-site-header > .wp-block-group {
  width: min(1200px, calc(100% - 36px));
  max-width: 1200px !important;
}

/* Admin-editable home hero photo. */
.kym-hero-editable-image {
  margin: 0;
  width: 100%;
}
.kym-hero-editable-image img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 28px;
}

/* Avoid the single-character wrap seen in large section headings. */
.kym-section-title,
.kym-section .wp-block-heading,
.kym-archive-hero .wp-block-heading {
  line-break: strict;
  word-break: keep-all;
  overflow-wrap: normal;
}
.kym-section .wp-block-heading.has-x-large-font-size,
.kym-section .wp-block-heading.has-xx-large-font-size {
  width: min(900px, 100%);
  max-width: 900px !important;
  margin-left: auto;
  margin-right: auto;
}

/* Stable desktop content width. */
.kym-section > .wp-block-group.alignwide,
.kym-article-shell > .wp-block-group.alignwide {
  width: min(1120px, calc(100% - 40px));
  max-width: 1120px !important;
}

@media (max-width: 980px) {
  .kym-site-header > .wp-block-group {
    width: min(100% - 24px, 1200px);
  }

  .kym-header-brand .wp-block-site-logo img {
    max-height: 48px;
    max-width: 190px;
  }

  .kym-section-title,
  .kym-section .wp-block-heading,
  .kym-archive-hero .wp-block-heading {
    word-break: normal;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 640px) {
  .kym-section > .wp-block-group.alignwide,
  .kym-article-shell > .wp-block-group.alignwide {
    width: min(100% - 28px, 1120px);
  }

  .kym-hero-editable-image img {
    border-radius: 20px;
  }
}
/* END KYM 2.0.5 LAYOUT */
