/* 
 * 로타리 클럽 인트라넷 - 메인 CSS 파일
 * 모든 공통 스타일, 컴포넌트, 유틸리티 스타일 임포트
 */

/* ========== 공통 변수 및 기본 스타일 ========== */
@import url('./common/variables.css');
@import url('./common/base.css');

/* ========== 레이아웃 스타일 ========== */
@import url('./layout/header.css');
@import url('./layout/sidebar.css');
@import url('./layout/footer.css');

/* ========== 컴포넌트 스타일 ========== */
@import url('./components/buttons.css');
@import url('./components/cards.css');
@import url('./components/forms.css');
@import url('./components/tables.css');
@import url('./components/alerts-badges.css');
/* 2026.03.10 : 박은정 : 위원회 조직도 트리 구조 스타일 추가 */
@import url('./components/org-chart.css');

/* ========== 유틸리티 및 헬퍼 클래스 ========== */
@import url('./utilities/utilities.css');
@import url('./utilities/responsive.css');
@import url('./utilities/clickable-row.css');
@import url('./utilities/required.css');
@import url('./utilities/announcement-badges.css');

/* ========== 2026.03.12 : 박은정 : inline style → CSS 분리 ========== */
@import url('./components/member-card.css');
@import url('./components/officers.css');
@import url('./components/issuetracker.css');
@import url('./pages/district.css');
@import url('./pages/dashboard.css');
@import url('./pages/donations.css');
@import url('./pages/members.css');
@import url('./pages/activities.css');
@import url('./pages/pride.css');
@import url('./pages/about-rotary.css');

/* ========== 추가 커스텀 스타일 ========== */

/* 2026.03.05 : 박은정 : 개발 중 메뉴/내보내기 비활성화 스타일 - disable 시각 효과 강화 */
[data-dev-disabled] {
    opacity: 0.55;
    cursor: not-allowed;
    filter: grayscale(0.4);
}

/* 2026.03.05 : 박은정 : 개발 중 메뉴 - 호버/액티브 시 클릭 가능해 보이는 스타일 제거, 비활성화 시각 강화 */
.sidebar .nav-link.dev-disabled,
.sidebar .nav-link.dev-disabled:hover,
.sidebar .nav-link.dev-disabled:focus,
.sidebar .nav-link.dev-disabled:focus-visible,
.sidebar .nav-link.dev-disabled:active,
.sidebar .collapse .nav-link.dev-disabled,
.sidebar .collapse .nav-link.dev-disabled:hover,
.sidebar .collapse .nav-link.dev-disabled:focus,
.sidebar .collapse .nav-link.dev-disabled:active {
    background: transparent !important;
    background-image: none !important;
    border-left-color: transparent !important;
    color: #adb5bd !important;
    box-shadow: none !important;
    padding-left: 1rem !important;
    text-decoration: none !important;
    opacity: 0.65 !important;
    filter: grayscale(0.5);
}

.sidebar .nav-link.dev-disabled i,
.sidebar .collapse .nav-link.dev-disabled i {
    color: #adb5bd !important;
}

/* 메인 컨테이너 */
.main-container {
    display: flex;
    min-height: calc(100vh - var(--layout-navbar-height));
}

.main-content {
    flex: 1;
    overflow-y: auto;
}

/* 컨텐츠 영역 */
main {
    padding: var(--spacing-6);
    background-color: var(--color-gray-light);
    min-height: calc(100vh - var(--layout-navbar-height) - var(--layout-footer-height));
}

/* 페이지 제목 및 액션 */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-6);
    gap: var(--spacing-4);
}

.page-header h1 {
    margin: 0;
    flex: 1;
}

.page-actions {
    display: flex;
    gap: var(--spacing-2);
    flex-wrap: wrap;
}

/* 브레드크럼 */
.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: var(--spacing-4);
}

.breadcrumb-item {
    font-size: var(--font-size-13);
}

.breadcrumb-item a {
    color: var(--color-primary);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: var(--color-text-muted);
}

/* 2026.03.09 : 박은정 : 내 정보·회원카드 인라인 스타일 분리 (07_회원상세회원카드) */
.profile-photo-card {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border: 4px solid var(--rotary-primary);
}

.profile-photo-thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
}

.attendance-progress {
    height: 10px;
}

