/*
Theme Name: Higashi-Hiroshima Sakidori v2 Minimal
Theme URI: 
Author: AI Agent
Author URI: 
Description: 東広島の主婦層向けスマホファーストデザイン（完全再現）
Version: 1.0.2
License: GNU General Public License v2 or later
Text Domain: higashihiroshima-sakidori
*/

:root {
    /* カラーパレット: より温かく、親しみやすく */
    --color-primary: #ffa726;
    /* 温かみのあるオレンジ */
    --color-primary-light: #ffb74d;
    --color-secondary: #ffecd2;
    /* より温かいベージュ */
    --color-text: #5d4037;
    /* 濃いブラウン */
    --color-text-light: #8d6e63;
    --color-bg: #fff9f2;
    /* 極めて薄い暖色 */
    --color-white: #ffffff;
    --color-border: #f0e6d2;
    --color-accent: #ff7043;
    /* 目立たせるためのコーラル */

    /* カテゴリカラー */
    --cat-news: #e57373;
    --cat-gourmet: #ffb300;
    --cat-event: #66bb6a;
    --cat-lifestyle: #29b6f6;
}

/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    overflow-x: hidden !important;
}

body {
    font-family: 'Kosugi Maru', 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif;
    color: var(--color-text);
    background-color: var(--color-bg) !important;
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    width: 100%;
}

a {
    color: var(--color-text);
    text-decoration: none;
    transition: opacity 0.3s;
}

a:hover {
    opacity: 0.7;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* WP Theme overrides */
header.site-header,
footer.site-footer.wp-block-template-part,
.wp-site-blocks>header,
.wp-site-blocks>footer,
.home .entry-title,
.home .page-title,
.page-id-13 .entry-title,
.page-id-13 h1.wp-block-post-title {
    display: none !important;
}

/* Header */
.custom-site-header {
    background-color: var(--color-white);
    border-bottom: 3px solid var(--color-primary-light);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    padding: 15px 20px;
    text-align: center;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 5px;
    letter-spacing: 1px;
    font-family: 'Nunito', 'Kosugi Maru', sans-serif;
}

.tagline {
    font-size: 12px;
    color: var(--color-text-light);
}

/* Navigation */
.main-nav {
    background-color: var(--color-primary);
    overflow-x: auto;
    /* hide scrollbar */
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
    display: none;
}

.main-nav ul {
    display: flex;
    list-style: none;
    padding: 0 10px;
    margin: 0;
    width: max-content;
    justify-content: flex-start;
}

@media (min-width: 768px) {
    .main-nav ul {
        margin: 0 auto;
        justify-content: center;
    }
}

.main-nav li {
    flex: 0 0 auto;
}

.main-nav a {
    display: block;
    padding: 12px 18px;
    color: var(--color-white);
    font-size: 14px;
    font-weight: bold;
}

/* Typography helpers */
.zen-font {
    font-family: 'Zen Maru Gothic', 'Zen Kurenaido', sans-serif;
}

/* Main Content */
.custom-content-area {
    padding: 30px 15px;
    max-width: 1000px;
    margin: 0 auto;
}

/* Affiliate Banner */
.affiliate-banner {
    margin-bottom: 40px;
    text-align: center;
}

.banner-link {
    display: block;
    border-radius: 30px 15px 30px 15px;
    /* オーガニックな角丸 */
    background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-primary) 100%);
    color: var(--color-white);
    padding: 25px 20px;
    box-shadow: 0 10px 20px rgba(255, 167, 38, 0.3);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.banner-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 25px rgba(255, 167, 38, 0.4);
    opacity: 1;
}

.banner-link::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.banner-link:hover::after {
    opacity: 1;
}

.banner-accent {
    display: inline-block;
    background-color: var(--color-white);
    color: var(--color-primary);
    font-size: 12px;
    font-weight: bold;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 10px;
}

