/* portfolio.css - ポートフォリオページ固有のスタイル */
/* リセットスタイルはdestyle.cssとbase.cssで定義済み */

/* 基本スタイルはbase.cssの.page-headerを使用 */
/* コンテナスタイルはbase.cssの.page-containerを使用 */

/* フィルターセクション */
.portfolio-filters {
    margin-bottom: 30px;
    padding: 0;
    text-align: center;
}

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.filter-btn {
    padding: 10px 24px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #999;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
}

.filter-btn:hover {
    border-color: #00ff88;
    color: #00ff88;
}

.filter-btn--active {
    background: rgba(0, 255, 136, 0.1);
    border-color: #00ff88;
    color: #00ff88;
}

.filter-btn .count {
    opacity: 0.7;
    font-size: 0.9rem;
}

/* 詳細フィルター */
.advanced-filters {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    padding: 20px 0;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 0;
}

.filter-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.filter-group label {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 5px;
}

.filter-select {
    padding: 8px 12px;
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 0;
    cursor: pointer;
    min-width: 150px;
}

/* ポートフォリオグリッド */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin: 50px 0;
    padding: 0;
}

/* ポートフォリオカード */
.portfolio-card {
    background: #1a1a1a;
    border-radius: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards;
}

.portfolio-card:hover {
    border-color: rgba(255, 255, 255, 0.1);
}

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

/* Before/After セクション */
.portfolio-card__comparison {
    position: relative;
    height: 375px;
    overflow: hidden;
    background: #0a0a0a;
}

.comparison-tabs {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.7);
    padding: 3px;
    border-radius: 0;
}

.comparison-tab {
    padding: 5px 12px;
    background: transparent;
    border: none;
    color: #999;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    border-radius: 0;
}

.comparison-tab--active {
    background: #00ff88;
    color: #000;
}

.comparison-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.comparison-image--active {
    opacity: 1;
}

/* カードコンテンツ */
.portfolio-card__content {
    padding: 25px;
}

.portfolio-card__header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 15px;
}

.portfolio-card__title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 5px;
    flex: 1;
}

.portfolio-card__category {
    padding: 4px 12px;
    font-size: 0.8rem;
    border-radius: 0;
    font-weight: 600;
    white-space: nowrap;
    margin-bottom: 8px;
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
    border: 1px solid rgba(0, 255, 136, 0.3);
}


