/* ================================
   CSS Variables
================================ */
:root {
    --primary: #4a90d9;
    --primary-dark: #2c5282;
    --primary-light: #ebf4ff;
    --accent: #3182ce;
    --bg-main: #f8fafc;
    --bg-white: #ffffff;
    --text-main: #2d3748;
    --text-light: #718096;
    --text-white: #ffffff;
    --border: #e2e8f0;
    --shadow: rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --transition: 0.3s ease;
    --font-family: 'Noto Sans JP', sans-serif;
}

/* ================================
   Reset & Base
================================ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family, 'Noto Sans JP', sans-serif);
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-main);
    background-color: var(--bg-main);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition);
}

ul {
    list-style: none;
}

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

/* ================================
   Container
================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ================================
   Header
================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-white);
    box-shadow: 0 2px 10px var(--shadow);
    z-index: 1000;
    transition: background var(--transition);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.nav-list {
    display: flex;
    gap: 30px;
}

.nav-list a {
    font-weight: 500;
    position: relative;
}

.nav-list a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width var(--transition);
}

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

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

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--text-main);
    transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ================================
   Hero Section
================================ */
.hero {
    height: 100vh;
    min-height: 600px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="3" fill="rgba(255,255,255,0.08)"/><circle cx="40" cy="70" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="90" cy="80" r="2" fill="rgba(255,255,255,0.06)"/></svg>');
    background-size: 200px;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 20px;
    line-height: 1.4;
    animation: fadeInUp 0.8s ease;
}

.hero-text {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-btn {
    display: inline-block;
    background: var(--bg-white);
    color: var(--primary);
    padding: 15px 40px;
    border-radius: 50px;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform var(--transition), box-shadow var(--transition);
    animation: fadeInUp 0.8s ease 0.4s both;
    margin-top: 20px;
}

.hero-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* Search Box */
.search-box {
    display: flex;
    max-width: 500px;
    margin: 0 auto 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.8s ease 0.3s both;
}

.search-input {
    flex: 1;
    padding: 15px 25px;
    border: none;
    font-size: 1rem;
    font-family: inherit;
    background: transparent;
    color: var(--text-main);
}

.search-input::placeholder {
    color: var(--text-light);
}

.search-input:focus {
    outline: none;
}

.search-btn {
    padding: 15px 20px;
    border: none;
    background: var(--primary);
    color: white;
    cursor: pointer;
    transition: background 0.2s ease;
}

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

.search-results {
    max-width: 500px;
    margin: 0 auto 20px;
    text-align: left;
    max-height: 300px;
    overflow-y: auto;
    animation: fadeInUp 0.3s ease both;
}

.search-results:empty {
    display: none;
}

.search-result-item {
    display: block;
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 20px;
    margin-bottom: 8px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-main);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.search-result-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.search-result-title {
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--primary-dark);
}

.search-result-desc {
    font-size: 0.85rem;
    color: var(--text-light);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-no-results {
    background: rgba(255, 255, 255, 0.9);
    padding: 15px 20px;
    border-radius: 10px;
    color: var(--text-light);
    text-align: center;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================================
   Section Title
================================ */
.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--primary);
    margin: 15px auto 0;
    border-radius: 3px;
}

