/* --- Global Settings --- */
:root {
    --primary-color: #95d8d1;
    --primary-dark: #76c1b8;
    --bg-gray: #F4F7F5;
    --text-color: #333;
    --white: #ffffff;
    --font-rounded: 'M PLUS Rounded 1c', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Noto Sans JP', sans-serif; background-color: var(--bg-gray); color: var(--text-color); line-height: 1.6; overflow-x: hidden; }
a { text-decoration: none; color: inherit; transition: 0.3s; }

/* Header & Nav */
.main-header { background: var(--white); border-bottom: 2px solid var(--primary-color); position: relative; z-index: 1000; }
.header-top { display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto; padding: 10px 20px; }
.logo-link { display: flex; align-items: center; gap: 15px; }
.logo-link img { max-height: 70px; width: auto; }
.company-name { font-family: var(--font-rounded); font-weight: 700; font-size: 1.4rem; color: #444; }

.header-right { display: flex; align-items: center; gap: 10px; }

/* Hamburger Menu Design */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 22px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1002;
}
.menu-toggle .bar {
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 5px;
    transition: all 0.3s ease;
}
.menu-toggle.is-active .bar:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.menu-toggle.is-active .bar:nth-child(2) { opacity: 0; }
.menu-toggle.is-active .bar:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }

.search-trigger { background-color: var(--primary-color); color: white; padding: 10px 20px; border-radius: 8px; cursor: pointer; display: flex; align-items: center; gap: 8px; font-weight: bold; }

.global-nav { background: var(--white); }
.global-nav > ul { display: flex; justify-content: center; list-style: none; max-width: 1200px; margin: 0 auto; }
.global-nav > ul > li { position: relative; }
.global-nav li a { display: block; padding: 15px 18px; font-weight: bold; font-size: 0.85rem; white-space: nowrap; }

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%; left: 50%; transform: translateX(-50%);
    background: var(--white); min-width: 180px;
    box-shadow: 0 8px 15px rgba(0,0,0,0.1); border-radius: 8px;
    display: none; flex-direction: column; padding: 10px 0; z-index: 1001;
    list-style: none; 
}
.dropdown-menu.is-active { display: flex !important; }
.dropdown-menu li a { padding: 10px 20px; font-size: 0.85rem; font-weight: normal; text-align: center; }
.dropdown-menu li a:hover { background-color: #f0fafa; color: var(--primary-color); }

/* Main Grid & Cards */
.hero-area { 
    position: relative; 
    max-width: 1160px; 
    margin: 20px auto; 
    aspect-ratio: 1160 / 450; 
    overflow: hidden; 
    border-radius: 12px; 
}
.slide { position: absolute; width: 100%; height: 100%; opacity: 0; transition: 1.5s; }
.slide.active { opacity: 1; z-index: 1; }
.slide a { display: block; width: 100%; height: 100%; } 
.slide img { width: 100%; height: 100%; object-fit: cover; }

/* スライダー操作用矢印 */
.hero-area button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    font-size: 1.2rem;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-area button:hover { background: rgba(0, 0, 0, 0.7); }
.slider-prev { left: 20px; }
.slider-next { right: 20px; }

.category-grid { display: grid; grid-template-columns: repeat(4, 1fr); max-width: 1160px; gap: 15px; margin: 30px auto; padding: 0 20px; }
.cat-item { background: var(--primary-color); color: white; height: 85px; border-radius: 10px; display: flex; align-items: center; justify-content: center; gap: 12px; font-weight: bold; }

.content-card { background: var(--white); margin: 20px auto; padding: 30px 40px; border-radius: 12px; max-width: 1160px; box-shadow: 0 2px 10px rgba(0,0,0,0.03); }
.section-title { border-bottom: 2px solid var(--text-color); margin-bottom: 25px; padding-bottom: 10px; font-size: 1.3rem; font-weight: 700; }

/* 本のリストレイアウト */
.book-row { display: flex; justify-content: flex-start; gap: 30px 2.6%; flex-wrap: wrap; }
.book-item { width: 23%; text-align: center; font-size: 0.85rem; font-weight: bold; margin-bottom: 20px; }
.book-item img { width: 100%; height: auto; border-radius: 4px; box-shadow: 0 3px 8px rgba(0,0,0,0.15); margin-bottom: 12px; }

/* お仕事依頼リストのレイアウト */
.request-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

/* --- BOOTHセクションのスタイル --- */
.booth-banner {
    width: 100%;
    margin-top: 10px;
}
.booth-img {
    width: 100%;
    max-width: 1160px;
    height: auto;
    aspect-ratio: 1160 / 220;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: block;
    transition: 0.3s;
}
.booth-img:hover {
    transform: scale(1.01);
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
}

/* --- アトリエセクションのスタイル --- */
.atelier-banner {
    width: 100%;
    margin-top: 10px;
}
.atelier-img {
    width: 100%;
    max-width: 1160px;
    height: auto;
    aspect-ratio: 1160 / 220; /* 指定サイズの比率を維持 */
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: block;
    transition: 0.3s;
}
.atelier-img:hover {
    transform: scale(1.01);
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
}

/* --- Event Page Styles --- */
.sub-section-title { font-size: 1.1rem; margin: 40px 0 20px; border-left: 5px solid var(--primary-color); padding-left: 15px; }

.event-hero { 
    max-width: 1280px; 
    margin: 0 auto 40px; 
    aspect-ratio: 1280 / 670; 
    overflow: hidden; 
    border-radius: 8px; 
    background: #eee;
}
.event-main-img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    display: block;
}

