/* CSSカスタムプロパティ */
:root {
    --bg-color: #ffffff;
    --text-color: #2C3E50;
    --accent-color: #E74C3C;
    --light-gray: #ECF0F1;
    --secondary-color: #3498DB;
    --font-primary: 'Noto Sans JP', sans-serif;
    --font-secondary: 'Poppins', sans-serif;
}

/* 基本スタイル */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
}

/* 共通レイアウト */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 100px 0;
}

/* ヘッダー */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 0;
    background-color: transparent;
    backdrop-filter: none;
    z-index: 1000;
    transition: all 0.3s ease;
}

body .header.scrolled {
    background-color: rgba(44, 62, 80, 0.95);
    backdrop-filter: blur(10px);
}

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

.logo a {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-secondary);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    color: white;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 5px 0;
    position: relative;
}

/* 下層ページのヘッダー文字色 */
body.subpage .logo a {
    color: var(--text-color);
}

body.subpage .nav-links a {
    color: var(--text-color);
}

/* 下層ページのヘッダー背景 */
body.subpage .header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

body.subpage .header.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* ヒーローセクション */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    overflow: hidden;
    padding-top: 80px;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 2s ease;
}

.hero-slide:nth-child(1) {
    background-image: url('images/hero-geometric.jpg');
}

.hero-slide:nth-child(2) {
    background-image: url('images/hero-pattern.jpg');
}

.hero-slide:nth-child(3) {
    background-image: url('images/hero-tech.jpg');
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
        rgba(0, 0, 0, 0.7) 0%,
        rgba(0, 0, 0, 0.5) 50%,
        rgba(0, 0, 0, 0.7) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-text h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 30px;
    line-height: 1.2;
    font-family: var(--font-secondary);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-text p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* セクションタイトル共通 */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 50px;
    font-family: var(--font-secondary);
    color: var(--text-color);
    line-height: 1.2;
}

.section-title.white {
    color: white;
}

.section-subtitle {
    font-size: 1.1rem;
    text-align: center;
    color: #666;
    max-width: 800px;
    margin: -30px auto 50px;
    line-height: 1.8;
}

.section-subtitle.white {
    color: rgba(255, 255, 255, 0.9);
}

/* サブサービスセクション */
.sub-services {
    background-color: white;
    padding: 80px 0;
}

.sub-services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.sub-service-item {
    background: var(--light-gray);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sub-service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.sub-service-item h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--text-color);
    font-family: var(--font-secondary);
}

.sub-service-item p {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
}

/* サービスセクション */
.services {
    background-color: var(--light-gray);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    font-family: var(--font-secondary);
    color: var(--text-color);
}