/* ================================
   Articles Section
================================ */
.articles {
    padding: 100px 0;
    background: var(--bg-white);
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.article-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 4px 20px var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.card-image {
    height: 180px;
    background: linear-gradient(135deg, var(--primary-light) 0%, #dbeafe 100%);
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 15px;
}

.card-category {
    display: inline-block;
    background: var(--primary);
    color: var(--text-white);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.card-content {
    padding: 20px;
}

.card-date {
    font-size: 0.8rem;
    color: var(--text-light);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 10px 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-excerpt {
    font-size: 0.9rem;
    color: var(--text-light);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 50px;
}

.pagination-btn {
    padding: 12px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.pagination-btn:disabled {
    background: var(--border);
    cursor: not-allowed;
    opacity: 0.6;
}

.pagination-info {
    font-size: 0.95rem;
    color: var(--text-light);
    min-width: 60px;
    text-align: center;
}

/* ================================
   Categories Section
================================ */
.categories {
    padding: 100px 0;
    background: var(--bg-main);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.category-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 4px 20px var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.category-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.category-card p {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* ================================
   Profile Section
================================ */
.profile {
    padding: 100px 0;
    background: var(--bg-white);
}

.profile-card {
    display: flex;
    align-items: center;
    gap: 40px;
    max-width: 800px;
    margin: 0 auto;
    padding: 40px;
    background: var(--primary-light);
    border-radius: var(--radius);
}

.profile-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    flex-shrink: 0;
    overflow: hidden;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--primary-dark);
}

.profile-admin-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.profile-info p {
    color: var(--text-main);
    margin-bottom: 20px;
}

.profile-assistant {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    padding-top: 15px;
    border-top: 1px solid rgba(0,0,0,0.08);
}

.profile-assistant-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    flex-shrink: 0;
    overflow: hidden;
}

.profile-assistant-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-assistant-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-sub);
}

.profile-sns {
    display: flex;
    gap: 15px;
}

.sns-link {
    display: inline-block;
    background: var(--primary);
    color: var(--text-white);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: background var(--transition);
}

.sns-link:hover {
    background: var(--primary-dark);
}

/* ================================
   Pagination
================================ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid var(--border);
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary);
    color: var(--text-white);
    border: none;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition);
}

.pagination-btn:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.pagination-btn:disabled {
    background: var(--border);
    color: var(--text-light);
    cursor: not-allowed;
}

.pagination-info {
    font-size: 0.95rem;
    color: var(--text-light);
    min-width: 60px;
    text-align: center;
}

@media (max-width: 480px) {
    .pagination {
        gap: 10px;
    }

    .pagination-btn {
        padding: 10px 16px;
        font-size: 0.85rem;
    }
}

/* ================================
   Footer
================================ */
.footer {
    background: var(--primary-dark);
    color: var(--text-white);
    padding: 50px 0 30px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.footer-logo {
    font-size: 1.3rem;
    font-weight: 700;
}

.footer-nav {
    display: flex;
    gap: 30px;
}

.footer-nav a {
    font-size: 0.9rem;
    opacity: 0.8;
    transition: opacity var(--transition);
}

.footer-nav a:hover {
    opacity: 1;
}

.copyright {
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.7;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ================================
   Mobile Navigation
================================ */
.nav.active .nav-list {
    display: flex;
}

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

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--bg-white);
        padding: 20px;
        box-shadow: 0 4px 10px var(--shadow);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }

    .nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-list {
        flex-direction: column;
        gap: 15px;
    }

    .nav-list a {
        display: block;
        padding: 10px 0;
    }

    .hero-title {
        font-size: 2rem;
    }

    .article-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .profile-card {
        flex-direction: column;
        text-align: center;
    }

    .profile-sns {
        justify-content: center;
    }

    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .footer-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.6rem;
    }

    .hero-text {
        font-size: 0.95rem;
    }

    .section-title {
        font-size: 1.4rem;
    }
}

/* ================================
   Search Box
================================ */
.search-box {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-radius: 50px;
    background: var(--bg-white);
    padding: 5px;
    animation: fadeInUp 0.8s ease 0.3s both;
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 20px;
    font-size: 1rem;
    color: var(--text-main);
    font-family: inherit;
    outline: none;
}

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

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

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 15px;
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    z-index: 100;
    max-height: 400px;
    overflow-y: auto;
    text-align: left;
    display: none;
    /* JSで制御 */
}

.search-results:not(:empty) {
    display: block;
    animation: fadeInUp 0.3s ease;
}

.search-result-item {
    display: block;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s ease;
}

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

.search-result-item:hover {
    background: var(--bg-main);
}

.search-result-title {
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 5px;
    font-size: 1rem;
}

.search-result-desc {
    font-size: 0.85rem;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-no-results {
    padding: 20px;
    color: var(--text-light);
    text-align: center;
}

mark {
    background: rgba(255, 255, 0, 0.4);
    color: inherit;
    padding: 0 2px;
    border-radius: 2px;
}

/* ================================
   Pagination
================================ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 60px;
}

.pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background: var(--bg-white);
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.pagination-btn:hover:not(:disabled) {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: var(--border);
    color: var(--text-light);
    background: var(--bg-main);
}

.pagination-info {
    font-weight: 700;
    color: var(--text-light);
    font-family: 'Poppins', sans-serif;
    /* 数字を見やすく */
}

/* ================================
   Pagination
================================ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 50px;
    flex-wrap: wrap;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: none;
    border-radius: 8px;
    background: var(--bg-white);
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: 0 2px 8px var(--shadow);
}

.pagination-btn:hover:not(:disabled) {
    background: var(--primary);
    color: var(--text-white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-btn.active {
    background: var(--primary);
    color: var(--text-white);
}

.pagination-info {
    color: var(--text-light);
    font-size: 0.85rem;
    margin: 0 10px;
}

@media (max-width: 480px) {
    .pagination {
        gap: 5px;
    }

    .pagination-btn {
        min-width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }
}