/*
Theme Name: Protoward
Theme URI: http://protoward.com
Author: Protoward LLC.
Author URI: http://protoward.com
Description: 合同会社Protowardのホームページ用Wordpressテーマです。
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: protoward
*/

:root {
    --primary-color: #333;
    --accent-color: #f39800;
    --bg-color: #fff;
    --gray-bg: #f5f5f5;
    --dark-section-bg: #555;
    --text-color: #333;
    --text-light: #888;
    --white: #fff;
    --white-transparent: rgba(255, 255, 255, 0.9);
    --header-height: 80px;
    --section-spacing: 40px;
    --container-width: 1000px;
    --placeholder-bg: #ddd;
    --border-color: #f39800;
    --disabled-color: #ccc;
    --header-bg: rgba(255, 255, 255, 0.95);
    --hover-bg: #fdfdfd;

    /* Border Radius */
    --border-radius: 10px;
    --radius-small: 6px;

    /* Fonts */
    --main-font: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;

    /* Transition */
    --transition: 0.3s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--main-font);
    color: var(--text-color);
    line-height: 1.8;
    background-color: var(--bg-color);
    background-image: radial-gradient(#eee 0.5px, transparent 0.5px);
    background-size: 20px 20px;
    padding-top: var(--header-height);
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity var(--transition);
}

a:hover {
    opacity: 0.7;
}

ul {
    list-style: none;
}

/* Utilities */
.u-pc-only {
    display: inline;
}


img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Container: コンテナ（幅制限） */
.container {
    max-width: var(--container-width);
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding: 0 0px;
}

/* Header: ヘッダー */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: var(--header-bg);
    z-index: 1000;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    width: 100%;
}

.site-title {
    font-size: 1.2rem;
    font-weight: normal;
}

.custom-logo-link {
    display: block;
    line-height: 1;
}

.custom-logo {
    max-height: 50px;
    width: auto;
    transition: opacity var(--transition);
}

.custom-logo:hover {
    opacity: 0.8;
}

.main-navigation ul {
    display: flex;
    gap: 50px;
    font-size: 1.1rem;
}

.main-navigation a:hover {
    color: var(--accent-color);
}

/* Section Common: セクション共通設定 */
.section-title {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 40px;
    font-weight: bold;
    display: inline-block;
    padding-bottom: 5px;
    position: relative;
}

.section-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background-color: var(--accent-color);
    transition: width 0.8s ease-out;
}

.reveal.active .section-title::after {
    width: 100%;
}

section {
    margin-bottom: var(--section-spacing);
}

/* Hero: メインビジュアル / ブロック崩しゲーム */
.hero-section {
    background-color: var(--gray-bg);
    height: 600px;
    min-height: 600px;
    max-width: var(--container-width);
    margin: 0 auto var(--section-spacing);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

#game-container {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

#hero-game {
    display: block;
    max-width: 100%;
    max-height: 100%;
    cursor: none;
}

/* ゲームクリア時のメッセージ表示エリア */
#game-clear-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 80%;
    max-width: 800px;
    pointer-events: none;
    z-index: 10;
}

.clear-inner {
    padding: 20px;
}

.thank-you {
    font-size: 1.7rem;
    color: var(--accent-color);
    margin-bottom: 20px;
    font-weight: bold;
    opacity: 0;
    animation: fadeIn 1s forwards;
}

.company-mission {
    font-size: 1.7rem;
    color: var(--primary-color);
    line-height: 1.6;
    opacity: 0;
    animation: fadeIn 1s forwards 0.5s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* News Front Page: トップページニュース */
.news-grid {
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 40px;
}

.news-item {
    background: var(--white);
    width: calc((100% - 60px) / 3);
    max-width: 400px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.news-item:hover,
.news-item.active:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.news-thumbnail {
    width: 100%;
    height: 200px;
    background-color: var(--placeholder-bg);
    margin-bottom: 15px;
    overflow: hidden;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.news-thumbnail img {
    height: 100%;
    width: 100%;
    object-fit: cover;
}

.news-title {
    font-size: 1rem;
    margin-bottom: 10px;
    line-height: 1.4;
    font-weight: normal;
    transition: color 0.3s ease;
}

.news-item:hover .news-title {
    color: var(--accent-color);
}

.news-date {
    font-size: 0.9rem;
    color: var(--accent-color);
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

.all-news-link {
    text-align: center;
}

.button {
    display: inline-block;
    padding: 12px 45px;
    background: var(--accent-color);
    color: var(--white);
    font-size: 1.0rem;
    position: relative;
    overflow: hidden;
    transition: background var(--transition);
    border-radius: var(--border-radius);
}

.button:hover {
    background: #e08a00;
    opacity: 1;
}

.button::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.3) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-25deg);
    transition: left 0.5s ease;
}

.button:hover::before {
    left: 150%;
}

/* Service: 事業内容 */
.service-block {
    background: var(--dark-section-bg);
    color: var(--white);
    padding: 80px 20px;
    text-align: center;
    margin-bottom: 30px;
    height: 350px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
}

.service-bg-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 6s ease;
    z-index: 0;
}

