/*
Theme Name: Isaka Theme
Theme URI: https://e-isaka.co.jp
Author: Seeds Brains
Author URI: https://jnome.co.jp
Description: 井阪運輸株式会社 WordPress テーマ
Version: 1.0.0
Text Domain: isaka-theme
*/

/* ============================================
   井阪運輸 - Custom CSS (from web_takaya/css/style.css)
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
    --isaka-blue: #0080CB;
    --isaka-blue-dark: #005BAB;
    --isaka-cyan: #33CCFF;
    --isaka-accent: #069DE9;
    --isaka-text: #231815;
    --isaka-gray: #666666;
    --isaka-bg: #F3F3F3;
}

/* --- Base --- */
html {
    scroll-behavior: smooth;
}

body {
    color: var(--isaka-text);
    overflow-x: hidden;
}

/* --- Section Heading --- */
.section-heading {
    display: flex;
    align-items: baseline;
    font-family: 'Raleway', sans-serif;
    font-weight: 800;
    font-size: 2rem;
    letter-spacing: 0.02em;
    color: var(--isaka-text);
    line-height: 1;
}

.section-heading.text-white {
    color: #fff;
}

.heading-initial {
    font-size: 1.4em;
    font-style: italic;
    margin-right: 0.05em;
    position: relative;
}

.heading-rest {
    letter-spacing: 0.05em;
}

.heading-dot {
    color: var(--isaka-cyan);
    font-size: 1.2em;
    margin-left: 0.02em;
}

@media (min-width: 768px) {
    .section-heading {
        font-size: 2.5rem;
    }
}

/* --- Hero Section --- */
.hero-slide {
    background-size: cover;
    background-position: center;
    transition: opacity 1.5s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

.hero-fade-up {
    opacity: 0;
    transform: translateY(30px);
    animation: heroFadeUp 1s ease forwards;
}

@keyframes heroFadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Hero White Band --- */
.hero-white-band {
    height: 360px;
    background: rgba(255, 255, 255, 0.10);
}

/* --- Message Text --- */
.message-text {
    line-height: 4.0rem !important;
}

/* --- Case Slider Track --- */
#case-slider-track {
    gap: 24px;
}

/* Logo motif circle animation */
.logo-motif-circle {
    animation: slowRotate 60s linear infinite;
}

@keyframes slowRotate {
    to { transform: rotate(360deg); }
}

/* Scroll indicator */
@keyframes scroll-down {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(200%); }
}

.animate-scroll-down {
    animation: scroll-down 1.5s ease-in-out infinite;
}

/* Hero logo SVG */
.hero-logo-svg {
    opacity: 0;
    animation: heroFadeUp 1s ease forwards 0.2s;
}

/* --- Scroll Fade In Animation --- */
.scroll-fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Service Cards --- */
.service-card-inner {
    position: relative;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.service-card-inner:hover {
    border-bottom-color: var(--isaka-blue);
    transform: translateY(-4px);
}

/* --- Case Cards --- */
.case-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.case-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Case Slider - Arrow buttons */
.case-arrow-btn {
    width: 40px;
    height: 40px;
    margin-top: -50px;
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(255, 255, 255, 0.5);
    color: var(--isaka-blue);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#case-prev { left: 8px; }
#case-next { right: 8px; }

@media (min-width: 768px) {
    .case-arrow-btn {
        width: 48px;
        height: 48px;
        margin-top: 0;
        background: rgba(255, 255, 255, 0.15);
        border-color: rgba(255, 255, 255, 0.3);
        color: #fff;
        box-shadow: none;
    }
    .case-arrow-btn:hover {
        background: rgba(255, 255, 255, 0.25);
    }
    #case-prev { left: -64px; }
    #case-next { right: -64px; }
}

/* Case Slider - Card sizing */
#case-slider-track .case-card {
    width: calc(33.333% - 16px);
}

@media (max-width: 767px) {
    #case-slider-track .case-card {
        width: calc(100vw - 48px) !important;
    }
    #case-slider-track {
        gap: 0 !important;
    }
}

