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

/* 基本設定 */
body {
    font-family: 'Yu Gothic', 'YuGothic', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif;
    line-height: 1.8;
    color: #333;
    background: white;
}

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

/* ボタンスタイル */
.btn {
    display: inline-block;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 16px;
    font-weight: 600;
}

.btn-primary {
    background-color: #2c3e50;
    color: white;
}

.btn-primary:hover {
    background-color: #34495e;
    transform: translateY(-2px);
}

/* ヘッダー（統合版） */
header {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-image {
    height: 50px;
    width: auto;
}

.logo-main {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

.logo-sub {
    font-size: 0.75rem;
    color: #666;
    font-weight: 400;
}

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

.nav-links a {
    text-decoration: none;
    color: #333;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: #2c5f7d;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 3px 0;
    transition: 0.3s;
    transform-origin: center;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ヒーローセクション（index.html用） */
.hero {
    background: white;
    padding: 12rem 2rem 4rem;
    min-height: 100vh;
}

.hero-text-section {
    max-width: 1000px;
    margin: 0 auto 1rem;
    text-align: left;
    position: relative;
    z-index: 2;
}

.hero-text-section h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.6;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
    text-indent: 1em;
    background: linear-gradient(135deg, #1a3a4a 0%, #2c5f7d 50%, #4a5fa8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(2px 2px 3px rgba(0, 0, 0, 0.3));
}

.hero-text-section p {
    font-size: 1.2rem;
    font-weight: 500;
    line-height: 1.9;
    color: #555;
    text-indent: 1em;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.15);
}

.hero-image-section {
    max-width: 1400px;
    margin: -6rem auto 0;
    height: 60vh;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}

.hero-image-section img {
    position: absolute;
    top: 0;
    left: 0;
    width: 120%;
    height: 100%;
    object-fit: cover;
    animation: slowPan 30s ease-in-out infinite alternate;
}

@keyframes slowPan {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-16.67%);
    }
}

.hero-content {
    padding: 0 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    text-align: left;
    z-index: 2;
    margin-bottom: 50px;
}

