/* CSS Variables */
:root {
    --primary-color: #c5a059;
    /* Gold/Champagne */
    --secondary-color: #1a1a1a;
    /* Dark Charcoal */
    --text-color: #333;
    --text-light: #f4f4f4;
    --accent-color: #e2d1a3;
    --bg-light: #fafafa;
    --bg-dark: #121212;
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: 0.2s ease;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', 'Noto Serif JP', serif;
    line-height: 1.8;
    font-size: 1.08rem;
    /* 全体的に108%程度に設定 */
    color: var(--text-color);
    background-color: var(--bg-light);
    overflow-x: hidden;
}

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 15px;
    width: 100%;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

h1,
h2,
h3,
h4,
h5 {
    font-family: 'Noto Serif JP', serif;
    font-weight: 700;
}

/* Header */
#main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition-slow);
}

#main-header.scrolled {
    background: rgba(18, 18, 18, 0.95);
    backdrop-filter: blur(10px);
    padding: 10px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

#main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#logo {
    color: var(--text-light);
    font-size: 1.5rem;
    letter-spacing: 0.2em;
}

#logo span {
    font-weight: 300;
    opacity: 0.7;
}

#main-nav ul {
    display: flex;
    gap: 30px;
}

#main-nav a {
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    position: relative;
    padding-bottom: 5px;
}

#main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--primary-color);
    transition: var(--transition-fast);
}

#main-nav a:hover {
    color: var(--primary-color);
}

#main-nav a:hover::after {
    width: 100%;
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-left: 30px;
}

.lang-switcher a {
    opacity: 0.6;
    transition: var(--transition-fast);
}

.lang-switcher a.active {
    opacity: 1;
    color: var(--primary-color);
    font-weight: 600;
}

.lang-switcher a:hover {
    opacity: 1;
}

.lang-switcher .sep {
    opacity: 0.3;
}

/* Hero Section */
#hero {
    height: 100vh;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-dark);
    /* 動画読み込みまでの背景色 */
    color: var(--text-light);
    text-align: center;
    overflow: hidden;
}

#hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: 0;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.2) 50%, rgba(0, 0, 0, 0.6) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-content .subtitle {
    font-size: 1.1rem;
    letter-spacing: 0.5em;
    margin-bottom: 20px;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s forwards 0.5s;
}

.hero-content .title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    letter-spacing: 0.15em;
    line-height: 1;
    margin-bottom: 40px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s forwards 0.8s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scroll-indicator {
    position: absolute;
    bottom: -250px;
    /* タイトルと被らないよう250px分だけ下にオフセット */
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    writing-mode: vertical-lr;
}

.scroll-indicator::after {
    content: '';
    display: block;
    width: 1px;
    height: 60px;
    background: var(--text-light);
    margin: 10px auto 0;
    animation: scrollDown 2s infinite;
}

@keyframes scrollDown {
    0% {
        transform: scaleY(0);
        transform-origin: top;
    }

    50% {
        transform: scaleY(1);
        transform-origin: top;
    }

    51% {
        transform: scaleY(1);
        transform-origin: bottom;
    }

    100% {
        transform: scaleY(0);
        transform-origin: bottom;
    }
}

/* Page Sections */
.page-section {
    padding: 120px 0;
}

.section-header {
    margin-bottom: 60px;
}

.section-header.center {
    text-align: center;
}

.section-header .label {
    display: block;
    font-size: 0.8rem;
    letter-spacing: 0.4em;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.section-header h3 {
    font-size: 2.2rem;
    letter-spacing: 0.05em;
    max-width: 100%;
    word-break: normal;
    overflow-wrap: break-word;
}

.bg-dark {
    background-color: var(--bg-dark);
    color: var(--text-light);
}

.bg-light {
    background-color: #f0f0f0;
}

/* Resident Area */
.resident-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

/* Amenity Grid */
.amenity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 60px;
    margin-top: 40px;
}

