/* 基本設定 */
:root {
    --primary-color: #6366f1;
    --secondary-color: #4f46e5;
    --accent-color: #8b5cf6;
    --text-color: #1f2937;
    --light-text: #f9fafb;
    --background: #ffffff;
    --dark-background: #111827;
    --light-background: #f3f4f6;
    --border-color: #e5e7eb;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--background);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ヘッダー */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 15px 0;
    transition: all 0.3s ease;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex !important;
    align-items: center !important;
    gap: 14px;
    height: auto;
}

.logo-img {
    height: 2.5em;
    width: auto;
    display: block;
    object-fit: contain;
}

.logo-texts {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

.logo p {
    font-size: 0.9rem;
    color: var(--text-color);
    margin-top: -5px;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: var(--primary-color);
}

.mobile-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.mobile-menu span {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 3px 0;
    transition: all 0.3s ease;
}

/* ヒーローセクション */
.hero {
    height: 80vh;
    min-height: 500px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: var(--light-text);
    display: flex;
    align-items: center;
    text-align: center;
    padding-top: 80px;
    background-image: url('../images/cipherweb-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(30, 30, 60, 0.55); /* 半透明の背景色 */
    border-radius: 18px;
    padding: 48px 32px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.10);
}

.hero h2,
.hero p {
    text-shadow: 0 2px 8px rgba(0,0,0,0.35), 0 1px 0 #666;
}

.hero h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.btn {
    display: inline-block;
    background-color: var(--light-text);
    color: var(--primary-color);
    padding: 12px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}

.btn-small {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--light-text);
    padding: 8px 15px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

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

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

.alternate {
    background-color: var(--light-background);
}

.section-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
}

/* 会社情報 */
.about-content {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
}

.about-text {
    max-width: 800px;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.company-details {
    list-style: none;
    margin-top: 20px;
}

.company-details li {
    margin-bottom: 10px;
}

/* サービス */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.service-card {
    background-color: var(--background);
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

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

.service-card .icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.service-card h3 {
    margin-bottom: 15px;
}

/* プロジェクト */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 30px;
}

.project-card {
    background-color: var(--background);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.project-image {
    height: 200px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-info {
    padding: 20px;
}

.project-info h3 {
    margin-bottom: 10px;
}

.project-info p {
    margin-bottom: 15px;
    font-size: 0.95rem;
}

/* お問い合わせ */
.contact-content {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

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

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

.social-links .btn-small {
    display: block;
    margin: 24px auto 0 auto; /* 上に余白、中央揃え */
    width: fit-content;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    box-shadow: 0 2px 8px rgba(99,102,241,0.10);
    transition: background 0.3s, box-shadow 0.3s;
}

.social-links .btn-small:hover {
    background-color: var(--accent-color);
    box-shadow: 0 4px 16px rgba(99,102,241,0.18);
}

.social-links h3 {
    margin-bottom: 15px;
    text-align: center;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: var(--light-text);
    border-radius: 50%;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

/* フッター */
footer {
    background-color: var(--dark-background);
    color: var(--light-text);
    padding: 50px 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.footer-logo h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

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

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: var(--light-text);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links ul li a:hover {
    color: var(--primary-color);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    nav ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: rgba(255, 255, 255, 0.95);
        flex-direction: column;
        padding: 20px 0;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    }

    nav ul.show {
        display: flex;
    }

    nav ul li {
        margin: 10px 20px;
    }

    .mobile-menu {
        display: flex;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-logo {
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .hero h2 {
        font-size: 1.7rem;
    }

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

    .services-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }
}
