/* Modern CSS Reset and Base Styles */
*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
    line-height: 1.7;
    color: #333;
    background-color: #fafafa;
    font-size: 18px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

input,
button,
textarea,
select {
    font: inherit;
}

/* CSS Custom Properties for Design System */
:root {
    --primary-color: #8b0000;
    --primary-hover: #a61414;
    --primary-light: #f5f0f0;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --text-primary: #2c3e50;
    --text-secondary: #666;
    --text-muted: #999;
    --border-color: #e1e8ed;
    --background-light: #fafafa;
    --background-white: #ffffff;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --transition: all 0.2s ease;
    --max-width: 1200px;
    --header-height: 80px;
    --page-padding: 16px;
}

/* Utility Classes */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--page-padding);
}

/* Page Layout */
#wrap {
    padding: 0 var(--page-padding);
    max-width: calc(var(--max-width) + 2 * var(--page-padding));
    margin: 0 auto;
}

@media (min-width: 768px) {
    :root {
        --page-padding: 24px;
    }
}

@media (min-width: 1024px) {
    :root {
        --page-padding: 32px;
    }
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Links */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 { font-size: clamp(2.2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.4rem); }
h3 { font-size: clamp(1.5rem, 3vw, 1.9rem); }
h4 { font-size: clamp(1.3rem, 2.5vw, 1.6rem); }

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

/* Lists */
ul, ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* Maintenance Notice */
.maintenance-notice {
    background: #fff8e1;
    border: 1px solid #f9a825;
    border-left: 4px solid #f57c00;
    padding: 12px 16px;
    margin-bottom: 24px;
    text-align: center;
}

.maintenance-notice p {
    margin: 0;
    color: #e65100;
    font-size: 15px;
    font-weight: 500;
}

/* Header Top */
#headerTop {
    background: var(--primary-color);
    color: white;
    padding: 12px 0;
    font-size: 16px;
    text-align: center;
}

#site-description {
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Main Header */
#header {
    background: var(--background-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
    display: flex;
    align-items: center;
}

#headerInner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

#site-title img {
    height: 60px;
    width: auto;
    transition: var(--transition);
}

#site-title:hover img {
    transform: scale(1.02);
}

#headContact {
    text-align: right;
    padding: 12px 20px;
    background: var(--primary-light);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary-color);
}

#headContactTxt {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

#headContactTel {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-color);
}

/* Navigation */
#gMenu {
    background: var(--background-white);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.assistive-text {
    background: var(--primary-color);
    color: white;
    padding: 12px 20px;
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

#gMenu .menu {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#gMenu .menu::-webkit-scrollbar {
    display: none;
}

#gMenu .menu li {
    flex-shrink: 0;
    border-right: 1px solid var(--border-color);
}

#gMenu .menu li:last-child {
    border-right: none;
}

#gMenu .menu li a {
    display: block;
    padding: 16px 24px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 15px;
    transition: var(--transition);
    white-space: nowrap;
    position: relative;
}

#gMenu .menu li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--primary-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

#gMenu .menu li a:hover,
#gMenu .menu li.current-menu-item a {
    background: var(--primary-light);
    color: var(--primary-color);
}

#gMenu .menu li a:hover::after,
#gMenu .menu li.current-menu-item a::after {
    width: 100%;
}

/* Slideshow */
#topMainBnr {
    background: var(--primary-color);
    padding: 20px 0;
}

.slideshow-container {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.slide {
    display: none;
}

.slide.active {
    display: block;
}

.slide img {
    width: 100%;
    height: 350px;
    object-fit: cover;
}

.slide-dots {
    text-align: center;
    margin-top: 20px;
}

.dot {
    height: 12px;
    width: 12px;
    margin: 0 6px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
    transition: var(--transition);
}

.dot.active,
.dot:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: scale(1.2);
}

/* Main Content */
#main {
    background: var(--background-white);
    padding: 40px 0;
}

#container {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    align-items: start;
}

/* Content Sections */
#content {
    min-height: 500px;
}

