/* Basic CSS reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --gradient-1: linear-gradient(90deg, #a6a6a6, #ffffff);
    --gradient-2: linear-gradient(90deg, #ffffff, #a6a6a6);
    --spacing: 10%;
    --header-height: 130px;
    --max-width: 1200px;
}

@media screen and (max-width: 960px) {
    :root {
        --header-height: 96px;
    }
}
@media screen and (min-width: 1400px) {
    :root {
        --spacing: calc(50% - var(--max-width) / 2);
    }
}

html,
body {
    height: 100%;
    /* font-family: "Noto Serif JP", serif; */
    font-family: "游ゴシック　（レギュラー）";
    line-height: 1.6;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

/* Common Flexbox setup for responsiveness */
.container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.column {
    flex: 1;
    padding: 15px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .column {
        flex: 100%; /* Columns stack on smaller screens */
    }
}
html {
    font-size: 100%; /* 1rem = 16px by default */
}

body {
    font-size: 1rem; /* Base font size */
}

h1 {
    font-size: 2.5rem; /* 40px */
}

h2 {
    font-size: 2rem; /* 32px */
}

h3 {
    font-size: 1.75rem; /* 28px */
}

p {
    font-size: 1rem; /* 16px */
    margin-bottom: 1.5rem;
}

/* Responsive typography */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem; /* 32px */
    }
    h2 {
        font-size: 1.75rem; /* 28px */
    }
    h3 {
        font-size: 1.5rem; /* 24px */
    }
}

/* Margin and padding utilities */
.m-0 {
    margin: 0;
}
.mt-1 {
    margin-top: 1rem;
}
.mb-1 {
    margin-bottom: 1rem;
}
.mt-2 {
    margin-top: 2rem;
}
.mb-2 {
    margin-bottom: 2rem;
}
.p-1 {
    padding: 1rem;
}
.px-2 {
    padding-left: 2rem;
    padding-right: 2rem;
}

/* Text alignment */
.text-center {
    text-align: center;
}
.text-left {
    text-align: left;
}
.text-right {
    text-align: right;
}

/* Display utilities */
.d-flex {
    display: flex;
}
.flex-center {
    justify-content: center;
    align-items: center;
}

.d-grid {
    display: grid;
}

/* Width and height */
.w-100 {
    width: 100%;
}
.h-auto {
    height: auto;
}
/* Button setup */
/* Button styles */
.button {
    background-color: #991d1d; /* Primary red color */
    color: #fff; /* White text for contrast */
    padding: 0.75rem 1.5rem; /* Button padding */
    border: none; /* Remove border */
    border-radius: 4px; /* Rounded corners */
    font-size: 1rem; /* Font size */
    cursor: pointer; /* Pointer cursor on hover */
    transition: background-color 0.3s ease, transform 0.2s ease; /* Smooth transition for hover and active states */
}

/* Hover state */
.button:hover {
    background-color: #a30000; /* Slightly darker red on hover */
}

/* Active state */
.button:active {
    background-color: #900000; /* Even darker red when button is pressed */
    transform: scale(
        0.98
    ); /* Slightly shrink button to simulate a press effect */
}

/* Disabled state */
.button:disabled {
    background-color: #e5e5e5; /* Light grey for disabled button */
    color: #aaa; /* Grey text */
    cursor: not-allowed; /* Not allowed cursor for disabled button */
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .button {
        width: 100%;
        padding: 1rem; /* Increase padding for better touch support */
    }
}

/* Responsive images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Specific image classes */
.img-rounded {
    border-radius: 8px;
}

.img-full {
    width: 100%;
    height: auto;
}

main.page {
    margin-top: var(--header-height);
}

.page-title {
    background-color: #ffffff;
}