.section-header p {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.service-item {
    background: white;
    padding: 40px 30px;
    border-radius: 15px;
    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(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.service-item h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    font-family: var(--font-secondary);
    color: var(--text-color);
}

.service-item p {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* 実績セクション */
.works {
    background-color: white;
}

.works-gallery {
    padding: 80px 0;
}

.works-filter {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 50px;
}

.filter-button {
    background: none;
    border: 2px solid var(--text-color);
    color: var(--text-color);
    padding: 10px 25px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-button:hover,
.filter-button.active {
    background-color: var(--text-color);
    color: white;
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 30px;
}

.work-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.work-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.work-item:hover img {
    transform: scale(1.1);
}

.work-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    background: linear-gradient(to top,
        rgba(0, 0, 0, 0.8) 0%,
        rgba(0, 0, 0, 0) 100%
    );
    color: white;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
}

.work-item:hover .work-info {
    transform: translateY(0);
    opacity: 1;
}

.work-info h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.work-info p {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* セクションCTAエリア */
.section-cta {
    text-align: center;
    margin-top: 50px;
}

.view-all-button {
    display: inline-block;
    padding: 15px 40px;
    background-color: transparent;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    font-weight: 700;
    border-radius: 30px;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.view-all-button:hover {
    background-color: var(--accent-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.2);
}

/* お問い合わせセクション */
.contact {
    background-color: var(--accent-color);
    color: white;
    text-align: center;
}

.contact h2 {
    font-family: var(--font-secondary);
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.contact p {
    font-size: 1.1rem;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.contact-info {
    margin-top: 30px;
}

.contact-button {
    display: inline-block;
    padding: 18px 50px;
    background-color: white;
    color: var(--accent-color);
    font-weight: 700;
    border-radius: 30px;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.contact-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* フッター */
footer {
    background-color: var(--text-color);
    color: white;
    padding: 80px 0 30px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 60px;
}

.footer-logo h2 {
    font-family: var(--font-secondary);
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.footer-logo p {
    font-size: 0.95rem;
    opacity: 0.8;
    line-height: 1.6;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.footer-section h3 {
    font-family: var(--font-secondary);
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: white;
}

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

.footer-section li {
    margin-bottom: 12px;
}

.footer-section a {
    color: white;
    opacity: 0.8;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.footer-section a:hover {
    opacity: 1;
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    margin-top: 60px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
    opacity: 0.7;
}

/* 下層ページ共通 */
.page-header {
    height: 400px;
    background: linear-gradient(to right, var(--text-color), var(--secondary-color));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-top: 80px;
}

.page-header-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    font-family: var(--font-secondary);
}

.page-header-content p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

/* レスポンシブ対応 */
@media (max-width: 1024px) {
    .services-grid,
    .works-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }

    .hero-text h1 {
        font-size: clamp(2rem, 4vw, 3rem);
    }

    .section-header h2 {
        font-size: 2rem;
    }

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

    .sub-services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .works-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

    .nav {
        padding: 0 15px;
    }

    .nav-links {
        gap: 20px;
    }

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

    .service-item,
    .work-item {
        padding: 30px 20px;
    }

    .page-header {
        height: 300px;
        padding: 0 20px;
    }

    .page-header-content h1 {
        font-size: 2.5rem;
    }

    .page-header-content p {
        font-size: 1rem;
    }

    .service-content {
        flex-direction: column;
        gap: 30px;
    }

    .service-detail {
        padding: 60px 0;
    }

    section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 40px;
    }

    .section-subtitle {
        font-size: 1rem;
        margin: -20px auto 40px;
        padding: 0 20px;
    }

    .sub-services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .sub-service-item {
        padding: 25px;
    }

    .works-filter {
        flex-wrap: wrap;
        gap: 10px;
    }

    .filter-button {
        padding: 8px 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 2rem;
    }

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

    .nav-links {
        gap: 15px;
    }

    .section-header h2 {
        font-size: 1.8rem;
    }

    .page-header-content h1 {
        font-size: 2rem;
    }

    .page-header-content p {
        font-size: 1rem;
    }

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

    .sub-service-item h3 {
        font-size: 1.1rem;
    }

    .service-features li {
        font-size: 1rem;
    }

    .works-grid {
        grid-template-columns: 1fr;
    }

    .work-info {
        transform: translateY(0);
        opacity: 1;
    }
}

/* アンカーリンクのオフセット調整 */
#services,
#works,
#contact {
    scroll-margin-top: 80px;
}

/* Aboutページ */
.about-content {
    padding: 80px 0;
    background-color: white;
}

.about-info {
    max-width: 1000px;
    margin: 0 auto;
}

.company-info {
    margin-bottom: 60px;
}

.company-info h2,
.about-text h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 30px;
    font-family: var(--font-secondary);
    color: var(--text-color);
    text-align: center;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 30px;
}

.info-item {
    background: var(--light-gray);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.info-item h3 {
    font-size: 1rem;
    margin-bottom: 15px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

.info-item p {
    font-size: 1.1rem;
    color: var(--text-color);
    font-weight: 500;
}

.info-item-image {
    background: var(--light-gray);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-item-image:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.address-card-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.about-text {
    background: var(--light-gray);
    padding: 50px;
    border-radius: 15px;
}

.about-text h2 {
    text-align: left;
    margin-bottom: 30px;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 20px;
    color: #666;
}

.about-text p:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .info-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .about-text {
        padding: 30px 20px;
    }
    
    .company-info h2,
    .about-text h2 {
        font-size: 1.8rem;
    }
}

/* コンタクトフォーム */
.contact-form {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
}

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

.form-group label {
    display: block;
    color: white;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group .required {
    color: var(--accent-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.15);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.submit-button {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.submit-button:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .contact-form {
        padding: 20px;
        margin: 0 15px;
    }
}

/* サービス詳細 */
.service-detail {
    padding: 100px 0;
}

.service-detail:nth-child(even) {
    background-color: var(--light-gray);
}

.service-content {
    display: flex;
    gap: 50px;
    margin-top: 50px;
}

.service-description {
    flex: 1;
}

.service-description p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 30px;
}

.service-features {
    list-style: none;
    padding: 0;
}

.service-features li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.service-features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background-color: var(--accent-color);
    border-radius: 50%;
}

/* 実績詳細ページ */
.work-hero {
    height: 600px;
    position: relative;
    margin-top: 80px;
    overflow: hidden;
}

.work-hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.work-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.work-hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 60px 0;
    background: linear-gradient(to top,
        rgba(0, 0, 0, 0.8) 0%,
        rgba(0, 0, 0, 0) 100%
    );
    color: white;
}

.work-hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 15px;
    font-family: var(--font-secondary);
}

.work-category {
    font-size: 1.2rem;
    opacity: 0.9;
}

.work-info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin: 60px 0;
    padding: 30px;
    background: var(--light-gray);
    border-radius: 15px;
}

.work-info-item h3 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    color: #666;
}

.work-info-item p {
    font-size: 1.1rem;
    font-weight: 500;
}

.work-info-item a {
    color: var(--accent-color);
}

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

.work-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin: 50px 0 20px;
    font-family: var(--font-secondary);
}

.work-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 30px;
}

.work-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin: 50px 0;
}

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

.work-gallery img:first-child {
    grid-column: 1 / -1;
}

.work-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 100px;
    padding-top: 50px;
    border-top: 1px solid var(--light-gray);
}

.prev-work,
.next-work {
    flex: 1;
    padding: 20px;
    transition: transform 0.3s ease;
}

.next-work {
    text-align: right;
}

.prev-work:hover {
    transform: translateX(-10px);
}

.next-work:hover {
    transform: translateX(10px);
}

.work-navigation span {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #666;
}

.work-navigation h4 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-top: 5px;
}

@media (max-width: 1024px) {
    .work-hero {
        height: 500px;
    }

    .work-hero-content h1 {
        font-size: 2.5rem;
    }

    .work-info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .work-hero {
        height: 400px;
    }

    .work-hero-content h1 {
        font-size: 2rem;
    }

    .work-gallery {
        grid-template-columns: 1fr;
    }

    .work-content h2 {
        font-size: 1.8rem;
    }

    .work-navigation {
        flex-direction: column;
        gap: 30px;
    }

    .next-work {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .work-hero {
        height: 300px;
    }

    .work-hero-content h1 {
        font-size: 1.8rem;
    }

    .work-info-grid {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .work-content h2 {
        font-size: 1.5rem;
    }
} 