/* Variables */
:root{    
    --bg: #ffffff;        /* background */ 
    --accent-red: #C0392B;/* headers */
    --matcha: #A7C796;    /* accent */
    --text: #2C2C2C;      /* main text */
    --line: #D8D8D8;      /* borders, subtle lines */
    --card-bg: #F5F1E6;   /* cards */
    --footer-bg: #2C2C2C; /* footer background */
}

html,body {
    min-height:100%;
    max-width: 100%;
    scroll-behavior: smooth;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    background: var(--footer-bg);
}

*[id] {
    scroll-margin-top: 140px;
}

body{
    margin: 0;
    font-family: "Noto Sans JP", "Noto Serif JP", system-ui, "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
    background: var(--bg);
    color: var(--text);
}

.page {
    flex: 1;
    min-height: 100%;
    display: flex;
    justify-content: center;
}

.container {
    flex: 1;
    background: #fff;
    width:100%;
    max-width: 1200px;
    padding: 0 24px; 
}

/* Hide checkbox */
#menu-toggle {
    display: none;
}

/* Top Navigation and Header*/
.site-header {
    margin: 0 0 20px 0; 
    background-color: transparent;
}

.topbar {
    background-color: var(--card-bg);
    width: 100vw;
    position: fixed;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    display: flex;
    justify-content: center;
    padding: 8px 0;
    z-index: 9999;
}

.topbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 24px;
    flex-wrap: wrap;
    max-width: 1200px;
}

.logo {
    margin-top: 8px;
}

.logo img {
    width: 150px;
    height: auto;
}

.topnav {
    display: flex;
    gap: 15px;  
    align-items: center;
    font-size: 18px;
}