/* --- Network Map Markers --- */
.map-marker {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.map-marker:hover {
    transform: scale(1.3);
}

.map-marker:hover circle {
    fill: var(--isaka-blue-dark);
}

/* --- Network Items --- */
.network-item {
    transition: all 0.3s ease;
}

.network-item:hover {
    padding-left: 1.5rem;
}

/* --- Header --- */
.header-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.header-transparent {
    background-color: transparent;
}

.header-solid {
    background-color: rgba(255, 255, 255, 0.97);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.header-transparent .nav-link {
    color: rgba(255, 255, 255, 0.9);
}

.header-transparent .nav-link:hover {
    color: #fff;
}

.header-solid .nav-link {
    color: var(--isaka-text);
}

.header-solid .nav-link:hover {
    color: var(--isaka-blue);
}

.header-transparent .header-logo {
    filter: brightness(0) invert(1);
}

.header-solid .header-logo {
    filter: none;
}

.header-transparent .cta-contact {
    background-color: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.header-transparent .cta-contact:hover {
    background-color: rgba(255, 255, 255, 0.25);
}

.header-solid .cta-contact {
    background-color: var(--isaka-blue);
    color: #fff;
    border: 1px solid var(--isaka-blue);
}

.header-solid .cta-contact:hover {
    background-color: var(--isaka-blue-dark);
}

.header-transparent .cta-recruit {
    background-color: transparent;
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.header-transparent .cta-recruit:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.header-solid .cta-recruit {
    background-color: transparent;
    color: var(--isaka-blue);
    border: 1px solid var(--isaka-blue);
}

.header-solid .cta-recruit:hover {
    background-color: var(--isaka-blue);
    color: #fff;
}

/* --- Nav Menu Hover Underline --- */
.nav-menu-link::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--isaka-blue);
    transition: width 0.3s ease, left 0.3s ease;
}

.nav-menu-link:hover::after {
    width: 80%;
    left: 10%;
}

/* --- Hamburger Menu --- */
.hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    transition: all 0.3s ease;
}

.header-transparent .hamburger-line {
    background-color: #fff;
}

.header-solid .hamburger-line {
    background-color: var(--isaka-text);
}

.hamburger.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Mobile Menu --- */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 360px;
    height: 100vh;
    background: #fff;
    z-index: 100;
    transition: right 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    overflow-y: auto;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
}

.mobile-menu.open {
    right: 0;
}

.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 99;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

/* --- Misc --- */
::selection {
    background-color: var(--isaka-blue);
    color: #fff;
}

/* Smooth loading */
body {
    opacity: 0;
    animation: bodyFadeIn 0.5s ease forwards 0.1s;
}

@keyframes bodyFadeIn {
    to { opacity: 1; }
}

/* ============================================
   Content Area — 静的HTMLの <style> 内CSSを外部化
   ※ セレクタ・値は静的版と完全一致させること
   ※ content-areaはコンテンツHTML内の白いボックスにのみ付与
     （テンプレート側では包まない）
   ============================================ */

