/*
 * AGM Mockup Theme Styles
 * Based on mockup-to-html/index.html
 */

:root {
    --orange: #ea6b1f;
    --orange-dark: #d65f17;
    --ink: #2b2b2b;
    --muted: #6b6b6b;
    --cream: #fbf7f1;
    --line: #ececec;
    --teal: #3aa0a0;
    --pink: #e8709a;
    --yellow: #f4c531;
    --blue: #3d7ec9;
}

/* Layout overrides */
#background {
    display: none;
}

#pc-menu,
.header-area,
.mobile-menu-content {
    display: none !important;
}

body {
    font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "Meiryo", "Noto Sans JP", sans-serif;
    font-weight: 500;
    color: var(--ink);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    background: #ffffff;
}

p,
li,
dd,
dt,
label,
figcaption,
blockquote {
    font-weight: 500;
}

html {
    background: #ffffff;
}

#content {
    margin: 0 !important;
    width: 100% !important;
    max-width: none !important;
    background: #ffffff;
    box-shadow: none;
}

#content::before {
    display: none;
}

#main-content {
    padding: 0;
}

.container {
    max-width: 1120px;
    margin: 20px auto;
    padding: 0 24px;
    box-sizing: border-box;
}

.homepage-mockup .container {
    width: 100%;
    max-width: 1120px;
    margin: 20px auto;
    padding-left: 24px;
    padding-right: 24px;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Header – override legacy mobile-first.css `header` rules */
header.site-header,
header.site-header:before {
    background: #fff !important;
    color: var(--ink) !important;
    max-width: none;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap;
}

header.site-header:before {
    display: none !important;
    content: none;
}

header.site-header a:link,
header.site-header a:visited {
    color: #444;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: #fff;
    border-bottom: 1px solid var(--line);
}

.site-header .nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 84px;
    gap: 16px;
}

.site-header .brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.site-header .brand .logo {
    width: 120px;
    height: auto;
    flex-shrink: 0;
    display: block;
}

.site-header .nav-links {
    display: flex;
    align-items: center;
    gap: 34px;
    flex-shrink: 0;
}

.site-header .nav-links a {
    font-size: 15px;
    font-weight: 600;
    color: #444;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.4;
}

.site-header .nav-links a.active,
.site-header .nav-links a:hover {
    color: var(--orange);
}

.site-header .btn-official {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--orange);
    border: none;
    padding: 11px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}

header.site-header a.btn-official:link,
header.site-header a.btn-official:visited,
header.site-header a.btn-official:hover,
header.site-header a.btn-official:active {
    color: #fff;
}

.site-header .btn-official:hover {
    background: var(--orange-dark);
}

.site-header .mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--ink);
}

.site-header .mobile-nav-panel {
    display: none;
    background: #fff;
    border-top: 1px solid var(--line);
    padding: 16px 24px 24px;
}

.site-header .mobile-nav-panel.active {
    display: block;
}

.site-header .mobile-nav-panel ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-header .mobile-nav-panel li {
    border-bottom: 1px solid var(--line);
}

.site-header .mobile-nav-panel a {
    display: block;
    padding: 14px 0;
    font-size: 15px;
    font-weight: 600;
    color: #444;
    text-decoration: none;
}

.site-header .mobile-nav-panel a.active,
.site-header .mobile-nav-panel a:hover {
    color: var(--orange);
}

.site-header .mobile-nav-panel .btn-official {
    margin-top: 16px;
    justify-content: center;
    width: 100%;
}

/* Inner page search strip */
.inner-search-strip {
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    padding: 20px 0;
}

.inner-search-strip .search-card {
    margin-top: 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .04);
}

/* Hero */
.hero {
    position: relative;
    padding: 64px 0 40px;
    overflow: hidden;
    isolation: isolate;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.homepage-mockup {
    position: relative;
    overflow: hidden;
}

.hero-shapes {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(1120px, calc(100% - 48px));
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1.05fr;
    gap: 40px;
    align-items: center;
}

.hero-grid > div:first-child {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 46px;
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: .01em;
    margin-bottom: 28px;
}

.hero h1 .accent {
    color: var(--orange);
}

.hero p {
    font-size: 15px;
    color: #555;
    max-width: 420px;
}

.hero-img-wrap {
    position: relative;
}

.hero-img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    border-radius: 48% 52% 55% 45% / 55% 48% 52% 45%;
}

