/* 성무패스 CSS */

/* Agency 테마 masthead 배경 오버라이드 */
.masthead {
    background: linear-gradient(135deg, #ffc107 0%, #ffb300 100%) !important;
    color: #003d82;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

.masthead .masthead-heading {
    font-weight: 700;
    font-size: 3.2rem;
    color: #0056b3;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.9);
}

.masthead .masthead-subheading {
    font-weight: 500;
    font-size: 1.3rem;
    color: #003d82;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.7);
}

.masthead .masthead-text {
    font-size: 1.1rem;
    color: #003d82;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.7);
    margin-bottom: 3rem;
    font-weight: 500;
    font-size: 1.1rem;
}



:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

body {
    background-color: #f8f9fa;
}

/* Navigation */
.navbar-brand {
    font-weight: bold;
    font-size: 1.25rem;
}

.navbar-nav .nav-link {
    font-weight: 400;
    display: flex;
    align-items: center;
}

/* 네비게이션 바 색상 개선 - 최상단에서 더 잘 보이도록 */
@media (min-width: 992px) {
    /* 최상단 (투명 배경) - 진한 색상 */
    #mainNav:not(.navbar-shrink) .navbar-brand {
        color: #003d82 !important;
        text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
    }
    
    #mainNav:not(.navbar-shrink) .navbar-nav .nav-item .nav-link {
        color: #003d82 !important;
        text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
        font-weight: 600;
    }
    
    #mainNav:not(.navbar-shrink) .navbar-nav .nav-item .nav-link:hover,
    #mainNav:not(.navbar-shrink) .navbar-nav .nav-item .nav-link.active {
        color: #0056b3 !important;
    }
    
    /* 스크롤 후 (어두운 배경) - 밝은 색상 */
    #mainNav.navbar-shrink .navbar-brand {
        color: #ffc800 !important;
        text-shadow: none;
    }
    
    #mainNav.navbar-shrink .navbar-nav .nav-item .nav-link {
        color: #fff !important;
        text-shadow: none;
        font-weight: 400;
    }
    
    #mainNav.navbar-shrink .navbar-nav .nav-item .nav-link:hover,
    #mainNav.navbar-shrink .navbar-nav .nav-item .nav-link.active {
        color: #ffc800 !important;
    }
}

/* Menu Icons */
.nav-link img {
    transition: transform 0.2s ease;
    filter: brightness(0) invert(1); /* 흰색으로 변환 */
}

.nav-link:hover img {
    transform: scale(1.1);
}

/* 모바일에서 메뉴 아이콘 크기 조정 */
@media (max-width: 991px) {
    .nav-link img {
        height: 18px !important;
        margin-right: 8px !important;
    }
    
    /* 모바일 드롭다운 메뉴 스크롤 가능하게 */
    .navbar-collapse .dropdown-menu {
        max-height: 60vh;
        overflow-y: auto;
        position: relative !important;
        transform: none !important;
        border: none;
        box-shadow: none;
        padding: 0;
        margin: 0;
    }
    
    /* 드롭다운이 열렸을 때 네비게이션 바 높이 제한 */
    .navbar-collapse {
        max-height: 80vh;
        overflow-y: auto;
    }
}


/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.hero-section .display-4 {
    font-weight: 700;
}

.hero-section .lead {
    font-weight: 400;
}

/* Feature Icons */
.feature-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* Service Icons */
.service-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto;
}

/* Service Images */
.service-icon-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    width: 200px;
    margin: 0 auto;
    overflow: hidden;
}

.service-image {
    width: 160px !important;
    height: 160px !important;
    min-width: 160px !important;
    min-height: 160px !important;
    max-width: 160px !important;
    max-height: 160px !important;
    object-fit: cover;
    object-position: center;
    border-radius: 18px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: block;
}

.service-image:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

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

/* Custom Colors */
.bg-purple {
    background-color: #6f42c1 !important;
}

.btn-purple {
    background-color: #6f42c1;
    border-color: #6f42c1;
    color: white;
}

.btn-purple:hover {
    background-color: #5a359a;
    border-color: #5a359a;
    color: white;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    font-family: var(--font-family-base);
}

.card-title {
    font-family: var(--font-family-heading);
    font-weight: 700;
}

.card-header {
    font-family: var(--font-family-heading);
    font-weight: 600;
}

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

/* Reservation Table */
.reservation-table {
    font-size: 0.9rem;
    font-family: var(--font-family-base);
}