/* --- 共通（パターンA: 36ページ + フォームページ）--- */
.content-area table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.content-area th, .content-area td { padding: 0.75rem; border: 1px solid #e5e7eb; text-align: left; }
.content-area th { background-color: #f0f9ff; font-weight: 600; color: #374151; }
.content-area img { max-width: 100%; height: auto; }
.content-area p { margin: 1rem 0; line-height: 1.8; }
.content-area h2, .content-area h3 { font-weight: bold; margin: 1.5rem 0 1rem; }
.content-area ul, .content-area ol { margin: 1rem 0; padding-left: 1.5rem; }
.content-area ul { list-style: disc; }
.content-area ol { list-style: decimal; }
.content-area li { margin: 0.5rem 0; line-height: 1.8; }

/* --- Section Number（丸数字バッジ）--- */
.section-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    background-color: #0080CB;
    color: white;
    font-weight: bold;
    border-radius: 50%;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

/* --- transport-modal-shift: 効果カード --- */
.effect-card {
    border-left: 4px solid #0080CB;
}

/* --- logistics-consulting: フェーズラベル・分析テーブル --- */
.phase-label {
    display: flex; align-items: center; justify-content: center;
    background-color: #0080CB; color: white; font-weight: bold;
    padding: 0.75rem 1rem; border-radius: 0.5rem; min-width: 140px; text-align: center;
}
.analysis-table th, .analysis-table td {
    padding: 0.5rem 0.75rem; border: 1px solid #e5e7eb; text-align: left; font-size: 0.875rem;
}
.analysis-table th { background-color: #0080CB; color: white; font-weight: bold; text-align: center; }

/* --- logistics-staffing: メリット番号・フローステップ --- */
.merit-number {
    display: inline-flex; align-items: center; justify-content: center;
    width: 2.5rem; height: 2.5rem; flex-shrink: 0;
}
.flow-step {
    display: flex; align-items: center; justify-content: center;
    min-width: 160px; padding: 0.5rem 1rem;
}

/* --- safety/management: 管理テーブル・活動テーブル --- */
.mgmt-table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.875rem; }
.mgmt-table th, .mgmt-table td { padding: 0.5rem 0.75rem; border: 1px solid #e5e7eb; text-align: center; }
.mgmt-table th { background-color: #1e3a5f; color: white; font-weight: 600; }
.mgmt-table td { background-color: white; }
.mgmt-table .row-label { text-align: left; font-weight: 500; }
.activity-table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.875rem; }
.activity-table th, .activity-table td { padding: 0.625rem 1rem; border: 1px solid #e5e7eb; }
.activity-table th { background-color: #1e3a5f; color: white; font-weight: 600; text-align: center; }
.activity-table td:first-child { font-weight: 500; }
.section-badge {
    display: inline-flex; align-items: center; justify-content: center;
    width: 2.5rem; height: 2.5rem; background-color: #BF360C; color: white;
    font-weight: bold; border-radius: 50%; margin-right: 0.75rem; flex-shrink: 0;
}
@media (max-width: 768px) {
    .mgmt-table { font-size: 0.75rem; }
    .mgmt-table th, .mgmt-table td { padding: 0.375rem 0.5rem; }
}

/* --- フォームページ: ステップUI --- */
.step-item { display: flex; flex-direction: column; align-items: center; flex: 1; position: relative; }
.step-circle {
    width: 2.5rem; height: 2.5rem; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 1rem; z-index: 10;
    border: 2px solid #d1d5db; color: #9ca3af; background: #fff;
    transition: all 0.3s ease;
}
.step-item.active .step-circle,
.step-item.completed .step-circle { border-color: #0d9488; background: #0d9488; color: #fff; }
.step-label { margin-top: 0.5rem; font-size: 0.75rem; color: #9ca3af; text-align: center; transition: color 0.3s ease; }
.step-item.active .step-label,
.step-item.completed .step-label { color: #0d9488; font-weight: 600; }
.step-connector {
    position: absolute; top: 1.25rem; left: calc(50% + 1.25rem); right: calc(-50% + 1.25rem);
    height: 2px; background: #d1d5db; z-index: 1; transition: background 0.3s ease;
}
.step-item.completed .step-connector { background: #0d9488; }
.form-step { display: none; animation: fadeIn 0.35s ease; }
.form-step.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* --- CF7 フォーム内の自動<p>タグ修正 --- */
.wpcf7-form .flex > p { display: contents; }
.wpcf7-form .flex > p br { display: none; }
.wpcf7-form input[type="submit"] { cursor: pointer; }

/* --- WordPress Admin Bar Fix --- */
body.admin-bar #main-header {
    top: 32px;
}
@media screen and (max-width: 782px) {
    body.admin-bar #main-header {
        top: 46px;
    }
}