/* 상태 바 */
.status-bar {
    display: flex;
    align-items: center;
    gap: var(--spacing-4);
    padding: var(--spacing-4);
    background-color: white;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--spacing-4);
}

.status-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-2);
}

.status-item-label {
    font-size: var(--font-size-13);
    color: var(--color-text-muted);
    font-weight: var(--font-weight-medium);
}

.status-item-value {
    font-size: var(--font-size-18);
    font-weight: var(--font-weight-bold);
    color: var(--color-primary);
}

/* 타임라인 (연혁 스타일) */
/* ========== 타임라인 스타일 ========== */

.timeline {
    position: relative;
    padding-left: 40px;
}

.timeline-item {
    position: relative;
    padding-bottom: 30px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

/* 타임라인 세로 선 */
.timeline-item::before {
    content: '';
    position: absolute;
    left: -29px;
    top: 30px;
    bottom: -10px;
    width: 2px;
    background-color: var(--color-gray-light);
}

.timeline-item:last-child::before {
    display: none;
}

/* 타임라인 마커 (동그라미) */
.timeline-marker {
    position: absolute;
    left: -40px;
    top: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 4px white;
    z-index: 1;
    background-color: var(--color-primary);
    color: white;
    font-size: var(--font-size-14);
    transition: all 0.3s ease;
}

.timeline-marker.bg-warning {
    background-color: var(--color-secondary) !important;
}

.timeline-marker.bg-rotary-primary {
    background-color: var(--color-primary) !important;
}

/* 타임라인 컨텐츠 */
.timeline-content {
    background-color: white;
    border-radius: var(--border-radius-md);
    padding: var(--spacing-4);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.timeline-item.completed::before {
    display: none;
}

.timeline-date {
    font-size: var(--font-size-12);
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-1);
}

.timeline-title {
    font-size: var(--font-size-16);
    font-weight: var(--font-weight-semibold);
    color: var(--color-dark);
    margin-bottom: var(--spacing-2);
}

.timeline-content {
    font-size: var(--font-size-14);
    color: var(--color-text);
    background-color: white;
    padding: var(--spacing-4);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
}

/* 프로필 카드 */
.profile-card {
    text-align: center;
    padding: var(--spacing-6);
    background-color: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
}

.profile-image {
    width: 120px;
    height: 120px;
    margin: 0 auto var(--spacing-4);
    border-radius: 50%;
    object-fit: cover;
    border: var(--border-width-4) solid var(--color-primary);
    box-shadow: var(--shadow-md);
}

.profile-name {
    font-size: var(--font-size-20);
    font-weight: var(--font-weight-bold);
    color: var(--color-dark);
    margin-bottom: var(--spacing-1);
}

.profile-role {
    font-size: var(--font-size-14);
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-4);
}

.profile-info {
    font-size: var(--font-size-14);
    color: var(--color-text);
    margin-bottom: var(--spacing-2);
}

/* 통계 박스 */
.stat-box {
    background-color: white;
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-6);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.stat-box.stat-primary {
    border-top: var(--border-width-4) solid var(--color-primary);
}

.stat-box.stat-secondary {
    border-top: var(--border-width-4) solid var(--color-secondary);
}

.stat-box.stat-success {
    border-top: var(--border-width-4) solid var(--color-success);
}

.stat-box.stat-danger {
    border-top: var(--border-width-4) solid var(--color-danger);
}

.stat-icon {
    font-size: var(--font-size-32);
    margin-bottom: var(--spacing-3);
}

.stat-value {
    font-size: var(--font-size-32);
    font-weight: var(--font-weight-bold);
    color: var(--color-primary);
    margin-bottom: var(--spacing-1);
}

.stat-label {
    font-size: var(--font-size-14);
    color: var(--color-text-muted);
}

/* 조건부 표시 */
.d-none {
    display: none !important;
}

.d-block {
    display: block !important;
}

.invisible {
    visibility: hidden !important;
}

/* 드래그 & 드롭 영역 */
.drag-drop-zone {
    border: var(--border-width-2) dashed var(--color-primary);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-8);
    text-align: center;
    background-color: var(--color-primary-light);
    transition: all var(--transition-base);
    cursor: pointer;
}

.drag-drop-zone.drag-over {
    background-color: rgba(0, 93, 170, 0.1);
    border-color: var(--color-primary-dark);
}