.reservation-table th {
    background-color: var(--light-color);
    border-color: #dee2e6;
    font-family: var(--font-family-heading);
    font-weight: 600;
    text-align: center;
    vertical-align: middle;
}

.reservation-table td {
    vertical-align: middle;
    border-color: #dee2e6;
}

.time-slot-header {
    background-color: #f8f9fa;
    font-weight: 500;
}

.date-header {
    min-width: 100px;
}

.reservation-cell {
    position: relative;
    padding: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.reservation-cell:hover {
    background-color: #f8f9fa;
}

.availability-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.available-slots .badge {
    font-size: 0.75rem;
    min-width: 40px;
}

.reserve-btn {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.reserve-btn:hover {
    transform: scale(1.05);
}

/* Loading Spinner */
.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Badges */
.badge {
    font-size: 0.8rem;
    padding: 0.4em 0.8em;
    font-family: var(--font-family-base);
    font-weight: 500;
}

/* Buttons */
.btn {
    border-radius: 6px;
    font-weight: 500;
    font-family: var(--font-family-base);
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
}

/* Alerts */
.alert {
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-family: var(--font-family-base);
}

/* Modal */
.modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    font-family: var(--font-family-base);
}

.modal-title {
    font-family: var(--font-family-heading);
    font-weight: 700;
}

.modal-header {
    border-bottom: 1px solid #e9ecef;
    border-radius: 12px 12px 0 0;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    border-radius: 0 0 12px 12px;
}

/* Table Responsive */
.table-responsive {
    border-radius: 8px;
    overflow: hidden;
}

.table {
    font-family: var(--font-family-base);
}

.table th {
    font-family: var(--font-family-heading);
    font-weight: 600;
}

/* Status Indicators */
.status-confirmed {
    color: var(--success-color);
}

.status-pending {
    color: var(--warning-color);
}

.status-cancelled {
    color: var(--danger-color);
}

.status-completed {
    color: var(--info-color);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 1rem !important;
    }
    
    .hero-section .display-4 {
        font-size: 2rem;
    }
    
    .reservation-table {
        font-size: 0.8rem;
    }
    
    .date-header {
        min-width: 80px;
    }
    
    .time-slot-header {
        font-size: 0.8rem;
    }
    
    .reserve-btn {
        font-size: 0.7rem;
        padding: 1px 6px;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn-lg {
        font-size: 1rem;
        padding: 0.5rem 1rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .btn,
    .modal,
    footer {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .table {
        font-size: 0.8rem;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --bs-body-bg: #1a1a1a;
        --bs-body-color: #ffffff;
    }
    
    .card {
        background-color: #2d2d2d;
        color: #ffffff;
    }
    
    .table {
        --bs-table-bg: #2d2d2d;
        --bs-table-color: #ffffff;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Focus States */
.btn:focus,
.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Loading States */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

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

/* PWA 관련 스타일 */
#install-button {
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.1);
}

#install-button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* PWA 설치 완료 후 숨김 */
.pwa-installed #install-button,
.pwa-installed #install-app-btn {
    display: none !important;
}

/* 네비게이션 바 PWA 설치 버튼 스타일 */
.nav-install-btn {
    margin: 0 10px;
    padding: 6px 12px;
    font-size: 0.9rem;
    border-radius: 20px;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.nav-install-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* 모바일에서 네비게이션 바 설치 버튼 */
@media (max-width: 991px) {
    .nav-install-btn {
        margin: 5px 0;
        width: 100%;
        text-align: center;
    }
}

/* 오프라인 상태 표시 */
.offline-indicator {
    position: fixed;
    top: 80px;
    right: 20px;
    background: #dc3545;
    color: white;
    padding: 10px 15px;
    border-radius: 25px;
    font-size: 0.9rem;
    z-index: 1050;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
    animation: slideInRight 0.3s ease;
}

.online-indicator {
    position: fixed;
    top: 80px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 10px 15px;
    border-radius: 25px;
    font-size: 0.9rem;
    z-index: 1050;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    animation: slideInRight 0.3s ease;
}

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

/* PWA 스플래시 스크린 스타일 */
@media (display-mode: standalone) {
    body {
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        -webkit-touch-callout: none;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* 상태바 영역 고려 */
    .navbar-fixed-top {
        padding-top: env(safe-area-inset-top);
    }
}

/* 모바일 PWA 최적화 */
@media (max-width: 768px) and (display-mode: standalone) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .service-image {
        max-width: 120px;
        max-height: 120px;
    }
}


