/* ==========================================================================
   YouTube Section (TOP) - ツキデ工務店
   section の padding / 背景 / 横幅ラッパは .common_section と .container に任せる
   見出しスタイルは .content_title_box / .content_title / .gallery_content_title を流用
   タイトルのフォント/weight/letter-spacing/line-height は .item_title を流用
   ========================================================================== */

/* 見出し上の間隔: .common_section の padding-top 60px から -5px
   次セクション（イベント情報・お知らせ）との間隔: +45px */
.tukide-youtube-section {
    padding-top: 55px;
    margin-bottom: 45px;
}

/* グリッド */
.tukide-youtube-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

@media (max-width: 767px) {
    .tukide-youtube-section {
        padding-bottom: 0;
        margin-bottom: 0;
    }

    .tukide-youtube-section .container {
        box-sizing: border-box;
        width: 100%;
        padding-right: 20px;
        padding-left: 20px;
    }

    .tukide-youtube-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

.tukide-youtube-item {
    width: 100%;
}

.tukide-youtube-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
}

.tukide-youtube-link:hover {
    opacity: 0.85;
}

.tukide-youtube-thumb-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #000;
}

@supports not (aspect-ratio: 16 / 9) {
    .tukide-youtube-thumb-wrap {
        padding-top: 56.25%;
        height: 0;
    }
    .tukide-youtube-thumb-wrap > * {
        position: absolute;
        top: 0;
        left: 0;
    }
}

.tukide-youtube-thumb {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.tukide-youtube-link:hover .tukide-youtube-thumb {
    transform: scale(1.03);
}

/* タイトル: .item_title を継承し、施工実例セクション限定セレクタで効いていた
   font-size 指定だけ YouTube セクション向けに明示する */
.tukide-youtube-section .item_title {
    margin-top: 6px;
    font-size: 20px;
}

.tukide-youtube-section .item_title a {
    color: inherit;
    text-decoration: none;
}

@media (max-width: 767px) {
    .tukide-youtube-section .item_title {
        font-size: 16px !important;
        line-height: 1.4em;
    }
}

/* ==========================================================================
   Modal
   ========================================================================== */

.tukide-youtube-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.tukide-youtube-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.tukide-youtube-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 8px;
    z-index: 2;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.tukide-youtube-modal-close:hover {
    opacity: 0.7;
    transform: scale(1.1);
}

.tukide-youtube-modal-close svg {
    width: 100%;
    height: 100%;
    display: block;
}

@media (max-width: 767px) {
    .tukide-youtube-modal-close {
        top: 12px;
        right: 12px;
        width: 40px;
        height: 40px;
    }
}

.tukide-youtube-modal-inner {
    width: 90%;
    max-width: 1100px;
    padding: 0 20px;
}

@media (max-width: 767px) {
    .tukide-youtube-modal-inner {
        width: 100%;
        padding: 0 16px;
    }
}

.tukide-youtube-modal-iframe-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

@supports not (aspect-ratio: 16 / 9) {
    .tukide-youtube-modal-iframe-wrap {
        padding-top: 56.25%;
        height: 0;
    }
}

.tukide-youtube-modal-iframe-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

body.tukide-youtube-modal-open {
    overflow: hidden;
}