.service-block:hover .service-bg-layer {
    transform: scale(1.1);
}

.service-block::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    transition: background 0.3s ease;
    z-index: 1;
}

.service-block:hover::before {
    background: rgba(0, 0, 0, 0.3);
}

.service-content {
    position: relative;
    z-index: 2;
}

.service-block h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    font-weight: bold;
}

.service-block p {
    font-size: 1.0rem;
    line-height: 1.8;
}

/* Company: 会社概要 */
.company-info {
    width: fit-content;
    margin: 0 auto;
    font-size: 1.0rem;
}

.company-info dl {
    display: grid;
    grid-template-columns: 200px 1fr;
    row-gap: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.company-info dt {
    font-weight: bold;
}

.company-info dd {
    margin-left: 0;
}

/* Footer: フッター */
.site-footer {
    text-align: center;
    padding: 50px 0;
    margin-top: 0px;
    font-size: 0.8rem;
}

.site-footer small {
    font-size: 0.9rem;
}

/* Contact Form: お問い合わせフォーム */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: var(--white);
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border-radius: var(--border-radius);
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    font-size: 0.9rem;
}

.form-group .required {
    color: #e33;
    font-size: 0.8rem;
    margin-left: 5px;
}

.form-group .optional {
    color: #888;
    font-size: 0.8rem;
    margin-left: 5px;
    font-weight: normal;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: var(--radius-small);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

.form-submit {
    text-align: center;
    margin-top: 30px;
}

.form-submit .button {
    border: none;
    cursor: pointer;
    width: 100%;
    max-width: 250px;
    font-weight: bold;
}

.form-submit.preview-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.button.secondary {
    background: #888;
}

.button.secondary:hover {
    background: #666;
}

/* Preview Area */
.preview-note {
    font-weight: bold;
    color: var(--accent-color);
    margin-bottom: 20px;
    text-align: center;
}

.preview-list {
    text-align: left;
    margin-bottom: 30px;
}

.preview-list dt {
    font-weight: bold;
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 5px;
}

.preview-list dd {
    margin-bottom: 20px;
    padding-left: 10px;
    border-left: 3px solid var(--accent-color);
    min-height: 1.5rem;
}

.contact-message {
    max-width: 600px;
    margin: 0 auto 30px;
    padding: 20px;
    border-radius: var(--border-radius);
    text-align: center;
    font-weight: bold;
    animation: fadeInDown 0.5s ease-out;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.contact-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.contact-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

#contact-page-form {
    margin-bottom: 0px;
}

/* ニュース一覧 */
.page-header {
    padding: 20px 0 20px;
    text-align: left;
}

.page-title {
    font-size: 1.5rem;
    font-weight: normal;
    color: var(--accent-color);
}

.news-list-item {
    display: flex;
    gap: 30px;
    border-bottom: 1px solid var(--border-color);
    padding: 30px 0;
}

.news-list-thumbnail {
    width: 200px;
    flex-shrink: 0;
    background-color: var(--placeholder-bg);
    height: 150px;
    border-radius: var(--radius-small);
    overflow: hidden;
}

.news-list-thumbnail img {
    height: 100%;
    width: 100%;
    object-fit: cover;
}

.news-list-content {
    flex-grow: 1;
}

.news-list-content .news-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.pagination {
    margin-top: 40px;
    text-align: center;
}

.pagination .page-numbers {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 38px;
    text-align: center;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    background: var(--white);
    margin: 0 5px;
    font-weight: bold;
    text-decoration: none;
    border-radius: var(--radius-small);
}

.pagination .page-numbers.current {
    background: var(--accent-color);
    color: var(--white);
}

.pagination .page-numbers.dots {
    border: none;
    width: auto;
}

.pagination .page-numbers:hover {
    opacity: 0.8;
}

/* Single Post: 投稿詳細ページ */
.single-post-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding-top: 40px;
    padding-bottom: 0px;
}