.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

/* プロジェクトカード：正方形ブロック */
.project-card { 
    aspect-ratio: 1 / 1; 
    display: flex;
    flex-direction: column;
    border: 1px solid #eee; 
    border-radius: 10px; 
    overflow: hidden; 
    background: #fff; 
    transition: 0.3s; 
}
.project-card:hover { transform: translateY(-5px); box-shadow: 0 5px 15px rgba(0,0,0,0.08); }

/* プロジェクト画像：指定比率 */
.project-card img { 
    width: 100%; 
    aspect-ratio: 1280 / 670;
    object-fit: cover; 
    border-bottom: 1px solid #eee; 
}

/* 説明文エリア */
.project-info { 
    padding: 15px; 
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden; 
}
.project-info h3 { font-size: 0.95rem; margin-bottom: 8px; color: #444; }
.project-info p { 
    font-size: 0.8rem; 
    color: #777; 
    line-height: 1.5;
    overflow-y: auto; 
}

/* LINE招待セクション */
.line-invite-section { margin: 50px 0; }
.line-invite-bar { background: #f0fdf9; border: 1.5px solid #41C9B4; border-radius: 50px; display: flex; justify-content: space-between; align-items: center; padding: 10px 25px; }
.line-text-area { display: flex; align-items: center; gap: 15px; color: #333; font-weight: bold; }
.line-text-area i { font-size: 2rem; color: #06C755; }
.line-button-area { display: flex; gap: 10px; }
.line-btn { padding: 8px 25px; border-radius: 20px; font-size: 0.85rem; font-weight: bold; cursor: pointer; transition: 0.3s; text-align: center; border: none; }
.join-btn { background: #06C755; color: #fff; }
.qr-btn { background: #fff; border: 1px solid #ccc; color: #555; }
.line-btn:hover { opacity: 0.8; }

.history-section { margin-top: 60px; }
.coming-soon-box { background: #f9f9f9; padding: 40px; text-align: center; border-radius: 8px; border: 1px dashed #ccc; color: #999; }

/* QR Modal */
.qr-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); z-index: 3000; justify-content: center; align-items: center; }
.qr-overlay.is-active { display: flex; }
.qr-modal-inner { background: #fff; padding: 30px; border-radius: 15px; position: relative; text-align: center; max-width: 320px; }
.qr-close { position: absolute; top: 10px; right: 10px; background: none; border: none; font-size: 1.2rem; cursor: pointer; color: #999; }
.qr-modal-inner h3 { font-size: 1rem; margin-bottom: 20px; }
.qr-modal-inner img { width: 200px; height: 200px; margin-bottom: 15px; }
.qr-modal-inner p { font-size: 0.8rem; color: #666; }

/* Search Modal */
.search-overlay {
    display: none; 
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    justify-content: center;
    align-items: flex-start;
    padding-top: 100px;
}
.search-overlay.is-active { display: flex; }
.search-overlay-inner {
    background: white; width: 90%; max-width: 800px;
    padding: 60px 40px; border-radius: 15px; position: relative;
}
.modal-close { position: absolute; top: 15px; right: 20px; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: #999; }
.search-input-wrapper { display: flex; border: 2px solid var(--primary-color); border-radius: 30px; overflow: hidden; margin-bottom: 30px; }
.search-input-wrapper input { flex: 1; border: none; padding: 15px 25px; font-size: 1rem; outline: none; }
.search-input-wrapper button { background: var(--primary-color); border: none; padding: 0 25px; color: white; cursor: pointer; }
.search-options { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.option-btn { border: 1px solid #ddd; padding: 10px 20px; border-radius: 20px; font-size: 0.85rem; background: #fff; }

/* Footer Design */
.main-footer { background: var(--white); border-top: 1px solid #ddd; padding-top: 60px; }
.footer-inner { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.footer-links-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; margin-bottom: 40px; }
.footer-column h3 { font-size: 1rem; margin-bottom: 15px; }
.footer-column ul { list-style: none; font-size: 0.85rem; color: #666; line-height: 2.2; }
.footer-line { border: 0; border-top: 1px solid #eee; margin: 20px 0; }

/* SNS Circle Icons with Text */
.footer-sns { 
    display: flex; 
    justify-content: center; 
    gap: 15px; 
    padding: 20px 0 40px; 
}
.sns-icon { 
    width: 60px; height: 60px; border-radius: 50%; 
    display: flex; align-items: center; justify-content: center; 
    color: white; font-size: 0.75rem; font-weight: bold; 
    transition: 0.3s; text-decoration: none;
}
.sns-icon.note { background-color: #41C9B4; }
.sns-icon.x-twitter { background-color: #000; font-size: 1rem; }
.sns-icon.booth { background-color: #fc4d50; }
.sns-icon.syosetu { background-color: #304878; font-size: 0.7rem; }
.sns-icon:hover { transform: translateY(-5px); opacity: 0.8; }

.footer-bottom { background: #f8fcf9; text-align: center; padding: 25px 0; border-top: 1px solid #eee; position: relative; }
.page-top { position: absolute; right: 30px; top: -30px; background: white; border: 1px solid #eee; width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }

/* --- Responsive Settings --- */
@media (max-width: 1024px) {
    .category-grid { grid-template-columns: repeat(2, 1fr); }
    .book-item { width: 47%; }
    .footer-links-grid { grid-template-columns: repeat(2, 1fr); }
    .request-list { grid-template-columns: 1fr; }
    .project-grid { grid-template-columns: repeat(2, 1fr); }

    /* タブレット画面：LINEバーを2段構成に変更 */
    .line-invite-bar { 
        flex-direction: column; 
        align-items: flex-start; 
        padding: 15px 20px;
        border-radius: 15px;
        gap: 15px;
    }
    .line-text-area { width: 100%; }
    .line-button-area { width: 100%; justify-content: flex-start; }

    /* タブレット：矢印を常に半透明で表示 */
    .hero-area button { opacity: 0.5; width: 40px; height: 40px; font-size: 1rem; }
    .slider-prev { left: 10px; }
    .slider-next { right: 10px; }
}

@media (min-width: 1025px) {
    /* PC：ホバー時のみ表示 */
    .hero-area button { opacity: 0; }
    .hero-area:hover button { opacity: 1; }
}

@media (max-width: 768px) {
    .header-top { padding: 10px 15px; }
    .logo-link img { max-height: 55px; }
    .company-name { font-size: 1rem; }
    .search-trigger span { display: none; }
    
    .menu-toggle { display: flex; }
    
    .global-nav {
        display: none;
        position: absolute; top: 100%; left: 0; width: 100%;
        background: #fff; border-bottom: 2px solid var(--primary-color);
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }
    .global-nav.is-active { display: block; }
    .global-nav > ul { flex-direction: column; }
    .global-nav li a { padding: 15px 25px; border-bottom: 1px solid #f0f0f0; text-align: left; }
    .dropdown-menu { position: static; transform: none; box-shadow: none; width: 100%; background: #f9f9f9; }

    .hero-area { margin: 10px; }
    /* スマホ：矢印を小さくして常に表示 */
    .hero-area button { opacity: 0.5; width: 35px; height: 35px; font-size: 0.9rem; }
    .slider-prev { left: 5px; }
    .slider-next { right: 5px; }

    .content-card { padding: 20px; margin: 10px; }
    .book-item { width: 46%; }
    .footer-links-grid { grid-template-columns: 1fr; text-align: center; }

    .project-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .project-info { padding: 10px; }
    .project-info h3 { font-size: 0.8rem; margin-bottom: 5px; }
    .project-info p { font-size: 0.7rem; line-height: 1.3; }
    
    /* --- LINE招待バー：スマホ画面での2段構成 --- */
    .line-invite-bar { 
        flex-direction: column; 
        align-items: flex-start; 
        padding: 15px 20px; 
        border-radius: 15px;
        gap: 15px; 
    }
    .line-text-area { 
        width: 100%;
        font-size: 0.85rem; 
        gap: 10px; 
    }
    .line-text-area i { font-size: 1.8rem; }
    .line-button-area { 
        width: 100%; 
        display: flex;
        gap: 10px; 
    }
    .line-btn { 
        flex: 1; 
        padding: 10px; 
        font-size: 0.8rem; 
    }
}