/* メタ情報 */
.portfolio-card__meta {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 0;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.meta-label {
    font-size: 0.65rem;
    color: #666;
    margin-bottom: 3px;
}

.meta-value {
    font-size: 0.8rem;
    color: #fff;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* テクノロジータグ */
.portfolio-card__technologies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.tech-tag {
    padding: 4px 10px;
    background: rgba(0, 255, 136, 0.1);
    color: #00ff88;
    font-size: 0.75rem;
    border-radius: 0;
    border: 1px solid rgba(0, 255, 136, 0.2);
}

/* 説明文 */
.portfolio-card__description {
    color: #999;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

/* 結果セクション */
.portfolio-card__results {
    padding: 15px;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.05) 0%, rgba(0, 255, 136, 0.02) 100%);
    border-radius: 8px;
    margin-bottom: 20px;
}

.portfolio-card__results h4 {
    font-size: 0.9rem;
    color: #00ff88;
    margin-bottom: 10px;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.result-item {
    text-align: center;
}

.result-value {
    display: block;
    font-size: 1.3rem;
    font-weight: 600;
    color: #00ff88;
}

.result-label {
    font-size: 0.7rem;
    color: #666;
}

/* アクションボタン */
.portfolio-card__actions {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 18px 40px;
    border: 2px solid rgba(0, 255, 136, 0.3);
    border-radius: 0;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-block;
    text-align: center;
    flex: 1;
    backdrop-filter: blur(10px);
    white-space: nowrap;
}

.btn--primary {
    background: rgba(0, 255, 136, 0.1);
    color: #00ff88;
    border-color: rgba(0, 255, 136, 0.3);
}

.btn--primary:hover {
    background: rgba(0, 255, 136, 0.2);
    border-color: #00ff88;
}

.btn--outline {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

.btn--outline:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: #fff;
}

/* モーダル */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal--active {
    display: block;
}

.modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal__content {
    position: relative;
    max-width: 900px;
    max-height: 90vh;
    margin: 5vh auto;
    background: #1a1a1a;
    border-radius: 0;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal__close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 0;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.modal__close:hover {
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
}


.modal__header {
    padding: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal__title {
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 10px;
}

.modal__category {
    display: inline-block;
    padding: 6px 15px;
    font-size: 0.9rem;
    border-radius: 0;
    font-weight: 600;
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
    border: 1px solid rgba(0, 255, 136, 0.3);
}

/* Before/After スライダー */
.modal__comparison {
    position: relative;
    height: 600px;
    background: #0a0a0a;
    overflow: hidden;
}

.comparison-slider {
    position: relative;
    width: 100%;
    height: 100%;
    user-select: none;
}

.comparison-slider__before,
.comparison-slider__after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.comparison-slider__before img,
.comparison-slider__after img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.comparison-slider__after {
    clip-path: inset(0 50% 0 0);
    transition: none;
}

.comparison-slider__handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 3px;
    background: #00ff88;
    transform: translateX(-50%);
    cursor: col-resize;
}

.comparison-slider__button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: #00ff88;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 255, 136, 0.4);
}

.comparison-slider__button::before,
.comparison-slider__button::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
}

.comparison-slider__button::before {
    border-width: 8px 8px 8px 0;
    border-color: transparent #000 transparent transparent;
    left: 8px;
}

.comparison-slider__button::after {
    border-width: 8px 0 8px 8px;
    border-color: transparent transparent transparent #000;
    right: 8px;
}

.comparison-label {
    position: absolute;
    padding: 8px 15px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    backdrop-filter: blur(5px);
}

.comparison-label--before {
    top: 20px;
    left: 20px;
    border-radius: 0;
}

.comparison-label--after {
    top: 20px;
    right: 20px;
    border-radius: 0;
}

/* モーダル詳細 */
.modal__body {
    padding: 30px;
}

.modal__details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.detail-section {
    background: rgba(255, 255, 255, 0.02);
    padding: 20px;
    border-radius: 0;
}

.detail-section h3 {
    font-size: 1rem;
    color: #00ff88;
    margin-bottom: 15px;
}

.detail-section p {
    color: #999;
    line-height: 1.6;
    font-size: 0.9rem;
}

.modal__features {
    margin-bottom: 30px;
}

.modal__features h3 {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 15px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.feature-item {
    padding: 10px 15px;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 0;
    color: #00ff88;
    font-size: 0.9rem;
    text-align: center;
}

.modal__results {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.05) 0%, rgba(0, 255, 136, 0.02) 100%);
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.modal__cta {
    /* text-align: center;
    padding: 30px;
    background: rgba(0, 255, 136, 0.02); */
    border-radius: 0;
}

.modal__cta h3 {
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 10px;
}

.modal__cta p {
    color: #999;
    margin-bottom: 20px;
}

/* CTA セクション */
.portfolio-cta {
    margin: 80px 20px 0;
    margin-left: auto;
    margin-right: auto;
    max-width: 1200px;
    padding: 50px;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.05), rgba(0, 204, 112, 0.05));
    border: 2px solid rgba(0, 255, 136, 0.2);
    text-align: center;
}

.portfolio-cta h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #00ff88;
}

.portfolio-cta p {
    color: #ccc;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* カスタムスクロールバー */
.modal__content::-webkit-scrollbar {
    width: 8px;
}

.modal__content::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-left: 1px solid #333;
}

.modal__content::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 136, 0.3);
    border: none;
    transition: background 0.3s ease;
}

.modal__content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 136, 0.6);
}

.modal__content::-webkit-scrollbar-thumb:active {
    background: #00ff88;
}

/* Firefox用 */
.modal__content {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 255, 136, 0.3) #1a1a1a;
}

.modal__content:hover {
    scrollbar-color: rgba(0, 255, 136, 0.6) #1a1a1a;
}

/* レスポンシブ */
@media (max-width: 1200px) {
    .page-container {
        padding: 0 20px;
    }
}

@media (max-width: 768px) {
    .page-container {
        padding: 0 20px;
    }


    .portfolio-header__title {
        font-size: 2rem;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .advanced-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-select {
        width: 100%;
    }

    .portfolio-card__meta {
        flex-direction: column;
    }

    .results-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .modal__details {
        grid-template-columns: 1fr;
    }

    .portfolio-card__actions {
        flex-direction: column;
    }

    .portfolio-cta {
        padding: 30px 20px;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .cta-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .page-container {
        padding: 0 15px;
    }

    .portfolio-header {
        padding: 80px 15px 60px;
    }

    .portfolio-cta {
        padding: 30px 15px;
    }
}

/* ローディング */
.loading {
    text-align: center;
    padding: 50px;
    color: #666;
}

.no-results {
    text-align: center;
    padding: 100px 20px;
    margin: 0 20px;
    color: #666;
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}