/*
 * Au Fil du Rêve — コンテンツ
 * Sizes and colours follow the original site's compiled Good Space CSS and its saved theme options.
 * The old theme's image files are not used; small patterns and icons are drawn with CSS.
 */

/* Slider ------------------------------------------------------------------ */
.afdr-slide[hidden] { display: none !important; }
.afdr-slideshow { position: relative; margin: 0; padding: 0 0 14px; }
.afdr-slides,
.afdr-slideshow ul.slides { position: relative; margin: 0; padding: 0; list-style: none; }
.afdr-slide { margin: 0; padding: 0; }
.afdr-slideshow img { display: block; width: 100%; height: auto; margin: 0; }
.afdr-slideshow--wide > .afdr-slides img { aspect-ratio: var(--afdr-slide-ratio, 940 / 360); object-fit: cover; }

/* Cross-fade, 600ms as configured on the original site. */
.afdr-slideshow.is-ready .afdr-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease; pointer-events: none; }
.afdr-slideshow.is-ready .afdr-slide.is-active { position: relative; inset: auto; opacity: 1; pointer-events: auto; z-index: 1; }

/* The thin bars at the lower right of the page sliders. */
.afdr-slider-bars { position: absolute; right: 0; bottom: 3px; display: flex; gap: 2px; }
.afdr-slider-bar { position: relative; display: block; width: 57px; height: 11px; margin: 0; padding: 5px 0 2px; border: 0; border-radius: 0; background: none; box-shadow: none; cursor: pointer; }
.afdr-slider-bar::before { content: ""; display: block; height: 4px; background: #c5c5c5; }
.afdr-slider-bar:hover::before,
.afdr-slider-bar.is-active::before { background: #4e4e4e; }
.afdr-slider-bar::after { content: ""; position: absolute; inset: -8px 0; } /* Larger touch target. */

/* The two small arrows on the lesson photos. */
.afdr-slideshow--thumb { padding-bottom: 0; }
.afdr-slider-arrows { position: absolute; left: 0; bottom: 0; z-index: 2; display: flex; }
.afdr-slider-arrow { position: relative; display: block; width: 30px; height: 26px; margin: 0; padding: 0; border: 0; border-radius: 0; background: #0a0a0a; box-shadow: none; cursor: pointer; }
.afdr-slider-arrow::before { content: ""; position: absolute; left: 10px; top: 12px; width: 9px; height: 1px; background: #eee; }
.afdr-slider-arrow::after { content: ""; position: absolute; top: 10px; width: 5px; height: 5px; border: solid #eee; border-width: 1px 0 0 1px; }
.afdr-slider-arrow--prev::after { left: 10px; transform: rotate(-45deg); }
.afdr-slider-arrow--next::after { right: 11px; transform: rotate(135deg); }
.afdr-slider-arrow:hover { background: #333; }

/* One lesson. The page uses the first rule; the others draw its box in the editor. */
.afdr-lesson__text { padding: 1em 2em 2em 2em; }
@media (min-width: 782px) { .afdr-lesson__text { padding-top: 0; } } /* Side by side, the heading starts level with the photo. */
.afdr-lesson-box { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; margin: 0 0 16px; padding: 14px; border: 1px solid #ddd; background: #fff; }
.afdr-lesson-box__thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0 0 10px; }
.afdr-lesson-box__thumbs img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.afdr-lesson-box .afdr-lesson-box__title { margin: 0 0 4px; }
.afdr-lesson-box .afdr-lesson-box__subtitle { margin: 0 0 10px; color: #777; font-size: 13px; }
.afdr-lesson-box .afdr-lesson-box__body { margin: 0; font-size: 14px; line-height: 1.5; }

/* Keyboard users can reach the pause control; it stays out of the design otherwise. */
.afdr-slider-pause { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); border: 0; background: #fff; color: #333; white-space: nowrap; }
.afdr-slider-pause:focus { right: 0; bottom: 18px; width: auto; height: auto; margin: 0; padding: 4px 8px; clip-path: none; z-index: 5; box-shadow: 0 0 0 1px #888; }
.afdr-slider-bars .afdr-slider-pause:focus { position: absolute; }
.afdr-slider-arrows .afdr-slider-pause:focus { position: absolute; left: 66px; right: auto; bottom: 0; }

/* Gallery ----------------------------------------------------------------- */
.afdr-portfolio-grid { display: grid; gap: 20px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 20px; }
.afdr-portfolio-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.afdr-portfolio-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.afdr-work-card { margin: 0; background: #f5f5f5; transition: background-color .3s; }
.afdr-work-card a { display: block; height: 100%; color: #555; text-decoration: none; transition: color .3s; }
.afdr-work-card__image { position: relative; display: block; overflow: hidden; }
.afdr-work-card img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; margin: 0; }
.afdr-work-card__image::before { content: ""; position: absolute; inset: 0; z-index: 1; background: rgb(0 0 0 / .76); opacity: 0; transition: opacity .3s; }
.afdr-work-card__image::after { content: "+"; position: absolute; top: 50%; left: 50%; z-index: 2; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; background: #fff; color: #111; font-size: 26px; font-weight: normal; line-height: 44px; text-align: center; opacity: 0; transition: opacity .3s; }
.afdr-work-card a:hover .afdr-work-card__image::before,
.afdr-work-card a:hover .afdr-work-card__image::after,
.afdr-work-card a:focus-visible .afdr-work-card__image::before,
.afdr-work-card a:focus-visible .afdr-work-card__image::after { opacity: 1; }
.afdr-work-card:has(a:hover) { background: #171717; }
.afdr-work-card a:hover { color: #efefef; }
.afdr-site .site-body .afdr-work-card h2,
.afdr-work-card h2 { margin: 8px 0 0; padding: 0 20px 8px; color: inherit; font-size: 12px; font-weight: bold; line-height: 18.5px; text-align: center; }

/* Blog list and sidebar --------------------------------------------------- */
.afdr-sidebar-layout { display: grid; grid-template-columns: minmax(0, 640px) minmax(0, 280px); gap: 20px; justify-content: space-between; align-items: start; }
.afdr-blog-card { margin: 0 0 50px; }
.afdr-blog-card::after { content: ""; display: block; clear: both; }
.afdr-blog-image { margin: 0 0 23px; }
.afdr-blog-image img { display: block; width: 100%; height: auto; aspect-ratio: 640 / 240; object-fit: cover; transition: opacity .15s; }
.afdr-blog-image a:hover img { opacity: .55; }
.afdr-blog-meta { float: left; width: 100px; margin-right: 20px; color: #9e9e9e; font-size: 11px; }
.afdr-blog-meta > div { margin-bottom: 7px; line-height: 18.5px; }
.afdr-blog-meta a { color: #9e9e9e; }
.afdr-meta-label { margin-right: 2px; color: #212121; font-family: "Droid Serif", Georgia, serif; font-style: italic; }
.afdr-blog-context { overflow: hidden; }
.afdr-site .site-body .afdr-blog-card h2,
.afdr-blog-card h2 { margin: 0; padding: 0 0 15px; color: #646464; font-size: 20px; line-height: 18.5px; }
.afdr-blog-card h2 a { color: inherit; font-weight: bold; line-height: 1.3em; }
.afdr-read-more { display: block; margin-top: 14px; }
.afdr-read-more em { font-style: italic; }

.afdr-sidebar { padding-top: 10px; }
.afdr-widget { margin: 0 0 35px; clear: both; }
.afdr-site .site-body .afdr-widget-title,
.afdr-widget-title { display: flex; align-items: center; gap: 15px; margin: 0 0 5px; color: #191919; font-size: 13px; font-weight: bold; line-height: 18px; }
.afdr-widget-title::after { content: ""; flex: 1 1 0; border-bottom: 1px solid #ececec; }
.afdr-widget ul { margin: 0; padding: 0; list-style: none; border: 0; }
.afdr-site .afdr-widget li { position: relative; margin: 0; padding: 9px 0 9px 15px; border: 0; border-bottom: 1px solid #ececec; background: none; font-size: inherit; line-height: 18px; }
.afdr-site .afdr-widget li a { display: inline; padding: 0; border: 0; background: none; font-size: inherit; }
.afdr-widget li::before { content: ""; position: absolute; left: 0; top: 14px; border: solid transparent; border-width: 3.5px 0 3.5px 4px; border-left-color: #888; }
.afdr-widget .tagcloud { display: inline-block; }
.afdr-site .afdr-widget .tagcloud a { display: block; float: left; margin: 10px 10px 0 0; padding: 3px 8px; border: 1px solid #ececec; border-radius: 3px; background: #fff; font-size: 12px !important; line-height: 18.5px; }
.afdr-site .afdr-widget .tagcloud a::before { display: none; content: none; }
.afdr-widget .textwidget p { margin: 0 0 20px; }
.afdr-widget .textwidget img { display: block; }

/* Pagination -------------------------------------------------------------- */
.afdr-pagination { margin: 0 0 10px; padding-right: 20px; }
.afdr-pagination a,
.afdr-pagination span { display: inline-block; height: 25px; padding: 0 12px; border: 1px solid #ececec; border-right: 0; background: #f9f9f9; color: inherit; line-height: 25px; text-align: center; }
.afdr-pagination > :last-child { border-right: 1px solid #ececec; }
.afdr-pagination a:hover { background: none; color: inherit; }
.afdr-pagination .current { background: none; }

/* Contact form ------------------------------------------------------------ */
.afdr-contact { margin: 0 0 20px; }
.afdr-contact-form { margin: 0; }
.afdr-field { margin: 0 0 20px; }
.afdr-field label { display: block; margin: 0; color: inherit; font-size: 12px; font-weight: bold; line-height: 18px; }
.afdr-contact-form input:not([type=hidden]),
.afdr-contact-form textarea { display: block; box-sizing: content-box; max-width: calc(100% - 22px); margin: 10px 5px; border: 1px solid #cfcfcf; border-radius: 2px; outline: none; background: #fff; color: #888; font: 13px/20px "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif; box-shadow: #ececec 0 1px 4px inset, #f8f8f8 -5px -5px 0 0, #f8f8f8 5px 5px 0 0, #f8f8f8 5px 0 0 0, #f8f8f8 0 5px 0 0, #f8f8f8 5px -5px 0 0, #f8f8f8 -5px 5px 0 0; }
.afdr-contact-form input:not([type=hidden]) { width: 320px; height: 30px; padding: 0 0 0 7px; line-height: 20px; }
.afdr-contact-form textarea { width: 590px; height: 165px; min-height: 60px; padding: 10px; resize: vertical; }
.afdr-contact-form input:not([type=hidden]):focus,
.afdr-contact-form textarea:focus { border-color: #aaa; color: #444; box-shadow: 0 0 3px rgb(0 0 0 / .2); }
.afdr-site .afdr-contact-form button,
.afdr-contact-form button { display: inline-block; height: 29px; margin: 0; padding: 1px 12px 0; border: 1px solid #dedede; border-radius: 3px; background: #f1f1f1 linear-gradient(rgb(255 255 255 / .52), rgb(255 255 255 / .25) 25%, rgb(255 255 255 / .145) 50%, rgb(255 255 255 / .055) 75%, rgb(255 255 255 / 0)); color: #7a7a7a; font: bold 13.3333px/26px Arial, sans-serif; cursor: pointer; box-shadow: 1px 1px 3px #ececec; }
.afdr-site .afdr-contact-form button:hover,
.afdr-contact-form button:hover { background-image: linear-gradient(rgb(255 255 255 / 0), rgb(255 255 255 / .28)); color: #7a7a7a; }
.afdr-honeypot { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.afdr-form-message { margin: 0 0 20px; padding: 10px 15px; border: 1px solid #badeb1; background: #e1ffd9; color: #435b3d; }
.afdr-form-message.is-error { border-color: #e9b9bb; background: #ffdcdd; color: #713a3c; }

/* Lightbox ---------------------------------------------------------------- */
.afdr-lightbox { max-width: min(1000px, 95vw); max-height: 95vh; border: 0; padding: 40px 15px 15px; background: #fff; }
.afdr-lightbox::backdrop { background: rgb(0 0 0 / .8); }
.afdr-lightbox img { display: block; width: auto; max-width: 100%; height: auto; max-height: 80vh; margin: auto; }
.afdr-lightbox button { position: absolute; top: 9px; right: 12px; border: 0; background: #fff; color: #333; padding: 3px 7px; font-size: 13px; }

.afdr-contact-form :focus-visible,
.afdr-slideshow :focus-visible,
.afdr-work-card a:focus-visible { outline: 2px solid #777; outline-offset: 2px; }

/* Smartphones (WordPress stacks the column blocks at the same width) ---------- */
@media (max-width: 781px) {
  .afdr-portfolio-grid,
  .afdr-portfolio-grid--2,
  .afdr-portfolio-grid--3 { grid-template-columns: minmax(0, 1fr); }
  .afdr-site .site-body .afdr-work-card h2,
  .afdr-work-card h2 { font-size: 14px; line-height: 1.5; }

  .afdr-sidebar-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .afdr-sidebar { padding-top: 20px; }
  .afdr-blog-card { margin-bottom: 40px; }
  .afdr-blog-meta { float: none; display: flex; flex-wrap: wrap; gap: 0 14px; width: auto; margin: 0 0 8px; font-size: 12px; }
  .afdr-blog-meta > div { margin: 0; }
  .afdr-site .site-body .afdr-blog-card h2,
  .afdr-blog-card h2 { padding-bottom: 10px; font-size: 18px; line-height: 1.4; }
  .afdr-blog-card h2 a { line-height: 1.4; }
  .afdr-site .afdr-widget li { line-height: 1.5; }
  .afdr-widget li::before { top: 15px; }

  .afdr-field label { font-size: 14px; line-height: 1.5; }
  .afdr-contact-form input:not([type=hidden]),
  .afdr-contact-form textarea { width: calc(100% - 22px); max-width: none; font-size: 16px; }
  .afdr-contact-form textarea { width: calc(100% - 32px); }
  .afdr-site .afdr-contact-form button,
  .afdr-contact-form button { height: 40px; padding: 0 24px; font-size: 15px; line-height: 38px; }

  .afdr-pagination { padding-right: 0; line-height: 34px; }
  .afdr-pagination a,
  .afdr-pagination span { height: 32px; line-height: 32px; }

  .afdr-lesson-box { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .afdr-slideshow.is-ready .afdr-slide,
  .afdr-work-card,
  .afdr-work-card a,
  .afdr-work-card__image::before,
  .afdr-work-card__image::after { transition: none; }
}