.shape {
    position: absolute;
    pointer-events: none;
}

.shape-dot {
    border-radius: 50%;
}

/* コンテナ基準：テキスト列の左余白・列間・画像列右 */
.shape-star {
    top: 72px;
    left: -6px;
    width: 34px;
    height: 34px;
    background: var(--yellow);
    clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.shape-dot--orange {
    top: 128px;
    left: 47%;
    width: 14px;
    height: 14px;
    background: var(--orange);
}

.shape-dot--teal {
    top: 58px;
    left: 66%;
    width: 18px;
    height: 18px;
    background: var(--teal);
}

.shape-arc {
    top: 72px;
    right: -24px;
    width: 60px;
    height: 60px;
    background: var(--blue);
    border-radius: 0 0 60px 0;
    opacity: 0.75;
}

.shape-dot--teal-bottom {
    bottom: 210px;
    left: -12px;
    width: 16px;
    height: 16px;
    background: var(--teal);
}

.shape-pink {
    bottom: 36px;
    left: 44%;
    width: 30px;
    height: 22px;
    background: var(--pink);
    border-radius: 0 0 30px 30px;
    transform: rotate(20deg);
}

/* Search card */
.search-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .06);
    padding: 30px 34px 26px;
    margin-top: 30px;
}

.search-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 18px;
}

.search-title svg {
    color: var(--orange);
}

.search-row {
    display: flex;
    gap: 14px;
}

.search-row input[type="text"] {
    flex: 1;
    height: 52px;
    border: 1px solid #e2e2e2;
    border-radius: 8px;
    padding: 0 16px;
    font-size: 15px;
    background: #faf9f7;
    width: auto;
}

.search-row select {
    width: 180px;
    height: 52px;
    border: 1px solid #e2e2e2;
    border-radius: 8px;
    padding: 0 14px;
    font-size: 14px;
    background: #faf9f7;
    color: #555;
}

.search-row button[type="submit"] {
    background: var(--orange);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0 34px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    min-width: auto;
    height: 52px;
}

.search-row button[type="submit"]:hover {
    background: var(--orange-dark);
}

.search-row button[type="submit"]::before {
    content: none;
}

.keywords {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
    font-size: 13px;
}

.keywords .label {
    color: #777;
    font-weight: 600;
}

.chip {
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 13px;
    color: #555;
    background: #fff;
    text-decoration: none;
}

.chip:hover {
    border-color: var(--orange);
    color: var(--orange);
}

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
    padding: 64px 0 20px;
}

.feature {
    text-align: center;
}

.feature .ico {
    width: min(100%, 220px);
    aspect-ratio: 1;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: transparent;
    overflow: visible;
}

.feature .ico img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.feature h3 {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 8px;
}

.feature p {
    font-size: 13px;
    color: #777;
}

.feature a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.feature a:hover h3 {
    color: var(--orange);
}

/* Culture */
.homepage-mockup section.container.culture {
    padding: 50px 24px;
}

.culture {
    position: relative;
    padding: 50px 0;
    overflow: visible;
}

.culture-shapes {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.culture .culture-grid {
    position: relative;
    z-index: 1;
}

.shape-dot--blue {
    top: 18%;
    right: -20px;
    width: 20px;
    height: 20px;
    background: var(--blue);
    opacity: 0.55;
}

.shape-pink--culture {
    bottom: 8%;
    left: 4%;
    width: 28px;
    height: 20px;
    background: var(--pink);
    border-radius: 0 0 28px 28px;
    transform: rotate(-12deg);
}

.culture-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 50px;
    align-items: center;
}

.culture h2 {
    font-size: 34px;
    font-weight: 800;
    line-height: 1.5;
    margin-bottom: 22px;
}

.culture h2 .accent {
    color: var(--orange);
}

.culture p {
    font-size: 14.5px;
    color: #555;
    margin-bottom: 26px;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--orange);
    color: #fff;
    padding: 13px 26px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
}

.btn-outline:hover {
    background: var(--orange-dark);
    color: #fff;
}

.culture-imgs {
    position: relative;
    height: 400px;
}

.culture-imgs .img-large {
    position: absolute;
    top: 0;
    left: 0;
    width: 58%;
    height: 220px;
    object-fit: cover;
    border-radius: 46% 54% 50% 50% / 60% 55% 45% 40%;
    z-index: 1;
}