.drag-drop-icon {
    font-size: var(--font-size-36);
    color: var(--color-primary);
    margin-bottom: var(--spacing-2);
}

.drag-drop-text {
    font-size: var(--font-size-16);
    color: var(--color-dark);
    margin-bottom: var(--spacing-1);
}

.drag-drop-hint {
    font-size: var(--font-size-13);
    color: var(--color-text-muted);
}

/* 로딩 스피너 */
.spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    vertical-align: -0.125em;
    border: 0.25em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-rotate 0.75s linear infinite;
}

.spinner-sm {
    width: 0.75rem;
    height: 0.75rem;
    border-width: 0.2em;
}

.spinner-lg {
    width: 1.5rem;
    height: 1.5rem;
    border-width: 0.3em;
}

@keyframes spinner-rotate {
    to {
        transform: rotate(360deg);
    }
}

/* 애니메이션 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

.slide-down {
    animation: slideDown 0.3s ease-out;
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

/* 마지막 요소 마진 제거 */
h1:last-child,
h2:last-child,
h3:last-child,
h4:last-child,
h5:last-child,
h6:last-child,
p:last-child {
    margin-bottom: 0;
}

/* ========== 향상된 고급 스타일 ========== */

/* 그라데이션 텍스트 */
.text-gradient {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 분리선 */
.divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
    margin: var(--spacing-6) 0;
}

/* 아이콘 배경 박스 */
.icon-box {
    width: 50px;
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(0, 93, 170, 0.1), rgba(255, 199, 44, 0.05));
    transition: all 0.3s ease;
}

/* 호버 효과가 있는 텍스트 링크 (2026.03.12 : hover 제거) */
.link-hover {
    position: relative;
    text-decoration: none;
    color: var(--color-primary);
}

/* 부드러운 배경 그라데이션 */
.bg-gradient {
    background: linear-gradient(135deg, #f0f4f9 0%, #e8f1f8 100%);
}

/* 향상된 섀도우 효과 */
.shadow-soft {
    box-shadow: 0 0 30px rgba(0, 93, 170, 0.1);
}

.shadow-lift {
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.05);
}

/* 스무딩 트랜지션 */
.smooth {
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* 통계 숫자 애니메이션 */
.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary);
    font-variant-numeric: tabular-nums;
}

/* 리본 스타일 배지 */
.badge-ribbon {
    position: relative;
    padding: var(--spacing-2) var(--spacing-4);
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    border-radius: 0 8px 8px 0;
}

.badge-ribbon::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 0;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-top: 15px solid rgba(0, 0, 0, 0.2);
}

.badge-ribbon::after {
    content: '';
    position: absolute;
    left: -10px;
    bottom: 0;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-bottom: 15px solid rgba(0, 0, 0, 0.2);
}

/* ========== 이미지 스타일 ========== */

/* 이미지 기본 스타일 */
/* 2026.04.03 : 박은정 : 전역 SVG 배경 제거 — 투명 PNG/SVG에서 No Image가 비치는 문제 방지 (resources/css/rotary-custom.css 동기화) */
img {
    background-color: transparent;
    background-image: none;
}

/* 2026.02.24 : 박은정 : 헤더 로고 이미지는 기본 No Image 배경 제외 */
.navbar-brand .navbar-logo {
    background-color: transparent;
    background-image: none;
}

/* 2026.03.12 : 박은정 : 클럽 로고 — No Image 배경 제외 */
img.club-logo-img {
    background-color: transparent;
    background-image: none;
}

/* 프로필 이미지 기본 스타일 */
img.profile-image,
img.member-photo,
img.user-avatar {
    border: 2px solid #ddd;
    background-color: #f5f5f5;
}

/* 동그란 이미지 기본 스타일 */
img.rounded-circle {
    background-color: #f0f0f0;
}

/* 위원장 동그란 이미지 (중앙 정렬) */
img.rounded-circle.mb-3 {
    display: block;
    margin: 0 auto var(--spacing-3);
}

/* 위원 프로필 이미지 (왼쪽 정렬 - margin 제거) */
img.rounded-circle.me-3 {
    margin-right: var(--spacing-3) !important;
}

