/* --- ヘッダー: 角丸除去 --- */
header,
.wp-block-template-part,
.wp-block-group.has-background:first-child,
header .wp-block-group,
.site-header,
.wp-block-navigation {
    border-radius: 0 !important;
}

/* === OYAMA.WS Design Enhancement v2 === */

/* --- Base & Typography --- */
html { scroll-behavior: smooth; }
body { letter-spacing: 0.03em; }

/* --- Header --- */
header.wp-block-template-part {
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

/* --- Heading Decoration --- */
h2.wp-block-heading {
    position: relative;
    padding-bottom: 18px;
    letter-spacing: 0.08em;
    font-size: 2em !important;
}
h2.wp-block-heading::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, #8b7355, #c9a96e);
    margin: 14px auto 0;
    transition: width 0.4s ease;
}
h2.wp-block-heading:hover::after {
    width: 80px;
}

/* --- Buttons - Elegant Style --- */
.wp-block-button__link {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    letter-spacing: 0.15em !important;
    border-radius: 0 !important;
    padding: 16px 40px !important;
    font-size: 0.9em !important;
    border: 1px solid currentColor !important;
    z-index: 1;
}
.wp-block-button__link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #8b7355, #6b5740);
    transition: left 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: -1;
}
.wp-block-button__link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139,115,85,0.3);
    color: #fff !important;
    border-color: #8b7355 !important;
}
.wp-block-button__link:hover::before {
    left: 0;
}
.wp-block-button__link::after {
    content: ' \2192';
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateX(-5px);
    display: inline-block;
}
.wp-block-button__link:hover::after {
    opacity: 1;
    transform: translateX(3px);
}

/* --- お取引の流れ: カード高さ統一 --- */
.wp-block-column.is-vertically-aligned-top {
    display: flex;
    flex-direction: column;
    min-height: 220px;
}

/* --- Images & Covers --- */
.wp-block-image img,
.wp-block-cover {
    border-radius: 8px;
}

/* --- Scroll Animations --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

/* Apply scroll animations */
.wp-block-cover,
.wp-block-group:not(.wp-block-template-part *) {
    animation: fadeInUp 0.8s ease both;
}
.wp-block-columns {
    animation: fadeInUp 0.8s ease 0.2s both;
}
.wp-block-image {
    animation: scaleIn 0.8s ease both;
}

/* --- Cover block overlay enhancement --- */
.wp-block-cover::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(0,0,0,0.4), transparent);
    pointer-events: none;
    z-index: 1;
    border-radius: 0 0 8px 8px;
}
.wp-block-cover .wp-block-cover__inner-container {
    z-index: 2;
}

/* --- Spacer --- */
.wp-block-spacer { height: 40px !important; }

/* --- Column cards hover --- */
.wp-block-column {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.wp-block-columns .wp-block-column:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.1);
}

/* --- Navigation links --- */
.wp-block-navigation-item a {
    position: relative;
    letter-spacing: 0.06em;
}
.wp-block-navigation-item a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 1.5px;
    background: #8b7355;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}
.wp-block-navigation-item a:hover::after {
    width: 100%;
}

/* --- Hide comments & likes --- */
.comments-area, #comments, .comment-respond, #respond,
.wp-block-post-comments-form, .jetpack-likes-widget-wrapper {
    display: none !important;
}

/* --- AOS animation fix --- */
[data-aos].aos-init { opacity: 1 !important; transform: none !important; }
[data-aos][data-aos].aos-init:not(.aos-animate) { opacity: 1 !important; transform: none !important; }
body [data-aos] { opacity: 1 !important; transform: none !important; }

/* --- Section separator line --- */
.wp-block-separator {
    border-top: 1px solid rgba(139,115,85,0.3) !important;
    width: 60px !important;
    margin: 2em auto !important;
}

/* --- Contact form focus --- */
.wp-block-jetpack-contact-form input:focus,
.wp-block-jetpack-contact-form textarea:focus {
    border-color: #8b7355 !important;
    box-shadow: 0 0 0 2px rgba(139,115,85,0.15) !important;
    outline: none !important;
}

/* --- Company info table style --- */
.wp-block-heading + .wp-block-paragraph {
    line-height: 1.9;
}

/* --- Footer elegant --- */
footer.wp-block-template-part {
    letter-spacing: 0.04em;
}

/* --- Site title elegant --- */
.wp-block-site-title a {
    letter-spacing: 0.06em;
    transition: opacity 0.3s ease;
}
.wp-block-site-title a:hover {
    opacity: 0.7;
}