.banner-inner h2 {
    font-size: 22px;
    margin-bottom: 5px;
    line-height: 1.4;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.banner-inner p {
    font-size: 14px;
    margin-bottom: 15px;
    opacity: 0.9;
}

.banner-btn {
    display: inline-block;
    background-color: var(--color-accent);
    color: var(--color-white);
    padding: 10px 30px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s;
}

.banner-link:hover .banner-btn {
    background-color: #f4511e;
}

/* Magazine Layout */
.magazine-grid {
    display: grid;
    gap: 30px;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .magazine-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .span-full {
        grid-column: 1 / -1;
    }
}

.category-block {
    background-color: var(--color-secondary);
    padding: 20px;
    border-radius: 24px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.section-title {
    text-align: center;
    margin-bottom: 25px;
    font-size: 24px;
    color: var(--color-text);
    position: relative;
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--color-primary);
    border-radius: 2px;
}

.section-title span {
    position: relative;
    z-index: 1;
}

/* Card List */
.card-list {
    display: grid;
    gap: 20px;
    grid-template-columns: 1fr;
}

@media (min-width: 600px) {

    .span-full .card-list,
    .category-block .card-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

.card {
    background: var(--color-white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.card-img-wrap {
    position: relative;
    aspect-ratio: 16/9;
}

.card-img-wrap img {
    border-radius: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    color: var(--color-white);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.cat-news {
    background-color: var(--cat-news);
}

.cat-gourmet {
    background-color: var(--cat-gourmet);
}

.cat-event {
    background-color: var(--cat-event);
}

.cat-lifestyle {
    background-color: var(--cat-lifestyle);
}

.card-content {
    padding: 15px;
}

.post-date {
    display: block;
    font-size: 12px;
    color: var(--color-text-light);
    margin-bottom: 8px;
}

.post-title {
    font-size: 16px;
    line-height: 1.5;
    margin: 0;
    font-weight: bold;
}

.post-title a {
    color: var(--color-text);
}

.post-title a:hover {
    color: var(--color-primary);
}

/* Button */
.btn-wrap {
    text-align: center;
    margin-top: 30px;
}

.btn-more {
    display: inline-block;
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 14px 40px;
    border-radius: 30px;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(255, 138, 101, 0.3);
}

.btn-more:hover {
    background-color: var(--color-accent);
    opacity: 1;
}

/* Custom Footer */
.custom-site-footer {
    background-color: var(--color-secondary);
    padding: 40px 20px 20px;
    text-align: center;
    margin-top: 40px;
}

.footer-logo {
    font-size: 20px;
    font-weight: bold;
    color: var(--color-primary);
    margin-bottom: 20px;
}

.footer-links {
    list-style: none;
    margin-bottom: 30px;
}

.footer-links li {
    display: inline-block;
    margin: 0 10px;
}

.footer-links a {
    font-size: 14px;
    color: var(--color-text-light);
}

.copyright {
    font-size: 12px;
    color: var(--color-text-light);
}

/* Single Layout fixes */
.single-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

@media (min-width: 860px) {
    .single-container {
        grid-template-columns: 7fr 3fr;
    }
}

.single-main {
    background: var(--color-white);
    padding: 20px 15px;
    /* スマホではパディングを少し狭く */
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    border: 1px solid var(--color-border);
}

@media (min-width: 768px) {
    .single-main {
        padding: 30px;
    }
}

.single-main h1 {
    font-size: 24px;
    margin-bottom: 20px;
    line-height: 1.4;
}

.entry-content {
    line-height: 1.8;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-all;
    /* URLなどを確実に折り返す */
    hyphens: auto;
}

.entry-content img,
.entry-content iframe,
.entry-content video {
    max-width: 100%;
    height: auto;
}

/* Instagram埋め込みのモバイルはみ出し防止 */
.entry-content .instagram-media {
    max-width: 100% !important;
    min-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.entry-content h2 {
    font-size: 20px;
    margin: 30px 0 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--color-primary-light);
    color: var(--color-primary);
}

.sticky-sidebar {
    position: sticky;
    top: 20px;
}

/* Breakout (to handle block theme containment) */
.break-out {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0;
    padding-right: 0;
    position: relative;
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
}

.mobile-fab {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-color: var(--color-primary);
    color: var(--color-white);
    text-align: center;
    line-height: 60px;
    font-size: 16px;
    font-weight: 700;
    z-index: 9999;
    box-shadow: 0 -4px 15px rgba(255, 167, 38, 0.2);
    text-decoration: none;
    transition: background-color 0.3s;
}

.mobile-fab:hover {
    background-color: var(--color-accent);
    opacity: 1;
}

@media (max-width: 767px) {
    .mobile-fab {
        display: block;
    }

    body {
        padding-bottom: 70px;
    }
}