/* --- 「法人理念・方針」セクションのスタイル --- */
#philosophy .container {
    max-width: 800px;
    width: 100%;
    text-align: center;
}

/* ヘッダーエリアのデザイン */
.philosophy-header {
    position: relative;
    padding: 40px 20px;
    margin-bottom: 20px;
    overflow: hidden;
}

.philosophy-header .header-bg-cloud {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 110%;
    max-width: 850px;
    z-index: 0;
    opacity: 0;
    color: #E3F2FD;
    animation: philosophy-fadeInCloud 1.5s 0.3s ease-out forwards;
}

.philosophy-section-title {
    font-size: 16px;
    font-weight: 500;
    color: #007BFF;
    margin-bottom: 8px;
    letter-spacing: 1px;
    opacity: 0;
    animation: philosophy-fadeInDown 0.8s 0.5s ease-out forwards;
}

.philosophy-h2 {
    font-size: 36px;
    font-weight: 700;
    margin: 0 0 16px 0;
    opacity: 0;
    animation: philosophy-fadeInDown 0.8s 0.7s ease-out forwards;
}

.philosophy-description {
    font-size: 15px;
    color: #555;
    line-height: 1.8;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0;
    animation: philosophy-fadeInDown 0.8s 0.9s ease-out forwards;
}

.philosophy-clouds {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 50px;
    padding: 0 20px;
    flex-wrap: wrap;
}
        
.philosophy-cloud-link {
    position: relative;
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease;
    width: 45%;
    max-width: 350px;
    opacity: 0;
    animation: philosophy-fadeInUp 0.8s 1.1s ease-out forwards;
}

.philosophy-cloud-link:nth-child(2) {
    animation-delay: 1.3s;
}

.philosophy-cloud-link:hover {
    transform: translateY(-10px);
}
        
.philosophy-svg-cloud {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.1));
    transition: filter 0.3s ease;
}

.philosophy-cloud-link:hover .philosophy-svg-cloud {
     filter: drop-shadow(0 12px 25px rgba(0, 0, 0, 0.15));
}

.philosophy-cloud-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 85%;
    padding: 20px;
    text-align: center;
}

.philosophy-cloud-content h3 {
    font-size: 18px;
    margin: 0 0 5px 0;
    font-weight: 700;
    position: relative;
    padding-bottom: 5px;
    display: inline-block;
}

.philosophy-cloud-content h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    border-radius: 1px;
}

.philosophy-cloud-link:nth-child(1) .philosophy-cloud-content h3::after {
    background-color: #66BB6A;
}
        
.philosophy-cloud-link:nth-child(2) .philosophy-cloud-content h3::after {
    background-color: #42A5F5;
}

.philosophy-cloud-content p {
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
    color: #666;
}
        
.philosophy-char {
    position: absolute;
    font-size: 28px;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10;
}

.char-1 {
    top: -10px;
    right: 0px;
    transform: translateY(10px);
}
.philosophy-cloud-link:hover .char-1 {
    opacity: 1;
    transform: translateY(0) rotate(-15deg);
}

.char-2 {
    top: -5px;
    left: 5px;
    transform: translateY(10px);
}
.philosophy-cloud-link:hover .char-2 {
    opacity: 1; 
    transform: translateY(0) rotate(5deg); 
}

.char-3 {
    top: -30px; 
    right: -25px;
    transform: translateY(10px) scale(0.5);
}

.philosophy-btn {
    position: relative;
    display: inline-block;
    padding: 14px 35px;
    border: none;
    border-radius: 50px;
    color: #fff;
    background-color: #EE7BAC;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    opacity: 0;
    animation: philosophy-fadeInUp 0.8s 1.5s ease-out forwards;
}

.philosophy-btn:hover .char-3 {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(15deg);
}
        
/* スマートフォン向けのレスポンシブ対応 */
@media (max-width: 768px) {
    .philosophy-h2 { font-size: 28px; }
    .philosophy-description { font-size: 14px; }
    .philosophy-clouds {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }
    .philosophy-cloud-link {
        width: 90%;
        max-width: 400px;
    }
}

/* アニメーション用キーフレーム */
@keyframes philosophy-fadeInCloud { to { opacity: 1; } }
@keyframes philosophy-fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes philosophy-fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}