/* --- Smooth page load --- */
@keyframes pageLoad {
    from { opacity: 0; }
    to { opacity: 1; }
}
.wp-site-blocks {
    animation: pageLoad 0.6s ease both;
}

/* --- Images & Covers: デスクトップ制約 --- */
.wp-block-image.alignwide img,
.wp-block-image.size-large img {
    max-height: 350px !important;
    object-fit: cover !important;
    width: 100% !important;
}
.wp-block-image.alignwide,
.wp-block-image.size-large {
    max-width: 800px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* --- Typography Balance --- */
.wp-block-group p,
.entry-content p {
    font-size: 0.95em;
    line-height: 1.9;
}

/* --- Mobile responsive --- */
@media (max-width: 768px) {
    /* --- ヘッダー: サイトタイトル縮小（2行） --- */
    .wp-block-site-title {
        font-size: 1em !important;
        line-height: 1.4 !important;
    }
    .wp-block-site-title a {
        letter-spacing: 0.02em !important;
    }
    h2.wp-block-heading { font-size: 1.3em !important; }
    .wp-block-button__link {
        padding: 14px 30px !important;
    }
    .wp-block-columns .wp-block-column:hover {
        transform: none;
        box-shadow: none;
    }
    /* --- 強みセクション: モバイルでコンパクト＆中央寄せ --- */
    .wp-block-cover.has-aspect-ratio {
        aspect-ratio: 16/9 !important;
        border-radius: 12px !important;
        min-height: unset !important;
        max-height: 140px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    .wp-block-cover.has-aspect-ratio .wp-block-cover__inner-container {
        padding: 12px !important;
    }
    .wp-block-cover.has-aspect-ratio .wp-block-cover__inner-container p {
        font-size: 0.85em !important;
        line-height: 1.4 !important;
    }

    /* --- 数字セクション: 横並びグリッド --- */
    .wp-block-columns:not(.is-not-stacked-on-mobile) {
        flex-wrap: wrap !important;
    }
    .wp-block-column.is-vertically-aligned-top {
        flex-basis: 30% !important;
        min-height: unset !important;
        padding: 16px 10px !important;
    }
    /* --- 数字セクション背景付きデザイン --- */
    .wp-block-group.has-background {
        padding: 20px 16px !important;
        border-radius: 16px !important;
    }
    /* --- ボタンサイズ調整 --- */
    .wp-block-button__link {
        padding: 12px 24px !important;
        font-size: 0.85em !important;
    }
    /* --- 画像: alignwide制約 --- */
    .wp-block-image.alignwide img,
    .wp-block-image.size-large img {
        max-height: 200px !important;
        border-radius: 8px !important;
    }
    .wp-block-image.alignwide,
    .wp-block-image.size-large {
        max-width: 100% !important;
    }
    .wp-block-image.aligncenter img {
        max-width: 90% !important;
    }
    /* --- 本文テキスト調整 --- */
    .wp-block-group p,
    .entry-content p {
        font-size: 1em !important;
        line-height: 1.8 !important;
    }
    /* --- お取引の流れカード --- */
    .wp-block-column.is-vertically-aligned-top p {
        font-size: 0.85em !important;
    }


    /* --- 数字セクション: 中央揃えカードレイアウト --- */
    .stats-section.wp-block-columns {
        gap: 12px !important;
    }
    .stats-section .wp-block-column {
        padding: 20px 16px !important;
        background: #f8f7f5 !important;
        border-radius: 12px !important;
        border-bottom: 3px solid #c9a96e !important;
        text-align: center !important;
    }
    .stats-section .wp-block-column p:first-child {
        font-size: 36px !important;
        color: #8b7355 !important;
        margin-bottom: 4px !important;
    }
    .stats-section .wp-block-column p:last-child {
        font-size: 13px !important;
        color: #555 !important;
        text-align: center !important;
    }


    /* --- フッター: モバイル調整 --- */
    footer p,
    footer .wp-block-site-title {
        font-size: 0.75em !important;
        line-height: 1.6 !important;
        text-align: center !important;
    }
    footer .wp-block-site-title {
        font-size: 1.1em !important;
        margin-bottom: 0 !important;
    }
    footer .wp-block-site-title + p,
    footer p:first-of-type {
        margin-top: 2px !important;
    }
    footer .wp-block-group {
        padding: 24px 16px !important;
        text-align: center !important;
    }

}