/* ==========================================================================
   Grant & Column Information Hub - Clean Government Style v38.0
   官公庁風シンプルデザイン - 白背景ベース + 濃紺×金アクセント
   ========================================================================== */

/* ==========================================================================
   Google Fonts Import
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Shippori+Mincho:wght@400;500;600;700;800&family=Noto+Sans+JP:wght@400;500;700&display=swap');

/* ==========================================================================
   CSS Variables
   ========================================================================== */
:root {
    /* Colors */
    --hub-white: #fdfdfd;
    --hub-bg: #f4f6f8;
    --hub-navy: #0f2350;
    --hub-navy-light: #1a3a70;
    --hub-gold: #c5a059;
    --hub-gold-light: #e6c885;
    --hub-red: #a63737;
    --hub-text: #2b2b2b;
    --hub-text-light: #6b7280;
    --hub-border: #dce3ea;
    --hub-border-light: #e5e7eb;
    
    /* Typography */
    --hub-font-serif: "Shippori Mincho", "Yu Mincho", serif;
    --hub-font-sans: "Noto Sans JP", -apple-system, sans-serif;
    
    /* Spacing */
    --hub-space-xs: 4px;
    --hub-space-sm: 8px;
    --hub-space-md: 16px;
    --hub-space-lg: 24px;
    --hub-space-xl: 32px;
    --hub-space-2xl: 48px;
    
    /* Effects */
    --hub-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.1);
    --hub-shadow-lg: 0 10px 30px -5px rgba(15, 35, 80, 0.15);
    --hub-radius: 4px;
    --hub-transition: 0.25s ease;
}

/* ==========================================================================
   Main Section
   ========================================================================== */
.info-hub {
    background-color: rgba(244, 246, 248, 0.3);
    padding: 64px 0;
    font-family: var(--hub-font-sans);
    color: var(--hub-text);
    line-height: 1.7;
}

.info-hub__container {
    max-width: 1152px;
    margin: 0 auto;
    padding: 0 16px;
}

@media (min-width: 768px) {
    .info-hub__container {
        padding: 0 32px;
    }
}

/* ==========================================================================
   Section Header
   ========================================================================== */
.info-hub__header {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding-bottom: 24px;
    margin-bottom: 48px;
    border-bottom: 1px solid var(--hub-border);
}

@media (min-width: 768px) {
    .info-hub__header {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
    }
}

.info-hub__title {
    font-family: var(--hub-font-serif);
    font-size: 28px;
    font-weight: 700;
    color: var(--hub-navy);
    margin: 0 0 8px 0;
    letter-spacing: 0.02em;
}

@media (min-width: 768px) {
    .info-hub__title {
        font-size: 30px;
    }
}

.info-hub__description {
    font-size: 14px;
    color: var(--hub-text-light);
    margin: 0;
}

.info-hub__count {
    font-weight: 700;
    color: var(--hub-navy);
    margin: 0 4px;
}

/* Stats Bar */
.info-hub__stats {
    display: flex;
    gap: 16px;
}

.info-hub__stat {
    background: var(--hub-white);
    border: 1px solid var(--hub-border);
    padding: 8px 16px;
    border-radius: var(--hub-radius);
    text-align: center;
    min-width: 100px;
    box-shadow: var(--hub-shadow);
}

.info-hub__stat--muted {
    opacity: 0.6;
}

.info-hub__stat-label {
    display: block;
    font-size: 10px;
    color: var(--hub-text-light);
    letter-spacing: 0.1em;
    margin-bottom: 4px;
}

.info-hub__stat-number {
    display: block;
    font-family: var(--hub-font-serif);
    font-size: 20px;
    font-weight: 700;
    color: var(--hub-navy);
}

.info-hub__stat--muted .info-hub__stat-number {
    color: var(--hub-text-light);
}

/* ==========================================================================
   Columns Grid
   ========================================================================== */
.info-hub__columns-grid {
    display: grid;
    gap: 48px;
    margin-bottom: 80px;
}

