/* Fun fact page (豆知識, page-fun-fact.php).
   Breadcrumb base comes from page-food-inspection.css (enqueued together);
   CTA + footer render via footer.php. */

:root { --ff-teal: #008b94; --ff-teal-dark: #006b72; }

.ff-band-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}
.ff-band {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 10px;
    gap: 10px;
    min-height: 63px;
    background: rgba(0, 143, 141, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.ff-band-title {
    margin: 0;
    color: #FFFFFF;
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 700;
    font-size: 36px;
    line-height: 43px;
    letter-spacing: -0.02em;
}

.ff-breadcrumb-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 2rem 0;
}

.ff-main { padding-bottom: 8px; }
.ff-inner {
    box-sizing: border-box;
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 2rem 40px;
}
.ff-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Card layout — Figma Frame 1000006710. */
.ff-card {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    gap: 24px;
    background: #FFFFFF;
    border: 1px solid #008F8D;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.16);
    border-radius: 8px;
}
.ff-card-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}
.ff-card-head {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    width: 100%;
    min-width: 0;
}
.ff-card-icon {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: #E5F8F8;
    border: 1px solid #008F8D;
}
.ff-card-icon img { display: block; width: 24px; height: 24px; }
.ff-card-title {
    min-width: 0;
    margin: 0;
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 700;
    font-size: 20px;
    line-height: 32px;
    letter-spacing: -0.02em;
    color: #061C3D;
    overflow-wrap: anywhere;
    word-break: normal;
}
.ff-card-excerpt {
    width: 100%;
    margin: 0;
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 150%;
    color: #061C3D;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
}

.ff-card-btn {
    align-self: flex-end;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 206px;
    max-width: 100%;
    height: 48px;
    background: #008F8D url('../../images/btn_background_blue_v2.png') center/cover no-repeat;
    border-radius: 8px;
    color: #FFFFFF;
    text-decoration: none;
    transition: filter .15s ease, transform .15s ease;
}
.ff-card-btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.ff-card-btn-label {
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 700;
    font-size: 20px;
    line-height: 32px;
    letter-spacing: -0.02em;
}
.ff-card-btn-arrow { display: inline-flex; }
.ff-card-btn-arrow img { display: block; width: 24px; height: 24px; }

