/* Import legacy styles for inner content tables & specifics */
@import url('style.css');

/* ==========================================================================
   Modern CSS Reset & Variables
   ========================================================================== */
:root {
    --primary: #0076c8;
    --primary-light: #e6f3ff;
    --primary-hover: #005a9c;
    --text-main: #334155;
    --text-muted: #64748b;
    --bg-page: #f8fafc;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    --danger: #ef4444;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    --font-sans: 'Inter', 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif;
    
    --max-width: 1100px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
    color: var(--text-main);
    background-color: var(--bg-page);
    line-height: 1.6;
    background-image: none !important; /* Override legacy body background */
    text-align: left; /* Override legacy center */
}

a,
a:visited {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

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

img {
    max-width: 100%;
    height: auto;
}

/* Override legacy div#boby_bg_top constraints */
#boby_bg_top {
    background: none !important;
}
center {
    text-align: left;
}

/* ==========================================================================
   Header (logo + search only, sticky)
   ========================================================================== */

/* The sticky-top-wrapper holds header + nav-bar together, fixed on scroll */
.sticky-top-wrapper {
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 3px 16px rgba(59, 95, 224, 0.25);
}

.site-header {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    padding: 0.5rem 0;
    overflow: hidden;
}

.header-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    min-height: 56px;
}

.logo-area {
    min-width: 0;
    overflow: hidden;
}

.logo-img {
    max-height: 44px;
    width: auto;
    max-width: 100%;
    display: block;
    object-fit: contain;
    object-position: center;
}

.header-controls {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* ==========================================================================
   Tab Navigation Bar (retro-style, cooler edition)
   ========================================================================== */
.tab-nav-bar {
    background: linear-gradient(135deg, #4a2db0 0%, #3b5fe0 50%, #5b3fd4 100%);
    box-shadow: 0 3px 12px rgba(59, 95, 224, 0.45);
    position: relative;
    z-index: 999;
}

.tab-nav-bar::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.08) 0%, transparent 100%);
    pointer-events: none;
}

.main-nav .nav-list {
    list-style: none;
    margin: 0 auto;
    padding: 0;
    display: flex;
    max-width: var(--max-width);
}

.main-nav .nav-list li {
    flex: 1;
    border-right: 1px solid rgba(255,255,255,0.2);
}

.main-nav .nav-list li:first-child {
    border-left: 1px solid rgba(255,255,255,0.2);
}

.nav-link,
.nav-link:visited {
    display: block;
    text-align: center;
    color: rgba(255,255,255,0.92) !important;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.75rem 0.5rem;
    text-decoration: none !important;
    position: relative;
    transition: background 0.2s ease, color 0.2s ease;
    letter-spacing: 0.02em;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: rgba(255,255,255,0.9);
    transition: width 0.25s ease;
}

.nav-link:hover {
    background: rgba(255,255,255,0.12);
    color: #fff !important;
    text-decoration: none !important;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link.active,
.nav-link.active:visited {
    background: rgba(255,255,255,0.18);
    color: #fff !important;
    font-weight: 700;
    box-shadow: inset 0 -3px 0 #fff;
}

.search-form {
    display: flex;
    align-items: center;
    background: var(--bg-page);
    border: 1px solid var(--border-color);
    border-radius: 99px;
    padding: 0.25rem 0.5rem 0.25rem 1rem;
    transition: all 0.2s ease;
}

.search-form:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.search-input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.875rem;
    color: var(--text-main);
    width: 140px;
    font-family: var(--font-sans);
}

