/* =========================================
   YUI MARKETING - WORKS PAGE STYLES (Final V2)
   ========================================= */

/* --- Variables --- */
:root {
    --cyan: #00c6ff;
    --purple: #9d50bb;
    --orange: #ff4b1f;
    --dark-bg: rgba(20, 20, 20, 0.6);
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    
    /* カテゴリ別カラー定義 */
    --cat-marketing: #00c6ff; /* Cyan */
    --cat-creative: #ff4b1f;  /* Orange */
    --cat-system: #9d50bb;    /* Purple */
    --cat-media: #20c997;     /* Teal/Green */
    --cat-sales: #f1c40f;     /* Gold */
    --cat-other: #888;
}

.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 20px; box-sizing: border-box; }
.container-wide { width: 100%; max-width: 1600px; margin: 0 auto; padding: 0 20px; box-sizing: border-box; }

section { padding: clamp(60px, 8vw, 100px) 0; }

/* --- Hero --- */
.page-hero {
    min-height: 40vh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
    padding-top: clamp(140px, 20vw, 180px); padding-bottom: 40px;
}
.hero-sub { font-size: 1rem; letter-spacing: 0.3em; margin-bottom: 10px; color: #00c6ff; font-weight: 700; }
.hero-title { font-size: clamp(3rem, 8vw, 6rem); font-weight: 900; line-height: 1; text-shadow: 0 10px 30px rgba(0,0,0,0.5); margin-bottom: 20px; }
.hero-desc { font-size: 1.1rem; opacity: 0.8; line-height: 1.8; }


/* --- 1. Featured Slider (Infinite Marquee) --- */
#works-slider-area { padding: 0 0 60px 0; overflow: hidden; }
.slider-container { width: 100%; }
.slider-track {
    display: flex; gap: 30px; width: max-content;
    animation: marquee 60s linear infinite;
}
.slider-track:hover { animation-play-state: paused; }

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.slide-item {
    width: 350px; height: 250px; position: relative; border-radius: 15px; overflow: hidden; cursor: pointer; flex-shrink: 0;
    border: var(--glass-border); transition: 0.3s;
}
.slide-item:hover { transform: scale(1.05); border-color: var(--cyan); box-shadow: 0 0 20px rgba(0, 198, 255, 0.3); }
.slide-img { width: 100%; height: 100%; background-size: cover; background-position: center; transition: 0.3s; }
.slide-item:hover .slide-img { opacity: 0.5; transform: scale(1.1); }
.slide-info {
    position: absolute; bottom: 0; left: 0; width: 100%; padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent); z-index: 2;
}
.slide-cat { font-size: 0.7rem; color: var(--cyan); font-weight: 700; display: block; margin-bottom: 5px; }
.slide-title { font-size: 1.1rem; font-weight: 700; color: #fff; margin: 0; line-height: 1.3; }


/* --- 2. Works Grid (Card Style) --- */
.works-filter { display: flex; justify-content: center; gap: 15px; margin-bottom: 60px; flex-wrap: wrap; }
.filter-btn {
    background: transparent; border: 1px solid rgba(255,255,255,0.2); color: #fff; padding: 10px 25px;
    border-radius: 50px; font-family: 'Montserrat', sans-serif; font-weight: 700; cursor: pointer; transition: 0.3s; font-size: 0.9rem;
}
.filter-btn:hover, .filter-btn.active { background: #fff; color: #000; border-color: #fff; box-shadow: 0 0 20px rgba(255,255,255,0.3); }

/* グリッドレイアウト：PCで6列 */
.works-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 30px; margin-bottom: 80px;
}

.works-item {
    display: flex; flex-direction: column; background: #1a1a1a;
    border-radius: 12px; overflow: hidden; cursor: pointer; border: 1px solid rgba(255,255,255,0.05);
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.works-item:hover {
    transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.3); border-color: rgba(255,255,255,0.2);
}

.works-thumb { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; }
.works-thumb img { width: 100%; height: 100%; object-fit: cover; transition: 0.3s; }
.works-item:hover .works-thumb img { transform: scale(1.05); opacity: 0.8; }

.works-card-body { padding: 20px; flex-grow: 1; display: flex; flex-direction: column; }

/* カテゴリタグ */
.works-cat-tag {
    display: inline-block; font-size: 0.7rem; padding: 3px 10px; border-radius: 50px;
    font-weight: 700; margin-bottom: 10px; align-self: flex-start; color: #fff;
    white-space: nowrap;
}
.cat-marketing { background: var(--cat-marketing); }
.cat-creative { background: var(--cat-creative); }
.cat-system { background: var(--cat-system); }
.cat-media-biz { background: var(--cat-media); }
.cat-sales { background: var(--cat-sales); }
.cat-other { background: var(--cat-other); }

.works-title-card { font-size: 1rem; font-weight: 700; line-height: 1.4; margin: 0 0 15px; flex-grow: 1; }
.works-price-card { font-size: 0.85rem; color: rgba(255,255,255,0.7); margin: 0; }
.price-val { color: #fff; font-weight: 700; font-size: 1rem; margin-left: 5px; }

.no-img-box { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: #222; }
.logo-text { font-family: 'Montserrat', sans-serif; font-weight: 900; color: rgba(255,255,255,0.1); font-size: 2rem; }


/* --- 3. Modal Styles (2-Column Layout) --- */
.works-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(10px); z-index: 10000;
    opacity: 0; visibility: hidden; transition: 0.3s ease;
    display: flex; justify-content: center; align-items: center; padding: 20px;
}
.works-modal-overlay.active { opacity: 1; visibility: visible; }

.works-modal-container.box-layout {
    width: 100%; max-width: 1200px; height: auto; max-height: 95vh;
    background: #1a1a1a; border: 1px solid rgba(255,255,255,0.1); border-radius: 16px;
    position: relative; box-shadow: 0 30px 80px rgba(0,0,0,0.6);
    transform: scale(0.95); transition: 0.3s ease; display: flex; flex-direction: column;
}
.works-modal-overlay.active .works-modal-container { transform: scale(1); }

/* 閉じるボタン（正円） */
.modal-close-btn {
    position: absolute; top: 15px; right: 15px;
    width: 36px; height: 36px; padding: 0; border-radius: 50%;
    background: rgba(255,255,255,0.1); border: none; color: #fff;
    font-size: 24px; line-height: 1; cursor: pointer; z-index: 10;
    transition: 0.3s; display: flex; justify-content: center; align-items: center;
}
.modal-close-btn:hover { background: #fff; color: #000; }

.works-modal-scroll-area {
    overflow-y: auto; padding: 40px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.3) transparent;
}

/* 2カラムレイアウト */
.modal-layout-2col { display: flex; gap: 40px; margin-bottom: 40px; }
.modal-col-left { width: 55%; flex-shrink: 0; }
.modal-col-right { width: 45%; display: flex; flex-direction: column; }

/* 画像（4:3 縦長） */
.modal-main-img img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.modal-cat-label {
    display: inline-block; font-size: 0.8rem; font-weight: 700; padding: 4px 12px;
    border-radius: 50px; color: #fff; margin-bottom: 15px; align-self: flex-start;
}
.modal-cat-label.cat-marketing { background: var(--cat-marketing); }
.modal-cat-label.cat-creative { background: var(--cat-creative); }
.modal-cat-label.cat-system { background: var(--cat-system); }
.modal-cat-label.cat-media-biz { background: var(--cat-media); }
.modal-cat-label.cat-sales { background: var(--cat-sales); }
.modal-cat-label.cat-other { background: var(--cat-other); }

.modal-title { font-size: 2rem; font-weight: 900; line-height: 1.3; margin-bottom: 30px; }
.modal-sub-heading { font-size: 1rem; color: rgba(255,255,255,0.7); margin-bottom: 10px; font-weight: 700; }

.modal-result-box { background: rgba(0, 198, 255, 0.1); padding: 20px; border-radius: 8px; margin-bottom: 30px; border-left: 4px solid var(--cyan); }
.highlight-text { font-size: 1.1rem; font-weight: 700; color: #fff; line-height: 1.6; }

.modal-section { margin-bottom: 30px; }
.modal-total-price { font-size: 1.2rem; font-weight: 700; color: var(--cyan); margin-bottom: 5px; }
.modal-price-detail { font-size: 0.9rem; line-height: 1.6; opacity: 0.8; }

/* CTAボタン（左カラム用） */
.modal-col-left .modal-cta { margin-top: 20px; }

/* ★変更: テキスト色を白に変更してタグと統一 */
.contact-btn-solid {
    display: block; text-align: center; background: var(--cyan); color: #fff !important;
    padding: 15px; border-radius: 50px; font-weight: 700; text-decoration: none;
    transition: 0.3s; box-shadow: 0 5px 15px rgba(0, 198, 255, 0.3);
    border: 2px solid var(--cyan);
}
.contact-btn-solid:hover {
    background: #fff; border-color: #fff; color: #000 !important;
    transform: translateY(-3px); box-shadow: 0 10px 25px rgba(255, 255, 255, 0.5);
}

/* 下部詳細エリア */
.modal-details-section { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 40px; }
.modal-details-section h3 { font-size: 1.4rem; font-weight: 700; margin-bottom: 30px; }
.detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-bottom: 40px; }
.detail-item h4 { font-size: 0.95rem; color: rgba(255,255,255,0.7); margin-bottom: 10px; }
.detail-item p { font-size: 0.95rem; line-height: 1.8; }
.modal-body-text { font-size: 1rem; line-height: 1.8; opacity: 0.9; }


/* --- Pagination & CTA (Common) --- */
.pagination { text-align: center; margin-top: 60px; }
.pagination .page-numbers {
    display: inline-block; min-width: 40px; height: 40px; line-height: 40px; margin: 0 5px; border-radius: 50%;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: #fff; text-decoration: none;
    font-family: 'Montserrat', sans-serif; font-weight: 700; transition: 0.3s;
}
.pagination .page-numbers:hover, .pagination .page-numbers.current { background: var(--cyan); border-color: var(--cyan); color: #000; }

.split-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.split-item {
    border-radius: 20px; padding: clamp(40px, 5vw, 60px) 40px; text-align: center;
    backdrop-filter: blur(10px) !important; border: 1px solid rgba(255,255,255,0.2) !important;
    display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 300px;
}
.recruit-area { background: linear-gradient(135deg, rgba(0,0,0,0.5), rgba(0, 198, 255, 0.15)) !important; }
.contact-area { background: linear-gradient(135deg, rgba(0,0,0,0.5), rgba(255, 75, 31, 0.15)) !important; }
.split-content h2 { font-family: 'Montserrat', sans-serif; font-size: 2.5rem; margin-bottom: 20px; }
.cta-btn { display: inline-block; padding: 15px 40px; border-radius: 50px; font-weight: 700; text-decoration: none; }
.recruit-btn { background: #fff; color: #000; }
.contact-btn { background: transparent; border: 2px solid #fff; color: #fff; }


/* --- Responsive --- */
@media (max-width: 1400px) { .works-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 991px) {
    .works-grid { grid-template-columns: repeat(3, 1fr); }
    /* モーダルを1カラムに変更 */
    .modal-layout-2col { flex-direction: column; gap: 30px; }
    .modal-col-left, .modal-col-right { width: 100%; }
    .detail-grid { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 768px) {
    .works-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }
    .works-card-body { padding: 15px; }
    .works-title-card { font-size: 0.9rem; }
    .slide-item { width: 280px; height: 200px; }
    .split-layout { grid-template-columns: 1fr; }
    .works-modal-container.box-layout { max-height: 100vh; border-radius: 0; }
    .works-modal-scroll-area { padding: 60px 20px 30px; }
    .modal-title { font-size: 1.5rem; }
}
@media (max-width: 480px) { .works-grid { grid-template-columns: 1fr; } }