.amenity-item {
    background: #fff;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: var(--transition-slow);
}

.amenity-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.1);
}

.amenity-item .img-wrapper {
    height: 300px;
    overflow: hidden;
}

.amenity-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.amenity-item:hover img {
    transform: scale(1.1);
}

.amenity-info {
    padding: 30px;
}

.amenity-info h4 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.amenity-info p {
    font-size: 0.95rem;
    color: #666;
    padding-bottom: 2px;
}

.resident-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition-slow);
}

.resident-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-color);
    transform: translateY(-10px);
}

.resident-card h4 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--accent-color);
}

.resident-card p {
    margin-bottom: 30px;
    opacity: 0.8;
    line-height: 1.7;
    max-width: 100%;
    word-break: normal;
}

/* Docs Table */
.docs-table-wrapper {
    background: #fff;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.docs-table {
    width: 100%;
    border-collapse: collapse;
}

.docs-table th,
.docs-table td {
    padding: 20px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.docs-table th {
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    color: #999;
    text-transform: uppercase;
}

.docs-table td.date {
    font-family: 'Outfit', sans-serif;
    color: #888;
}

.docs-table td.action {
    text-align: right;
}

.download-link {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: underline;
}

.download-link.locked {
    color: #ccc;
    text-decoration: none;
    cursor: pointer;
}

.download-link.locked::before {
    content: '🔒 ';
}

/* Login Box */
.login-box {
    max-width: 500px;
    margin: 0 auto;
    background: #fff;
    padding: 60px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

.login-box h3 {
    text-align: center;
    margin-bottom: 40px;
}

.login-box label {
    display: block;
    font-size: 0.8rem;
    margin-bottom: 8px;
    color: #666;
}

.login-info {
    margin-top: 30px;
    text-align: center;
}

.login-info .note {
    font-size: 0.75rem;
    color: #e74c3c;
    /* Red */
    margin-bottom: 15px;
}

.login-info .help a:hover {
    text-decoration: underline;
}

.login-box .btn-full {
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(197, 160, 89, 0.3);
    transition: var(--transition-fast);
}

.login-box .btn-full:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(197, 160, 89, 0.4);
}

/* Board Summary */
.board-summary {
    margin-bottom: 40px;
    padding: 30px;
    background: #f9f9f9;
    border-radius: 8px;
}

.board-summary h5 {
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.board-summary ul li {
    font-size: 0.95rem;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.board-summary .date {
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    color: #aaa;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 15px 40px;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    cursor: pointer;
    border: none;
}

.btn-gold {
    background: var(--primary-color);
    color: var(--bg-dark);
    font-weight: 600;
}

.btn-gold:hover {
    background: var(--accent-color);
}

.btn-outline {
    border: 1px solid var(--text-light);
    color: var(--text-light);
}

.btn-outline:hover {
    background: var(--text-light);
    color: var(--bg-dark);
}

/* Board */
.board-container {
    max-width: 800px;
    margin: 0 auto;
}

.post-form {
    background: #fff;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    margin-bottom: 60px;
}

.post-form h5 {
    font-size: 1.2rem;
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #999;
    /* 枠線を濃いグレーに変更（#ddd -> #999） */
    font-family: inherit;
    font-size: 1.1rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 8px rgba(197, 160, 89, 0.2);
}

.input-small {
    width: 100px !important;
    text-align: center;
    letter-spacing: 0.1em;
}

.form-group.row {
    display: flex;
    align-items: center;
    gap: 20px;
}

.form-group textarea {
    height: 150px;
    resize: vertical;
}

.calendar-wrapper {
    background: #fff;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

@media (max-width: 768px) {
    .calendar-wrapper iframe {
        height: 400px;
    }
}

/* 新着イベント情報カードリスト（agakanren.com より取得） */
.event-card-list {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    padding: 10px 30px;
}

.event-card {
    display: flex;
    align-items: center;
    gap: 25px;
    padding: 22px 0;
    border-bottom: 1px solid #eee;
    color: var(--text-color);
    transition: background var(--transition-fast);
}

.event-card:last-child {
    border-bottom: none;
}

.event-card:hover {
    background: #fafafa;
}

.event-card-image {
    flex: 0 0 160px;
    height: 110px;
    overflow: hidden;
    border-radius: 4px;
    background: #f0f0f0;
}

.event-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.event-card-body {
    flex: 1 1 auto;
    min-width: 0;
}

.event-card-badge {
    display: inline-block;
    border: 1.5px solid #2e9a4a;
    color: #2e9a4a;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 3px 12px;
    border-radius: 4px;
    margin-bottom: 10px;
    letter-spacing: 0.05em;
}

.event-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--secondary-color);
    line-height: 1.5;
    margin-bottom: 8px;
    word-break: break-word;
}

.event-card:hover .event-card-title {
    color: var(--primary-color);
}

.event-card-schedule {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .event-card-list {
        padding: 5px 15px;
    }

    .event-card {
        gap: 14px;
        padding: 16px 0;
    }

    .event-card-image {
        flex: 0 0 100px;
        height: 80px;
    }

    .event-card-title {
        font-size: 0.95rem;
    }

    .event-card-schedule {
        font-size: 0.8rem;
    }
}

.btn-full {
    width: 100%;
    background: var(--secondary-color);
    color: #fff;
}

.form-note {
    font-size: 0.8rem;
    color: #777;
    margin-top: 15px;
    text-align: center;
}

#posts-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.post-item {
    background: #fff;
    padding: 30px;
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
    overflow: visible;
}

.post-meta {
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
}

.post-meta .author {
    color: var(--secondary-color);
    font-weight: 600;
}

/* Mobile Toggle */
#mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

#mobile-menu-toggle span {
    display: block;
    width: 30px;
    height: 2px;
    background: var(--text-light);
    transition: var(--transition-fast);
}

