* {
    margin: 0;
    padding: 0;
    font-family: "Libre Caslon Text", "Noto Serif JP", sans-serif;
    font-weight: 700;
    font-style: normal;
    animation-delay: 50ms;
    animation:0.2s ease-in-out;
}

:root{
    --bg_color: #fffaf0;
    --base-color: #fffaf0;
    --text-white: #eeeeee;
    --text-color: #222222;
    --text-gray: #444444;
    --light-gray: #888888;
    --sub-color: #888f5c;
    --red: #ee3322;
    --font-size-large: 1.5em;
    --font-size-medium: 1.2em;
    --font-size-small: 0.8em;
    --transparent-white: rgba(255, 255, 255, 0.6);
}

body {
    background-image: url(../site_images/bg.png);
    background-repeat: repeat;
    color : var(--text-color);
}

footer{
    padding:10px 20px;
    text-align: right;
}

.main {
    display: block;
    width:90%;
    height:fit-content;
    margin: 40px auto;
    background-color: var(--bg_color);
}

h1 {
    font-size: 1.8em;
    padding : 2px 40px;
    font-weight:700;
}

/* ヘッダー */

.header-img{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-image: url(../site_images/dark_pasta.png);
    background-repeat: no-repeat;
    background-size:cover;
    background-position: center;
    text-align: center;
    color: var(--text-white);
    font-weight:900;
    text-align: center;
    /* text-transform: uppercase; */
    letter-spacing: 0.2em;
    text-shadow: 2px 2px 5px rgba(0,0, 0, 0.8);
}

.header-large{
    height:calc(90vw*0.32);
    /* padding:15vh; */
}
.header-small{
    height:calc(90vw*0.25);
}

.header-img h2{
    font-size:4em;
    margin:0 auto;
}
.header-img p{
    font-size:var(--font-size-large);
}
.header-img h2{
    letter-spacing: 0.3em;
}
/* 文字の修飾 */
.note{
    text-align: right;
    color: var(--text-gray);
    font-size: var(--font-size-small);
}

/* Mainタグの中のナビゲーション */
#sub-nav{
    text-transform: uppercase;
    width: 45%;
    margin: 50px auto;
}

#sub-nav ul{
    display: flex;
    justify-content: center;
    align-items: center;
    list-style-type: none;
}

#sub-nav li{
    width:30%;
    height:50px;
    text-align: center;
    margin:0 auto;
}

#sub-nav li.selected a{
    font-size: calc(var(--font-size-large) + 0.2em);

}

#sub-nav li.selected{
    background: linear-gradient(transparent 90%, var(--sub-color) 90%, var(--sub-color) 100%);
}
#sub-nav a{
    display:block;
    width:100%;
    height:100%;
    color: var(--text-color);
    text-decoration: none;
    font-size: var(--font-size-large);
    align-items: center;
}

#sub-nav a:hover{
    font-size: calc(var(--font-size-large) + 0.2em);
}

#menu-nav{
    width: 70%;
    margin: 10px auto;
}

#menu-nav h4{
    width: fit-content;
    margin: 0 auto 20px;
    font-size: 1.2rem;
    text-align: center;
    border-color: var(--sub-color);
    border-style:double;
    border-width: 0 0 5px 0;
    padding: 5px 20px;  
}

#menu-nav p{
    font-size:0.9em;
}


#menu-nav ul{
    display: flex;
    justify-content: center;
    align-items: center;
    list-style-type: none;
}

#menu-nav li{
    width:30%;
    height:100px;
    text-align: center;
    margin:0 auto;
}

#menu-nav img{
    height:50px;
    aspect-ratio: 1/1;
}


/* インデックスページのコンテナ表示 */
#topics-container{
    width:90%;
    display: flex;
    justify-content: space-around;
    margin:10px  auto;
}

