﻿/* 基本設定とフォント */
:root {
    --primary-color: #0d6efd;
    --primary-hover-color: #0a58ca;
    --header-height: 70px;
    --text-color: #333;
    --section-bg-color: #f8f9fa;
    --header-height: 70px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Noto Sans JP', sans-serif;
    background-color: #ffffff; /* デフォルトの背景色 */
    color: var(--text-color);
    transition: background-color 0.4s ease;
    line-height: 1.7;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ヘッダー */
.header {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid #eee;
    height: var(--header-height);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.logo {
    font-size: 1.7rem;
    font-weight: 700;
}

.nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    gap: 35px;
}

.nav a {
    font-size: 1rem;
    font-weight: 400;
    position: relative;
    padding: 5px 0;
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease-in-out;
}

.nav a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.hamburger-menu {
    display: none; /* PCでは非表示 */
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 5px 0;
    transition: all 0.3s ease-in-out;
}

/* メインコンテンツ */
main {
    padding-top: var(--header-height);
}

/* ヒーローセクション */
.hero {
    background-image: linear-gradient(rgba(0,0,0,0.1), rgba(0,0,0,0.2)), url("images/main.jpg");
    background-size: cover;
    background-position: center;
    height: calc(80vh - var(--header-height));
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    margin-bottom: 1rem;
    font-weight: 700;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.6);
}

.hero-content p {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    max-width: 600px;
    margin: 0 auto;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
}

/* セクション共通スタイル */
.service-section, .about-section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.8rem;
    text-align: center;
    margin-bottom: 60px;
    font-weight: 700;
}

/* サービスセクション */
.service-section {
    background-color: var(--section-bg-color);
}

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

.service-item {
    background: #fff;
    padding: 35px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
    text-align: left;
    transition: transform 0.3s, box-shadow 0.3s;
}

.service-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.service-item h3 {
    margin-top: 0;
    font-size: 1.5rem;
}

/* Aboutセクション */
.about-section {
    text-align: center;
}

.about-text {
    max-width: 700px;
    margin: 0 auto 40px auto;
    font-size: 1.1rem;
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: #fff;
    padding: 14px 35px;
    border-radius: 50px;
    font-weight: 700;
    transition: background-color 0.3s, transform 0.3s;
}

.btn:hover {
    background-color: var(--primary-hover-color);
    transform: translateY(-3px);
}

/* フッター */
.footer {
    background-color: #212529;
    color: #f8f9fa;
    padding: 40px 0;
    text-align: center;
}

.color-picker-container {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

#bgColorPicker {
    border: 2px solid #fff;
    padding: 0;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: none;
    cursor: pointer;
    overflow: hidden;
}
#bgColorPicker::-webkit-color-swatch-wrapper {
    padding: 0;
}
#bgColorPicker::-webkit-color-swatch {
    border: none;
    border-radius: 50%;
}

/* レスポンシブ対応 (スマートフォン) */
@media (max-width: 768px) {
    .nav {
        position: fixed;
        top: 0;
        right: -100%; /* 初期状態では画面外 */
        width: 70%;
        height: 100vh;
        background-color: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.4s ease-in-out;
        display: flex;
    }

    .nav.active {
        right: 0; /* activeクラスで表示 */
    }

    .nav ul {
        flex-direction: column;
        gap: 40px;
        text-align: center;
    }

    .nav a {
        font-size: 1.5rem;
    }

    .hamburger-menu {
        display: block;
    }
    
    .hamburger-menu.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .hamburger-menu.active span:nth-child(2) {
        opacity: 0;
    }
    .hamburger-menu.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}
