/* 日本不動産価格調査センター - Official Design System */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&family=Noto+Sans+JP:wght@400;500;700&display=swap');

:root {
    --primary: #1e293b;
    --accent: #2563eb;
    --background: #f1f5f9;
    --card-bg: #ffffff;
    --text-main: #334155;
    --text-muted: #64748b;
    --border: #e2e8f0;
}

body {
    font-family: 'Noto Sans JP', 'Inter', sans-serif;
    line-height: 1.8;
    color: var(--text-main);
    margin: 0;
    padding: 0;
    background-color: var(--background);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background: #0f172a;
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.tool-header {
    background: #0f172a;
    padding: 60px 0;
    text-align: center;
    margin-bottom: 0;
}

.tool-header h1 {
    font-size: 2.2rem;
    color: white;
    margin-bottom: 15px;
}

.tool-description {
    color: #94a3b8;
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto;
}


header a {
    color: white;
    text-decoration: none;
}

/* --- Hero Section (Homepage) --- */
.hero-section {
    position: relative;
    width: 100vw;
    margin-left: calc(-1 * (100vw - 100%) / 2);
    margin-right: calc(-1 * (100vw - 100%) / 2);
    height: 500px;
    background: url('../images/hero_bg.png') no-repeat center center / cover;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 60px;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.6) 0%, rgba(15, 23, 42, 0.9) 100%);
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 900px;
    width: 90%;
    text-align: center;
    padding: 0 20px;
}

.hero-content h2 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 24px;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

@media (max-width: 768px) {
    .hero-content h2 {
        font-size: 2.2rem;
    }
}

.hero-content p {
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 48px;
    font-weight: 500;
    line-height: 1.6;
}

/* Glassmorphism search box on Hero */
.hero-search-box {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 12px;
    border-radius: 20px;
    display: flex;
    gap: 12px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
    max-width: 760px;
    margin: 0 auto;
}

.hero-search-box input {
    flex: 1;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 12px;
    padding: 18px 24px;
    font-size: 1.1rem;
    font-weight: 500;
    color: #1e293b;
    outline: none;
}

.hero-search-box button {
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 0 32px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hero-search-box button:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .hero-content h2 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .hero-search-box {
        flex-direction: column;
    }

    .hero-search-box button {
        padding: 16px;
    }
}



/* Hide Dates - Global */
.meta,
.date,
time,
.post-date {
    display: none !important;
}

.layout-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 32px;
    margin-top: 40px;
}

@media (max-width: 968px) {
    .layout-wrapper {
        grid-template-columns: 1fr;
    }
}

article {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 8px;
}

article header {
    background: var(--card-bg);
    color: var(--primary);
    padding: 0;
    box-shadow: none;
    margin-bottom: 28px;
}

article h1 {
    font-size: 1.8rem;
    color: var(--primary);
    margin: 0;
    line-height: 1.5;
}


/* Calculator Formatting FIX */
.calc-container {
    max-width: 500px;
    margin: 30px auto;
    background: #f8fafc;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
}

.calc-result {
    background: #0f172a;
    color: white;
    padding: 25px;
    text-align: center;
    border-radius: 8px;
    margin-top: 20px;
}

.result-value {
    font-size: 2.5rem;
    color: #3b82f6;
    font-weight: 700;
}

/* --- Premium Tool UI Components --- */
.tool-container {
    max-width: 800px;
    margin: 40px auto;
}

.simulator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    margin-top: 32px;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
}

.simulator-card {
    background: white;
    padding: 32px;
    border-radius: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02), 0 10px 15px rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.simulator-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
    border-color: var(--accent);
}

.simulator-card::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--accent);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: left;
}

.simulator-card:hover::before {
    transform: scaleX(1);
}

.sim-icon {
    width: 56px;
    height: 56px;
    background: #f1f5f9;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    font-size: 24px;
    color: var(--accent);
    transition: all 0.3s ease;
}

.simulator-card:hover .sim-icon {
    background: var(--primary);
    transform: rotate(-5deg);
}

.simulator-card h3 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--primary);
    line-height: 1.4;
}

.simulator-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 24px;
    flex-grow: 1;
}

.sim-action {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #eff6ff;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.simulator-card:hover .sim-action {
    background: var(--accent);
    color: white;
}

/* Home Bottom Content */
.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--primary);
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.05rem;
}

.post-card {
    display: block;
    background: white;
    padding: 24px;
    border-radius: 16px;
    margin-bottom: 20px;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.post-card:hover {
    border-color: var(--accent);
    transform: translateX(8px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.post-card h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: var(--primary);
}

.post-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.premium-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.input-wrapper {
    position: relative;
    margin-bottom: 24px;
}

.input-wrapper input[type="number"],
.input-wrapper input[type="text"] {
    width: 100%;
    padding: 18px 20px;
    background: #f8fafc;
    border: 2px solid transparent;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--accent);
    background: white;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.unit-tag {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-weight: 700;
    pointer-events: none;
}

/* Range Sliders */
.slider-group {
    margin: 32px 0;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.slider-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent);
}

input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #e2e8f0;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    border: 4px solid white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

/* Result Dashboard */
.result-dashboard {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-radius: 20px;
    padding: 40px;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.result-dashboard::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.1) 0%, transparent 70%);
}

.result-main {
    position: relative;
    z-index: 1;
}

.result-label {
    font-size: 1rem;
    color: #94a3b8;
    margin-bottom: 12px;
}

.result-big-value {
    font-size: 3.5rem;
    font-weight: 800;
    color: #60a5fa;
    line-height: 1;
    margin-bottom: 8px;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.result-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 32px;
}

.result-sub-label {
    font-size: 0.85rem;
    color: #94a3b8;
}

.result-sub-value {
    font-size: 1.2rem;
    font-weight: 700;
}


footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 40px 0;
    text-align: center;
    margin-top: 80px;
}

/* Price Map Section */
.price-map-section {
    padding: 80px 0;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.japan-map-container {
    max-width: 1000px;
    margin: 40px auto 0;
}

.map-wrapper {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-areas:
        "hokkaido . . ."
        "tohoku . . ."
        "kanto chubu kansai chugoku-shikoku"
        "kyushu . . .";
    gap: 24px;
}

@media (max-width: 1024px) {
    .map-wrapper {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }
}

.map-region {
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.map-region:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    border-color: var(--accent);
}

.region-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 16px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 8px;
}

.pref-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 8px;
}

.pref-grid a {
    display: block;
    padding: 6px;
    background: #f1f5f9;
    color: var(--secondary);
    font-size: 0.85rem;
    text-align: center;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s;
}

.pref-grid a:hover {
    background: var(--accent);
    color: white;
}

.pref-grid a.highlight {
    background: #e0f2fe;
    color: var(--accent);
    font-weight: 700;
    border: 1px solid var(--accent);
}

.map-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: var(--accent);
    color: white;
    text-align: center;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
}

.hokkaido {
    grid-area: hokkaido;
}

.tohoku {
    grid-area: tohoku;
}

.kanto {
    grid-area: kanto;
}

.chubu {
    grid-area: chubu;
}

.kansai {
    grid-area: kansai;
}

.chugoku-shikoku {
    grid-area: chugoku-shikoku;
}

.kyushu {
    grid-area: kyushu;
}