/* Footer */
footer {
    padding: 100px 0 60px;
    background: var(--bg-dark);
    color: var(--text-light);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 2fr;
    gap: 80px;
    margin-bottom: 80px;
    text-align: left;
}

.footer-logo {
    font-size: 1.5rem;
    letter-spacing: 0.3em;
    margin-bottom: 30px;
}

.footer-info .address {
    font-size: 0.9rem;
    line-height: 2;
    opacity: 0.7;
}

.footer-access h5 {
    font-size: 1.1rem;
    letter-spacing: 0.1em;
    margin-bottom: 25px;
    color: var(--primary-color);
}

.footer-access ul {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-access li {
    font-size: 0.85rem;
    opacity: 0.7;
    line-height: 1.6;
}

.copyright {
    font-size: 0.75rem;
    opacity: 0.4;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 40px;
}

/* Responsive */
@media (max-width: 768px) {
    #main-nav {
        display: none;
    }

    #mobile-menu-toggle {
        display: flex;
    }

    .page-section {
        padding: 80px 0;
    }

    .hero-content .title {
        font-size: 3rem;
    }

    .resident-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile Nav Open State */
@media (max-width: 768px) {
    #main-header.nav-open {
        background: rgba(18, 18, 18, 0.98);
        height: 100vh;
    }

    #main-header.nav-open #main-nav {
        display: block;
        position: absolute;
        top: 100px;
        left: 0;
        width: 100%;
        text-align: center;
    }

    #main-header.nav-open #main-nav ul {
        flex-direction: column;
        gap: 40px;
    }

    #main-header.nav-open #main-nav a {
        font-size: 1.5rem;
    }

    #main-header.nav-open #mobile-menu-toggle span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    #main-header.nav-open #mobile-menu-toggle span:nth-child(2) {
        opacity: 0;
    }

    #main-header.nav-open #mobile-menu-toggle span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
}