.topics-card{
    display:block;
    width: 30%;
    border-radius: 2px;
    background-color: var(--transparent-white);
    overflow: hidden;
    font-family: "Noto Serif JP", sans-serif;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.topics-card img{
    width:100%;
    aspect-ratio: 3/2;
    object-fit: cover;
    border-radius: 2px;
}

.topics-card h3{
    padding: 5px 15px;
}

.topics-card p{
    padding: 5px 5px;
    font-weight:600;
    font-size:1em;
}
.topics-card p::before{
    content: "　";
}

/* セパレータ */
.separater-line{
    display:block;
    width:80%;
    height:3px;
    background-color:  var(--sub-color);
    margin: 10px auto;
}

/* 本文セクション */
.section-block {
    width:90%;
    max-width: 860px;
    margin: 0 auto 10px;

}

.section-block h3{
    display: block;
    font-size: var(--font-size-large);
    text-align:center;
    padding:5px 20px;
    margin: 50px auto 10px;
    width:50%;

    border-width:6px 0px 6px 0px;
    border-style: double;
    border-color: var(--sub-color);
}

.section-block h3.text-en{
    text-transform: uppercase;
}

.section-cell {
    background-color: var(--transparent-white);
    border-radius:2px;
    margin: 10px 0;
    padding: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
/* Contactのリスト表示など */
.contact-cell{
    width:60%;
    margin: 0 auto;
}
.contact-cell h4{
    text-align: center;
    font-size: var(--font-size-medium);
    margin: 10px 0;
}
.contact-cell ul{
    list-style-type: none;
}
.contact-cell li::before{
    content:"-";
    padding: 0 5px;
}
.contact-cell li{
    padding: 5px 10px;
    border-width: 0 0 1px 0;
    border-color: var(--sub-color);
    border-style: solid;
    text-wrap: wrap;
}

.contact-header{
    display:inline-block;
    width:100px;
    text-align: center;
    text-transform: uppercase;
}

.contact-data::before{
    content:":　"
}

.contact-data{
    display:inline;
    padding: 0;
}

.contact-cell li p{
    text-align: right;
}

/* ボタン */

.more-link {
    text-align: center; margin-top: 30px;
}
.more-link a { 
    display: inline-block; 
    padding: 15px 40px; 
    text-decoration: none; 
    border-radius: 2px; 
    font-weight: bold;
    color: var(--text-color);
    border-width:1px;
    border-style: solid;
    border-color: var(--sub-color);
}

.more-link.right a{
    display: block;
    margin: 0 20px 0 auto;
    width:fit-content;
}

.more-link a:hover {
    color: white;
    background: var(--sub-color);
}

/* タグボタンのスタイル */
.tag-section {
    width: 95%;
    margin: 0px 0 30px;
    padding: 10px;
    text-align: center;
}
.tag-section h3 {
    margin-bottom: 15px;
}
.tag-info { 
    font-size: 14px; 
    color: var(--text-light-gray); 
    margin-bottom: 10px; 
}
.tag-info .selected-count {
    color: var(--main-color);
    font-weight: bold;
}
.tag-buttons { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 10px; 
    justify-content: center; 
    max-width: 900px; 
    margin: 0 auto; 
}


/* タグボタン（ラベル） */
.tag-btn-wrapper {
    position: relative;
}
.tag-btn-wrapper input[type="checkbox"] {
    display: none; /* チェックボックスを隠す */
}
.tag-btn { 
    padding: 8px 16px; 
    border: 2px solid var(--main-color); 
    color: var(--main-color); 
    border-radius: 2px; 
    border-color: var(--sub-color);
    border-width:1px;
    border-style: solid;
    cursor: pointer; 
    font-size: 1em;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    user-select: none;
}
.tag-btn:hover { 
    background: white; 
    transform: translateY(-2px);
}

/* チェックされた状態 */
.tag-btn-wrapper input[type="checkbox"]:checked + .tag-btn { 
    background: var(--sub-color); 
    color: white; 
    box-shadow: 0 4px 8px rgba(123,123,144,0.5);
}
.tag-btn .count { 
    background: rgba(123,123,123,0.2); 
    padding: 2px 8px; 
    border-radius: 10px; 
    font-size: 12px;
}
.tag-btn-wrapper input[type="checkbox"]:checked + .tag-btn .count {
    background: rgba(255,255,255,0.5);
}

/* 「すべて」ボタン */
.tag-btn.all { 
    border-color: var(--text-gray); 
    color: var(--text-gray); 
}
.tag-btn.all:hover { 
    background: var(--light-gray); 
    color: var(--base-color)
}

.tag-btn.all.active {
    background: var(--text-gray);
    color: var(--base-color);
}

/* .tag-btn.all.active:hover {
    background: var(--tag-btn-all);
    color: white;
} */

.tag-btn-wrapper input[type="checkbox"]:checked + .tag-btn.all { 
    background: var(--tag-btn-all); 
    color: white; 
}

/* flexbox用 */

.flex-container{
    display:flex;
}
.fd-column{
    flex-direction: column;
    justify-content: center;
}
.fd-row{
    flex-direction: row;
    justify-content: center;
    align-items: center;
}
.ac-center{
    align-content: center;
}


/* loading */

#loading {
    transition: all 1s;
    background-color: var(--text-color);
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: 9999;
    inset: 0;
    display: flex;
    flex-direction: column;
    place-items: center;
    justify-content: center;
    align-items:  center;
    font-size: 3rem;
    font-weight:800;
    color :var(--bg_color);
    font-family: "Roboto", sans-serif;
    text-transform: uppercase;
}

#progress_bar {
    display: block;
    width :calc(90%);
    height: 50px;
    border-radius: 10px;
    border-width: 3px;
    border-color: var(--dark_gray);
    border-style: solid;
    padding: 2px;
}
#progress_bar span{
    transition: all 0.2s;
    display: block;
    width :5%;
    height: 100%;
    border-radius: 10px;
    background-color: var(--bg_color);
}

#loading.hidden{
    display:none;
}


/* レスポンシブ */

@media (min-width: 1024px){
    body{
        font-size:18px;
    }
}

@media (max-width: 780px){
    .header-large{
    height:calc(90vw*0.4);

    }
    .header-small{
    height:calc(90vw*0.35);

    }
    #sub-nav{
        width:60%;
    }

    #topics-container{
        width:90%;
        flex-direction: column;
    }

    .topics-card{
        width: 60%;
        margin: 10px auto;
    }
    .contact-cell{
        width:90%;
    }
    .header-img h2{
        font-size:3em;
    }
    .header-img p{
        font-size:var(--font-size-medium);
    }
}

@media (max-width: 480px){
    .main {
        width:95%;
        margin: 10px auto;
        background-color: var(--bg_color);
    }
    #sub-nav{
        width:80%;
    }
    .header-large{
    height:calc(90vw*0.6);

    }
    .header-small{
    height:calc(90vw*0.6);

    }
    .topics-card{
        width: 90%;
        margin: 10px auto;
    }
    .contact-cell{
        width:100%;
    }
    .contact-cell li {
        font-size: var(--font-size-small);
    }

    .more-link.right a{
        margin: 0 auto;
    }
}