.hero-content h2 {
    font-size: 4rem;
    margin-bottom: 30px;
    font-weight: 600;
    background: linear-gradient(135deg, #2c3e50, #34495e, #1a252f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 2px 2px 4px rgba(44, 62, 80, 0.3);
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.5rem;
    color: #555;
    line-height: 1.8;
    max-width: 600px;
}

.hero-images {
    width: 100%;
    overflow: hidden;
    position: absolute;
    bottom: 0;
    left: 0;
    height: 40%;
}

.hero-image-scroll {
    display: flex;
    animation: scrollImages 30s linear infinite;
    height: 100%;
}

.hero-image-scroll img {
    height: 100%;
    width: auto;
    object-fit: cover;
    margin-right: 20px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

@keyframes scrollImages {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* ページヘッダー（詳細ページ用） */
.page-header {
    background: #f8f9fa;
    padding: 12rem 2rem 6rem;
    text-align: center;
}

.page-title {
    font-size: 3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #2c5f7d;
}

.page-subtitle {
    font-size: 1.2rem;
    color: #666;
}

/* セクション共通スタイル */
section {
    padding: 6rem 2rem;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #2c5f7d;
}

.section-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 4rem;
    font-size: 1.1rem;
}

/* 会社概要セクション（ごあいさつ） */
.about {
    background-color: #fff;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.policies {
    margin-bottom: 60px;
}

.policy-item {
    margin-bottom: 40px;
    padding: 30px;
    background-color: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #2c3e50;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.policy-item:hover {
    transform: translateX(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.policy-item h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #2c3e50;
    font-weight: 600;
}

.policy-item p {
    color: #666;
    line-height: 1.8;
    font-size: 1rem;
}

.representative {
    text-align: right;
    margin-top: 40px;
}

.representative p {
    font-size: 1.2rem;
    color: #2c3e50;
    font-weight: 600;
    padding: 20px;
    border-top: 2px solid #2c3e50;
    display: inline-block;
}

/* サービスセクション */
.services {
    background-color: #f8f9fa;
}

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

.service-item {
    text-align: center;
    padding: 40px 30px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

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

.service-item h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #2c3e50;
    font-weight: 600;
}

.service-item p {
    color: #666;
    line-height: 1.6;
}

/* 実績セクション */
.portfolio {
    background-color: #fff;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

.portfolio-item {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.portfolio-item:hover {
    transform: translateY(-10px);
}

.portfolio-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.portfolio-content {
    padding: 30px;
}

.portfolio-content h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #2c3e50;
    font-weight: 600;
}

.portfolio-content p {
    color: #666;
    line-height: 1.6;
}

/* ブログセクション */
.blog {
    background-color: #f8f9fa;
}

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

.blog-item {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.blog-item:hover {
    transform: translateY(-5px);
}

.blog-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-content {
    padding: 25px;
}

.blog-date {
    color: #999;
    font-size: 0.9rem;
}

.blog-content h3 {
    font-size: 1.3rem;
    margin: 10px 0 15px;
    color: #2c3e50;
    font-weight: 600;
}

.blog-content p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.blog-link {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.blog-link:hover {
    color: #34495e;
}

/* お問い合わせセクション */
.contact {
    background-color: #fff;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #2c3e50;
    font-weight: 600;
}

.contact-info p {
    margin-bottom: 30px;
    line-height: 1.8;
    color: #666;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-item strong {
    display: block;
    color: #2c3e50;
    margin-bottom: 5px;
    font-weight: 600;
}

.contact-item p {
    margin: 0;
    color: #666;
}

.contact-form {
    background-color: #f8f9fa;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2c3e50;
}

/* フッター（統合版） */
footer {
    background: #1a1a1a;
    color: white;
    padding: 3rem 2rem 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: #667eea;
}

.footer-section p,
.footer-section a {
    color: #aaa;
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #333;
    color: #666;
}

/* レスポンシブデザイン（統合版） */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
        z-index: 1001;
    }
    
    nav {
        padding: 1rem 1.5rem;
        position: relative;
        z-index: 1001;
    }
    
    .logo {
        z-index: 1001;
        position: relative;
    }
    
    .logo-image {
        height: 45px;
        width: auto;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2.5rem;
        transition: left 0.3s ease;
        box-shadow: none;
        z-index: 1000;
        padding-top: 0;
    }
    
    .nav-links.mobile-active {
        left: 0;
    }
    
    .nav-links a {
        font-size: 1.4rem;
        padding: 1rem 2rem;
        width: auto;
        text-align: center;
        color: #2c5f7d;
        font-weight: 500;
        border-radius: 8px;
        transition: all 0.3s ease;
    }
    
    .nav-links a:hover,
    .nav-links a.active {
        background: rgba(44, 95, 125, 0.1);
        color: #1a4a5a;
    }
    
    /* ヘッダーの背景オーバーレイ */
    .nav-links::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.4);
        z-index: -1;
    }
    
    /* モバイルメニューの閉じるボタン */
    .mobile-menu-header {
        position: absolute;
        top: 1.5rem;
        right: 1.5rem;
    }
    
    .mobile-menu-close {
        background: none;
        border: none;
        font-size: 2rem;
        color: #2c5f7d;
        cursor: pointer;
        padding: 0.5rem;
        line-height: 1;
        display: none;
    }
    
    @media (max-width: 768px) {
        .mobile-menu-close {
            display: block;
        }
    }
    
    /* ロゴテキストの調整 */
    .logo-main {
        font-size: 1rem;
    }
    
    .logo-sub {
        font-size: 0.7rem;
    }

    .page-header {
        padding: 8rem 2rem 4rem;
    }

    .page-title {
        font-size: 2rem;
    }

    .hero {
        padding: 8rem 2rem 3rem;
    }

    .hero-text-section h1 {
        font-size: 2rem;
    }

    .hero-text-section p {
        font-size: 0.95rem;
    }

    .hero-image-section {
        height: 40vh;
    }

    .about-content,
    .services-grid,
    .works-grid,
    .blog-grid,
    .policy-grid,
    .footer-content {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .container {
        padding: 0 15px;
    }
    
    section {
        padding: 4rem 2rem;
    }
}

@media (max-width: 480px) {
    nav {
        padding: 0.8rem 1rem;
    }
    
    .nav-links {
        width: 100%;
        gap: 2rem;
    }
    
    .nav-links a {
        font-size: 1.2rem;
        padding: 1rem 1.5rem;
    }
    
    .logo-image {
        height: 38px;
    }
    
    .logo-main {
        font-size: 0.9rem;
    }
    
    .logo-sub {
        font-size: 0.65rem;
    }
    
    .mobile-menu-toggle {
        padding: 3px;
    }
    
    .mobile-menu-toggle span {
        width: 22px;
        height: 2px;
    }
    
    .hero {
        padding: 7rem 1rem 3rem;
    }
    
    .hero-text-section h1 {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }
    
    .hero-text-section p {
        font-size: 0.9rem;
        line-height: 1.7;
    }
    
    .hero-image-section {
        height: 35vh;
        margin: -4rem auto 0;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .service-item,
    .contact-form {
        padding: 30px 20px;
    }
    
    .hero-content {
        padding: 0 15px;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    section {
        padding: 3rem 1rem;
    }
    
    .container {
        padding: 0 10px;
    }
}

/* スムーススクロール */
html {
    scroll-behavior: smooth;
}

/* アニメーション */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.service-item,
.portfolio-item,
.blog-item,
.policy-item {
    animation: fadeInUp 0.6s ease-out;
}

/* ヒーローセクションのアニメーション改善 */
.hero-content h2 {
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-content p {
    animation: fadeInUp 1s ease-out 0.4s both;
}