.search-btn {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.search-btn:hover {
    background: var(--primary-hover);
}

/* ==========================================================================
   Hero Banner
   ========================================================================== */
.hero-banner {
    max-width: var(--max-width);
    margin: 1.5rem auto 0;
    padding: 0 1.5rem;
}

.hero-img {
    width: 100%;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: block;
}

.hero-link:hover .hero-img {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */
.breadcrumb-wrapper {
    max-width: var(--max-width);
    margin: 1.5rem auto;
    padding: 0 1.5rem;
}

.breadcrumbs {
    font-size: 0.875rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.breadcrumbs a,
.breadcrumbs a:visited {
    color: var(--text-muted);
}

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

.breadcrumbs .current {
    font-weight: 500;
    color: var(--text-main);
}

/* ==========================================================================
   Main Layout (Grid)
   ========================================================================== */
.main-wrapper {
    max-width: var(--max-width);
    margin: 0 auto 3rem;
    padding: 0 1.5rem;
}

.main-container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 2rem;
    align-items: start;
}

.content-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 2.5rem;
    border: 1px solid var(--border-color);
}

/* Reset legacy table structure inside content to flow naturally */
.legacy-content > table > tbody > tr > td {
    width: auto !important; /* Ignore the hardcoded 670px */
}

/* Styles for elements inside legacy content to look modern */
.legacy-content h3 {
    margin-top: 0;
    font-size: 1.5rem;
    color: var(--primary);
    border-bottom: 2px solid var(--primary-light);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.legacy-content table img {
    border-radius: var(--radius-md);
    transition: transform 0.2s ease;
}

.legacy-content a:hover img {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ==========================================================================
   Sidebar Widgets
   ========================================================================== */
.sidebar-widgets {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: 108px; /* sticky-top-wrapper height: ~60px header + ~48px nav */
}

.widget {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.widget-title {
    margin: 0;
    padding: 1rem 1.25rem;
    background: var(--primary-light);
    color: var(--primary-hover);
    font-size: 1rem;
    font-weight: 700;
    border-bottom: 1px solid var(--border-color);
}

.widget-content {
    padding: 1.25rem;
    font-size: 0.875rem;
    color: var(--text-main);
}

.widget-content p {
    margin: 0 0 1rem;
}

.read-more-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 600;
}

.location-group {
    margin-bottom: 1rem;
}

.location-group:last-child {
    margin-bottom: 0;
}

.location-group strong {
    display: block;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.location-group p {
    margin: 0;
    color: var(--text-muted);
}

.banner-widget {
    background: transparent;
    border: none;
    box-shadow: none;
}

.hover-lift {
    display: block;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.hover-lift img {
    border-radius: var(--radius-md);
    width: 100%;
}

.hover-lift:hover {
    transform: translateY(-3px);
    filter: brightness(1.05);
}

.mt-4 { margin-top: 1rem; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    background: #0f172a; /* Slate 900 */
    color: #94a3b8; /* Slate 400 */
    padding: 3rem 0;
    margin-top: auto;
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 2rem;
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
    flex-wrap: wrap;
}

.footer-nav a,
.footer-nav a:visited {
    color: #cbd5e1;
    text-decoration: none !important;
    font-weight: 500;
}

.footer-nav a:hover {
    color: #38bdf8; /* Sky 400 */
}

.copyright {
    text-align: center;
    font-size: 0.875rem;
}

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--primary);
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    opacity: 0.8;
    transition: all 0.2s ease;
    z-index: 100;
}

.back-to-top:hover {
    opacity: 1;
    transform: translateY(-3px);
    color: white;
}

/* ==========================================================================
   Symposium Grid (replaces legacy table-in-table)
   ========================================================================== */
.symposium-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem 1.5rem;
}

.symposium-item {
    min-width: 0;
}

.symposium-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    height: 100%;
    text-decoration: none !important;
    color: var(--text-main);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    transition: background 0.2s ease;
}

.symposium-link .h6Top {
    word-break: keep-all; 
    /* 文字の途中で改行されないようにする */
}

.symposium-link:hover {
    background: transparent;
    text-decoration: none !important;
}

.symposium-link.no-link {
    cursor: default;
    opacity: 0.75;
}

.symposium-link.no-link:hover {
    background: transparent;
}

.symposium-img {
    width: 200px;
    flex-shrink: 0;
    border-radius: var(--radius-md);
    display: block;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 992px) {
    .main-container {
        grid-template-columns: 1fr;
    }
    
    /* Keep widgets stacked vertically at all times to avoid the truncation glitch */
    .sidebar-widgets {
        position: static;
        flex-direction: column;
    }
    
    .sidebar-widgets .widget {
        width: 100%;
    }
}

@media (max-width: 768px) {
    /* Hide search on small screens to prevent logo overlap */
    .header-controls {
        display: none;
    }

    .main-nav .nav-list {
        width: 100%;
        flex-wrap: wrap;
    }

    .main-nav .nav-list li {
        flex: 0 0 50%; /* 2 items per row on mobile */
        border-bottom: 1px solid rgba(255,255,255,0.15);
    }

    .content-card {
        padding: 1.5rem;
    }

    .footer-nav {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    /* Symposium grid: single column on mobile */
    .symposium-grid {
        grid-template-columns: 1fr;
    }

    .symposium-img {
        width: 160px; /* 少し大きめに */
    }
}
