/* 「東海大名鑑」の枠線 */

@layer utilities {
  .text-outline {
    -webkit-text-stroke: 0.5px rgba(0,0,0,0.1);
  }
  .text-outline-primary {
    -webkit-text-stroke: 0.5px var(--color-primary, #000);
  }
  .text-outline-secondary {
    -webkit-text-stroke: 0.5px var(--color-secondary, #000);
  }
}

/* TOKAI Directory の左右の波線 */

.title-container {
  width: fit-content;
  margin: 0 auto;
}
.heading-wave {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}
.heading-wave p {
    white-space: nowrap;
    padding: 0 0.5rem;
}
.heading-wave::before,
.heading-wave::after {
    content: "";
    flex: 1;
    height: 8px;
    background-size: auto 8px;
    background-position: center;
    min-width: 10px;
    max-width: calc(50% - 100px);
}
.heading-wave::before,
.heading-wave::after {
    background-image: url('data:image/svg+xml, %3Csvg xmlns="http://www.w3.org/2000/svg" width="180" height="10" viewBox="0 0 120 10" preserveAspectRatio="none"%3E%3Cpath d="M0 5 Q5 0 10 5 T20 5 T30 5 T40 5 T50 5 T60 5 T70 5 T80 5 T90 5 T100 5 T110 5 T120 5" fill="none" stroke="black" stroke-width="2" /%3E%3C/svg%3E');
}
.heading-wave::before { margin-right: .5rem; }
.heading-wave::after { margin-left: .5rem; }

/* モーダルの CSS */
#person-modal {
    /* Tailwind の backdrop-blur が効かない旧ブラウザ向け */
    backdrop-filter: blur(6px) saturate(120%);
    overscroll-behavior: contain;
}
.modal-card {
    width: 100%;
    display: flex;
    flex-direction: column;
    background: white;
    border: 2px solid black;
    border-radius: 16px;
    /* box-shadow: 0 8px 24px rgba(0,0,0,.30); */
    transition: transform .3s ease, opacity .3s ease;
}
.modal-body {
    overflow-y: auto;
}
.text-color-blue {
    color: #004B9B;
}
.text-color-tokai-red {
    color: #CC3737;
}
.back-color-tokai-red {
    background-color: #FFF9F8;
}
.back-color-tokai-blue-light {
    background-color: #F9FBFE;
}
.back-color-tokai-blue {
    background-color: #004B9B;
}
@media (min-width:768px){
    .modal-card{
        width: 100vw;
        max-width: 1400px;
    }
}
.modal-card img {
    width: 360px; 
    height: 360px;
    object-fit: cover;
    object-position: center; 
}
.modal-card.active {
    height: 98vh;
    display: flex;
    flex-direction: column;
    transform: translateX(0) scale(1);
    opacity: 1;
}
.modal-card.active .container::-webkit-scrollbar {
    width: 6px;
    border-radius: 12px;
    padding-top: 10px;
    padding-bottom: 10px;
}
.modal-card.active .container::-webkit-scrollbar-track {
    background: #e0e0e0;
}
.modal-card.active .container::-webkit-scrollbar-thumb {
    background: #a0a0a0;
    border-radius: 6px;
}
.modal-card.preview-left {
    transform: translateX(-70%);
    height: 98vh;
    opacity: .35;
}
.modal-card.preview-right {
    transform: translateX(70%);
    height: 98vh;
    opacity: .35;
}
.modal-card.active .container {
    flex: 1 1 auto;
    overflow-y: scroll;
}
.modal-card.preview-left .container,
.modal-card.preview-right .container {
    overflow: hidden;
}
body.modal-open {
    overflow: hidden !important;
    height: 100% !important;
}
@media (max-width:1023px){
    .modal-card.active{
        height: 94dvh;
        margin: 2% 3%;
        width: 94%;
    }
}
@media (max-width:767px) {
    .modal-card.active img{
        height: 100%;
        width: 100%;
    }
}
/* 個々のカード */

.card-square{
    /* aspect-ratio: 1 / 1;
    position: relative;
    border: 1px solid #000; */
}
.card-square::before{
    content:"";
    display:block;
    /* 
    padding-top:100%;
    */
}
.card-square img{
    /* 
    inset:0;
    position:absolute;
    width:100%;
    height:100%;
    object-fit:cover;
    object-position:center;
    */
}
.question-image-box div:nth-child(1),
.question-image-box div:nth-child(2) {
    width: 33px;
    position: absolute;
}
.question-image-box div:nth-child(1) {
    top: -12px;
    left: -16px;
}
.question-image-box div:nth-child(2) {
    bottom: -12px;
    right: -16px;
}
.question-image-box img {
    width: 100%;
    height: auto;
}
.corp-line {
    width: 100%;
}
.corp-line img {
    width: 100%;
    height: auto;
}
.company-image-box img{
    width: 100%;
    height: 100%;
}

@media screen and (max-width: 768px) {
    .tab-btn{
        display:inline-flex !important;
        width:auto        !important;
        margin-bottom:0;
    }
    h1.font-stencil{
        font-size:4rem !important; 
    }
    .modal-card.preview-left,
    .modal-card.preview-right {
        display:none;
    }
    #modal-prev, #modal-next { display:none; }
    #modal-close { font-size:2rem; }
    .question-image-box div:nth-child(1) {
        left: -8px;
    }
    .question-image-box div:nth-child(2) {
        right: -8px;
    }
    .card-square img{
        top: 28px;
    }
}

@media screen and (min-width: 640px) {
    .container {
        max-width: 100% !important;
    }
}

/* モーダルのアニメーション */
#person-modal {
    /* background-color: rgba(225, 225, 225, 0.96); */
    backdrop-filter: blur(6px) saturate(120%);
    transition: opacity 0.3s ease;
    will-change: opacity;
}

.modal-visible {
    opacity: 1;
    pointer-events: auto;
}

.modal-hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#cards {
    will-change: opacity, transform;
    backface-visibility: hidden;
    transform: translateZ(0); /* ハードウェアアクセラレーション */
}