.culture-imgs .img-mid {
    position: absolute;
    top: 28%;
    right: 0;
    width: 52%;
    height: 210px;
    object-fit: cover;
    border-radius: 50% 50% 55% 45% / 55% 45% 55% 45%;
    z-index: 2;
}

.culture-imgs .img-small {
    position: absolute;
    bottom: 0;
    left: 22%;
    width: 48%;
    height: 190px;
    object-fit: cover;
    border-radius: 48% 52% 55% 45% / 55% 48% 52% 45%;
    z-index: 3;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .08);
}

/* Category */
.category {
    background: var(--cream);
    border-radius: 28px;
    padding: 48px 40px 56px;
    margin: 30px 0;
}

.section-title {
    text-align: center;
    font-size: 30px;
    font-weight: 800;
    margin-bottom: 36px;
}

.cat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 26px;
}

.cat-card {
    background: transparent;
}

.cat-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 16px;
}

.cat-card h4 {
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
}

.cat-card p {
    font-size: 12.5px;
    color: #777;
    text-align: center;
    line-height: 1.6;
    margin-bottom: 16px;
}

.btn-browse {
    display: block;
    width: 100%;
    text-align: center;
    border: 1.5px solid var(--orange);
    color: var(--orange);
    border-radius: 8px;
    padding: 9px 0;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.btn-browse:hover {
    background: var(--orange);
    color: #fff;
}

/* Stats */
.stats {
    border: 1px solid #eee;
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 64px;
}

.stats-head h2 {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 12px;
}

.stats-head p {
    font-size: 14px;
    color: #666;
    margin-bottom: 30px;
}

.stats .stats-grid {
    display: grid;
    grid-template-columns: 2fr 1.1fr;
    gap: 30px;
    max-width: none;
    width: 100%;
    margin: 0;
}

.stats .stat-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    max-width: none;
    width: 100%;
}

.stat-card {
    border: 1px solid #eee;
    border-radius: 14px;
    padding: 22px 10px;
    text-align: center;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
}

.stat-card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.stat-card .ico {
    font-size: 26px;
    margin-bottom: 8px;
    display: flex;
    justify-content: center;
}

.stat-card .num {
    font-size: 30px;
    font-weight: 800;
}

.stat-card .lbl {
    font-size: 12px;
    color: #777;
    margin-top: 4px;
}