.page-title h1 {
    width: 70%;
    padding: 1rem;
    color: #ffffff;
    background: linear-gradient(90deg, #991d1d, #ffffff);
}

table td[rowspan] {
    vertical-align: top;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown .arrow {
    width: 0;
    height: 0;
    display: none;
    margin-left: 0.25rem;
    border-left: 9px solid #000000;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    transition: transform 0.3s ease;
}

.dropdown .dropbtn.active .arrow {
    border-left: 9px solid #ffffff;
}
.dropdown .dropbtn.active:hover .arrow {
    border-left: 9px solid #ffffff;
}

.dropdown .dropbtn:hover .arrow {
    border-left: 9px solid #2c7a7b;
}

.dropdown.open .arrow {
    transform: rotate(90deg);
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f7efee;
    min-width: 240px;
    z-index: 1;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
}

.dropdown-content a {
    color: black;
    padding: 0.5rem 1rem;
    text-decoration: none;
    display: block;
    border-radius: 0;
}

.dropdown-content a.sub-active {
    color: #2c7a7b;
}

.dropdown-content a:hover {
    background-color: #ddd;
    box-shadow: none;
}

.dropdown.open .dropdown-content {
    display: block;
}

/* responsive header style */

.navbar .burger-btn {
    display: none;
}

.navbar .close-btn {
    display: none;
}

.navbar .right .btn-group.mobile {
    display: none;
}

@media screen and (max-width: 960px) {
    header {
        padding: 0;
        height: 96px;
    }
    header .navbar {
        height: 96px;
    }
    .navbar .nav-links {
        display: none;
        position: absolute;
        padding-inline-start: 4px;
        padding-inline-end: 4px;
        top: 96px;
        left: 0;
        width: 100%;
    }
    .navbar .burger-btn {
        float: right;
        display: flex;
    }
    .navbar .right .btn-group {
        display: none;
    }

    .navbar .right .btn-group.mobile {
        display: flex;
    }
    .navbar .right .btn-group.mobile a.btn-link {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 3rem;
        height: 3rem;
    }
    .navbar .right {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 1rem;
        justify-content: flex-end;
        margin-left: 0;
        padding-right: 1rem;
        flex: 1;
    }
    .burger-btn,
    .close-btn {
        background-color: #991d1d;
        color: white;
        border: 0;
        border-radius: 8px;
        width: 3rem;
        height: 3rem;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .burger-btn img {
        width: 2.5rem;
        height: 2.5rem;
    }

    .close-btn {
        font-size: 1.75rem;
        font-weight: 400;
    }
}

@media screen and (max-width: 960px) {
    header.responsive .navbar {
        position: relative;
    }
    header.responsive .navbar .nav-links {
        float: none;
        display: block;
        text-align: left;
        width: 100%;
        background-color: white;
    }
    header.responsive .navbar .burger-btn {
        display: none;
    }
    header.responsive .navbar .close-btn {
        display: block;
    }
    header.responsive .navbar .nav-links li {
        padding: 0.5rem 1rem;
        float: none;
        display: block;
        text-align: left;
        width: 100%;
        background-color: #f7efee;
        margin-bottom: 2px;
    }
    header.responsive .navbar .nav-links .dropdown {
        width: 100%;
    }
    header.responsive .navbar .nav-links .dropdown .arrow {
        display: inline-block;
    }

    header.responsive .navbar .nav-links .dropdown-content {
        position: relative;
        width: 100%;
        background-color: white;
        box-shadow: none;
        margin-top: 0.875rem;
    }
    header.responsive .navbar .nav-links .dropdown-content a {
        background-color: #f7efee;
        margin-bottom: 2px;
        display: list-item;
        list-style-type: disc;
        list-style-position: inside;
    }
}

img {
    object-fit: contain;
    width: 100%;
}

/* Pagination Styles */

/* Pagination Container */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 20px;
}

/* Pagination Items */
.page-item {
    text-decoration: none;
    padding: 10px 15px;
    border: 1px solid #a6a6a6; /* Light gray border */
    border-radius: 5px;
    color: #ffffff; /* White text */
    background-color: #a6a6a6; /* Light gray background */
    font-size: 16px;
    text-align: center;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Active Page Button */
.page-item.active {
    background-color: #2c7a7b; /* Dark red background */
    border-color: #2c7a7b; /* Dark red border */
}

/* Hover Effect */
.page-item:hover {
    background-color: #2c7a7b; /* Teal background on hover */
    border-color: #2c7a7b; /* Teal border on hover */
}

/* Disabled (if needed) */
.page-item:disabled {
    background-color: #ccc;
    border-color: #ccc;
    color: #666;
    pointer-events: none;
}
/* -------------------------------------------------------------------- */

.card {
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    /* transform: translateY(-0.5rem) scale(1.02); */
    transform: translateY(-0.5rem);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.2);
}

.card img {
    object-fit: cover;
}

#backToTop {
    display: none; /* Hidden by default */
    position: fixed; /* Fixed position in the bottom right corner */
    bottom: 2rem;
    right: 2rem;
    z-index: 99;
    border: 3px solid #b54d4d;
    outline: none;
    cursor: pointer;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    justify-content: center;
    align-items: center;
    background-color: transparent;
}

#backToTop img {
    object-fit: cover;
    width: auto;
}

.p-title {
    font-weight: bold;
    text-align: center;
}

.p-content {
    text-align: left;
}

.back-link {
    display: inline-flex;
    align-items: center;
    font-size: 16px;
    color: #b54d4d;
    text-decoration: none;
    font-weight: 500;
}
.back-link:hover {
    color: #8e3c3c;
}

.back-link .triangle {
    display: inline-block;
    width: 0;
    height: 0;
    margin-right: 8px;
    border-style: solid;
    border-width: 6px 8px 6px 0;
    border-color: transparent #b54d4d transparent transparent;
    transition: border-color 0.3s;
}

.back-link:hover .triangle {
    border-color: transparent #8e3c3c transparent transparent;
}

.breadcrumbs {
    display: flex;
    gap: 0.75rem;
}

.breadcrumbs a {
    padding: 6px 12px;
    background-color: #9a9999;
    border-radius: 6px;
    font-weight: 400;
}
.breadcrumbs a.current {
    background-color: #484848;
    color: #fafafa;
}