@media (min-width: 1024px) {
    .info-hub__columns-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Section Header */
.info-hub__section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.info-hub__section-title {
    font-family: var(--hub-font-serif);
    font-size: 20px;
    font-weight: 700;
    color: var(--hub-navy);
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
}

.info-hub__section-bar {
    width: 4px;
    height: 24px;
    background: var(--hub-gold);
    flex-shrink: 0;
}

.info-hub__section-sub {
    font-size: 12px;
    font-family: var(--hub-font-sans);
    font-weight: 400;
    color: var(--hub-text-light);
    margin-left: 8px;
}

.info-hub__link {
    font-size: 12px;
    font-weight: 700;
    color: var(--hub-gold);
    text-decoration: none;
    border-bottom: 1px solid var(--hub-gold);
    padding-bottom: 2px;
    transition: var(--hub-transition);
    white-space: nowrap;
}

.info-hub__link:hover {
    color: var(--hub-navy);
    border-color: var(--hub-navy);
}

/* ==========================================================================
   Article Cards (New Columns)
   ========================================================================== */
.info-hub__articles {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.article-card {
    background: var(--hub-white);
    border: 1px solid var(--hub-border);
    border-radius: var(--hub-radius);
    box-shadow: var(--hub-shadow);
    transition: var(--hub-transition);
}

.article-card:hover {
    border-color: var(--hub-gold);
}

.article-card__link {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px;
    text-decoration: none;
    color: inherit;
}

@media (min-width: 480px) {
    .article-card__link {
        flex-direction: row;
    }
}

.article-card__image {
    width: 100%;
    height: 80px;
    background: var(--hub-bg);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    border-radius: var(--hub-radius);
}

@media (min-width: 480px) {
    .article-card__image {
        width: 128px;
    }
}

.article-card__thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-card__no-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--hub-bg) 0%, var(--hub-border) 100%);
}

.article-card__badge {
    position: absolute;
    top: 0;
    left: 0;
    background: var(--hub-navy);
    color: white;
    font-size: 10px;
    padding: 2px 8px;
    font-family: var(--hub-font-sans);
}

.article-card__body {
    flex: 1;
}

.article-card__date {
    display: block;
    font-size: 10px;
    color: var(--hub-text-light);
    margin-bottom: 4px;
}

.article-card__title {
    font-size: 14px;
    font-weight: 700;
    color: var(--hub-text);
    line-height: 1.6;
    margin: 0;
    transition: var(--hub-transition);
}

.article-card:hover .article-card__title {
    color: var(--hub-navy-light);
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* ==========================================================================
   Ranking List
   ========================================================================== */
.ranking-list {
    background: var(--hub-white);
    border: 2px solid var(--hub-border);
    border-radius: var(--hub-radius);
    padding: 24px;
    box-shadow: var(--hub-shadow-lg);
    position: relative;
}

.ranking-list__binding {
    position: absolute;
    left: 16px;
    top: 0;
    bottom: 0;
    border-left: 2px dotted var(--hub-border-light);
}

.ranking-list__items {
    list-style: none;
    padding: 0 0 0 24px;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.ranking-item {
    position: relative;
}

.ranking-item--rest {
    opacity: 0.8;
}

.ranking-item__rank {
    position: absolute;
    left: -40px;
    top: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--hub-font-serif);
    font-size: 12px;
    font-weight: 700;
    border-radius: var(--hub-radius);
    box-shadow: var(--hub-shadow);
}

.ranking-item__rank--gold {
    background: var(--hub-gold);
    color: white;
}

.ranking-item__rank--silver {
    background: #9ca3af;
    color: white;
}

.ranking-item:not(.ranking-item--top) .ranking-item__rank {
    background: #e5e7eb;
    color: var(--hub-text-light);
}

.ranking-item__link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.ranking-item__title {
    font-size: 14px;
    font-weight: 700;
    color: var(--hub-text);
    line-height: 1.6;
    margin: 0 0 4px 0;
    transition: var(--hub-transition);
}

.ranking-item__link:hover .ranking-item__title {
    color: var(--hub-gold);
}

.ranking-item__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 10px;
    color: var(--hub-text-light);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--hub-border-light);
}

.ranking-item__pv {
    background: var(--hub-bg);
    padding: 2px 6px;
    border-radius: var(--hub-radius);
    font-weight: 700;
    color: var(--hub-navy);
}

/* ==========================================================================
   Grant Tabs Section
   ========================================================================== */
