/*
Theme Name: hiehie-syokudou
Description: 冷え冷え食堂の独自WordPressテーマ - ページ別CSS管理システム対応
Version: 1.0.0
Author: ippei
*/

/* 
 * メインスタイルファイル
 * 基本的なリセットCSSと全体の設定のみを記載
 * 
 * CSS管理構造：
 * - style.css：基本設定とリセットCSS
 * - global/layout.css：全ページ共通（ヘッダー・フッター・ナビゲーション）
 * - pages/front-page.css：トップページ専用
 * - pages/page.css：固定ページ専用
 * - pages/single.css：単一投稿ページ専用
 * - pages/archive.css：アーカイブページ専用
 */

:root {
    --main-color: #74ACDD;
    --title-color: #387FC2;
    --text-color: #333;
    --white-color: #fff;
    --active-color: #2c3e50;
    --border-color: #e1e1e1;
    --leading-trim: calc((1em - 1lh) / 2);
    --hiehie-font:
        "Oswald",
        "BIZ UDGothic",
        -apple-system, BlinkMacSystemFont, "Helvetica Neue",
        "Yu Gothic", "Hiragino Kaku Gothic ProN",
        Meiryo, sans-serif;
    --hiehie-heading-font:
        "Noto Sans", sans-serif;
}

/* ==========================================================================
   CSS Reset
   ========================================================================== */

/* スムーズスクロール設定 */
html {
    scroll-behavior: smooth;
}

/* CSS reset */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
}

/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
    display: block;
}

body {
    line-height: 1;
}

ol, ul {
    list-style: none;
}

blockquote, q {
    quotes: none;
}

blockquote:before, blockquote:after,
q:before, q:after {
    content: '';
    content: none;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}

/* ==========================================================================
   基本設定
   ========================================================================== */

/* WordPress管理バーを非表示 */
#wpadminbar {
    display: none;
}

html {
    margin: 0 !important;
    padding: 0 !important;
}

body {
    font-family: var(--hiehie-font);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    overflow-x: hidden;
    letter-spacing: 0.1em;
}

h1, h2, h3, h4, h5, h6, .hero-subtitle {
    font-family: var(--hiehie-heading-font);
    font-weight: normal;
    letter-spacing: 0.05em !important;
}

/* メインコンテンツエリアのマージン調整（固定ヘッダー対応） */
.site-main:not(.home .site-main) {
    margin-top: calc(70px + 1.3rem);
}

/* ==========================================================================
    レスポンシブデバイス別表示制御
    ========================================================================== */

/* PC表示（タブレット含む：769px以上） */
@media (min-width: 769px) {
    .pc-only {
        display: block !important;
    }

    .sp-only {
        display: none !important;
    }
}

/* スマートフォン表示（768px以下） */
@media (max-width: 768px) {
    .pc-only {
        display: none !important;
    }

    .sp-only {
        display: block !important;
    }
}

/* フレックスボックス用の表示制御 */
@media (min-width: 769px) {
    .pc-flex {
        display: flex !important;
    }

    .sp-flex {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .pc-flex {
        display: none !important;
    }

    .sp-flex {
        display: flex !important;
    }
}

/* インラインブロック用の表示制御 */
@media (min-width: 769px) {
    .pc-inline-block {
        display: inline-block !important;
    }

    .sp-inline-block {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .pc-inline-block {
        display: none !important;
    }

    .sp-inline-block {
        display: inline-block !important;
    }
}

/* ==========================================================================
   共通ユーティリティクラス
   ========================================================================== */


.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* テキスト関連 */
.text-center {
    text-align: center;
}

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

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

/* マージン・パディング */
.mt-0 {
    margin-top: 0;
}

.mb-0 {
    margin-bottom: 0;
}

.pt-0 {
    padding-top: 0;
}

.pb-0 {
    padding-bottom: 0;
}

/* 表示制御 */
.hidden {
    display: none;
}

.visible {
    display: block;
}

/* ==========================================================================
   WordPress固有のクラス
   ========================================================================== */

/* 画像の基本設定 */
img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* WordPressのアライメントクラス */
.aligncenter {
    display: block;
    margin: 0 auto;
}

.alignleft {
    float: left;
    margin: 0 20px 20px 0;
}

.alignright {
    float: right;
    margin: 0 0 20px 20px;
}

.alignwide {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.alignfull {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

/* WordPressのキャプション */
.wp-caption {
    max-width: 100%;
    margin-bottom: 20px;
}

.wp-caption img {
    display: block;
    margin: 0 auto;
}

.wp-caption-text {
    font-size: 0.9rem;
    color: #666;
    text-align: center;
    margin-top: 8px;
    font-style: italic;
}

/* ギャラリー */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin: 20px 0;
}

.gallery-item {
    display: block;
}

.gallery-caption {
    font-size: 0.8rem;
    color: #666;
    text-align: center;
    margin-top: 5px;
}

/* ==========================================================================
   レスポンシブ用のユーティリティ
   ========================================================================== */

@media (max-width: 768px) {
    .site-main {
        margin-top: calc(60px + 1rem);
    }

    .hide-mobile {
        display: none;
    }
}

@media (min-width: 769px) {
    .hide-desktop {
        display: none;
    }
}

/* ==========================================================================
   アクセシビリティ
   ========================================================================== */

/* フォーカス表示の改善 */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--main-color);
    outline-offset: 2px;
}

/* 動きを抑制したいユーザー向け */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ハイコントラストモード対応 */
@media (prefers-contrast: high) {
    :root {
        --text-color: #000;
        --bg-color: #fff;
        --border-color: #000;
    }
}

/* 
 * ページ別CSSファイルは functions.php で自動的に読み込まれます
 * - 全ページ共通: global/layout.css
 * - トップページ: pages/front-page.css
 * - 固定ページ: pages/page.css
 * - 投稿ページ: pages/single.css
 * - アーカイブ: pages/archive.css
 */