/* ss_top.css - WDC for Geomagnetism, Kyoto : top page (index.html / index-j.html) */

* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, "Hiragino Sans", "Noto Sans JP", Meiryo, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    color: #333;
    background-image: url('/figs/Back.gif');
    background-repeat: repeat;
    background-attachment: fixed;
}

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

/* ---- header ---- */
.header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 16px 20px 14px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.70);
    border-radius: 10px;
}

.header-logos {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-logos img {
    height: 52px;
    display: block;
}

.header-text {
    flex: 1 1 auto;
    min-width: 0;
}

.header h1 {
    color: #2c3e50;
    margin: 0 0 2px;
    font-size: 1.5em;
    font-weight: 700;
    line-height: 1.25;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.05);
}

.header .operator {
    margin: 0;
    font-size: 0.82em;
    color: #44586b;
    line-height: 1.45;
}

.header .operated-by {
    color: #7d8f9e;
}

/* ---- notice (emergency announcements) ---- */
.notice {
    background: rgba(255, 230, 230, 0.95);
    border-left: 4px solid #ff4444;
    padding: 15px;
    margin: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* ---- text navigation ---- */
.top-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    margin: 0 20px 25px;
    background: linear-gradient(180deg, #33526b 0%, #24405a 100%);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(0,0,0,0.18);
}

.top-nav ul {
    flex: 1 1 auto;
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
}

.top-nav li {
    flex: 1 1 auto;
    text-align: center;
}

.top-nav li + li {
    border-left: 1px solid rgba(255,255,255,0.14);
}

.top-nav a {
    display: block;
    padding: 13px 18px;
    color: #eaf2f8;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95em;
    letter-spacing: 0.02em;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
}

.top-nav a:hover {
    background: rgba(255,255,255,0.14);
    color: #fff;
}

.top-nav a[aria-current="page"] {
    background: #3498db;
    color: #fff;
    box-shadow: inset 0 -3px 0 rgba(255,255,255,0.45);
}

/* 言語切替: ナビバー右端に固定 */
.top-nav .lang-switch {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 13px 20px;
    background: rgba(255,255,255,0.10);
    border-left: 1px solid rgba(255,255,255,0.28);
    color: #fff;
    font-weight: 700;
}

.top-nav .lang-switch::before {
    content: "";
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='1.8'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cellipse cx='12' cy='12' rx='4.2' ry='9.5'/%3E%3Cpath d='M2.5 12h19M4.2 6.5h15.6M4.2 17.5h15.6'/%3E%3C/svg%3E");
    opacity: 0.9;
}

.top-nav .lang-switch:hover {
    background: rgba(255,255,255,0.22);
}

/* ---- main ---- */
.content {
    margin: 0 20px 20px;
}

/* ---- featured / 注目・新サービス ---- */
.featured-section {
    margin-bottom: 30px;
}

.featured-section h2 {
    color: #2c3e50;
    font-size: 1.35em;
    margin: 0 0 14px;
    padding-left: 12px;
    border-left: 5px solid #e67e22;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.featured-card {
    background: rgba(255, 255, 255, 0.94);
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 2px 10px rgba(0,0,0,0.10);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.featured-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.featured-card > a {
    display: block;
    color: inherit;
    text-decoration: none;
    height: 100%;
}

.featured-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f4f7f9;
    border-bottom: 1px solid #e2e8ec;
}

.featured-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.featured-card:hover .featured-thumb img {
    transform: scale(1.04);
}

.featured-body {
    padding: 12px 18px 16px;
}

.featured-badge {
    display: inline-block;
    font-size: 0.7em;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #fff;
    background: #e67e22;
    border-radius: 4px;
    padding: 2px 8px;
    margin-bottom: 6px;
}

.featured-card h3 {
    color: #2c3e50;
    font-size: 1.1em;
    margin: 0 0 4px;
    line-height: 1.4;
    transition: color 0.2s;
}

.featured-card:hover h3 {
    color: #d35400;
}

.featured-desc {
    color: #555;
    font-size: 0.85em;
    line-height: 1.5;
    margin: 0;
}

/* ---- today's Dst / AE ---- */
.today-section {
    background: rgba(255, 255, 255, 0.92);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    padding: 22px 26px 24px;
    margin-bottom: 30px;
}

.today-section h2 {
    color: #2c3e50;
    font-size: 1.35em;
    margin: 0 0 16px;
    padding-left: 12px;
    border-left: 5px solid #2c8c5a;
}

/* Dst(月プロット, 約3.3:1)と AE(日プロット, 約1.6:1)の高さが揃うよう
   列幅を画像の縦横比の比(3.29 : 1.56 = 2.1 : 1)に合わせる。 */
.today-grid {
    display: grid;
    grid-template-columns: 2.1fr 1fr;
    gap: 18px;
    align-items: start;
}

.today-card {
    display: block;
    text-decoration: none;
    color: inherit;
    border: 1px solid #e2e8ec;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.today-card:hover {
    border-color: #b9d4e6;
    box-shadow: 0 3px 12px rgba(0,0,0,0.12);
}

.today-thumb {
    background: #fff;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.today-thumb img {
    display: block;
    width: 100%;
    height: auto;
}

/* 当日分がまだ無いなど、画像が取得できなかったとき */
.today-thumb-failed::after {
    content: "";
    display: block;
    width: 100%;
    height: 90px;
    background: linear-gradient(135deg, #eef4f9 0%, #dce8f2 100%);
}

.today-label {
    display: block;
    padding: 9px 14px;
    font-size: 0.87em;
    font-weight: 600;
    color: #2c3e50;
    background: #f4f8fb;
    border-top: 1px solid #e6edf2;
}

.today-card:hover .today-label {
    color: #2980b9;
}

/* ---- What's New ---- */
.news-section {
    background: rgba(255, 255, 255, 0.92);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    padding: 25px 30px 20px;
    margin-bottom: 30px;
}

.news-section h2 {
    color: #2c3e50;
    font-size: 1.6em;
    margin: 0 0 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

.news-section .quick-links {
    font-size: 0.9em;
    color: #555;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ddd;
}

.news-section .quick-links a {
    color: #2980b9;
    text-decoration: none;
    font-weight: 600;
}

.news-section .quick-links a:hover {
    text-decoration: underline;
}

.news-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.news-item {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 16px 0;
    border-bottom: 1px solid #eee;
}

.news-item:last-child {
    border-bottom: none;
}

.news-thumb {
    flex: 0 0 110px;
    width: 110px;
    height: 74px;
    border-radius: 6px;
    overflow: hidden;
    background: #f4f7f9;
    border: 1px solid #e2e8ec;
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.news-thumb-none {
    background: linear-gradient(135deg, #eef4f9 0%, #dce8f2 100%);
    color: #a8bccd;
    font-size: 1.9em;
    line-height: 1;
}

.news-thumb-none::before {
    content: "\25CE";
}

.news-body {
    flex: 1;
    min-width: 0;
}

.news-date {
    display: inline-block;
    font-size: 0.78em;
    color: #fff;
    background: #7f9db3;
    border-radius: 4px;
    padding: 2px 8px;
    margin-bottom: 6px;
    white-space: nowrap;
}

.news-text {
    font-size: 0.95em;
    line-height: 1.65;
    color: #333;
}

.news-text a {
    color: #2980b9;
    text-decoration: none;
}

.news-text a:hover {
    text-decoration: underline;
}

.news-more {
    margin-top: 18px;
    text-align: right;
}

.news-more a {
    color: #2980b9;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95em;
}

.news-more a:hover {
    text-decoration: underline;
}

/* ---- section cards ---- */
.section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.section-card {
    background: rgba(255, 255, 255, 0.88);
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.section-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.section-card > a {
    display: block;
    padding: 18px;
    color: inherit;
    text-decoration: none;
    height: 100%;
}

.section-card h3 {
    color: #2c3e50;
    font-size: 1.1em;
    margin: 0 0 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid #3498db;
    transition: color 0.2s;
}

.section-card:hover h3 {
    color: #3498db;
}

.section-card .description {
    color: #555;
    font-size: 0.85em;
    line-height: 1.6;
    margin: 0;
}

/* ---- footer ---- */
.footer {
    background: rgba(255, 255, 255, 0.90);
    margin: 20px;
    padding: 18px 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    font-size: 0.85em;
    color: #888;
    text-align: right;
}

/* ---- responsive ---- */
@media (max-width: 768px) {
    .header, .content, .footer, .notice {
        margin: 10px;
    }

    .header {
        flex-direction: column;
        text-align: center;
        gap: 10px;
        margin: 12px 10px;
        padding: 12px;
    }

    .header h1 {
        font-size: 1.25em;
    }

    .header-logos img {
        height: 46px;
    }

    .top-nav {
        margin: 0 10px 15px;
    }

    .top-nav ul {
        flex: 1 1 100%;
    }

    .top-nav li {
        flex: 1 1 30%;
        border-top: 1px solid rgba(255,255,255,0.14);
    }

    .top-nav li:nth-child(-n+3) {
        border-top: none;
    }

    .top-nav a {
        padding: 11px 10px;
        font-size: 0.85em;
    }

    .top-nav .lang-switch {
        flex: 1 1 100%;
        justify-content: center;
        border-left: none;
        border-top: 1px solid rgba(255,255,255,0.28);
        padding: 11px 10px;
        font-size: 0.9em;
    }

    .news-section {
        padding: 20px;
    }

    .featured-section h2 {
        font-size: 1.2em;
    }

    .featured-grid {
        gap: 15px;
    }

    .today-section {
        padding: 18px 16px 20px;
    }

    .today-section h2 {
        font-size: 1.2em;
    }

    .today-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .news-section h2 {
        font-size: 1.35em;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.1em;
    }

    .header .operator {
        font-size: 0.75em;
    }

    .top-nav li {
        flex: 1 1 50%;
        border-left: none;
        border-top: 1px solid rgba(255,255,255,0.14);
    }

    .top-nav li:nth-child(-n+2) {
        border-top: none;
    }

    .top-nav li:nth-child(even) {
        border-left: 1px solid rgba(255,255,255,0.14);
    }

    .news-item {
        gap: 12px;
    }

    .news-thumb {
        flex: 0 0 64px;
        width: 64px;
        height: 48px;
    }

    .news-thumb-none {
        font-size: 1.3em;
    }

    .news-text {
        font-size: 0.9em;
    }

    .section-card h3 {
        font-size: 1em;
    }

    .featured-card h3 {
        font-size: 1.05em;
    }

    .featured-body {
        padding: 14px 16px 16px;
    }
}