.topnav a {
    color: var(--matcha);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s;
    outline: none;
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.topnav a:hover{
    color: var(--accent-red);
    background: rgba(192, 57, 43, 0.15);
}

.topnav a:focus {
    color: var(--accent-red);
    text-decoration: none;
}

.topnav a.active {
    color: var(--accent-red);
    text-decoration: underline;
}

/* Hide hamburger by defailt in desktop */
.hamburger {
    display: none;
}

/* Hero */
.hero img{
    width:100%;
    height:auto;
    object-fit:cover;
    max-width: 1200px;
    margin-top: 90px;
}

/* Photo Gallery Section */
.gallery-title h2{
    position: relative;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    display: inline-block;
    border-radius: 5px;
    background: #FFFFF0;
    color: var(--accent-red);
    font-weight: 700;
    text-align: center;
    box-sizing: border-box;
    margin: 0;
    padding: 8px 15px;
    box-shadow: 0 8px 8px rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.gallery-container {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 15px;
    width: 100%;
    padding: 0;
    box-sizing: border-box;
    margin-top: 10px;
    flex: none;
}

.gallery {
    border: 1px solid #00000015;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.gallery:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.gallery img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    object-position: center;
    flex-shrink: 0;
    display: block;
}

.desc {
    padding: 15px 10px;
    text-align: center;
    font-size: 16px;
    flex: 1;
    display: flex; 
    align-items: center;
    justify-content: center;
}

/* PAGINATION */
.pagination-section {
    display: flex;
    margin: 20px 0;
    align-items: center;
    justify-content: flex-end;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.pagination-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #d1d5db;
    border-radius: 50%;
    background-color: #ffffff;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
}

.pagination-item:hover {
    background-color: #f3f4f6;
    border-color: #9ca3af;
    transform: translate(-1px);
}

.pagination-item.active {
    background-color: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.pagination-item.active:hover {
    background-color: #2563eb;
    border-color: #2563eb;
}

/*
.pagination-item.disabled {
    background-color: #f9fafb;
    color: #d1d5db;
    border-color: #e5e7eb;
    cursor: not-allowed;
}

.pagination-item.disabled:hover {
    background-color: #f9fafb;
    color: #d1d5db;
    border-color: #e5e7eb;
    transform: none;
}
*/

.pagination-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-item svg {
    width: 16px;
    height: 16px;
}

/* FOOTER */
.site-footer {
    background: var(--bg);
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    flex-shrink: 0;
}

.footer-uprow {
    max-width: 1200px;
    padding: 20px 24px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    background: white;
}

.logo-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    height: 80px;
}

.logo-section img {
    width: 200px;
    height: 70px;
    border: 1px solid #ccc;
    padding: 7px;
    margin: -3px;
    border-radius: 4px;
}

.footer-center {
    flex: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 4px; 
    padding: 5px;
    background: #f9f9f9;
    color: var(--text);
    text-align: center;
    gap: 15px;
    margin: 0 auto;
}

.footer-text-box {
    font-size: 14px;
}

.footer-text-box a {
    color: #0066cc;
    text-decoration: underline;
}

.footer-text-box a:hover {
    color: var(--accent-red);
    text-decoration: underline;
}

.qr-code {
    display: flex;
    justify-content: center;
    align-items: center;
}

.qr-code img {
    width: 70px;
    height: 70px;
    background: #f0f0f0;
    border: 2px solid var(--line);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #666;
    text-align: center;
}

.footer-secrow {
    background: var(--footer-bg);
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    padding: 20px 0;
}

.footer-downrow {
    max-width: 1200px;
    padding: 0 24px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.footer-logotext {
    font-family: "Noto Serif JP";
    color: white;
    font-weight: 700;
    width: 100%;
    flex: 1;
}

.footer-center-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 8;
}

.footer-nav.footnav {
    display: flex;
    gap: 20px;  
    align-items: center;
    font-size: 18px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 10px;
}

.footer-nav.footnav a {
    color: white;
    text-decoration: none;
    font-weight: 700;
    padding: 0;
    transition: color 0.2s;
}

.footer-nav.footnav a:hover{
    color: var(--accent-red);
}

.footer-nav.footnav a:focus {
    color: var(--accent-red);
    text-decoration: none;
}

.footer-nav.footnav a.active {
    color: var(--accent-red);
    text-decoration: underline;
}

.site-footer .copyright {
    color: white;
    font-size: 12px;
    text-align: center;
    font-weight: 400;
}

/* MOBILE RESPONSIVE (768px BREAKPOINT) */
@media (max-width: 768px) {
    .container  {
        padding: 0 16px;
    }

    .page {
        max-width: none;
        margin: 0 auto;
    }

    *[id] {
        scroll-margin-top: 100px; 
    }

    /* HEADER AND NAVIGATION */
    .topbar {
        padding: 10px 0;
        position: fixed;
        overflow: hidden;
    }

    .topbar-content {
        padding: 0 16px;
        flex-wrap: wrap;
        position: relative;
    }

    .topbar-content .logo img {
        width: 120px;
    }

    .hamburger {
        display: inline-flex;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 22px;
        cursor: pointer;
        order: 2;
    }

    .hamburger .bar {
        height: 3px;
        background: var(--matcha);
        border-radius: 2px;
        transition: transform 0.25s ease, opacity 0.25s ease;
    }

    .topnav {
        display: none;
        flex-direction: column;
        background: var(--card-bg);
        width: 100%;
        order: 3;
        gap: 0;
        border-top: 1px solid var(--line);
        margin-top: 10px;
    }

    .topnav a {
        display: block;
        padding: 15px 0 5px;
        border-radius: 6px;
        margin: 0;
        font-size: 20px;
        text-align: left;
        border-bottom: 1px solid var(--line);
    }

    .topnav a:last-child {
        border-bottom: none;
    }

    .topbar-content {
        min-height: 60px;
    }

    .topnav a:hover {
        color: var(--accent-red);
        background: rgba(192, 57, 43, 0.15);
    }

    .topnav a:focus {
        color: var(--accent-red);
        text-decoration: none;
    }

    .topnav a.active {
        color: var(--accent-red);
        text-decoration: underline;
    }

    /* SHOW MENU WHEN CHECKBOX IS CHECKED */
    #menu-toggle:checked ~ .page .topnav {
        display: flex !important;
    }
    
    /* ANIMATE HAMBURGER TO X */
    #menu-toggle:checked ~ .page .hamburger .bar:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    #menu-toggle:checked  ~ .page .hamburger .bar:nth-child(2) {
        opacity: 0;
    }

    #menu-toggle:checked ~ .page .hamburger .bar:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    .hero img {
        margin-top: 80px;
    }

    /* Photo Gallery */
    .gallery-title h2 {
        font-size: 20px;
    }

    .gallery-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 0;
        width: 100%;
        margin-top: -15px;
    }
    
    .gallery img {
        height: 180px;
        width: 100%;
        object-fit: cover;
        object-position: center;
    }

    .desc {
        padding: 12px 8px;
        font-size: 14px;
    }

    /* Pagination */
    .pagination {
        gap: 6px;
    }

    .pagination-item {
        width: 36px;
        height: 36px;
        font-size: 13px;
    }

    .pagination-arrow svg {
        width: 14px;
        height: 14px;
    }
 
    /* FOOTER MOBILE */
    .footer-uprow {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        padding: 0 15px 16px
    }

    .footer-center {
        order: 2;
        gap: 10px;
    }

    .logo-section img {
        width: 150px;
        padding: 0 5px;
        margin: 12px;
    }

    .footer-logo {
        order: 1;
        justify-content: center;
    }

    .footer-logotext img {
        width: 120px;
    }

    .qr-code {
        width: 100px;
        height: 100px;
    }

    .footer-downrow {
        flex-direction: column;
        gap: 5px;
        text-align: center;
        padding: 0 16px;
    }

    .footer-center-nav {
        align-items: center;
    }

    .footer-nav.footnav {
        font-size: 16px;
        gap: 15px;
        margin-bottom: 15px;
    }

    .footer-nav.footnav a {
        padding: 2px 8px;
    }
}

/* SMALL MOBILE (480px and below) */
@media (max-width: 480px) {
    .topnav a{
        font-size: 16px;
    }
    .footer-nav.footnav {
        gap: 4px;
    }
        
    .footer-nav.footnav a {
        font-size: 16px;
    }
}


/* EXTRA SMALL SCREENS (375px and below) */  
@media (max-width: 375px) {
    .container {
        padding: 0 8px;
        max-width: none;
    }

    .page {
        max-width: none;
    }

    *[id] {
        scroll-margin-top: 90px; 
    }

    .topbar-content {
        padding: 0 8px;
    }

    .topbar-content .logo img {
        width: 100px;
    }

    .hero img {
        margin-top: 67px;
    }

    /* Photo Gallery */
    .gallery-title h2{
        font-size: 18px;
        padding: 6px 12px;
        margin-top: 4px;
    }

    .gallery-container {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 0;
        margin-top: -15px;
    }

    .gallery {
        border-radius: 6px;
    }

    .gallery img {
        height: 180px;
        object-fit: cover;
    }

    .desc {
        padding: 12px 10px;
        font-size: 13px;
    }
    
    /* Footer */
    .footer-secrow {
        padding: 15px 0;
    }

    .footer-downrow {
        padding: 0 8px;
    }

    .footer-logotext img {
        width: 110px;
    }

    .qr-code {
        width: 80px;
        height: 80px;
        font-size: 10px;
    }

    .footer-nav.footnav {
        gap: 0;
        font-size: 14px;
        display: flex;
        flex-direction: column;
    }
}



