/* ========================================
   基本設定
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #27ae60;
    --text-color: #333;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --gray: #6c757d;
    --light-gray: #e9ecef;
    --dark-gray: #343a40;
}

body {
    font-family: 'Segoe UI', 'Hiragino Sans', 'Yu Gothic', Meiryo, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--white);
}

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

/* ========================================
   ヘッダー・ナビゲーション
   ======================================== */
header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--white);
    text-decoration: none;
}

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

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

/* ブランド名専用フォント */
.brand-name {
    font-family: 'Playfair Display', serif;
    letter-spacing: 0.08em;
    font-weight: 700;
    font-style: italic;
}

.logo .subtitle {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0;
}

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

.nav-menu a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--secondary-color);
    border-bottom-color: var(--secondary-color);
}

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

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--white);
    margin: 3px 0;
    transition: 0.3s;
}

/* ========================================
   ヒーロースライダー
   ======================================== */
.hero-slider {
    position: relative;
    overflow: hidden;
}

.slider-container {
    position: relative;
    width: 100%;
    height: 600px;
}

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

.slide.active {
    opacity: 1;
}

.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.8), rgba(52, 152, 219, 0.7));
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    text-align: center;
    color: var(--white);
}

.hero-content h2 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.4rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.slider-dots {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1rem;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s;
}

.dot.active,
.dot:hover {
    background-color: var(--white);
}

/* ========================================
   ボタン
   ======================================== */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

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

.btn-primary:hover {
    background-color: #229954;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

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

/* ========================================
   セクション共通
   ======================================== */
.intro,
.latest-news,
.sponsors,
.content-section,
.team-members,
.concept,
.logic-section,
.tools-section,
.diagram-section,
.blog-section,
.contact-section {
    padding: 4rem 0;
}

.intro,
.sponsors {
    background-color: var(--light-bg);
}

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

section h3 {
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

section p {
    margin-bottom: 1rem;
    text-align: center;
}

.text-center {
    text-align: center;
    margin-top: 2rem;
}

/* ========================================
   特徴カード
   ======================================== */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

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

.feature-card h3 {
    margin-bottom: 0.8rem;
    font-size: 1.3rem;
    text-align: center;
}

.feature-card p {
    color: var(--gray);
    line-height: 1.6;
    text-align: center;
}

/* ========================================
   ブログ記事グリッド
   ======================================== */
.news-grid,
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.news-card,
.blog-card {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.news-card:hover,
.blog-card:hover {
    transform: translateY(-5px);
}

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

.news-card-content,
.blog-card-content {
    padding: 1.5rem;
}

.news-card h4,
.blog-card h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.news-date,
.blog-date {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
}

.news-card p,
.blog-card p {
    color: var(--text-color);
    line-height: 1.6;
    text-align: left;
}

.read-more {
    display: inline-block;
    margin-top: 1rem;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
}

.read-more:hover {
    text-decoration: underline;
}

.no-posts {
    text-align: center;
    padding: 3rem;
    color: var(--gray);
}

/* ========================================
   スポンサーセクション
   ======================================== */
.sponsor-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 2rem;
}

.sponsor-item {
    padding: 1.5rem 3rem;
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* ========================================
   ページヘッダー
   ======================================== */
.page-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 3rem 0;
    text-align: center;
}

.page-header h2 {
    color: var(--white);
    margin-bottom: 0.5rem;
}

.page-header p {
    opacity: 0.9;
}

/* ========================================
   コンテンツセクション
   ======================================== */
.content-section p,
.concept p,
.diagram-info p {
    text-align: left;
    max-width: 900px;
    margin: 1rem auto;
}

.content-section ul,
.diagram-info ul {
    max-width: 900px;
    margin: 1rem auto;
    padding-left: 2rem;
}

.strength-list {
    list-style: none;
    padding-left: 0;
}

.strength-list li {
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--light-gray);
}

.strength-list li:last-child {
    border-bottom: none;
}

/* ========================================
   メンバーカード
   ======================================== */
.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.member-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.member-photo {
    width: 120px;
    height: 120px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--secondary-color);
}

.member-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-initial {
    font-size: 3rem;
    color: var(--white);
    font-weight: 700;
}

.member-card h4 {
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
    color: var(--primary-color);
}