.grant-tabs {
    background: var(--hub-white);
    border: 1px solid var(--hub-border);
    border-radius: var(--hub-radius);
    box-shadow: var(--hub-shadow-lg);
    padding: 24px;
    position: relative;
    overflow: hidden;
}

@media (min-width: 768px) {
    .grant-tabs {
        padding: 40px;
    }
}

.grant-tabs__decoration {
    position: absolute;
    top: 0;
    right: 0;
    width: 128px;
    height: 128px;
    background: rgba(15, 35, 80, 0.05);
    border-bottom-left-radius: 100%;
    pointer-events: none;
}

/* Tabs Navigation */
.grant-tabs__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border-bottom: 1px solid var(--hub-border);
    margin-bottom: 32px;
    padding-bottom: 1px;
}

.grant-tabs__btn {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 700;
    font-family: var(--hub-font-sans);
    color: var(--hub-text-light);
    background: transparent;
    border: none;
    border-top: 2px solid transparent;
    border-left: 1px solid transparent;
    border-right: 1px solid transparent;
    border-radius: var(--hub-radius) var(--hub-radius) 0 0;
    cursor: pointer;
    transition: var(--hub-transition);
    position: relative;
    top: 1px;
}

.grant-tabs__btn:hover {
    color: var(--hub-navy);
}

.grant-tabs__btn.active {
    background: var(--hub-navy);
    color: white;
    border-color: var(--hub-navy);
}

.grant-tabs__badge {
    display: inline-block;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 9999px;
    margin-left: 4px;
    vertical-align: middle;
}

.grant-tabs__badge--red {
    background: var(--hub-red);
    color: white;
}

.grant-tabs__badge--gold {
    background: var(--hub-gold);
    color: white;
}

/* Tab Panels */
.grant-tabs__panel {
    animation: fadeIn 0.4s ease-out;
}

.grant-tabs__panel[hidden] {
    display: none;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.grant-tabs__panel-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 24px;
}

.grant-tabs__panel-desc {
    font-size: 14px;
    font-weight: 700;
    color: var(--hub-navy);
    margin: 0 0 24px 0;
}

.grant-tabs__panel-desc--red {
    color: var(--hub-red);
}

/* ==========================================================================
   Grant Cards (Featured)
   ========================================================================== */
.grant-cards {
    display: grid;
    gap: 24px;
}

@media (min-width: 768px) {
    .grant-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

.grant-card {
    border: 1px solid var(--hub-border);
    border-radius: var(--hub-radius);
    padding: 20px;
    background: var(--hub-white);
    transition: var(--hub-transition);
    position: relative;
    display: flex;
    flex-direction: column;
}

.grant-card:hover {
    box-shadow: var(--hub-shadow-lg);
}

.grant-card__top-line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--hub-gold);
    border-radius: var(--hub-radius) var(--hub-radius) 0 0;
}

.grant-card__badges {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.grant-card__badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--hub-radius);
}

.grant-card__badge--gold {
    background: var(--hub-gold);
    color: white;
}

.grant-card__badge--red {
    background: var(--hub-red);
    color: white;
}

.grant-card__title {
    font-family: var(--hub-font-serif);
    font-size: 18px;
    font-weight: 700;
    color: var(--hub-navy);
    line-height: 1.4;
    margin: 0 0 12px 0;
}

.grant-card__title a {
    color: inherit;
    text-decoration: none;
    transition: var(--hub-transition);
}

.grant-card:hover .grant-card__title a {
    color: var(--hub-gold);
}

.grant-card__excerpt {
    font-size: 12px;
    color: var(--hub-text-light);
    line-height: 1.6;
    margin: 0 0 16px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.grant-card__footer {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px dashed var(--hub-border-light);
}

.grant-card__deadline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.grant-card__deadline-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--hub-text-light);
}

.grant-card__deadline-date {
    font-size: 14px;
    font-weight: 700;
    font-family: var(--hub-font-sans);
    color: var(--hub-text);
}

.grant-card__deadline-date--urgent {
    color: var(--hub-red);
}

