/* リセットCSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* カスタムプロパティ（CSS変数） */
:root {
    --primary-color: #52C41A;
    --primary-light: #95DE64;
    --primary-dark: #389E0D;
    --accent-color: #87D068;
    --background: #F6FFED;
    --text-primary: #1F1F1F;
    --text-secondary: #595959;
    --white: #FFFFFF;
    --gray-light: #F0F0F0;
    --gray-border: #D9D9D9;
    --shadow: rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* 基本スタイル */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
    background-color: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* タイポグラフィ */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.2;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* ボタン */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    color: var(--white);
}

.btn-secondary {
    background-color: var(--white);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* ヘッダー */
.header {
    background-color: var(--white);
    box-shadow: 0 2px 4px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: bold;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-primary);
    font-weight: 500;
    padding: 0.5rem;
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link.active {
    color: var(--primary-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--primary-color);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    margin: 5px 0;
    transition: var(--transition);
}

/* ヒーローセクション */
.hero {
    position: relative;
    padding: 100px 0;
    background: linear-gradient(135deg, var(--background) 0%, var(--primary-light) 100%);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.1;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%2352C41A" fill-opacity="1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,112C672,96,768,96,864,112C960,128,1056,160,1152,160C1248,160,1344,128,1392,112L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
    background-position: bottom;
    background-repeat: no-repeat;
}

.hero-content {
    position: relative;
    text-align: center;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* セクション共通 */
section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

/* サービス概要 */
.services-overview {
    background-color: var(--gray-light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 8px var(--shadow);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px var(--shadow);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.service-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.service-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.service-link {
    color: var(--primary-color);
    font-weight: 500;
}

/* ポートフォリオ */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.portfolio-card {
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px var(--shadow);
    transition: var(--transition);
}

.portfolio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px var(--shadow);
}

.portfolio-link {
    display: block;
    color: inherit;
}

.portfolio-link:hover {
    color: inherit;
}

.portfolio-image {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
}

.portfolio-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portfolio-content {
    padding: 1.5rem;
}

.portfolio-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.portfolio-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.portfolio-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.portfolio-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--background);
    color: var(--primary-dark);
    border-radius: 4px;
    font-size: 0.875rem;
}

.portfolio-more {
    text-align: center;
    margin-top: 3rem;
}

/* ページヘッダー */
.page-header {
    background-color: var(--background);
    padding: 40px 0;
    text-align: center;
}

.page-title {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.page-description {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

/* フィルタリング */
.filter-section {
    background-color: var(--gray-light);
    padding: 30px 0;
}

.filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: flex-start;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-title {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.filter-options,
.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.filter-checkbox,
.filter-tag {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.filter-checkbox input,
.filter-tag input {
    margin-right: 0.5rem;
}

.filter-result {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-border);
}

.filter-reset {
    align-self: flex-start;
}

/* お問い合わせCTA */
.contact-cta {
    background-color: var(--background);
    text-align: center;
}

.contact-title {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.contact-description {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.external-icon {
    margin-left: 0.5rem;
}

/* フッター */
.footer {
    background-color: var(--text-primary);
    color: var(--white);
    padding: 40px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.footer-description {
    color: var(--gray-light);
}

.footer-heading {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.footer-list {
    list-style: none;
}

.footer-list li {
    margin-bottom: 0.5rem;
}

.footer-list a {
    color: var(--gray-light);
}

.footer-list a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--gray-light);
}

/* プロジェクト詳細 */
.breadcrumb {
    padding: 1rem 0;
    background-color: var(--gray-light);
}

.breadcrumb-list {
    display: flex;
    list-style: none;
    font-size: 0.875rem;
}

.breadcrumb-list li::after {
    content: '/';
    margin: 0 0.5rem;
    color: var(--text-secondary);
}

.breadcrumb-list li:last-child::after {
    content: '';
}

.project-detail {
    padding: 40px 0;
}

.project-overview {
    margin-bottom: 3rem;
}

.project-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.project-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.project-category {
    background-color: var(--primary-light);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
}

.gallery-main {
    margin-bottom: 1rem;
}

.gallery-main img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.thumb {
    cursor: pointer;
    border-radius: 4px;
    overflow: hidden;
    opacity: 0.7;
    transition: var(--transition);
}

.thumb:hover,
.thumb.active {
    opacity: 1;
}

.section-subtitle {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
}

.challenge-solution {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.challenge,
.solution {
    background-color: var(--gray-light);
    padding: 1.5rem;
    border-radius: 8px;
}

.challenge h4,
.solution h4 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.feature-list {
    list-style-position: inside;
    margin-bottom: 2rem;
}

.results {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.result-item {
    text-align: center;
}

.result-value {
    font-size: 3rem;
    font-weight: bold;
    color: var(--primary-color);
}

.result-label {
    color: var(--text-secondary);
}

.tech-stack {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.tech-group h4 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.tech-group ul {
    list-style-position: inside;
}

.project-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-border);
}

.project-nav-links {
    display: flex;
    gap: 2rem;
}

/* 事業紹介ページ */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    margin-bottom: 4rem;
}

.about-text p {
    margin-bottom: 1rem;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.philosophy-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.philosophy-item {
    text-align: center;
}

.philosophy-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.profile-card {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 3rem;
    background-color: var(--gray-light);
    padding: 2rem;
    border-radius: 8px;
}

.profile-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.profile-name {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.profile-title {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.profile-bio p {
    margin-bottom: 1rem;
}

.profile-skills h5 {
    margin: 1rem 0;
}

.profile-skills ul {
    list-style-position: inside;
}

.link-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.link-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--shadow);
    text-align: center;
}

.link-title {
    margin-bottom: 1rem;
}

.link-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.info-table {
    width: 100%;
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px var(--shadow);
}

.info-table th,
.info-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-border);
}

.info-table th {
    background-color: var(--gray-light);
    width: 200px;
    font-weight: 600;
}

.info-table ul {
    list-style-position: inside;
}

/* サービス紹介ページ */
.service-detail {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--shadow);
    margin-bottom: 3rem;
    overflow: hidden;
}

.service-header {
    background-color: var(--background);
    padding: 2rem;
    text-align: center;
}

.service-icon-large {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.service-content {
    padding: 2rem;
}

.service-lead {
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

.service-features,
.service-target,
.service-price,
.service-examples {
    margin-bottom: 2rem;
}

.service-features h4,
.service-target h4,
.service-price h4,
.service-examples h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.service-features ul,
.service-target ul {
    list-style-position: inside;
}

.price-note {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.example-link {
    display: inline-block;
    margin-right: 1rem;
    margin-bottom: 0.5rem;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .nav-list {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .services-grid,
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .profile-card {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .profile-image {
        max-width: 200px;
        margin: 0 auto;
    }
    
    .challenge-solution {
        grid-template-columns: 1fr;
    }
    
    .results {
        grid-template-columns: 1fr;
    }
    
    .link-cards {
        grid-template-columns: 1fr;
    }
    
    .filter-container {
        flex-direction: column;
    }
    
    .project-nav {
        flex-direction: column;
        gap: 1rem;
    }
}

/* ローディングとアニメーション */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* アクセシビリティ */
:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}