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

html {
    overflow-x: hidden;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #333;
    background-color: #f5f5f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Navbar */
.navbar {
    background-color: #fff;
    padding: 0 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid #e8e8e8;
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

/* 좌측: 로고 */
.navbar-brand {
    color: #2c3e50;
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.navbar-logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

/* 중앙: 메뉴 */
.navbar-center {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    justify-content: center;
}

.nav-link {
    color: #333;
    padding: 0.5rem 0.8rem;
    border-radius: 4px;
    transition: color 0.2s, background-color 0.2s;
    font-size: 1.05rem;
    font-weight: 600;
    white-space: nowrap;
}

.nav-link:hover {
    color: #3498db;
    background-color: #f5f7fa;
}

/* 우측: 아이콘 */
.navbar-icons {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-shrink: 0;
}

.nav-icon {
    color: #666;
    font-size: 1.2rem;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s;
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
}

.nav-icon:hover {
    color: #3498db;
    background-color: #f5f7fa;
}

.nav-icon-user {
    color: #666;
    font-size: 0.75rem;
    padding: 0 0.3rem;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-icon-form {
    display: inline;
}

/* Footer */
.footer {
    background-color: #f8f9fa;
    color: #888;
    text-align: center;
    padding: 2rem 1.5rem;
    margin-top: auto;
    border-top: 1px solid #e8e8e8;
}

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

.footer-info {
    margin-bottom: 1rem;
}

.footer-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #555;
    margin-bottom: 0.5rem;
}

.footer-details {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    font-size: 0.85rem;
    color: #999;
}

.footer-copyright {
    font-size: 0.8rem;
    color: #bbb;
    margin-top: 0.8rem;
}

/* Page Header */
.page-header {
    width: 100%;
    min-height: 180px;
    background-color: #2c3e50;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-header-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-header-title {
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
}

@media (max-width: 768px) {
    .page-header {
        min-height: 130px;
    }

    .page-header-title {
        font-size: 1.5rem;
    }
}

/* Main Content */
.main-content {
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

/* Hero */
.hero {
    text-align: center;
    padding: 6rem 2rem;
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: #fff;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn:hover {
    opacity: 0.85;
}

.btn-primary {
    background-color: #3498db;
    color: #fff;
}

.btn-secondary {
    background-color: #95a5a6;
    color: #fff;
}

.btn-success {
    background-color: #27ae60;
    color: #fff;
}

.btn-warning {
    background-color: #f39c12;
    color: #fff;
}

.btn-danger {
    background-color: #e74c3c;
    color: #fff;
}

.btn-full {
    width: 100%;
}

.btn-sm {
    padding: 0.3rem 0.7rem;
    font-size: 0.8rem;
}

/* Forms */
.form-container {
    max-width: 440px;
    margin: 2rem auto;
    background: #fff;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.form-container h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 0.7rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #3498db;
}

.form-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: #888;
}

.form-footer a {
    color: #3498db;
    font-weight: 600;
}

.field-error {
    color: #e74c3c;
    font-size: 0.8rem;
    margin-top: 0.3rem;
    display: block;
}

/* Alerts */
.alert {
    padding: 0.8rem 1rem;
    border-radius: 6px;
    margin-bottom: 1.2rem;
    font-size: 0.9rem;
}

.alert-error {
    background-color: #fdecea;
    color: #c0392b;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Admin */
.admin-container {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.admin-header h2 {
    color: #2c3e50;
}

.admin-menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.admin-card {
    display: block;
    padding: 2rem;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: #fff;
    border-radius: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.admin-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.admin-card p {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Data Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.data-table th,
.data-table td {
    padding: 0.8rem;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
}

.data-table th {
    background-color: #f8f9fa;
    font-weight: 700;
    color: #555;
}

.data-table tbody tr:hover {
    background-color: #f8f9fa;
}

.action-cell {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    align-items: center;
}

.inline-form {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.select-sm {
    padding: 0.3rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.8rem;
}

/* Badge */
.badge {
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge.ADMIN {
    background-color: #e74c3c;
    color: #fff;
}

.badge.MEMBER {
    background-color: #3498db;
    color: #fff;
}

.badge.GUEST {
    background-color: #95a5a6;
    color: #fff;
}

.badge.approved {
    background-color: #27ae60;
    color: #fff;
}

.badge.pending {
    background-color: #f39c12;
    color: #fff;
}

/* Admin Card Variants */
.admin-card-green {
    background: linear-gradient(135deg, #27ae60, #219a52);
}

.admin-card-orange {
    background: linear-gradient(135deg, #e67e22, #d35400);
}

.admin-card-teal {
    background: linear-gradient(135deg, #1abc9c, #16a085);
}

/* Form Section */
.form-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.form-section h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
    font-size: 1.1rem;
}

.inline-form-row {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.form-group-inline {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.form-group-inline label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #555;
}

.form-group-inline input,
.form-group-inline select {
    padding: 0.4rem 0.6rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.input-sm {
    padding: 0.3rem 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.8rem;
    width: 100px;
}

/* Dropdown Navigation */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    cursor: pointer;
}

.nav-dropdown-content {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    background-color: #fff;
    min-width: 180px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    z-index: 1000;
}

.nav-dropdown:hover .nav-dropdown-content {
    display: block;
}

.nav-dropdown-item {
    display: block;
    padding: 0.7rem 1rem;
    color: #333;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.nav-dropdown-item:hover {
    background-color: #f0f0f0;
}

/* Admin Card Variants */
.admin-card-purple {
    background: linear-gradient(135deg, #8e44ad, #7d3c98);
}

/* Menu Management */
.menu-group {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.menu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.menu-item-parent {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.menu-item-child {
    padding-left: 2.5rem;
    border-bottom: 1px solid #f0f0f0;
}

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

.menu-item-info {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.menu-depth-label {
    background-color: #2c3e50;
    color: #fff;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

.menu-depth-label.sub {
    background-color: #7f8c8d;
}

.menu-meta {
    font-size: 0.8rem;
    color: #888;
}

.menu-header-image-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-top: 1px solid #f0f0f0;
    flex-wrap: wrap;
}

.menu-header-preview {
    height: 40px;
    border-radius: 4px;
    border: 1px solid #ddd;
    object-fit: cover;
}

.menu-item-actions {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    flex-wrap: wrap;
}

/* Page View */
.page-container {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.page-container h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #3498db;
}

.page-content {
    line-height: 1.8;
    color: #444;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* CKEditor 이미지 리사이즈 지원 */
.page-content .image.image_resized,
.post-content .image.image_resized {
    max-width: 100%;
    display: block;
    box-sizing: border-box;
}

.page-content .image.image_resized img,
.post-content .image.image_resized img {
    width: 100%;
}

.page-content .image img,
.post-content .image img {
    max-width: 100%;
    height: auto;
}

.page-content table,
.post-content table {
    max-width: 100%;
    overflow-x: auto;
    display: block;
}

.page-content iframe,
.post-content iframe {
    max-width: 100%;
}

.page-content img,
.post-content img {
    max-width: 100%;
    height: auto;
}

/* Board */
.board-container {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.board-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.board-header h2 {
    color: #2c3e50;
}

.board-header-actions {
    display: flex;
    gap: 0.8rem;
    align-items: center;
}

.board-search {
    display: flex;
    gap: 0.4rem;
}

.board-search input {
    padding: 0.4rem 0.7rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    width: 180px;
}

.board-table .col-no { width: 60px; text-align: center; }
.board-table .col-title { }
.board-table .col-author { width: 100px; text-align: center; }
.board-table .col-date { width: 100px; text-align: center; }
.board-table .col-views { width: 60px; text-align: center; }

.board-title-link {
    color: #333;
    font-weight: 500;
}

.board-title-link:hover {
    color: #3498db;
    text-decoration: underline;
}

.attach-icon {
    font-size: 0.85rem;
    margin-left: 0.3rem;
    vertical-align: middle;
    opacity: 0.6;
}

.empty-message {
    text-align: center;
    color: #999;
    padding: 3rem 0;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.3rem;
    margin-top: 2rem;
}

.page-link {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.page-link:hover {
    background-color: #3498db;
    color: #fff;
    border-color: #3498db;
}

.page-link.active {
    background-color: #3498db;
    color: #fff;
    border-color: #3498db;
    font-weight: 700;
}

/* Post View */
.post-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #3498db;
}

.post-header h2 {
    color: #2c3e50;
    margin-bottom: 0.8rem;
}

.post-meta {
    display: flex;
    gap: 1.5rem;
    color: #888;
    font-size: 0.85rem;
    flex-wrap: wrap;
}

.post-content {
    min-height: 200px;
    padding: 1.5rem 0;
    line-height: 1.8;
    color: #444;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: break-word;
    border-bottom: 1px solid #eee;
}

.post-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5rem;
}

.post-actions-right {
    display: flex;
    gap: 0.5rem;
}

/* Write Form */
.write-form .form-group {
    margin-bottom: 1.5rem;
}

.write-form textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
}

.write-form textarea:focus {
    outline: none;
    border-color: #3498db;
}

.write-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
}

/* Error Page */
.error-container {
    text-align: center;
    padding: 4rem 2rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.error-container h1 {
    font-size: 5rem;
    color: #e74c3c;
    margin-bottom: 0.5rem;
}

.error-container h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.error-container p {
    color: #888;
    margin-bottom: 2rem;
}

/* Site Settings */
.logo-preview-area {
    margin: 1rem 0;
}

.logo-current {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-current p {
    color: #666;
    font-size: 0.9rem;
}

.logo-preview-img {
    height: 50px;
    width: auto;
    object-fit: contain;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 4px;
    background: #fff;
}

.form-hint {
    font-size: 0.8rem;
    color: #999;
    margin-top: 0.5rem;
}

/* File Input */
.file-input {
    width: 100%;
    padding: 0.7rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    background: #fff;
}

/* Attachment List (write/edit form) */
.attachment-list {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
}

.attachment-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9rem;
}

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

.attachment-delete-label {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    flex-shrink: 0;
}

.attachment-delete-text {
    color: #e74c3c;
    font-size: 0.8rem;
    font-weight: 600;
}

.attachment-type-badge {
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    flex-shrink: 0;
}

.attachment-type-badge.image {
    background-color: #3498db;
    color: #fff;
}

.attachment-type-badge.file {
    background-color: #95a5a6;
    color: #fff;
}

.attachment-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.attachment-size {
    color: #999;
    font-size: 0.8rem;
    flex-shrink: 0;
}

/* Attachment Gallery (view page - images) */
.attachment-gallery {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.attachment-gallery h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.attachment-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.attachment-image-item {
    display: block;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    transition: box-shadow 0.2s;
}

.attachment-image-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.attachment-image-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

/* Attachment Files (view page - downloads) */
.attachment-files {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.attachment-files h4 {
    color: #2c3e50;
    margin-bottom: 0.8rem;
    font-size: 1rem;
}

.attachment-file-list {
    list-style: none;
}

.attachment-file-list li {
    margin-bottom: 0.4rem;
}

.attachment-file-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.8rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    color: #333;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.attachment-file-link:hover {
    background-color: #f0f0f0;
}

.attachment-file-icon {
    font-size: 1.1rem;
}

/* Admin Card - Pink */
.admin-card-pink {
    background: linear-gradient(135deg, #e91e63, #c2185b);
}

/* Banner Slider */
.banner-slider {
    position: relative;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    overflow: hidden;
    background: #000;
}

.banner-track {
    display: flex;
    transition: transform 0.4s ease;
}

.banner-slide {
    min-width: 100%;
    flex-shrink: 0;
}

.banner-link {
    display: block;
    width: 100%;
}

.banner-link img {
    width: 100%;
    height: 480px;
    object-fit: cover;
    display: block;
}

.banner-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    border: none;
    padding: 0.8rem 1rem;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10;
    border-radius: 4px;
    transition: background 0.2s;
}

.banner-arrow:hover {
    background: rgba(0, 0, 0, 0.7);
}

.banner-arrow-left {
    left: 1rem;
}

.banner-arrow-right {
    right: 1rem;
}

.banner-dots {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.banner-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.2s;
}

.banner-dot.active {
    background: #fff;
}

.banner-dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* Admin Banner Management */
.banner-toggle-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.banner-form-grid {
    display: grid;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-select {
    width: 100%;
    padding: 0.7rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    background: #fff;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
}

.banner-admin-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.banner-admin-card {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    align-items: flex-start;
}

.banner-admin-preview {
    flex-shrink: 0;
    width: 200px;
}

.banner-admin-preview img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.banner-admin-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.banner-admin-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.banner-admin-meta {
    font-size: 0.85rem;
    color: #888;
}

.banner-edit-details {
    margin-top: 0.5rem;
}

.banner-edit-details[open] > summary {
    margin-bottom: 0.8rem;
}

.banner-edit-form {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.banner-edit-form .form-group {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .banner-link img {
        height: auto;
        max-height: 200px;
        width: 100%;
    }

    .banner-slider {
        max-width: 100vw;
        overflow: hidden;
    }

    .banner-slide {
        min-width: 100%;
    }

    .banner-track {
        max-width: 100%;
    }

    .banner-arrow {
        padding: 0.5rem 0.7rem;
        font-size: 1rem;
    }

    .banner-admin-card {
        flex-direction: column;
    }

    .banner-admin-preview {
        width: 100%;
    }

    .banner-admin-preview img {
        height: 160px;
    }
}

/* Admin Card - Indigo */
.admin-card-indigo {
    background: linear-gradient(135deg, #3f51b5, #303f9f);
}

/* ========== Home Modules ========== */
.home-modules-container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 1rem 2rem 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* 배너가 첫 모듈일 때 네비바에 바로 붙도록 */
.home-modules-container.has-banner-first {
    padding-top: 0;
}

.home-modules-container.has-banner-first > .home-module-item:first-child {
    margin-left: -2rem;
    margin-right: -2rem;
    width: calc(100% + 4rem);
    overflow: hidden;
}

.home-module-item {
    min-width: 0;
    box-sizing: border-box;
}

.home-module-item.module-full {
    width: 100%;
}

.home-module-item.module-half {
    width: calc(50% - 0.5rem);
}

.home-module-item.module-third {
    width: calc(33.333% - 0.667rem);
}

.home-module-item .banner-slider img {
    width: 100%;
    object-fit: cover;
}

.home-module-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.home-module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 1.5rem 0.8rem;
    border-bottom: 2px solid #3498db;
}

.home-module-header h3 {
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 700;
}

.home-module-more {
    color: #3498db;
    font-size: 0.85rem;
    font-weight: 600;
}

.home-module-more:hover {
    text-decoration: underline;
}

.home-module-body {
    padding: 1rem 1.5rem 1.5rem;
    flex: 1;
    overflow: hidden;
}

/* Board Preview */
.board-preview-list {
    list-style: none;
}

.board-preview-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.7rem 0;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
    gap: 1rem;
}

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

.board-preview-item:hover {
    color: #3498db;
}

.board-preview-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.95rem;
}

.board-preview-date {
    color: #999;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.empty-message-sm {
    text-align: center;
    color: #999;
    padding: 1.5rem 0;
    font-size: 0.9rem;
}

/* HTML Module */
.html-module-content {
    line-height: 1.8;
    color: #444;
}

.html-module-content img {
    max-width: 100%;
    height: auto;
}

/* Fullscreen Mode */
body.fullscreen-mode {
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.fullscreen-container {
    padding: 0;
    margin: 0;
    max-width: none;
    width: 100%;
    height: 100vh;
}

.home-module-item.module-fullscreen {
    width: 100%;
    height: 100vh;
}

.module-iframe-fullscreen {
    width: 100%;
    height: 100%;
    border: none;
}

/* iframe Module */
.iframe-body {
    padding: 0;
    flex: 1;
    display: flex;
}

.module-iframe {
    width: 100%;
    min-height: 400px;
    border: none;
    flex: 1;
}

/* Video Module */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Card Builder (Admin) */
.card-builder-item {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 0.8rem;
    margin-bottom: 0.5rem;
    background: #fff;
}

.card-builder-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
    flex-wrap: wrap;
}

.card-builder-row:last-child {
    margin-bottom: 0;
}

.card-builder-row input {
    flex: 1;
    min-width: 120px;
    padding: 0.4rem 0.6rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.85rem;
}

/* Info Cards Module */
.info-cards-desc {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1.2rem;
}

.info-cards-grid {
    display: grid;
    gap: 1.2rem;
}

.info-cards-col-2 { grid-template-columns: repeat(2, 1fr); }
.info-cards-col-3 { grid-template-columns: repeat(3, 1fr); }
.info-cards-col-4 { grid-template-columns: repeat(4, 1fr); }

.info-card {
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

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

.info-card-img {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: #f0f0f0;
}

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

.info-card-body {
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.info-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.info-card-desc {
    font-size: 0.85rem;
    color: #777;
    line-height: 1.5;
    flex: 1;
    margin-bottom: 1rem;
}

.info-card-btn {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    background: #3498db;
    color: #fff;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    transition: background 0.2s;
    align-self: flex-start;
}

.info-card-btn:hover {
    background: #2980b9;
}

@media (max-width: 1024px) {
    .info-cards-col-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .info-cards-col-3 { grid-template-columns: repeat(2, 1fr); }
    .info-cards-col-4 { grid-template-columns: repeat(2, 1fr); }

    .info-card-img { height: 140px; }
}

@media (max-width: 480px) {
    .info-cards-col-2,
    .info-cards-col-3,
    .info-cards-col-4 { grid-template-columns: 1fr; }
}

/* Board Slider Module */
.board-slider-desc {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid #f0f0f0;
}

.board-slider {
    position: relative;
    overflow: hidden;
}

.board-slider-track {
    display: flex;
    gap: 1rem;
    transition: transform 0.4s ease;
    cursor: grab;
}

.board-slider-track.dragging {
    transition: none;
    cursor: grabbing;
}

.board-slider-card {
    flex: 0 0 calc(25% - 0.75rem);
    display: flex;
    flex-direction: column;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e8e8e8;
    background: #fff;
    transition: transform 0.2s, box-shadow 0.2s;
    color: inherit;
    user-select: none;
}

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

.board-slider-thumb {
    position: relative;
    width: 100%;
    height: 160px;
    overflow: hidden;
    background: #f0f0f0;
}

.board-slider-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.board-slider-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    font-size: 0.85rem;
}

.board-slider-info {
    padding: 0.7rem 0.8rem;
}

.board-slider-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.3rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.board-slider-date {
    font-size: 0.75rem;
    color: #999;
}

.board-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
    color: #333;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.board-slider-arrow:hover {
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.board-slider-prev {
    left: 0.5rem;
}

.board-slider-next {
    right: 0.5rem;
}

@media (max-width: 1024px) {
    .board-slider-card {
        flex: 0 0 calc(33.333% - 0.667rem);
    }
}

@media (max-width: 768px) {
    .board-slider-card {
        flex: 0 0 calc(50% - 0.5rem);
    }

    .board-slider-thumb {
        height: 110px;
    }

    .board-slider-track {
        gap: 0.6rem;
    }

    .board-slider-arrow {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }

    .board-slider-info {
        padding: 0.5rem 0.6rem;
    }

    .board-slider-title {
        font-size: 0.82rem;
    }
}

@media (max-width: 480px) {
    .board-slider-card {
        flex: 0 0 100%;
    }

    .board-slider-thumb {
        height: 150px;
    }
}

/* Worship Info Module */
.worship-info-content {
    line-height: 1.8;
    color: #444;
}

.worship-info-content table {
    width: 100%;
    border-collapse: collapse;
}

.worship-info-content table th,
.worship-info-content table td {
    padding: 0.8rem 1rem;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.95rem;
}

.worship-info-content table th {
    font-weight: 700;
    color: #2c3e50;
    white-space: nowrap;
    width: 120px;
}

.worship-info-content table td {
    color: #555;
}

.worship-info-content table tr:last-child th,
.worship-info-content table tr:last-child td {
    border-bottom: none;
}

.worship-info-content img {
    max-width: 100%;
    height: auto;
}

/* Map Module */
.map-module-body {
    padding: 0;
}

.map-iframe-wrapper {
    width: 100%;
}

.map-iframe {
    width: 100%;
    height: 350px;
    border: none;
    display: block;
}

.map-info {
    padding: 1.2rem 1.5rem;
    border-top: 1px solid #f0f0f0;
}

.map-info-content {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.7;
}

.map-info-content img {
    max-width: 100%;
    height: auto;
}

/* Quick Link Module */
.quick-link-content {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.quick-link-content a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem 0.8rem;
    border-radius: 10px;
    background: #f8f9fa;
    color: #333;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    min-width: 80px;
    text-align: center;
    transition: background 0.2s, transform 0.2s;
}

.quick-link-content a:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

/* Image Module */
.image-module {
    border-radius: 12px;
    overflow: hidden;
}

.image-module img {
    width: 100%;
    display: block;
    object-fit: cover;
}

/* ========== Admin Home Module Management ========== */
.module-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.module-admin-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.module-admin-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
    background: #fff;
}

.module-admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.module-admin-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.module-type-badge {
    background-color: #2c3e50;
    color: #fff;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

.module-admin-meta {
    font-size: 0.85rem;
    color: #888;
}

.module-admin-actions {
    display: flex;
    gap: 0.3rem;
    align-items: center;
}

.module-edit-details {
    margin-top: 0.8rem;
}

.module-edit-details[open] > summary {
    margin-bottom: 0.8rem;
}

.module-edit-form {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 6px;
}

.module-edit-form .form-group {
    margin-bottom: 0;
}

/* ========== Gallery View (게시판 갤러리형) ========== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.2rem;
    margin-top: 1rem;
}

.gallery-card {
    display: flex;
    flex-direction: column;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    background: #fff;
    transition: transform 0.2s, box-shadow 0.2s;
    color: inherit;
}

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

.gallery-thumb {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: #f0f0f0;
}

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

.gallery-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    font-size: 0.9rem;
}

.gallery-info {
    padding: 0.8rem 1rem;
}

.gallery-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.4rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gallery-meta {
    display: flex;
    gap: 0.8rem;
    font-size: 0.8rem;
    color: #999;
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
    }

    .gallery-thumb {
        height: 120px;
    }

    .gallery-info {
        padding: 0.5rem 0.6rem;
    }

    .gallery-title {
        font-size: 0.82rem;
    }

    .gallery-meta {
        font-size: 0.72rem;
        gap: 0.5rem;
    }
}

@media (max-width: 380px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-thumb {
        height: 160px;
    }
}

/* YouTube Preview (글쓰기 폼) */
.youtube-preview {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.youtube-preview img {
    width: 160px;
    height: 90px;
    object-fit: cover;
    border-radius: 4px;
}

#youtube-preview-text {
    font-size: 0.85rem;
    color: #888;
}

/* YouTube Embed (상세 페이지) */
.post-youtube {
    margin-bottom: 1.5rem;
}

.youtube-embed {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 8px;
}

.youtube-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* YouTube Badge (갤러리 목록) */
.gallery-thumb {
    position: relative;
}

.gallery-youtube-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    width: 48px;
    height: 48px;
    background: rgba(255, 0, 0, 0.85);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
    pointer-events: none;
}

/* Admin Card - Brown */
.admin-card-brown {
    background: linear-gradient(135deg, #795548, #5d4037);
}

.admin-card-cyan {
    background: linear-gradient(135deg, #00acc1, #00838f);
}

/* ========== Worship Schedule (예배시간) ========== */
.worship-schedule-section {
    padding: 2rem 0;
}

.worship-schedule-table-wrap {
    overflow-x: auto;
}

.worship-schedule-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #cbcbcb;
    text-align: center;
    font-size: 16px;
    line-height: 1.5;
}

.worship-schedule-table thead th {
    background-color: #f5f5f5;
    border-top: 2px solid #6d6d6d;
    border-bottom: 1px solid #6d6d6d;
    border-right: 1px solid #cbcbcb;
    border-left: 1px solid #cbcbcb;
    font-weight: bold;
    padding: 14px 12px;
    color: #000;
}

.worship-schedule-table thead th:first-child {
    border-left: 1px solid #fff;
}

.worship-schedule-table thead th:last-child {
    border-right: 1px solid #fff;
}

.worship-schedule-table tbody td {
    border: 1px solid #cbcbcb;
    padding: 14px 12px;
    color: #000;
}

.worship-category-cell {
    background-color: #f5f5f5;
    font-weight: bold;
    border-left: 1px solid #fff !important;
}

.worship-schedule-table tbody td:last-child {
    border-right: 1px solid #fff;
}

@media (max-width: 768px) {
    .worship-schedule-table {
        font-size: 14px;
    }

    .worship-schedule-table thead th,
    .worship-schedule-table tbody td {
        padding: 10px 8px;
    }
}

/* ========== Timeline (교회연혁) ========== */
.timeline {
    position: relative;
    padding: 1rem 0;
}

.timeline-decade {
    margin-bottom: 2rem;
}

.timeline-decade-label {
    position: relative;
    margin-bottom: 1rem;
}

.timeline-decade-label span {
    display: inline-block;
    background: #2c3e50;
    color: #fff;
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.timeline-items {
    position: relative;
    padding-left: 2rem;
    border-left: 3px solid #3498db;
    margin-left: 0.8rem;
}

.timeline-item {
    position: relative;
    padding: 0.6rem 0 0.6rem 1rem;
}

.timeline-dot {
    position: absolute;
    left: -2rem;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: #3498db;
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 2px #3498db;
    z-index: 1;
}

.timeline-content {
    display: flex;
    align-items: baseline;
    gap: 0.8rem;
    padding: 0.6rem 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    transition: background 0.2s;
}

.timeline-content:hover {
    background: #e9ecef;
}

.timeline-year {
    font-weight: 700;
    color: #2c3e50;
    font-size: 0.95rem;
    white-space: nowrap;
    min-width: 60px;
}

.timeline-text {
    color: #444;
    font-size: 0.95rem;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .timeline-items {
        padding-left: 1.5rem;
        margin-left: 0.5rem;
    }

    .timeline-content {
        flex-direction: column;
        gap: 0.2rem;
    }

    .timeline-year {
        font-size: 0.85rem;
        color: #3498db;
    }

    .timeline-text {
        font-size: 0.9rem;
    }
}

/* 홈 예배 안내 테이블 */
.worship-info-table-wrap {
    overflow-x: auto;
}

.worship-info-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #cbcbcb;
    text-align: center;
    font-size: 0.95rem;
    line-height: 1.5;
}

.worship-info-table thead th {
    background-color: #f5f5f5;
    border-top: 2px solid #6d6d6d;
    border-bottom: 1px solid #6d6d6d;
    border-right: 1px solid #cbcbcb;
    border-left: 1px solid #cbcbcb;
    font-weight: bold;
    padding: 10px 8px;
    color: #000;
}

.worship-info-table tbody td {
    border: 1px solid #cbcbcb;
    padding: 10px 8px;
    color: #000;
}

.worship-info-table .worship-category-cell {
    background-color: #f5f5f5;
    font-weight: 600;
}

.worship-info-content {
    margin-top: 1rem;
}

@media (max-width: 768px) {
    .home-modules-container {
        padding: 0.8rem;
        gap: 0.8rem;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .home-modules-container.has-banner-first {
        padding-top: 0;
    }

    .home-modules-container.has-banner-first > .home-module-item:first-child {
        margin-left: -0.8rem;
        margin-right: -0.8rem;
        width: calc(100% + 1.6rem);
        max-width: 100vw;
        overflow: hidden;
    }

    .home-module-item {
        max-width: 100%;
    }

    .home-module-item.module-half,
    .home-module-item.module-third {
        width: 100%;
    }

    .home-module-body {
        padding: 0.8rem;
    }

    .home-module-header {
        padding: 1rem 0.8rem 0.6rem;
    }

    .home-module-card {
        max-width: 100%;
        overflow: hidden;
    }

    .module-form-grid {
        grid-template-columns: 1fr;
    }

    .module-admin-header {
        flex-direction: column;
        align-items: flex-start;
    }

    /* 예배시간 테이블 모바일 최적화 */
    .worship-info-table {
        font-size: 0.82rem;
        table-layout: fixed;
        word-break: keep-all;
    }

    .worship-info-table thead th,
    .worship-info-table tbody td {
        padding: 8px 5px;
    }

    .worship-info-table thead th:first-child,
    .worship-info-table tbody td.worship-category-cell {
        width: 22%;
    }
}

/* ========== Mobile Hamburger Menu ========== */
.navbar-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.hamburger-line {
    display: block;
    width: 22px;
    height: 2px;
    background-color: #333;
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

/* 햄버거 → X 애니메이션 */
.navbar-hamburger.active .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

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

.navbar-hamburger.active .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* 모바일 메뉴 패널 */
.mobile-menu {
    display: none;
    flex-direction: column;
    background: #fff;
    border-top: 1px solid #e8e8e8;
    padding: 0.5rem 0;
}

.mobile-menu.open {
    display: flex;
}

.mobile-menu-group {
    border-bottom: 1px solid #f0f0f0;
}

.mobile-menu-link {
    display: block;
    padding: 0.9rem 1.5rem;
    color: #333;
    font-size: 1rem;
    font-weight: 600;
    transition: background-color 0.2s;
}

.mobile-menu-link:hover {
    background-color: #f5f7fa;
    color: #3498db;
}

.mobile-menu-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0.9rem 1.5rem;
    background: none;
    border: none;
    color: #333;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.2s;
}

.mobile-menu-toggle::after {
    content: '\25BE';
    font-size: 0.9rem;
    color: #999;
    transition: transform 0.3s;
}

.mobile-menu-toggle.open::after {
    transform: rotate(180deg);
}

.mobile-menu-toggle:hover {
    background-color: #f5f7fa;
}

.mobile-submenu {
    display: none;
    background: #f8f9fa;
}

.mobile-submenu.open {
    display: block;
}

.mobile-submenu-link {
    padding-left: 2.5rem;
    font-weight: 500;
    font-size: 0.95rem;
    color: #555;
}

.mobile-menu-icons {
    border-top: 1px solid #e8e8e8;
    padding: 0.5rem 0;
}

.mobile-logout-form {
    display: block;
}

.mobile-logout-btn {
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
}

/* 모바일 오버레이 */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 999;
}

.mobile-menu-overlay.active {
    display: block;
}

@media (max-width: 768px) {
    .navbar-center,
    .navbar-icons {
        display: none;
    }

    .navbar-hamburger {
        display: flex;
    }

    .navbar-container {
        height: 56px;
    }

    .navbar {
        position: sticky;
        top: 0;
        z-index: 1000;
    }
}

/* ========== 3-Depth Dropdown Navigation ========== */
.nav-dropdown-sub {
    position: relative;
}

.nav-sub-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-sub-toggle::after {
    content: '\25B6';
    font-size: 0.6rem;
    margin-left: 0.5rem;
    color: #999;
}

.nav-sub-toggle:hover {
    background-color: #f0f0f0;
}

.nav-dropdown-sub-content {
    display: none;
    position: absolute;
    left: 100%;
    top: 0;
    background-color: #fff;
    min-width: 170px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    z-index: 1001;
}

.nav-dropdown-sub-content .nav-dropdown-item:first-child {
    border-radius: 6px 6px 0 0;
}

.nav-dropdown-sub-content .nav-dropdown-item:last-child {
    border-radius: 0 0 6px 6px;
}

.nav-dropdown-sub:hover > .nav-dropdown-sub-content {
    display: block;
}

/* Mobile 3-depth */
.mobile-submenu-toggle {
    padding-left: 2rem;
    font-size: 0.9rem;
}

.mobile-submenu-depth3 {
    padding-left: 1rem;
}

.mobile-depth3-link {
    padding-left: 3rem !important;
    font-size: 0.85rem;
}

/* ========== Admin Menu 3-Depth ========== */
.menu-item-grandchild {
    padding-left: 4.5rem;
    border-bottom: 1px solid #f0f0f0;
    background-color: #fafafa;
}

.menu-depth-label.depth3 {
    background-color: #27ae60;
}

/* ========== Admin Card - Olive ========== */
.admin-card-olive {
    background: linear-gradient(135deg, #6d8764, #556b2f);
}
.admin-card-red {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

/* ========== Staff (교역자) Page ========== */
.staff-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.staff-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.staff-card {
    display: flex;
    gap: 1.5rem;
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    align-items: flex-start;
}

.staff-photo {
    flex-shrink: 0;
    width: 140px;
    height: 180px;
    border-radius: 10px;
    overflow: hidden;
    background-color: #f0f0f0;
}

.staff-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.staff-no-photo {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #ccc;
    background-color: #f5f5f5;
}

.staff-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.staff-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2c3e50;
}

.staff-position {
    display: inline-block;
    font-size: 0.9rem;
    color: #fff;
    background-color: #3498db;
    padding: 0.2rem 0.7rem;
    border-radius: 20px;
    font-weight: 500;
    width: fit-content;
}

.staff-description {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
    margin-top: 0.5rem;
    white-space: pre-line;
}

@media (max-width: 600px) {
    .staff-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .staff-photo {
        width: 120px;
        height: 155px;
    }

    .staff-position {
        margin: 0 auto;
    }
}

/* ========== Admin Staff Management ========== */
.staff-form {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.staff-form .form-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.staff-form .form-group {
    flex: 1;
    min-width: 150px;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.staff-form .form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
}

.staff-form .form-group input,
.staff-form .form-group textarea,
.staff-form .form-group select {
    padding: 0.4rem 0.6rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.admin-staff-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.admin-staff-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    flex-wrap: wrap;
}

.admin-staff-preview img {
    width: 50px;
    height: 65px;
    object-fit: cover;
    border-radius: 6px;
}

.staff-no-photo-sm {
    width: 50px;
    height: 65px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0;
    border-radius: 6px;
    font-size: 1.5rem;
    color: #ccc;
}

.admin-staff-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    min-width: 200px;
}

.admin-staff-actions {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-wrap: wrap;
    margin-left: auto;
}

.staff-edit-form {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-wrap: wrap;
}

.alert-info {
    background-color: #e3f2fd;
    color: #1565c0;
    padding: 1rem;
    border-radius: 6px;
    border-left: 4px solid #1565c0;
}

.alert-info a {
    color: #0d47a1;
    text-decoration: underline;
    font-weight: 600;
}