/*
Theme Name: PORTFOLIO
Theme URI: https://maikotakeuchi.site/
Author: Your Name
Author URI: https://maikotakeuchi.site/
Description: A clean and modern portfolio theme designed for displaying creative works.
Version: 1.0.3 (Final Fixes including Variables and Margin Reset)
*/

/* * 1. 文字コード宣言とカスタムプロパティ (CSS変数) */
@charset "UTF-8";

/* 修正点: カスタムプロパティをグローバルに定義 (これで変数反映の問題が解決) */
:root {
    --color-base: #48c0cb;
    --color-accent: #4860cb;
    --color-text: #333333;
    --color-background: #ffffff;
}

/* グローバル設定 */
html {
    font-size: 62.5%; /* 1rem = 10px の設定 */
    line-height: 1.6;
}

body {
    /* 修正点: ブラウザのデフォルト8pxマージンをリセット */
    margin: 0; 
    padding: 0;
    
    font-family: 'Noto Sans JP', sans-serif;
    color: var(--color-text); /* 変数を適用 */
    font-size: 1.6rem; 
    background-color: var(--color-background) !important; /* メインカラー（背景色）を強制的に白に */
}

h1, h2 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

/* WordPress 管理バーによるレイアウト崩れ対策 */
html.wp-toolbar {
    margin-top: 0 !important; 
}

/* * 2. ヘッダー (Header) */
header {
    width: 100%;
    padding: 20px 40px;
    background-color: rgba(255, 255, 255, 0.95);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

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

.logo a {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--color-text);
    text-decoration: none;
}

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

nav ul li a {
    text-decoration: none;
    color: #555;
    font-size: 1.6rem;
    margin-left: 20px;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: var(--color-base); /* ベースカラーを適用 */
}

/* * 3. ヒーローセクション (Hero Section) */
.hero {
    padding-top: 80px; 
    text-align: center;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    /* 修正点: 高さを安全な固定値で確保 */
    min-height: 500px !important; 
}

.hero-with-bg {
    background-image: url('images/hero-bg.jpg') !important; /* **正しい画像パスに修正してください** */
    background-size: cover; 
    background-position: center;
    background-repeat: no-repeat;
    position: relative; 
    z-index: 1;
}

/* 背景画像が見やすいように半透明のオーバーレイを設定 */
.hero-with-bg::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4); 
    z-index: -1;
}

.hero-content {
    z-index: 10;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 6rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-content p {
    font-size: 2.4rem;
    font-weight: 300;
}


/* * 4. コンテンツラッパーとセクション基本設定 */
.content-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
}

section {
    padding: 60px 0;
}

h2 {
    font-size: 4rem;
    text-align: center;
    margin-bottom: 40px;
    border-bottom: 3px solid #ccc;
    display: inline-block;
    padding-bottom: 5px;
}

/* * 5. 作品ギャラリー (Works Section) */
.works-gallery {
    background-color: var(--color-background) !important; /* 白を適用 */
}

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

.work-item {
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
    overflow: hidden;
    border-radius: 8px;
}

.work-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.work-item img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.work-info {
    padding: 15px;
    text-align: center;
}

.work-info h3 {
    font-size: 2.2rem;
    margin-top: 0;
    margin-bottom: 5px;
}

/* * 6. About Me (自己紹介) セクション */
.about-cta {
    text-align: center;
    padding: 80px 0;
}

.about-cta p {
    font-size: 1.8rem;
    line-height: 1.8;
    max-width: 800px;
    margin: 20px auto;
}

/* * 7. フッター (Footer) */
footer {
    background-color: #333;
    color: #fff;
    padding: 40px 20px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    /* 修正点: Flexboxでコンテンツとボタンを左右に配置 */
    display: flex; 
    justify-content: space-between; 
    align-items: center;
}

footer p {
    margin-top: 0;
    margin-bottom: 0; 
    font-size: 1.4rem;
}

.cta-button {
    display: inline-block;
    /* 修正点: ベースカラーを適用 */
    background-color: var(--color-base); 
    color: #fff;
    text-decoration: none;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.cta-button:hover {
    /* 修正点: アクセントカラーを適用 */
    background-color: var(--color-accent); 
}

/* * 8. レスポンシブデザイン */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 4rem;
    }

    .footer-inner {
        flex-direction: column;
    }
    
    footer p {
        margin-bottom: 10px;
    }
}