/*
Theme Name: YMGA Twenty Twenty-Five
Template: twentytwentyfive
Version: 0.5.1
Text Domain: ymga-twentytwentyfive
*/

/* Keep the inherited block theme's fluid type scale comfortable on every page. */
body { font-size:1rem; line-height:1.75; background:#fbfcfa; color:#24312a; }
.wp-site-blocks main { padding-top:clamp(2rem,5vw,3.5rem)!important; padding-bottom:clamp(3rem,6vw,4.5rem)!important; }
.wp-site-blocks main h1 { letter-spacing:-.025em; }
.wp-site-blocks main h2 { margin-top:2.2em; padding-bottom:.4em; border-bottom:1px solid #cbd8ce; letter-spacing:-.015em; }
.wp-site-blocks h1,.wp-site-blocks .wp-block-post-title { font-size:clamp(1.8rem,2.8vw,2.25rem); line-height:1.3; }
.wp-site-blocks h2 { font-size:clamp(1.4rem,2.2vw,1.65rem); line-height:1.4; }
.wp-site-blocks h3 { font-size:clamp(1.15rem,1.8vw,1.3rem); line-height:1.45; }
.ymga-site-header .wp-block-site-title { font-size:1.25rem; line-height:1.4; }
.ymga-site-nav { font-size:.95rem; line-height:1.5; }
.wp-site-blocks :where(main p,main li) { font-size:1rem; line-height:1.75; }

.ymga-guide-filters { display:grid; grid-template-columns:repeat(auto-fit,minmax(12rem,1fr)); gap:1rem; margin:2rem 0; padding:1.4rem; border:1px solid #d5ded8; border-radius:.8rem; background:#f1f5f0; }
.ymga-guide-filters label { display:block; font-weight:600; }
.ymga-guide-filters input,.ymga-guide-filters select { box-sizing:border-box; width:100%; min-height:2.75rem; border:1px solid #b9c9bd; border-radius:.35rem; background:#fff; }
.ymga-guide-filters button { align-self:end; min-height:2.75rem; border:0; border-radius:.35rem; background:#24543b; color:#fff; font-weight:700; cursor:pointer; }
.ymga-guide-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); align-items:start; gap:1rem; padding:0; list-style:none; }
.ymga-guide-card { min-width:0; border:1px solid #d5ded8; border-radius:.65rem; padding:1rem; background:#fff; box-shadow:0 6px 20px rgba(27,63,42,.045); }
.ymga-guide-card img { width:100%; aspect-ratio:1; object-fit:cover; object-position:center 25%; border-radius:.35rem; }
.ymga-guide-card h3 { margin:.75rem 0 .35rem; }
.ymga-guide-card p { margin:.5rem 0; }
.ymga-guide-tags { display:flex; flex-wrap:wrap; gap:.35rem; padding:0; list-style:none; }
.ymga-guide-tags li { background:#eaf1ea; border-radius:999px; padding:.15rem .65rem; font-size:.85rem; }
.ymga-site-header { border-bottom:3px solid #b4a371; background:#183b2d; color:#f8f7ef; }
.ymga-site-header > .wp-block-group { align-items:center; gap:1rem 2rem; }
.ymga-site-header .wp-block-site-title { margin:0; padding-left:1rem; border-left:3px solid #b4a371; font-size:1.1rem; font-weight:700; line-height:1.35; letter-spacing:.02em; }
.ymga-site-header .wp-block-site-title::after { display:block; content:'YATSUGATAKE MOUNTAIN GUIDES'; margin-top:.15rem; color:#c8d7ca; font-family:Arial,sans-serif; font-size:.58rem; font-weight:600; letter-spacing:.18em; }
.ymga-site-header a { color:#f8f7ef; }
.ymga-site-nav { display:flex; flex-wrap:wrap; gap:.5rem 1.15rem; align-items:center; }
.ymga-site-nav a { padding:.35rem 0; border-bottom:2px solid transparent; text-decoration:none; font-weight:600; }
.ymga-site-nav a:hover,.ymga-site-nav a:focus { border-color:#d4c38c; text-decoration:none; }
.ymga-site-footer { border-top:1px solid #d5ded8; background:#f1f5f0; }
.single-ymga_guide .wp-block-post-featured-image { max-width:28rem; }
.single-ymga_guide .wp-block-post-featured-image img { width:100%; height:auto; object-fit:contain; }
.ymga-home-hero { display:grid; grid-template-columns:1fr 1fr; gap:clamp(1.5rem,4vw,3.5rem); align-items:center; margin:0 0 4rem; padding:1rem 0 2rem; border-bottom:1px solid #cbd8ce; }
.ymga-home-hero h1 { margin:0; }
.ymga-home-lead { color:#24543b; font-weight:700; font-size:1.05rem; }
.wp-site-blocks .ymga-home-hero h1 { font-size:clamp(1.9rem,3vw,2.5rem); }
.ymga-home-hero img { display:block; width:100%; aspect-ratio:4/3; object-fit:cover; border-radius:.65rem; box-shadow:0 15px 35px rgba(18,50,32,.13); }
.ymga-home-button { display:inline-block; padding:.8rem 1.2rem; background:#24543b; color:white!important; border-radius:.4rem; text-decoration:none; font-weight:700; }
.ymga-home-button:hover,.ymga-home-button:focus,.ymga-guide-filters button:hover,.ymga-guide-filters button:focus { background:#193e2a; }
.ymga-home-links { margin:3.5rem 0; }
.ymga-home-links > h2 { margin-bottom:1.4rem; }
.ymga-home-cards { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1.25rem; }
.ymga-home-cards a { display:flex; flex-direction:column; gap:.35rem; border:1px solid #d5ded8; border-radius:.65rem; overflow:hidden; text-decoration:none; color:#24312a; padding-bottom:1rem; background:#fff; box-shadow:0 6px 20px rgba(27,63,42,.045); }
.ymga-home-cards a:hover,.ymga-home-cards a:focus { border-color:#91aa97; }
.ymga-home-cards img { display:block; width:100%; height:auto; aspect-ratio:auto; object-fit:contain; background:#edf3ee; }
.ymga-home-cards strong { margin:.5rem 1rem 0; font-size:1.05rem; line-height:1.4; }
.ymga-home-cards span { margin:0 1rem; color:#526759; font-size:.91rem; line-height:1.5; }
.ymga-home-contact { padding:1.5rem; background:#edf3ee; border-radius:.5rem; }
/* Legacy fixed-width photo tables stay within the text column before JS enhances them. */
.wp-site-blocks main table[summary] { width:100%!important; max-width:100%; table-layout:fixed; border-collapse:collapse; }
.wp-site-blocks main table[summary] td { min-width:0; overflow-wrap:anywhere; }
.wp-site-blocks main table[summary] img { max-width:100%; height:auto; }

.ymga-photo-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; margin:1.75rem 0 2.5rem; }
.ymga-gallery-item { min-width:0; margin:0; padding:.5rem; border:1px solid #d5ded8; border-radius:.6rem; background:#fff; }
.ymga-gallery-item a { display:block; }
.ymga-gallery-item img { display:block; width:100%; height:auto; border-radius:.3rem; }
.ymga-gallery-item figcaption { padding:.65rem .35rem .2rem; color:#41564a; font-size:.9rem; line-height:1.5; }
.ymga-carousel { margin:1.75rem 0 2.75rem; padding:1rem; border:1px solid #d5ded8; border-radius:.7rem; background:#f1f5f0; }
.ymga-carousel .ymga-gallery-item { padding:0; border:0; background:transparent; text-align:center; }
.ymga-carousel .ymga-gallery-item[hidden] { display:none!important; }
.ymga-carousel .ymga-gallery-item img { width:100%; max-height:32rem; object-fit:contain; background:#e5ece5; }
.ymga-carousel .ymga-gallery-item figcaption { min-height:2.5em; }
.ymga-carousel-controls { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-top:.5rem; }
.ymga-carousel-controls button { min-width:5.5rem; padding:.5rem .9rem; border:1px solid #24543b; border-radius:.35rem; background:#fff; color:#24543b; font:inherit; font-weight:600; cursor:pointer; }
.ymga-carousel-controls button:hover,.ymga-carousel-controls button:focus { background:#dfeadf; }
.ymga-carousel-count { font-variant-numeric:tabular-nums; font-size:.9rem; color:#41564a; }

@media (max-width: 850px) { .ymga-guide-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width: 600px) { .ymga-guide-filters,.ymga-guide-grid,.ymga-photo-grid { grid-template-columns:1fr; } }
@media (max-width: 700px) { .ymga-home-hero,.ymga-home-cards { grid-template-columns:1fr; } .ymga-site-nav { gap:.35rem .75rem; } }
@media (max-width: 600px) {
  .ymga-site-header { padding-top:.95rem!important; padding-bottom:.95rem!important; }
  .ymga-site-header .wp-block-site-title { font-size:1rem; }
  .ymga-site-nav { font-size:.85rem; gap:.1rem .8rem; }
  .ymga-site-nav { font-size:.88rem; }
  .wp-site-blocks h1,.wp-site-blocks .wp-block-post-title { font-size:1.75rem; }
  .wp-site-blocks h2 { font-size:1.35rem; }
  .wp-site-blocks .ymga-home-hero h1 { font-size:1.9rem; }
}
