/* Variables & Reset */
:root {
    /* Colors */
    --color-primary: #1A237E;
    /* Classic Navy */
    --color-primary-dark: #000051;
    --color-primary-light: #534bae;
    --color-accent: #1A237E;
    /* Navy Accent */
    --color-accent-hover: #000051;
    --color-bg: #FAFAFA;
    /* Very Light Gray */
    --color-surface: #FFFFFF;
    --color-text-main: #333333;
    /* Dark Gray */
    --color-text-muted: #666666;
    --color-border: #eeeeee;

    /* Typography */
    --font-jp: 'Noto Sans JP', sans-serif;
    --font-en: 'Inter', sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2.5rem;
    --spacing-xl: 4rem;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 4px 12px rgba(26, 35, 126, 0.08);
    --shadow-lg: 0 10px 30px rgba(26, 35, 126, 0.12);

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-jp);
    background-color: var(--color-bg);
    color: var(--color-text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-jp);
    font-weight: 700;
    line-height: 1.3;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

/* Layout Container */
.app-container {
    max-width: 100%;
    overflow: hidden;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-content {
    width: 90%;
    max-width: 1200px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--color-primary);
}

.logo-icon {
    font-size: 1.4rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text-muted);
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--color-primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-accent);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--color-text-main);
}

/* Hero Section */
.hero {
    padding-top: 120px;
    padding-bottom: 60px;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    min-height: 80vh;
}

.hero-content {
    display: flex;
    width: 100%;
    gap: 4rem;
    align-items: center;
    z-index: 2;
}

.hero-text {
    flex: 1;
}

.badge {
    display: inline-block;
    padding: 6px 12px;
    background-color: #f0f0f0;
    color: var(--color-text-main);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 20px;
    margin-bottom: 1.5rem;
    font-family: var(--font-en);
}

.hero-text h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.highlight {
    color: var(--color-primary);
    position: relative;
    display: inline-block;
}

.highlight::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 12px;
    background-color: rgba(26, 35, 126, 0.1);
    z-index: -1;
    transform: skewX(-10deg);
}

.hero-text p {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(26, 35, 126, 0.2);
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 35, 126, 0.3);
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

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

.section-header p {
    color: var(--color-text-muted);
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto 4rem;
}

.category-card {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-md);
    text-align: center;
    border: 1px solid var(--color-border);
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary);
}

.category-icon {
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.category-card h3 {
    font-size: 1.2rem;
    color: var(--color-text-main);
}

/* Regional Map Section */
.region-map-section {
    background-color: white;
    padding: 4rem 0;
    margin-bottom: 4rem;
}

.map-container {
    width: 90%;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    height: 500px;
    background-color: #f5f7fa;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-placeholder {
    text-align: center;
    color: var(--color-text-muted);
}

.map-svg {
    width: 100%;
    height: 100%;
    max-height: 450px;
}

.map-region {
    fill: #e0e0e0;
    stroke: white;
    stroke-width: 2;
    transition: fill 0.3s ease;
    cursor: pointer;
}

.map-region:hover {
    fill: var(--color-primary);
}

.region-label {
    font-size: 0.8rem;
    fill: var(--color-text-main);
    pointer-events: none;
    font-weight: 600;
}

.map-region:hover+.region-label {
    fill: white;
}

/* Layout Wrapper */
.content-wrapper {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto 4rem;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    align-items: start;
}

.main-column {
    width: 100%;
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 100px;
}

.sidebar-widget {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    margin-bottom: 2rem;
}

.sidebar-widget h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-primary);
    display: inline-block;
}

.ranking-list {
    list-style: none;
    counter-reset: rank;
}

.ranking-list li {
    display: flex;
    gap: 10px;
    margin-bottom: 1rem;
    align-items: baseline;
}

.ranking-list li:last-child {
    margin-bottom: 0;
}

.rank {
    background-color: var(--color-primary);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

.ranking-list li:nth-child(n+4) .rank {
    background-color: #e0e0e0;
    color: var(--color-text-muted);
}

.ranking-list a {
    font-size: 0.9rem;
    color: var(--color-text-main);
    line-height: 1.4;
}

.ranking-list a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        margin-top: 2rem;
    }

    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
        width: 100%;
        margin: 0;
    }

    .categories-grid {
        width: 100%;
        margin: 0;
    }

    .map-container {
        width: 100%;
    }
}

.btn-secondary {
    background-color: white;
    color: var(--color-text-main);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    background-color: #f5f5f5;
    border-color: var(--color-text-muted);
}