.post-header {
    margin-bottom: 60px;
}

.post-date {
    display: block;
    font-size: 1.0rem;
    margin-bottom: 10px;
    font-weight: normal;
}

.post-title {
    font-size: 2.0rem;
    font-weight: bold;
    line-height: 1.4;
}

.post-thumbnail {
    width: 60%;
    margin: 0 auto 60px;
    background-color: var(--placeholder-bg);
    aspect-ratio: 16/9;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-content {
    font-size: 1.0rem;
    line-height: 2;
    margin-bottom: 80px;
    overflow-wrap: break-word;
    word-break: break-all;
}

.post-navigation {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 40px 0;
}

.nav-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 140px;
    height: 45px;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all var(--transition);
    background: var(--white);
    border-radius: var(--radius-small);
}

.nav-button:hover {
    opacity: 0.8;
    background: var(--hover-bg);
}

.nav-button.all-news {
    background: var(--accent-color);
    color: var(--white);
    font-weight: bold;
}

.nav-button.disabled {
    border-color: var(--disabled-color);
    color: var(--disabled-color);
    pointer-events: none;
}

.reveal {
    opacity: 0;
    transition: all 0.8s ease;
}

.reveal-up {
    transform: translateY(30px);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive: レスポンシブ対応 */
.menu-toggle {
    display: none;
}

@media (max-width: 768px) {
    .container {
        padding: 0 30px;
    }

    .news-grid {
        flex-direction: column;
    }

    .news-item {
        width: 100%;
        max-width: none;
    }

    .news-list-item {
        flex-direction: column;
    }

    .news-list-thumbnail {
        width: 100%;
        height: auto;
        aspect-ratio: 16/9;
    }

    .company-info dl {
        grid-template-columns: 150px 1fr;
    }

    .menu-toggle {
        display: block;
        width: 30px;
        height: 24px;
        position: relative;
        background: none;
        border: none;
        cursor: pointer;
        z-index: 1001;
    }

    .menu-toggle span {
        display: block;
        position: absolute;
        height: 3px;
        width: 100%;
        background: var(--accent-color);
        border-radius: 9px;
        left: 0;
        transition: .25s ease-in-out;
    }

    .menu-toggle span:nth-child(1) {
        top: 0px;
    }

    .menu-toggle span:nth-child(2) {
        top: 10px;
    }

    .menu-toggle span:nth-child(3) {
        top: 20px;
    }

    .toggled-on .menu-toggle span:nth-child(1) {
        top: 10px;
        transform: rotate(135deg);
    }

    .toggled-on .menu-toggle span:nth-child(2) {
        opacity: 0;
        left: -60px;
    }

    .toggled-on .menu-toggle span:nth-child(3) {
        top: 10px;
        transform: rotate(-135deg);
    }

    .main-navigation {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: var(--white-transparent);
        z-index: 1000;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: var(--header-height);
    }

    .toggled-on .main-navigation {
        display: flex;
    }

    .main-navigation ul {
        flex-direction: column;
        align-items: center;
        gap: 0;
        font-size: 1.5rem;
        width: 100%;
        border-top: 1px solid var(--accent-color);
    }

    .main-navigation li {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid var(--accent-color);
    }

    .main-navigation a {
        color: var(--accent-color);
        display: block;
        padding: 20px 0;
    }

    .header-inner {
        position: relative;
    }

    .site-branding {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        z-index: 1001;
    }

    .post-thumbnail {
        width: 100%;
        margin-bottom: 40px;
    }

    .hero-section {
        height: 500px;
        min-height: 500px;
    }

    #game-clear-message {
        width: 90%;
    }

    .thank-you {
        font-size: 1.5rem;
    }

    .company-mission {
        font-size: 1rem;
    }

    #hero-game {
        cursor: default;
    }

    .u-pc-only {
        display: none;
    }
}