/* Top PR Section */
#topPr {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.topPrInner {
    background: var(--background-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

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

.topPrTit {
    background: var(--primary-light);
    padding: 16px 20px;
    border-left: 4px solid var(--primary-color);
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.topPrTit a {
    color: var(--text-primary);
}

.prImage img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.topPrTxtBox {
    padding: 20px;
}

.topPrDescription {
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.6;
}

.moreLink a {
    background: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    display: inline-block;
    transition: var(--transition);
}

.moreLink a:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

/* News Section */
.infoList h2 {
    color: var(--text-primary);
    border-left: 4px solid var(--primary-color);
    padding: 0 0 0 20px;
    margin-bottom: 32px;
    font-size: 28px;
    font-weight: 700;
    border-radius: 0;
}

.infoListBox {
    background: var(--background-white);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.infoListBox:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.entryTitle {
    margin-bottom: 12px;
    font-size: 18px;
    font-weight: 600;
}

.entryTitle a {
    color: var(--text-primary);
    transition: var(--transition);
}

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

.entryMeta {
    margin-bottom: 12px;
    font-size: 16px;
    color: var(--text-muted);
    display: flex;
    gap: 16px;
    align-items: center;
}

.infoDate {
    font-weight: 500;
}

.infoCate {
    background: var(--primary-color);
    color: white;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
}

/* Sidebar */
#sideTower {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

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

.localHead {
    background: var(--primary-color);
    color: white;
    padding: 16px 20px;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.widget-content {
    padding: 20px;
}

.widget-content p {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 16px;
}

.widget-btn {
    background: var(--primary-color);
    color: white;
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 16px;
    display: inline-block;
    transition: var(--transition);
    text-align: center;
    width: 100%;
}

.widget-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

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

.news-list li {
    border-bottom: 1px solid var(--border-color);
    padding: 12px 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.news-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.news-date {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

.news-list a {
    font-size: 16px;
    color: var(--text-primary);
    transition: var(--transition);
}

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

.contact-info p {
    margin-bottom: 12px !important;
}

.contact-info strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* Page-specific Styles */
.page-header {
    background: var(--primary-light);
    padding: 40px;
    margin-bottom: 40px;
    border-left: 6px solid var(--primary-color);
    border-radius: 0;
    box-shadow: var(--shadow-sm);
}

.page-title {
    color: var(--primary-color);
    margin-bottom: 8px;
    font-size: clamp(1.8rem, 4vw, 2.2rem);
}

.page-description {
    color: var(--text-secondary);
    margin: 0;
    font-size: 16px;
}

.content-section {
    margin-bottom: 48px;
    padding: 32px 0;
}

.content-section:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}

/* Info Boxes */
.info-box, .notice-box, .note-box {
    background: #f8f9fa;
    border: 1px solid #e1e8ed;
    border-radius: 0;
    padding: 24px;
    margin: 24px 0;
    border-left: 6px solid #2196f3;
}

.form-notice {
    background: #fff8e1;
    border: 1px solid #e1e8ed;
    border-radius: 0;
    padding: 24px;
    margin: 24px 0;
    border-left: 6px solid #ff9800;
}

/* Activity Grid */
.activity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.activity-item {
    background: var(--background-white);
    padding: 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

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

.activity-item h3 {
    color: var(--primary-color);
    margin-bottom: 12px;
    font-size: 18px;
}

/* Officer List */
.officer-list {
    display: grid;
    gap: 16px;
    margin-top: 16px;
}

.officer-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--background-white);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.officer-title {
    font-weight: 600;
    color: var(--primary-color);
}

.officer-name {
    font-weight: 500;
    color: var(--text-primary);
}

/* Contact Info */
.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    margin-top: 24px;
}

.contact-item {
    padding: 24px;
    background: var(--background-white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

/* Registration Methods */
.method-item, .contact-method-grid .method-item {
    background: var(--background-white);
    padding: 28px;
    margin-bottom: 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.method-item:hover {
    box-shadow: var(--shadow-md);
}

.method-item h3 {
    color: var(--primary-color);
    margin-bottom: 16px;
    font-size: 18px;
}

.contact-detail {
    background: var(--primary-light);
    padding: 16px;
    border-radius: 0;
    margin-top: 16px;
    font-weight: 600;
    border-left: 4px solid var(--primary-color);
}

/* Footer */
#footerSection {
    background: #2c3e50;
    color: white;
    padding: 48px 0 0;
    margin-top: 60px;
    margin-left: calc(-1 * var(--page-padding));
    margin-right: calc(-1 * var(--page-padding));
    width: calc(100% + 2 * var(--page-padding));
}

#footer {
    padding: 32px var(--page-padding);
}

#footerInner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
    max-width: var(--max-width);
    margin: 0 auto;
}

#footerOutline dt img {
    height: 60px;
    width: auto;
    margin-bottom: 16px;
    filter: brightness(0) invert(1);
}

#footerOutline dd {
    font-size: 14px;
    line-height: 1.8;
    color: #bdc3c7;
}

#footerSiteMap .menu {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

#footerSiteMap .menu li a {
    color: #bdc3c7;
    font-size: 14px;
    padding: 8px 0;
    display: block;
    transition: var(--transition);
    border-radius: var(--radius-sm);
    padding-left: 12px;
}

#footerSiteMap .menu li a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

/* Site Bottom */
#siteBottom {
    background: #1a252f;
    padding: 20px var(--page-padding);
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#siteBottomInner {
    max-width: var(--max-width);
    margin: 0 auto;
}

