/* ============================================
   common.css - 目筋トレ 共通スタイル
   ============================================ */

/* --- Site Header --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid #333333;
    padding: 15px 0;
}

.site-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
    margin-right: 8px;
}

.site-logo img {
    height: 30px;
    width: auto;
}

/* --- Desktop Navigation --- */
.site-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.site-nav-link {
    color: #9ca3af;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 14px;
    border-radius: 6px;
    transition: color 0.3s, background-color 0.3s;
    white-space: nowrap;
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

.site-nav-link:hover {
    color: #f9fafb;
    background-color: rgba(249, 250, 251, 0.1);
}

.site-nav-link.active {
    color: #10b981;
    background-color: rgba(16, 185, 129, 0.1);
}

/* --- Dropdown --- */
.site-nav-dropdown {
    position: relative;
}

.site-nav-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
}

.site-dropdown-arrow {
    font-size: 0.7rem;
    transition: transform 0.3s;
    display: inline-block;
}

.site-nav-dropdown:hover .site-dropdown-arrow,
.site-nav-dropdown-menu.show + .site-dropdown-arrow {
    transform: rotate(180deg);
}

.site-nav-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 12px;
    padding: 8px;
    min-width: 220px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    z-index: 1001;
}

.site-nav-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 0;
    right: 0;
    height: 8px;
}

.site-nav-dropdown-menu.show {
    display: block;
    animation: siteDropdownIn 0.2s ease;
}

@keyframes siteDropdownIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-8px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.site-nav-dropdown-item {
    display: block;
    padding: 12px 16px;
    color: #e5e7eb;
    text-decoration: none;
    border-radius: 8px;
    transition: background-color 0.2s;
    font-weight: 500;
    font-size: 0.95rem;
    line-height: 1.4;
}

.site-nav-dropdown-item:hover {
    background-color: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.site-dropdown-icon {
    margin-right: 8px;
    font-size: 1.1rem;
}

.site-dropdown-desc {
    display: block;
    font-size: 0.8rem;
    color: #6b7280;
    font-weight: 400;
    margin-top: 2px;
    padding-left: 28px;
}

.site-nav-dropdown-item:hover .site-dropdown-desc {
    color: #9ca3af;
}

/* --- Hamburger --- */
.site-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-left: auto;
}

.site-hamburger span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: #f9fafb;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.site-hamburger.active span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}

.site-hamburger.active span:nth-child(2) {
    opacity: 0;
}

.site-hamburger.active span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

/* --- Mobile Navigation --- */
.site-mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    z-index: 9999;
    display: none;
    pointer-events: none;
}

.site-mobile-nav.active {
    display: block;
    pointer-events: auto;
}

.site-mobile-nav-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.site-mobile-nav-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 280px;
    max-width: 85vw;
    height: 100%;
    background: #1f2937;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
    padding: 20px;
    overflow-y: auto;
    animation: siteMobileSlideIn 0.3s ease;
}

@keyframes siteMobileSlideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.site-mobile-nav-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    color: #f9fafb;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.site-mobile-nav-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.site-mobile-nav-link {
    display: block;
    padding: 14px 16px;
    color: #e5e7eb;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    border-bottom: 1px solid #374151;
    transition: all 0.2s;
}

.site-mobile-nav-link:first-of-type {
    margin-top: 56px;
}

.site-mobile-nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    padding-left: 24px;
}

.site-mobile-nav-link.active {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.site-mobile-nav-group {
    padding: 16px 16px 6px;
    color: #6b7280;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.site-mobile-nav-sub {
    padding-left: 32px;
    font-size: 0.95rem;
}

/* --- Breadcrumbs --- */
.site-breadcrumb {
    background: transparent;
    padding: 12px 0;
}

.site-breadcrumb-inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.site-breadcrumb-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    font-size: 0.85rem;
}

.site-breadcrumb-list li {
    display: flex;
    align-items: center;
}

.site-breadcrumb-list li:not(:last-child)::after {
    content: '>';
    margin: 0 8px;
    color: #9ca3af;
}

.site-breadcrumb-list a {
    color: #10b981;
    text-decoration: none;
    transition: color 0.2s;
}

.site-breadcrumb-list a:hover {
    color: #34d399;
    text-decoration: underline;
}

.site-breadcrumb-list li:last-child span {
    color: #6b7280;
}

/* --- Site Footer --- */
.site-footer {
    padding: 40px 20px;
    background: #0f172a;
    text-align: center;
    border-top: 1px solid #1e293b;
    margin-top: 60px;
}

.site-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.site-footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.site-footer-links a {
    color: #9ca3af;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.site-footer-links a:hover {
    color: #10b981;
}

.site-footer-text {
    color: #9ca3af;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.site-footer-copyright {
    color: #6b7280;
    font-size: 0.85rem;
}

/* --- Scroll Reveal --- */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .site-nav {
        display: none;
    }
    .site-hamburger {
        display: flex;
    }
}

@media (max-width: 768px) {
    .site-header-inner {
        padding: 0 15px;
    }
    .site-breadcrumb-inner {
        padding: 0 15px;
    }
}
