/* ========================================
   メディア掲載実績ページ用スタイル
======================================== */

/* フィルター */
.filter-section {
    margin-bottom: clamp(4rem, 5vw, 6rem);
    text-align: center;
}

.filter-buttons {
    display: inline-flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    padding: 0.2rem 2rem;
    border: 1px solid #5D5260;
    background: white;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: clamp(1.6rem, 1.6vw, 1.8rem);
    font-weight: bold;
    display: inline-block;
}

.filter-btn:hover,
.filter-btn.active {
    background: #5D5260;
    color: white;
}

/* メディアグリッド */
.media-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4rem 2.5rem;
    margin-bottom: 4rem;
}

.media-card {
    background: white;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.media-card-image {
    position: relative;
    aspect-ratio: 385 / 248;
    overflow: hidden;
    background: #edebdf;
}

.media-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.5s ease;
}

.media-card:hover .media-card-image img {
    transform: scale(1.1);
}

.media-card-category {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 0.1rem 1.5rem;
    background: #fff;
    color: #BF9210;
    font-size: 1.5rem;
    font-weight: bold;
    border-radius: 20px;
    border: 1px solid #BF9210;
}

.media-card-content {
    padding: clamp(2rem, 2vw, 2.5rem);
}

.media-card-date {
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.media-card-title {
    font-size: 1.8rem;
    font-weight: 600;
    line-height: 1.5;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.media-card-hr {
    width: 45px;
    height: 1px;
    background-color: #000;
    border: none;
    margin: 1rem 0 2rem;
}

.media-card-excerpt {
    font-size: 1.5rem;
    color: #666;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.media-card-footer {
    padding: 0 clamp(2rem, 2vw, 2.5rem) clamp(2rem, 2vw, 2.5rem);
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.media-card-link {
    color: #BF9210;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: bold;
}

.media-card-link::before {
    content: '';
    width: 6px;
    height: 6px;
    border-right: 1px solid #BF9210;
    border-bottom: 1px solid #BF9210;
    transform: rotate(-45deg);
}

/* モーダル */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    overflow-y: auto;
    padding: 40px 20px;
    box-sizing: border-box;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    max-width: 900px;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    animation: modalSlideIn 0.4s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: rotate(90deg);
}

.modal-header-image {
    width: 100%;
    height: 400px;
    object-fit: contain;
    object-position: center;
    background: #f0f0f0;
}

.modal-body {
    padding: 40px;
}

.modal-category {
    display: inline-block;
    padding: 0.1rem 1.5rem;
    background: #fff;
    color: #BF9210;
    font-size: 1.5rem;
    font-weight: bold;
    border-radius: 100px;
    margin-bottom: 15px;
    border: 1px solid #BF9210;
}

.modal-date {
    font-size: 1.6rem;
    color: #999;
}

.modal-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    line-height: 1.4;
    margin-bottom: 25px;
}

.modal-description {
    font-size: 1.6rem;
    color: #666;
    line-height: 1.8;
    margin-bottom: 30px;
}

.modal-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.modal-gallery img {
    width: 100%;
    height: 180px;
    object-fit: contain;
    border-radius: 8px;
}

.modal-external-links {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.modal-external-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: #5D5260;
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.modal-external-link:hover {
    transform: translateY(-2px);
}

.modal-external-link::after {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    border-right: 1px solid #fff;
    border-bottom: 1px solid #fff;
    transform: rotate(-45deg);
    font-size: 1.2rem;
}

/* レスポンシブ */
@media (max-width: 1024px) {
    .media-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .modal-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    .media-grid {
        grid-template-columns: 1fr;
    }

    .modal {
        padding: 20px 10px;
    }

    .modal-content {
        max-height: 90vh;
        overflow-y: auto;
    }

    .modal-header-image {
        height: 200px;
    }

    .modal-body {
        padding: 30px 20px;
    }

    .modal-gallery {
        grid-template-columns: 1fr;
    }

    .modal-gallery img {
        height: 200px;
    }

    .modal-external-links {
        flex-direction: column;
    }

    .modal-external-link {
        width: 100%;
        justify-content: center;
    }

    .filter-section {
        margin-top: 6rem;
    }

    .filter-buttons {
        gap: 5px;
    }

    .modal-close {
        width: 35px;
        height: 35px;
        top: 15px;
        right: 15px;
    }
}