.stat-side {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.stat-big {
    display: flex;
    align-items: center;
    gap: 18px;
    border: 1px solid #e3eaf3;
    border-radius: 14px;
    padding: 20px 18px;
    background: #f8fbff;
}

.stat-big:last-child {
    border-color: #e0ebe4;
    background: #f7fbf8;
}

.stat-big .box {
    width: 54px;
    height: 54px;
    border-radius: 12px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    background: #f3f7fb;
    color: var(--blue);
}

.stat-big .num {
    font-size: 34px;
    font-weight: 800;
    color: var(--blue);
    line-height: 1;
}

.stat-big .lbl {
    font-size: 13px;
    color: #777;
}

.stat-big.shelf .box {
    background: #eef4ee;
    color: #5a9c6e;
}

.stat-big.shelf .num {
    color: #5a9c6e;
}

/* Color helpers */
.c-orange { color: var(--orange); }
.c-teal { color: var(--teal); }
.c-blue { color: var(--blue); }
.c-pink { color: var(--pink); }
.bg-orange-soft { background: #fdf0e6; }
.bg-teal-soft { background: #e9f5f4; }
.bg-blue-soft { background: #ecf2fa; }
.bg-pink-soft { background: #fdeef3; }

/* Updates section (homepage) */
.homepage-mockup section.container.updates-section {
    padding: 40px 24px 20px;
}

.updates-section {
    padding: 40px 0 20px;
}

.updates-list {
    display: grid;
    gap: 0;
}

.update-item {
    display: flex;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.update-item:last-child {
    border-bottom: none;
}

.update-date {
    font-size: 14px;
    color: var(--muted);
    font-weight: 500;
    min-width: 100px;
    margin-right: 20px;
}

.update-title a {
    color: var(--orange);
    font-weight: 600;
    text-decoration: underline;
}

.update-more-link {
    text-align: right;
    margin-top: 12px;
}

.update-more-link a {
    color: var(--orange);
    font-weight: 600;
    text-decoration: none;
}

/* Inner pages */
.is-inner-page #main-content {
    padding: 32px 0 48px;
}

.is-inner-page .inner-page-content {
    width: 100%;
}

.is-inner-page .inner-page-content .blocks {
    max-width: none;
    margin: 0;
}

/* Referencing cards (show page) */
.referencing-item-card,
.referencing-resource-card {
    border: 1.5px solid #f0d4bc;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: none;
}

.referencing-item-card:hover,
.referencing-resource-card:hover {
    border-color: var(--orange);
    box-shadow: 0 4px 16px rgba(234, 107, 31, 0.1);
}

.referencing-item-card .card-header,
.referencing-resource-card .card-header {
    background: #fdf0e6;
    color: var(--orange);
    border-bottom: 1px solid #f5dcc8;
    font-weight: 700;
}

.referencing-item-card .card-header i,
.referencing-item-card .card-header i::before,
.referencing-resource-card .card-header i,
.referencing-resource-card .card-header i::before {
    color: var(--orange);
}

.referencing-item-card .card-header .item-type,
.referencing-resource-card .card-header .item-type {
    color: var(--orange);
}

.referencing-item-card .identifier a,
.referencing-resource-card .resource-title a {
    color: var(--orange);
    font-weight: 600;
}

.referencing-item-card .identifier a:hover,
.referencing-resource-card .resource-title a:hover {
    color: var(--orange-dark);
}

/* Browse result cards */
.result-card {
    border: 1px solid #e2e2e2;
    border-radius: 7px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.result-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Footer */
footer {
    border-top: 1px solid var(--line);
    margin-top: 0;
    padding: 2rem 0 1rem;
    background: #fff;
}

.footer-content {
    max-width: 1120px;
}

.footer-text a {
    color: var(--orange);
}

.scroll-to-top {
    background: var(--orange);
    top: -47px;
}

.scroll-to-top:hover {
    background: var(--orange-dark);
}

.footer-logo {
    filter: none;
    opacity: 1;
}

/* Responsive */
@media (max-width: 900px) {
    .site-header .nav-links,
    .site-header .btn-official {
        display: none;
    }

    .site-header .mobile-nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .hero-grid,
    .culture-grid,
    .stats .stats-grid {
        grid-template-columns: 1fr;
    }

    .features,
    .cat-grid,
    .stats .stat-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero h1 {
        font-size: 34px;
    }

    .shape-star {
        top: 48px;
        left: 4px;
        width: 24px;
        height: 24px;
    }

    .shape-dot--orange {
        left: 52%;
        top: 100px;
    }

    .shape-dot--teal {
        left: 78%;
        top: 40px;
    }

    .shape-arc {
        right: -8px;
        width: 48px;
        height: 48px;
    }

    .shape-dot--teal-bottom {
        bottom: 280px;
        left: 4px;
    }

    .shape-pink {
        left: 50%;
        bottom: 24px;
    }

    .culture-imgs {
        height: 340px;
    }

    .culture-imgs .img-small {
        left: 10%;
        width: 55%;
    }

    .search-row {
        flex-wrap: wrap;
    }

    .search-row select,
    .search-row button[type="submit"] {
        width: 100%;
    }

    .culture-imgs {
        height: 320px;
    }

    .homepage-mockup section.container.updates-section,
    .homepage-mockup section.container.culture,
    .homepage-mockup .container {
        padding-left: 24px;
        padding-right: 24px;
    }

    .homepage-mockup section.container.culture {
        overflow-x: clip;
    }

    .category {
        padding: 32px 20px 40px;
    }

    .stats {
        padding: 24px 20px;
    }
}

@media (max-width: 520px) {
    .features,
    .cat-grid,
    .stats .stat-cards {
        grid-template-columns: 1fr;
    }

    .feature .ico {
        max-width: 280px;
    }

    .hero {
        padding: 40px 0 24px;
    }

    .hero-img {
        height: 280px;
    }

    .search-card {
        padding: 20px;
    }

    .update-item {
        flex-direction: column;
        gap: 4px;
    }

    .update-date {
        min-width: auto;
        margin-right: 0;
    }

    .homepage-mockup section.container.updates-section,
    .homepage-mockup section.container.culture,
    .homepage-mockup .container {
        padding-left: 20px;
        padding-right: 20px;
    }
}