/* 2026.03.06 : 박은정 : 아바타/이미지 크기 (resources와 동기화) */
.avatar-24 { width: 24px; height: 24px; object-fit: contain; }
.avatar-32 { width: 32px; height: 32px; object-fit: cover; }
.avatar-40 { width: 40px; height: 40px; object-fit: cover; }
.avatar-50 { width: 50px; height: 50px; object-fit: cover; }
.avatar-60 { width: 60px; height: 60px; object-fit: cover; }
.avatar-70 { width: 70px; height: 70px; object-fit: cover; }
.avatar-90 { width: 90px; height: 90px; object-fit: cover; }
.avatar-120 { width: 120px; height: 120px; object-fit: cover; }
.avatar-100 { width: 100px; height: 100px; object-fit: cover; }
.avatar-150 { width: 150px; height: 150px; object-fit: cover; }
.avatar-200 { width: 200px; height: 200px; object-fit: cover; border: 4px solid var(--rotary-primary); }

/* ========== 텍스트 색상 수정 ========== */

/* 2026.03.05 : 박은정 : 모달 헤더 파란 배경 시 텍스트 흰색 강제 */
.modal-header,
.modal-header .modal-title,
.modal-header i {
    color: white !important;
}

/* 카드 헤더 - 텍스트 요소만 흰색으로 */
.card-header {
    color: white !important;
}

.card-header i {
    color: white !important;
}

.card-header strong,
.card-header b {
    color: white !important;
}

.card-header a {
    color: white !important;
    text-decoration: underline;
}

.card-header h1,
.card-header h2,
.card-header h3,
.card-header h4,
.card-header h5,
.card-header h6 {
    color: white !important;
}

/* 버튼과 입력 필드는 원래 색상 유지 */
.card-header .btn,
.card-header input,
.card-header select,
.card-header textarea {
    color: inherit;
}

/* 파란 배경 섹션 */
.bg-primary,
.bg-rotary-primary {
    color: white !important;
}

.bg-primary i,
.bg-rotary-primary i {
    color: white !important;
}

.bg-primary a,
.bg-rotary-primary a {
    color: #fff;
    text-decoration: underline;
}

/* 파란 배경의 버튼과 입력은 원래 색상 유지 */
.bg-primary .btn,
.bg-rotary-primary .btn,
.bg-primary input,
.bg-rotary-primary input,
.bg-primary select,
.bg-rotary-primary select {
    color: inherit;
}

/* ========== 탭 스타일 (개선됨) ========== */

/* 탭 네비게이션 */
.nav-tabs {
    border-bottom: 2px solid var(--color-gray-border);
    gap: var(--spacing-2);
}

.nav-tabs .nav-link {
    position: relative;
    color: var(--color-text-muted) !important;
    background-color: transparent;
    border: none;
    padding: var(--spacing-3) var(--spacing-4) !important;
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-14);
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}

.nav-tabs .nav-link.active {
    color: white !important;
    background: linear-gradient(135deg, var(--color-primary), #003d75);
    border-bottom-color: var(--color-primary);
    font-weight: var(--font-weight-semibold);
    box-shadow: 0 2px 8px rgba(0, 93, 170, 0.2);
}

.nav-tabs .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    border-radius: 2px 2px 0 0;
}

/* 탭 내용 */
.tab-content {
    animation: fadeIn 0.3s ease-out;
}

.tab-pane {
    animation: slideDown 0.3s ease-out;
}

/* 탭 라벨 스타일 */
.nav-link {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-2);
}

.nav-link i {
    font-size: var(--font-size-16);
}

/* 탭 배지 */
.nav-link .badge {
    margin-left: var(--spacing-1);
    font-size: var(--font-size-11);
    padding: var(--spacing-1) var(--spacing-2);
}

/* 2026.02.24 : AI : 회원 추가 버튼 강조 스타일 추가 */
.btn-member-add-highlight {
    background: linear-gradient(135deg, #1f9d55, #157347) !important;
    border-color: #146c43 !important;
    color: #ffffff !important;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(21, 115, 71, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-member-add-highlight:focus {
    background: linear-gradient(135deg, #22b662, #198754) !important;
    border-color: #157347 !important;
    color: #ffffff !important;
}

.btn-member-add-highlight:active {
    transform: translateY(0);
    box-shadow: 0 3px 10px rgba(21, 115, 71, 0.3);
}

/* 임포트 완료 메시지 (개발 시 삭제) */
/* @import url('./custom-additions.css'); */