.grant-card__cta {
    display: block;
    width: 100%;
    text-align: center;
    background: var(--hub-navy);
    color: white;
    font-size: 12px;
    font-weight: 700;
    padding: 8px;
    border-radius: var(--hub-radius);
    text-decoration: none;
    transition: var(--hub-transition);
}

.grant-card__cta:hover {
    background: var(--hub-gold);
}

/* ==========================================================================
   Deadline List
   ========================================================================== */
.deadline-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.deadline-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    background: rgba(244, 246, 248, 0.3);
    border: 1px solid var(--hub-border);
    border-radius: var(--hub-radius);
    text-decoration: none;
    color: inherit;
    transition: var(--hub-transition);
}

@media (min-width: 768px) {
    .deadline-item {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.deadline-item:hover {
    background: var(--hub-white);
    border-color: var(--hub-red);
}

.deadline-item__content {
    flex: 1;
}

.deadline-item__title {
    font-size: 14px;
    font-weight: 700;
    color: var(--hub-text);
    margin: 0;
    transition: var(--hub-transition);
}

.deadline-item:hover .deadline-item__title {
    color: var(--hub-red);
}

.deadline-item__date {
    font-size: 10px;
    color: var(--hub-text-light);
}

.deadline-item__info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.deadline-item__label {
    font-size: 10px;
    background: var(--hub-white);
    border: 1px solid var(--hub-border-light);
    padding: 4px 8px;
    border-radius: var(--hub-radius);
}

.deadline-item__days {
    font-size: 14px;
    font-weight: 700;
    color: white;
    background: var(--hub-red);
    padding: 4px 12px;
    border-radius: var(--hub-radius);
    box-shadow: var(--hub-shadow);
}

/* ==========================================================================
   New Grants List
   ========================================================================== */
.new-grants-list {
    display: flex;
    flex-direction: column;
}

.new-grant-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    border-bottom: 1px dashed var(--hub-border-light);
    text-decoration: none;
    color: inherit;
    transition: var(--hub-transition);
}

@media (min-width: 768px) {
    .new-grant-item {
        flex-direction: row;
        align-items: baseline;
    }
}

.new-grant-item:hover {
    background: rgba(244, 246, 248, 0.3);
}

.new-grant-item__date {
    font-size: 10px;
    color: var(--hub-text-light);
    flex-shrink: 0;
}

.new-grant-item__title {
    font-size: 14px;
    font-weight: 700;
    color: var(--hub-navy);
    margin: 0;
    transition: var(--hub-transition);
}

.new-grant-item:hover .new-grant-item__title {
    color: var(--hub-gold);
}

/* ==========================================================================
   Empty State
   ========================================================================== */
.info-hub__empty {
    text-align: center;
    padding: 40px 24px;
    color: var(--hub-text-light);
    background: var(--hub-bg);
    border: 2px dashed var(--hub-border);
    border-radius: var(--hub-radius);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 767px) {
    .info-hub {
        padding: 40px 0;
    }
    
    .info-hub__header {
        text-align: center;
    }
    
    .info-hub__stats {
        justify-content: center;
    }
    
    .info-hub__section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .info-hub__section-title {
        font-size: 18px;
        flex-wrap: wrap;
    }
    
    .info-hub__section-sub {
        width: 100%;
        margin-left: 16px;
    }
    
    .ranking-list {
        padding: 16px;
    }
    
    .ranking-list__binding {
        left: 12px;
    }
    
    .ranking-list__items {
        padding-left: 20px;
    }
    
    .ranking-item__rank {
        left: -32px;
        width: 20px;
        height: 20px;
        font-size: 10px;
    }
    
    .grant-tabs__btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    .grant-tabs__panel {
        animation: none;
    }
    
    * {
        transition-duration: 0.01ms !important;
    }
}

.info-hub a:focus-visible,
.info-hub button:focus-visible {
    outline: 3px solid var(--hub-gold);
    outline-offset: 2px;
}

/* ==========================================================================
   Print
   ========================================================================== */
@media print {
    .info-hub {
        background: white;
        padding: 24px 0;
    }
    
    .grant-tabs__nav {
        display: none;
    }
    
    .grant-tabs__panel[hidden] {
        display: block !important;
    }
    
    .grant-card,
    .article-card,
    .ranking-list {
        box-shadow: none;
        border: 1px solid #000;
    }
}