#copy {
    font-size: 13px;
    color: #7f8c8d;
}

#copy a {
    color: #95a5a6;
    transition: var(--transition);
}

#copy a:hover {
    color: white;
}

/* Back to Home Button */
.back-to-home {
    text-align: center;
    margin: 48px 0 24px 0;
    padding-top: 32px;
    border-top: 2px solid var(--border-color);
}

.btn-back {
    background: var(--primary-color);
    color: white;
    padding: 14px 32px;
    border-radius: var(--radius-md);
    font-weight: 600;
    display: inline-block;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.btn-back:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-contact {
    background: #2196f3;
    color: white;
    padding: 14px 32px;
    border-radius: var(--radius-md);
    font-weight: 600;
    display: inline-block;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.btn-contact:hover {
    background: #1976d2;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Article Styles */
.article-header {
    background: var(--primary-light);
    padding: 40px;
    margin-bottom: 40px;
    border-left: 6px solid var(--primary-color);
    border-radius: 0;
    box-shadow: var(--shadow-sm);
}

.article-meta {
    margin-bottom: 16px;
    font-size: 14px;
    display: flex;
    gap: 16px;
    align-items: center;
}

.article-date {
    color: var(--text-muted);
    font-weight: 500;
}

.article-category {
    background: var(--primary-color);
    color: white;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
}

.article-title {
    color: var(--primary-color);
    margin: 0;
    font-size: clamp(1.5rem, 3vw, 2rem);
    line-height: 1.4;
}

.article-content {
    line-height: 1.8;
}

.article-footer {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 2px solid var(--border-color);
}

.article-nav {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Timeline Styles */
.timeline {
    position: relative;
    margin: 32px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 24px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    padding-left: 64px;
    margin-bottom: 32px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 8px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 3px solid white;
    box-shadow: 0 0 0 2px var(--primary-color);
}

.timeline-year {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.timeline-content {
    background: var(--background-white);
    padding: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.timeline-content h3 {
    color: var(--text-primary);
    margin-bottom: 12px;
    font-size: 16px;
}

.timeline-content ul {
    margin: 0;
    padding-left: 16px;
}

.timeline-content li {
    margin-bottom: 8px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.timeline-content strong {
    color: var(--primary-color);
    font-weight: 600;
}

@media (max-width: 768px) {
    .timeline::before {
        left: 12px;
    }
    
    .timeline-item {
        padding-left: 40px;
    }
    
    .timeline-item::before {
        left: 4px;
        width: 12px;
        height: 12px;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    :root {
        --header-height: auto;
    }
    
    .container {
        padding: 0 16px;
    }

    #headerInner {
        flex-direction: column;
        gap: 16px;
        padding: 16px 0;
    }

    #headContact {
        width: 100%;
        text-align: center;
    }

    #header {
        position: relative;
        height: auto;
    }

    #gMenu .menu {
        flex-direction: column;
    }

    #gMenu .menu li {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    #gMenu .menu li:last-child {
        border-bottom: none;
    }

    #container {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    #topPr {
        grid-template-columns: 1fr;
    }

    #sideTower {
        order: -1;
    }

    .slide img {
        height: 250px;
    }

    .page-header {
        padding: 24px;
    }

    #footerInner {
        grid-template-columns: 1fr;
        gap: 32px;
        text-align: center;
    }

    #footerSiteMap .menu {
        grid-template-columns: 1fr;
    }

    .article-nav {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }

    #site-title img {
        height: 50px;
    }

    .slide img {
        height: 200px;
    }

    .page-header {
        padding: 20px;
    }

    .method-item,
    .activity-item,
    .contact-item {
        padding: 20px;
    }

    .article-header {
        padding: 24px;
    }
}

/* Print Styles */
@media print {
    #headerTop,
    #gMenu,
    #sideTower,
    #footerSection,
    .article-nav,
    .back-to-home {
        display: none;
    }

    body {
        background: white;
        color: black;
        font-size: 12pt;
        line-height: 1.4;
    }

    a {
        color: black;
        text-decoration: underline;
    }

    .page-header,
    .article-header {
        background: none;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}