.member-role {
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.member-name-en {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.member-sns {
    margin: 1rem 0;
}

.member-sns a {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 0.9rem;
}

.member-description {
    text-align: left;
    color: var(--text-color);
    line-height: 1.6;
}

/* ========================================
   コンセプトセクション
   ======================================== */
.concept-section {
    margin: 2rem 0;
    padding: 2rem;
    background-color: var(--light-bg);
    border-radius: 10px;
}

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

/* ========================================
   ロボット仕様
   ======================================== */
.specs-section {
    padding: 3rem 0;
    background-color: var(--light-bg);
}

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

.spec-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.spec-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

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

.spec-card h4 {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.spec-card p {
    color: var(--gray);
    font-size: 0.95rem;
}

/* 画像付きスペックカード */
.spec-card-image {
    padding: 1rem;
}

.spec-image {
    width: 100%;
    height: 120px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 1rem;
}

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

/* ========================================
   技術カード
   ======================================== */
.logic-card {
    background-color: var(--light-bg);
    padding: 2rem;
    border-radius: 10px;
    margin: 1.5rem 0;
    border-left: 4px solid var(--accent-color);
}

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

.logic-card p {
    text-align: left;
    line-height: 1.8;
}

/* ========================================
   ツールカード
   ======================================== */
.tools-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.tool-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

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

.tool-card h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.tool-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tool-item {
    background-color: var(--light-bg);
    padding: 0.6rem 1rem;
    border-radius: 6px;
    color: var(--text-color);
    font-size: 0.95rem;
    transition: background-color 0.2s;
}

.tool-item:hover {
    background-color: #e0e7ff;
}

/* ツールカード画像スタイル */
.tool-card-image {
    padding: 1.5rem;
}

.tool-image {
    width: 100%;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    overflow: hidden;
}

.tool-image img {
    max-width: 100%;
    max-height: 150px;
    object-fit: contain;
}

/* ========================================
   お問い合わせフォーム
   ======================================== */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.contact-info h3,
.contact-form-container h3 {
    text-align: left;
}

.contact-info p {
    text-align: left;
}

.contact-methods {
    margin-top: 2rem;
}

.contact-method {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: var(--light-bg);
    border-radius: 8px;
}

.contact-method h4 {
    color: var(--primary-color);
    margin-bottom: 0.8rem;
}

.contact-method p {
    text-align: left;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.required {
    color: #e74c3c;
}

.form-group input,
.form-group textarea {
    padding: 0.8rem;
    border: 1px solid var(--light-gray);
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.form-note {
    font-size: 0.9rem;
    color: var(--gray);
    margin-top: 1rem;
    text-align: left;
}

.form-message {
    padding: 1rem;
    border-radius: 5px;
    margin-top: 1rem;
}

.form-message.success {
    background-color: #d4edda;
    color: #155724;
}

.form-message.error {
    background-color: #f8d7da;
    color: #721c24;
}

/* ========================================
   フッター
   ======================================== */
footer {
    background-color: var(--dark-gray);
    color: var(--white);
    padding: 3rem 0 1rem;
}

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

.footer-section h3 {
    color: var(--white);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    text-align: left;
}

.footer-section p {
    margin-bottom: 0.5rem;
    opacity: 0.9;
    text-align: left;
}

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

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

.footer-section a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.footer-section a:hover {
    opacity: 1;
}

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

.footer-bottom p {
    margin: 0;
    opacity: 0.7;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-logo {
    width: 100px;
    height: auto;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    object-fit: contain;
}

.footer-description {
    font-size: 0.9rem;
    line-height: 1.6;
    opacity: 0.8;
}

/* ========================================
   表彰バナー
   ======================================== */
.achievement-banner {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    margin: 2rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.achievement-banner img {
    width: 100%;
    height: auto;
    display: block;
}

.achievement-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: var(--white);
    padding: 2rem;
}

.achievement-overlay h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    color: var(--white);
}

.achievement-rank {
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffd700;
    margin: 0;
}

/* ========================================
   開発プロセス
   ======================================== */
.development-process {
    background-color: var(--white);
}

.process-showcase {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.process-item {
    background-color: var(--light-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.process-item img {
    width: 100%;
    height: auto;
    display: block;
}

.process-item h4 {
    color: var(--primary-color);
    margin: 1.5rem 1.5rem 0.5rem;
    font-size: 1.3rem;
}

.process-item p {
    padding: 0 1.5rem 1.5rem;
    text-align: left;
    color: var(--text-color);
}

/* ========================================
   ギャラリー
   ======================================== */
.robot-gallery {
    background-color: var(--light-bg);
}

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

.gallery-item {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* ========================================
   レスポンシブデザイン
   ======================================== */
@media (max-width: 768px) {
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--primary-color);
        flex-direction: column;
        align-items: center;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s;
    }

    .nav-menu.active {
        max-height: 400px;
    }

    .nav-menu li {
        width: 100%;
        text-align: center;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-menu a {
        display: block;
        padding: 1rem;
    }

    .hamburger {
        display: flex;
    }

    /* スライダーをスマホ対応 */
    .slider-container {
        height: 400px;
    }

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

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .slider-dots {
        bottom: 1rem;
    }

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

    .features,
    .members-grid,
    .news-grid,
    .blog-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   ブログ記事詳細ページ
   ======================================== */
.blog-post {
    padding: 2rem 0 4rem;
    background-color: var(--white);
}

.post-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--light-gray);
}

.breadcrumb {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 1rem;
}

.breadcrumb a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s;
}

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

.post-date {
    font-size: 0.95rem;
    color: var(--gray);
    margin-bottom: 0.5rem;
}

.post-header h1 {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 0;
    line-height: 1.3;
}

.post-content {
    max-width: 900px;
    margin: 0 auto;
}

.post-image {
    width: 100%;
    margin: 2rem 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.post-image img {
    width: 100%;
    height: auto;
    display: block;
}

.post-content h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--secondary-color);
    text-align: left;
}

.post-content h3 {
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-top: 1.8rem;
    margin-bottom: 0.8rem;
    text-align: left;
}

.post-content p {
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 1.2rem;
    color: var(--text-color);
}

.post-content strong {
    color: var(--primary-color);
    font-weight: 600;
}

.post-content ul.strength-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.post-content ul.strength-list li {
    padding: 1rem 1.2rem;
    margin-bottom: 1rem;
    background-color: var(--light-bg);
    border-left: 4px solid var(--secondary-color);
    border-radius: 4px;
    font-size: 1.05rem;
    line-height: 1.7;
}

.post-navigation {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--light-gray);
    text-align: center;
}

/* ========================================
   PCB画像表示
   ======================================== */
.pcb-image-container {
    margin: 2rem auto;
    max-width: 600px;
    text-align: center;
}

.pcb-image {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    background-color: #1a1a2e;
    padding: 1rem;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .post-header h1 {
        font-size: 1.6rem;
    }

    .post-content h2 {
        font-size: 1.4rem;
    }

    .post-content h3 {
        font-size: 1.2rem;
    }

    .post-content p,
    .post-content ul.strength-list li {
        font-size: 1rem;
    }

    .pcb-image-container {
        max-width: 100%;
    }

    .pcb-image {
        max-width: 100%;
    }
}
