/* =============================================== */
/* ========== 共通スタイル (common.css) ========== */
/* =============================================== */

/* ---------- サブメニュー（ドロップダウン） ---------- */
.nav-menu .has-submenu {
    position: relative;
}

.nav-menu .submenu {
    /* display: none; を削除 */
    position: absolute;
    top: 100%;
    left: 0;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 1001;
    list-style: none;
    padding: 10px 0;
    min-width: 180px;
    border-radius: 8px;
    backdrop-filter: blur(5px);
    
    /* ↓↓↓ ここからが追加・変更部分 ↓↓↓ */
    opacity: 0; /* 最初は透明にする */
    visibility: hidden; /* 最初は非表示で見えなくする */
    transform: translateY(10px); /* 少し下に配置しておく */
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s; /* アニメーションを設定 */
}

.nav-menu .submenu li a {
    color: #333333;
    padding: 10px 20px;
    text-decoration: none;
    display: block;
    white-space: nowrap;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-size: 1.1rem;
}

.nav-menu .submenu li a:hover {
    background-color: #97ca00;
    color: white;
}

.nav-menu .has-submenu:hover > .submenu {
    /* display: block; を変更 */
    opacity: 1; /* 不透明にする */
    visibility: visible; /* 表示する */
    transform: translateY(0); /* 元の位置に戻す */
}

/* ---------- ヘッダーナビゲーション ---------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 50px;
    background: rgba(255, 255, 255, 0);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    padding: 15px 50px;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: #97ca00;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1002;
    position: relative;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: #97ca00;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.logo:hover .logo-icon {
    transform: rotate(360deg) scale(1.1);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 40px;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-link {
    color: #333333;
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
    font-size: 1.35rem;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #97ca00;
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: #97ca00;
}

.nav-link:hover::after {
    width: 100%;
}

.cta-button {
    background: #97ca00;
    color: white !important;
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(151, 202, 0, 0.3);
    font-size: 1.1rem;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(151, 202, 0, 0.4);
    background: #6f9502;
    color: white !important;
}

.cta-button::after {
    display: none;
}

/* ---------- モバイルメニュー用ハンバーガー ---------- */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    z-index: 1002;
    position: relative;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: #333333;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* ---------- フッター ---------- */
footer {
    background: #222;
    color: white;
    padding: 60px 0 40px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 40px;
}

.footer-brand h3 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #97ca00;
    font-weight: bold;
}

.footer-brand p {
    opacity: 0.9;
    line-height: 1.8;
    font-size: 1.2rem;
}

.footer-section h4 {
    margin-bottom: 25px;
    color: #97ca00;
    font-size: 1.4rem;
    font-weight: bold;
}

.footer-links {
    list-style: none;
    /* フッターのulのデフォルトpaddingをリセット */
    padding-left: 0; 
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    line-height: 1.6;
    /* ホバー時のズレを防ぐためインラインブロック化 */
    display: inline-block;
}

.footer-links a:hover {
    opacity: 1;
    color: #97ca00;
    transform: translateX(5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.7;
    font-size: 1.1rem;
}

/* =============================================== */
/* ========== レスポンシブスタイル ========== */
/* =============================================== */

/* ---------- タブレットサイズ ---------- */
@media (max-width: 992px) {
    .navbar { padding: 15px 30px; }
    .nav-menu { gap: 25px; }
    .nav-link { font-size: 1.2rem; }
    .cta-button { padding: 10px 25px; font-size: 1rem; }
    .footer-content { grid-template-columns: 1fr 1fr; gap: 40px; }
    .footer-brand { grid-column: 1 / -1; text-align: center; margin-bottom: 20px; }
}

/* ---------- モバイルサイズ ---------- */
@media (max-width: 768px) {
    .navbar, .navbar.scrolled { padding: 15px 20px; }
    .logo { font-size: 1.6rem; }
    .logo-icon { width: 35px; height: 35px; }
    
    .nav-menu { 
        position: fixed; 
        top: 0; 
        right: -100%; 
        width: 100%; 
        height: 100vh; 
        background: rgba(255, 255, 255, 0.98); 
        backdrop-filter: blur(20px); 
        flex-direction: column; 
        justify-content: center; 
        gap: 30px; 
        transition: right 0.3s ease; 
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1); 
    }
    .nav-menu.active { right: 0; }
    .nav-link { font-size: 1.5rem; padding: 10px 0; }
    .cta-button { font-size: 1.2rem; padding: 15px 40px; margin-top: 20px; }
    .mobile-menu-toggle { display: flex; }
    
    .nav-menu .submenu {
        position: static;
        background-color: transparent;
        box-shadow: none;
        padding: 0;
        min-width: auto;
        border-radius: 0;
        backdrop-filter: none;
        margin-left: 20px;
    }
    .nav-menu .submenu li a {
        padding: 8px 0;
        font-size: 1.3rem;
    }
    .nav-menu .submenu li a:hover {
        background-color: transparent;
        color: #97ca00;
    }
    
    footer { padding: 50px 0 30px; }
    .footer-content { grid-template-columns: 1fr; gap: 30px; text-align: center; }
    .footer-brand { grid-column: 1; margin-bottom: 10px; }
    .footer-brand h3 { font-size: 1.8rem; margin-bottom: 15px; }
    .footer-brand p { font-size: 1.1rem; }
    .footer-section h4 { font-size: 1.3rem; margin-bottom: 20px; }
    .footer-links a { font-size: 1.1rem; }
    .footer-bottom { font-size: 1rem; padding-top: 25px; }
}

/* ---------- 小さいモバイルサイズ ---------- */
@media (max-width: 480px) {
    .logo { font-size: 1.4rem; }
    .logo-icon { width: 30px; height: 30px; }
    .nav-link { font-size: 1.3rem; }
    .footer-brand h3 { font-size: 1.6rem; }
    .footer-brand p { font-size: 1rem; }
    .footer-section h4 { font-size: 1.2rem; }
    .footer-links a { font-size: 1rem; }
}