@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;900&family=Noto+Sans+JP:wght@400;500;600;700&display=swap');

:root {
    --siaf-button: #242424;
    --siaf-bg: #F0EDE6;
}

body {
    font-family: 'Noto Sans JP', 'Montserrat', sans-serif;
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

/* Override Bootstrap container to match Tailwind max-w-7xl (1280px) */
.container-site {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* Main content text size: match production (1rem on all screens) */
main {
    font-size: 1rem;
    line-height: 1.5rem;
}

.bg-siaf-button { background-color: var(--siaf-button); }
.bg-siaf-bg { background-color: var(--siaf-bg); }
.btn-siaf {
    background-color: var(--siaf-button);
    color: #fff;
    border: none;
    padding: 0.5rem 2rem;
}
.btn-siaf:hover { background-color: rgba(36,36,36,0.8); color: #fff; }

/* Section spacing: mb-32 = 8rem to match original */
.section-gap { margin-bottom: 8rem; }

/* Category badge colors */
.badge-exhibition { background-color: #D3A950; }
.badge-theater { background-color: #C75B5B; }
.badge-music { background-color: #9B6BB5; }
.badge-performance { background-color: #D96BA0; }
.badge-workshop { background-color: #0779CA; }
.badge-talk { background-color: #2B9A8F; }
.badge-graduation { background-color: #5B6BB5; }
.badge-outdoor { background-color: #5BA85B; }
.badge-children-rec { background-color: #FF8D5C; }
.badge-children-ok { background-color: #5BACBF; }
.badge-age-limit { background-color: #7A7A7A; }
.badge-other { background-color: #8B8B8B; }
.badge-barrier-free { background-color: #D3A950; }

/* Category badge sizing: mobile px-1 py-0 text-[10px], md+ px-3 py-1 text-[12px] */
.cat-badge {
    display: inline-block;
    width: fit-content;
    padding: 0 0.25rem;
    font-size: 10px;
    font-weight: bold;
    line-height: 1.4;
    border-radius: 0;
}
@media (min-width: 768px) {
    .cat-badge {
        padding: 0.25rem 0.75rem;
        font-size: 12px;
    }
}

/* Event card title: text-sm md:text-xl */
.card-title-text {
    font-size: 0.875rem;
    font-weight: bold;
}
@media (min-width: 768px) {
    .card-title-text {
        font-size: 1.25rem;
    }
}

/* Event card info: text-xs md:text-base */
.card-info-text {
    font-size: 0.75rem;
}
@media (min-width: 768px) {
    .card-info-text {
        font-size: 1rem;
    }
}

/* Event card */
.event-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background-color: var(--siaf-bg);
}
.event-card .card-img-top {
    height: 200px;
    object-fit: contain;
    width: 100%;
    background-color: #e9ecef;
}
@media (min-width: 768px) {
    .event-card .card-img-top { height: 250px; }
}

/* Event grid: match original auto-rows-fr behavior */
.event-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 1fr;
    gap: 1rem;
}
@media (min-width: 1200px) {
    .event-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Offcanvas */
.offcanvas-nav { background-color: #242424 !important; }
.offcanvas-nav .nav-link { color: #fff; font-weight: bold; }
.offcanvas-nav .nav-link:hover { color: #ccc; }

/* Scroll to top */
#scrollToTop {
    position: fixed;
    bottom: 8rem;
    right: 0;
    z-index: 50;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
#scrollToTop.visible { opacity: 1; pointer-events: auto; }

/* Header banner */
.header-banner { background-size: cover; background-position: center; background-repeat: no-repeat; }
.header-banner-full { aspect-ratio: 1921 / 479; }
.header-banner-sp { aspect-ratio: 4126 / 3000; }

/* Map: original uses aspect-[3/2] on mobile, aspect-[2/1] on md+ */
.map-container {
    aspect-ratio: 3 / 2;
    width: 100%;
    background-color: #D9D9D9;
}
.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
}
@media (min-width: 768px) {
    .map-container {
        aspect-ratio: 2 / 1;
    }
}

/* SIAF banner: aspect-[16/9] container with centered image */
.siaf-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 9;
    background-color: #000;
}
.siaf-banner img {
    height: 80%;
    width: auto;
}

/* Section with inner width constraint: md:w-3/4 md:max-w-[800px] */
.section-narrow {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}
@media (min-width: 768px) {
    .section-narrow {
        width: 75%;
        max-width: 800px;
    }
}

/* Description item */
.desc-item {
    border-bottom: 1px solid #ccc;
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
}
.desc-item:last-child { border-bottom: none; }
.desc-item dt { font-weight: bold; font-size: 1rem; margin-bottom: 0.25rem; }

/* Remaining days badge */
.remaining-badge { position: absolute; left: 1rem; top: 1rem; z-index: 2; }

/* Category badge overlay */
.category-badges-overlay {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}
@media (min-width: 768px) {
    .category-badges-overlay { top: 1rem; bottom: auto; }
}

/* Language switcher */
.lang-switcher a { text-decoration: none; font-weight: 900; font-size: 1.1rem; }
.lang-switcher a.active { opacity: 1; }
.lang-switcher a.inactive { opacity: 0.5; }

/* Event detail sidebar */
.event-sidebar { background-color: #eee; padding: 1.5rem; }
@media (min-width: 768px) {
    .event-sidebar { padding: 2rem 2rem; width: 400px; flex-shrink: 0; align-self: flex-start; }
}

/* Event detail layout: match original flex layout */
.event-detail-layout {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3rem;
}
@media (min-width: 768px) {
    .event-detail-layout {
        flex-direction: row;
    }
}
.event-detail-main {
    flex: 1;
}

/* Sidebar negative margin on mobile to match original -mx-4 */
@media (max-width: 767.98px) {
    .event-sidebar {
        margin-left: -1.5rem;
        margin-right: -1.5rem;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* Search form: match original px-4 sm:px-16 md:px-6 */
.search-form-wrap {
    border-radius: 0.375rem;
    background-color: var(--siaf-bg);
    padding: 0.75rem 1rem 0.75rem 1rem;
}
@media (max-width: 767.98px) {
    .search-form-wrap {
        margin-left: -1.5rem;
        margin-right: -1.5rem;
        border-radius: 0;
        padding-left: 1rem;
        padding-right: 1rem;
    }
}
@media (min-width: 576px) and (max-width: 767.98px) {
    .search-form-wrap {
        padding-left: 4rem;
        padding-right: 4rem;
    }
}

/* Footer spacing: match original grid-cols-1 md:grid-cols-4 gap-8 mb-12 */
.footer-links {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}
@media (min-width: 768px) {
    .footer-links {
        grid-template-columns: repeat(4, 1fr);
    }
}
.footer-org {
    margin-bottom: 3rem;
}

/* About title image: w-full on mobile, md:w-1/2, centered */
.about-title-img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 auto 1rem;
}
@media (min-width: 768px) {
    .about-title-img {
        width: 50%;
    }
}

/* Text sizes matching original */
.text-home-main {
    font-size: 1rem;
    line-height: 2;
    white-space: pre-line;
}
@media (min-width: 768px) {
    .text-home-main {
        font-size: 1.125rem;
        line-height: 2;
    }
}

/* Heading2 style: match original mb-8 mt-[16px] text-center text-xl font-bold md:mb-16 md:text-5xl */
.heading-section {
    font-weight: bold;
    font-size: 1.25rem;
    text-align: center;
    margin-top: 16px;
    margin-bottom: 2rem;
}
@media (min-width: 768px) {
    .heading-section {
        font-size: 3rem;
        margin-bottom: 4rem;
    }
}
/* SIAF heading variant: md:text-4xl */
.heading-section-siaf {
    font-weight: bold;
    font-size: 1.25rem;
    text-align: center;
    margin-top: 16px;
    margin-bottom: 2rem;
}
@media (min-width: 768px) {
    .heading-section-siaf {
        font-size: 2.25rem;
        margin-bottom: 4rem;
    }
}

/* Event card body padding: original p-3 = 0.75rem */
.event-card .card-body {
    padding: 0.75rem;
}
