@import url('https://fonts.googleapis.com/css2?family=Kaisei+Tokumin:wght@400;500;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-image: url(../img/外観.png);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    font-family: 'Kaisei Tokumin', serif;
    min-height: 100vh;
    padding: 30px 20px;
}
/* 白い透かし（オーバーレイ） */
body::before {
    content: "";
    position: fixed; /* スクロールしても固定 */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.5); /* 透明度を調整（0.2〜0.4が自然） */
    z-index: -1; /* 背景画像より前面・本文より背面 */
    pointer-events: none; /* クリック操作などを邪魔しない */
}


.container {
    max-width: 1400px;
    margin: 0 auto;
}

.header {
    display: flex;
    align-items: center;
    margin-bottom: 40px;
    color: #333;
}

.header-icon {
    font-size: 2rem;
    margin-right: 15px;
    color: #8b7cc8;
}

.header h1 {
    font-size: 2.2rem;
    font-weight: 600;
    color: #555;
}

.main-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 30px;
    align-items: start;
}

.philosophy-card {
    background: linear-gradient(135deg, #a8c8ec 0%, #7fb3d3 100%);
    border-radius: 20px;
    padding: 30px;
    height: 600px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.philosophy-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.philosophy-card:hover::before {
    left: 100%;
}

.philosophy-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.philosophy-image {
    width: 100%;
    height: 200px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 200"><rect fill="%23ffffff" opacity="0.3" width="400" height="200" rx="10"/><circle fill="%23d4af37" cx="150" cy="80" r="30"/><circle fill="%23cd853f" cx="200" cy="100" r="25"/><circle fill="%23daa520" cx="250" cy="70" r="20"/><rect fill="%23333" x="100" y="130" width="200" height="8" rx="4"/><rect fill="%23ff6347" x="80" y="150" width="20" height="20" rx="10"/><rect fill="%23ff6347" x="120" y="160" width="15" height="15" rx="7"/><rect fill="%23ff6347" x="160" y="155" width="18" height="18" rx="9"/><rect fill="%23ff6347" x="200" y="150" width="20" height="20" rx="10"/><rect fill="%23ff6347" x="240" y="160" width="15" height="15" rx="7"/><rect fill="%23ff6347" x="280" y="155" width="18" height="18" rx="9"/></svg>') center/cover;
    border-radius: 15px;
    margin-bottom: 20px;
}

.philosophy-title {
    color: #2c5aa0;
    font-size: 3rem;
    font-weight: bold;
    text-align: center;
    line-height: 1.4;
    margin-bottom: 20px;
}

.philosophy-plus {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2c5aa0;
    font-size: 1.5rem;
    font-weight: bold;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 20px;
    height: 600px;
}

.category-card {
    border-radius: 20px;
    padding: 30px 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.category-card:hover::before {
    left: 100%;
}

.category-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.category-plus {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
}

.category-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    transition: transform 0.3s ease;
    object-fit: contain;
}

.category-card:hover .category-icon {
    transform: scale(1.1);
}

.category-title {
    font-size: 2.2rem;
    font-weight: bold;
    color: white;
    line-height: 1.3;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.communication .category-title {
    font-size: 2rem;
}

.communication .title-line1 {
    font-size: 2.2rem;
}

.communication .title-line2 {
    font-size: 1.8rem;
}

/* カテゴリー別の背景色 */
.health { 
    background: linear-gradient(135deg, #b19cd9 0%, #a87fb3 100%);
}
.health .category-plus { color: #8b7cc8; }

.exercise { 
    background: linear-gradient(135deg, #daa520 0%, #b8860b 100%);
}
.exercise .category-plus { color: #b8860b; }

.cognition { 
    background: linear-gradient(135deg, #ff6347 0%, #e5533d 100%);
}
.cognition .category-plus { color: #e5533d; }

.communication { 
    background: linear-gradient(135deg, #ff6347 0%, #e5533d 100%);
}
.communication .category-plus { color: #e5533d; }

.social { 
    background: linear-gradient(135deg, #b6c9f0 0%, #a8bce8 100%);
}
.social .category-plus { color: #7fb3d3; }

.support { 
    background: linear-gradient(135deg, #f4b942 0%, #e8a826 100%);
}
.support .category-plus { color: #e8a826; }

@media (max-width: 1200px) {
    .main-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .philosophy-card {
        height: auto;
        min-height: 300px;
    }
    
    .categories-grid {
        height: auto;
        grid-template-rows: auto auto;
    }
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 1.8rem;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, 1fr);
    }
    
    .philosophy-card {
        padding: 25px;
    }
    
    .category-card {
        padding: 20px 15px;
    }
}

@media (max-width: 480px) {
    .categories-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(6, 1fr);
    }
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 30px;
    border-radius: 20px;
    width: 80%;
    max-width: 500px;
    text-align: center;
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

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

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 15px;
}

.close:hover {
    color: #000;
}

.modal-title {
    color: #333;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.modal-description {
    color: #666;
    line-height: 1.6;
}

/* --- ホームボタン --- */
.home-button {
    position: fixed;
    top: 25px;
    right: 30px;
    background: rgba(255, 255, 255, 0.8);
    color: #2c5aa0; /* ミントと合う落ち着いた青系 */
    font-size: 1rem;
    font-weight: bold;
    padding: 10px 18px;
    border-radius: 25px;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    backdrop-filter: blur(6px);
    transition: all 0.3s ease;
    z-index: 1001;
}

.home-button:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}