.hero-visual {
    flex: 1;
    position: relative;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Floating Data Cards */
.data-card {
    position: absolute;
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    width: 260px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
}

.floating-card-1 {
    top: 10%;
    left: 10%;
    z-index: 2;
    animation: float 6s ease-in-out infinite;
}

.floating-card-2 {
    bottom: 10%;
    right: 5%;
    z-index: 3;
    animation: float 7s ease-in-out infinite 1s;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
}

.mini-chart {
    height: 80px;
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.bar-chart .bar {
    flex: 1;
    background-color: #e0e0e0;
    border-radius: 4px 4px 0 0;
    transition: height 1s ease;
}

.bar-chart .bar.active {
    background-color: var(--color-primary);
}

.line-chart svg {
    width: 100%;
    height: 100%;
}

.card-stat {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.trend {
    font-size: 0.8rem;
    font-weight: 600;
}

.trend.up {
    color: #2ecc71;
}

.value {
    font-family: var(--font-en);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-main);
}

.hero-bg-decoration {
    position: absolute;
    top: -20%;
    right: -10%;
    width: 60%;
    height: 120%;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.03) 0%, rgba(255, 255, 255, 0) 70%);
    z-index: 1;
    pointer-events: none;
}

/* Bento Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.bento-item {
    background: white;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--color-border);
}

.bento-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

/* Grid Spans */
.featured {
    grid-column: span 2;
    grid-row: span 2;
    background: white;
    color: var(--color-text-main);
    padding: 0;
}

.standard {
    grid-column: span 1;
}

.widget {
    grid-column: span 1;
}

.newsletter {
    grid-column: span 2;
    background-color: #f0f0f0;
    color: var(--color-text-main);
    border: 1px solid var(--color-border);
}

/* Featured Item Styles */
.featured .item-content {
    padding: 2rem;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0));
}

.featured .item-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.1;
}

.bg-icon {
    font-size: 10rem;
    color: var(--color-text-main);
    transform: rotate(-15deg);
}

.featured h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    line-height: 1.4;
    color: var(--color-text-main);
}

.featured p {
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.featured .read-more {
    color: var(--color-primary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Standard Item Styles */
.item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.tag {
    background-color: #f0f0f0;
    color: var(--color-text-main);
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
}

.featured .tag {
    background-color: var(--color-accent);
    color: white;
}

.date {
    color: var(--color-text-muted);
}

.featured .date {
    color: rgba(255, 255, 255, 0.7);
}

.standard h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--color-text-main);
}

.read-more-icon {
    align-self: flex-end;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-main);
    transition: all 0.3s ease;
}

.bento-item:hover .read-more-icon {
    background-color: var(--color-primary);
    color: white;
}

/* Widget Styles */
.widget h4 {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
}

.big-stat {
    font-family: var(--font-en);
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.big-stat .number {
    font-size: 3rem;
    font-weight: 700;
}

.big-stat .unit {
    font-size: 1.5rem;
    font-weight: 600;
}

.stat-desc {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background-color: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background-color: var(--color-accent);
}

.stat-list {
    list-style: none;
}

.stat-list li {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9rem;
}

.stat-list li:last-child {
    border-bottom: none;
}

.stat-list .val {
    font-weight: 700;
    color: var(--color-primary);
}

.stat-note {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: auto;
    text-align: right;
}

/* Newsletter Styles */
.newsletter h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.newsletter p {
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

.newsletter-form {
    display: flex;
    gap: 10px;
}

.newsletter-form input {
    flex: 1;
    padding: 12px 16px;
    border-radius: 8px;
    border: none;
    outline: none;
    font-family: inherit;
}

.newsletter-form button {
    background-color: var(--color-accent);
    color: white;
    width: 48px;
    border-radius: 8px;
    font-size: 1.2rem;
    transition: background-color 0.3s ease;
}

.newsletter-form button:hover {
    background-color: var(--color-accent-hover);
}

/* Footer */
.footer {
    background-color: white;
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--color-border);
}

.footer-content {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand .logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    display: block;
    margin-bottom: 1rem;
}

.footer-brand p {
    color: var(--color-text-muted);
    max-width: 300px;
}

.footer-links {
    display: flex;
    gap: 4rem;
    flex-wrap: wrap;
}

.link-group h4 {
    margin-bottom: 1.5rem;
    color: var(--color-text-main);
}

.link-group a {
    display: block;
    color: var(--color-text-muted);
    margin-bottom: 0.8rem;
}

.link-group a:hover {
    color: var(--color-primary);
}

.footer-bottom {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    padding-top: 2rem;
    border-top: 1px solid #f0f0f0;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
    }

    .hero h1 {
        font-size: 2.8rem;
    }

    .hero-visual {
        transform: scale(0.9);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* Hide for mobile initially */
    }

    .menu-toggle {
        display: block;
    }

    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 100px;
    }

    .hero-content {
        flex-direction: column;
        gap: 3rem;
    }

    .hero-text p {
        margin: 0 auto 2.5rem;
    }

    .hero-actions {
        justify-content: center;
    }

    .bento-grid {
        grid-template-columns: 1fr;
    }

    .featured,
    .newsletter {
        grid-column: span 1;
    }

    .footer-content {
        flex-direction: column;
        gap: 2rem;
    }

    .footer-links {
        gap: 2rem;
        width: 100%;
        justify-content: space-between;
    }
}