.ff-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    margin-top: 26px;
}
.ff-pg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    font-family: 'Poppins', 'Noto Sans JP', sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: #000;
    text-decoration: none;
    background: transparent;
    box-sizing: border-box;
    transition: background .15s ease, color .15s ease;
}
.ff-pg:hover:not(.active):not(.ellipsis):not(.disabled) { background: #f0f0f0; }
.ff-pg.active {
    background: var(--ff-teal);
    color: #fff;
    box-shadow: 0 1px 2px -1px rgba(17, 12, 34, 0.08);
}
.ff-pg.prev, .ff-pg.next {
    background: #fff;
    border: 1px solid #ECECED;
    color: #061C3D;
    box-shadow: 0 1px 2px -1px rgba(17, 12, 34, 0.08);
}
.ff-pg.prev { margin-right: 24px; }
.ff-pg.next { margin-left: 24px; }
.ff-pg.prev.disabled, .ff-pg.next.disabled { color: #C3CAD4; cursor: not-allowed; }
.ff-pg.ellipsis {
  background: transparent;
  color: #000000;
  box-shadow: none;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateY(4px);
  cursor: default;
  pointer-events: none;
}

@media (max-width: 1024px) {
    .ff-band-wrap, .ff-breadcrumb-wrap, .ff-inner {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (max-width: 768px) {
    .ff-band-wrap, .ff-breadcrumb-wrap, .ff-inner { padding-left: 1rem; padding-right: 1rem; }
    .ff-inner { padding-top: 20px; padding-bottom: 28px; }
    .ff-band-title { font-size: 24px; line-height: 32px; letter-spacing: -0.01em; }
    .ff-band { padding: 8px 16px; min-height: 52px; }

    .ff-list { gap: 16px; }
    .ff-card { padding: 16px; gap: 16px; }
    .ff-card-body { gap: 8px; }
    .ff-card-head { align-items: flex-start; gap: 12px; }
    .ff-card-icon { width: 40px; height: 40px; padding: 8px; }
    .ff-card-icon img { width: 22px; height: 22px; }
    .ff-card-title { font-size: 16px; line-height: 24px; }
    .ff-card-excerpt { font-size: 13px; line-height: 1.55; -webkit-line-clamp: 3; line-clamp: 3; }

    .ff-card-btn { justify-content: center; align-self: flex-end; height: 44px; }
    .ff-card-btn-label { font-size: 16px; line-height: 24px; }
    .ff-card-btn-arrow img { width: 20px; height: 20px; }

    /* Allow wrap so many page numbers fit on narrow viewports. */
    .ff-pagination { flex-wrap: wrap; gap: 6px; margin-top: 20px; }
    .ff-pg { width: 36px; height: 36px; font-size: 13px; }
    .ff-pg.prev, .ff-pg.next { margin-left: 0; margin-right: 0; }
}

@media (max-width: 480px) {
    .ff-band-wrap, .ff-breadcrumb-wrap, .ff-inner { padding-left: 12px; padding-right: 12px; }
    .ff-band-title { font-size: 20px; line-height: 28px; }
    .ff-band { padding: 6px 14px; min-height: 46px; }
    .ff-card { padding: 14px; gap: 14px; }
    .ff-card-title { font-size: 15px; line-height: 22px; }
    .ff-card-excerpt { font-size: 12px; }
    .ff-card-icon { width: 36px; height: 36px; padding: 6px; }
    .ff-card-icon img { width: 20px; height: 20px; }
    .ff-card-btn { height: 42px; }
    .ff-card-btn-label { font-size: 15px; }
    .ff-pg { width: 32px; height: 32px; font-size: 12px; }
    .ff-pg.ellipsis { min-width: 16px; }
}

@media (max-width: 360px) {
    .ff-card-head { gap: 10px; }
    .ff-card-icon { width: 32px; height: 32px; padding: 5px; }
    .ff-card-icon img { width: 18px; height: 18px; }
    .ff-card-title { font-size: 14px; line-height: 21px; }
    .ff-card-btn-label { font-size: 14px; }
    .ff-pagination { gap: 4px; }
    .ff-pg { width: 30px; height: 30px; }
}

/* Detail page styling (matches legacy trivia detail UI) */
.ff-detail-container {
    background: #ffffff;
    border-radius: 8px;
    padding: 32px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 40px;
}

.pages-contents {
    line-height: 2;
    color: #061C3D;
    font-family: 'Noto Sans JP', sans-serif;
}

.pages-contents section {
    margin-top: 36px;
}

.pages-contents section:first-child {
    margin-top: 0;
}

.pages-contents h3 {
    text-align: left;
    font-size: 1.6rem;
    line-height: 1.4;
    font-weight: 700;
    color: #061C3D;
    margin-bottom: 12px;
}

.pages-writer {
    text-align: right;
    margin-top: 12px;
    font-size: 0.95rem;
    color: #555555;
    line-height: 1.6;
}

.pages-contents h4 {
    text-align: left;
    font-size: 1.3rem;
    font-weight: 700;
    color: #061C3D;
    border-bottom: solid 3px #E2E8F0;
    padding-bottom: 8px;
    margin-bottom: 20px;
}

.pages-contents h5 {
    text-align: left;
    font-size: 1.1rem;
    font-weight: 700;
    color: #061C3D;
    border-left: solid 4px #008F8D;
    border-bottom: solid 1px #008F8D;
    padding-left: 10px;
    margin-top: 24px;
    margin-bottom: 16px;
}

.pages-contents h6 {
    text-align: left;
    font-size: 1rem;
    font-weight: 700;
    color: #061C3D;
    border-left: solid 4px #008F8D;
    padding-left: 10px;
    margin-top: 24px;
    margin-bottom: 16px;
}

.pages-contents .text {
    text-align: left;
    line-height: 2;
    font-size: 1rem;
}

.pages-contents .text p {
    text-indent: 1em;
    margin-bottom: 1em;
}

.pages-contents .text p.indent-off {
    text-indent: 0;
}

.pages-contents .text-def p {
    text-indent: 0;
}

.float-center {
    text-align: center;
    margin-top: 24px;
    margin-bottom: 24px;
}

.float-center figure {
    margin: 0 auto;
}

.float-center img {
    max-width: 100%;
    height: auto;
    display: inline-block;
}

.float-center .caption {
    text-align: center;
    font-weight: 700;
    line-height: 1.6;
    margin-top: 8px;
    font-size: 0.9rem;
    color: #333;
}

.pages-contents .document {
    text-align: left;
    background: #E5F8F8;
    padding: 24px;
    border-radius: 8px;
    margin-top: 32px;
}

.pages-contents .document h4 {
    position: relative;
    font-size: 1.15rem;
    font-weight: 700;
    border: 0;
    padding-left: 28px;
    margin-bottom: 16px;
    color: #061C3D;
}

.pages-contents .document h4::before {
    content: '';
    display: inline-block;
    width: 18px;
    height: 18px;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23008F8D'%3E%3Cpath d='M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 16H8v-2h8v2zm0-4H8v-2h8v2zm-3-5V3.5L18.5 9H13z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.pages-contents .document .list-num1 {
    margin: 0;
    padding: 0;
    list-style: none;
}

.pages-contents .document .list-num1 dt {
    width: 2.5em;
    float: left;
    font-weight: 700;
    color: #061C3D;
}

.pages-contents .document .list-num1 dd {
    margin-left: 2.5em;
    margin-bottom: 12px;
    word-break: break-all;
    line-height: 1.6;
    color: #333333;
}

.pages-contents .document .list-num1 dd::after {
    content: '';
    display: block;
    clear: both;
}

.pages-contents a {
    color: #008F8D;
    text-decoration: underline;
    word-break: break-all;
    transition: color 0.2s ease;
}

.pages-contents a:hover {
    color: #006664;
    text-decoration: none;
}

.pages-contents a.wrapback {
    word-break: break-all;
    overflow-wrap: anywhere;
}

.pages-forlist {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: 40px;
    margin-bottom: 20px;
}

.pages-forlist a,
.pages-forlist .sn-single-close-btn {
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 106px;
    height: 32px;
    background: #008F8D;
    border-radius: 8px;
    font-family: 'Noto Sans JP', sans-serif;
    font-style: normal;
    font-weight: 700;
    font-size: 16px;
    line-height: 32px;
    letter-spacing: -0.02em;
    color: #FFFFFF;
    text-decoration: none;
    transition: opacity .15s ease;
    margin: 0 auto;
}

.pages-forlist a::after,
.pages-forlist .sn-single-close-btn::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 53px;
    height: 100%;
    background: url('../../images/path_short.png') right center / 100% 100% no-repeat;
    pointer-events: none;
    z-index: 1;
    border-radius: 0 8px 8px 0;
}

.pages-forlist a > span,
.pages-forlist .sn-single-close-btn > span {
    position: relative;
    z-index: 2;
    width: 56px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.pages-forlist a:hover,
.pages-forlist .sn-single-close-btn:hover {
    opacity: 0.9;
    color: #FFFFFF;
    text-decoration: none;
}

@media (max-width: 768px) {
    .ff-detail-container {
        padding: 20px;
    }
    .pages-contents h3 {
        font-size: 1.3rem;
    }
    .pages-contents h4 {
        font-size: 1.15rem;
    }
}

