/* Accounting Regulation Page Styles */

/* 메가메뉴 z-index 보정 - 메가메뉴가 다른 요소들 위에 표시되도록 */
.mega-dropdown {
    z-index: 10000 !important;
}

.main-navigation .nav-item .mega-dropdown {
    z-index: 10000 !important;
}

/* Hero Section (Business 스타일과 동일) */
.accounting-hero {
    position: relative;
    height: 320px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
}

.accounting-hero .hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: white;
}

.accounting-hero .hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.accounting-hero .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(32, 37, 51, 0.2);
    z-index: 2;
}

.accounting-hero .hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: white;
}

.accounting-hero .hero-title {
    font-size: 3rem;
    font-weight: 330;
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease-out 0.5s forwards;
}

.accounting-hero .hero-subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.4rem;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease-out 0.8s forwards;
}

.accounting-hero .hero-description {
    font-size: 1.1rem;
    margin: 0;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease-out 1.1s forwards;
}

.accounting-hero .scroll-indicator {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}

.accounting-hero .scroll-arrow {
    width: 45px;
    height: 45px;
    border: 2px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: bounce 2s infinite;
}

.accounting-hero .scroll-arrow:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
}

/* Body와 HTML 오버플로우 설정 */
body, html {
    overflow-x: visible !important;
    overflow-y: auto !important;
}

/* Container 오버플로우 설정 */
.container {
    overflow: visible !important;
}

/* Main Content 컨테이너 - 강제 오버라이드 */
.main-content {
    position: relative !important;
    overflow: visible !important;
    padding: 80px 0 !important;
    min-height: 60vh !important;
}

/* 레이아웃 */
.regulation-layout {
    display: flex !important;
    gap: 40px !important;
    align-items: flex-start !important;
    position: relative !important;
    overflow: visible !important;
}

.regulation-sidebar {
    flex: 0 0 320px !important;
    position: -webkit-sticky !important; /* Safari 지원 */
    position: sticky !important;
    top: 20px !important;
    max-height: calc(100vh - 40px) !important;
    overflow-y: auto !important;
    z-index: 1000 !important;
    align-self: flex-start !important;
    will-change: transform !important;
}

.regulation-main {
    flex: 1;
    min-width: 0;
}

/* 목차 네비게이션 */
.regulation-nav {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.regulation-nav h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #007bff;
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-list li {
    margin-bottom: 10px;
}

/* 회계규정 페이지 전용 네비게이션 링크 - 메가메뉴와 충돌 방지 */
.regulation-nav .nav-link {
    display: block;
    padding: 10px 15px;
    color: #666;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
}

.regulation-nav .nav-link:hover {
    background: #f8f9fa;
    color: #007bff;
    transform: translateX(5px);
}

.regulation-nav .nav-link.active {
    background: #007bff;
    color: white;
    box-shadow: 0 3px 10px rgba(0, 123, 255, 0.3);
}

.regulation-nav .nav-link.active::before {
    content: '';
    position: absolute;
    left: -15px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: #007bff;
    border-radius: 2px;
}

/* Regulation Content */
.regulation-content {
    padding: 0;
    background: transparent;
}

.regulation-section {
    background: white;
    margin-bottom: 40px;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.regulation-section h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid #007bff;
}

.article {
    margin-bottom: 30px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.article h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.article p {
    line-height: 1.8;
    color: #555;
    margin-bottom: 15px;
}

.article ul {
    margin: 15px 0;
    padding-left: 20px;
}

.article li {
    line-height: 1.6;
    color: #555;
    margin-bottom: 8px;
}

/* Show More Section */
.show-more-section {
    text-align: center;
    margin: 40px 0;
    padding: 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.show-more-btn {
    padding: 15px 40px;
    font-size: 1.1rem;
    border-radius: 30px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.show-more-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.3);
}

.show-more-btn .btn-icon {
    margin-left: 10px;
    transition: transform 0.3s ease;
}

.show-more-btn:hover .btn-icon {
    transform: translateY(2px);
}

.show-more-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.show-more-btn:hover::before {
    left: 100%;
}

/* Full Regulation Content */
.regulation-full {
    animation: fadeIn 0.5s ease-out;
}

.regulation-footer {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    margin-top: 30px;
    text-align: center;
}

.regulation-footer h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
}

.regulation-footer p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 10px;
}

/* Animations */
@keyframes slideUpFadeIn {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

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

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

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

/* Responsive Design */
@media (max-width: 992px) {
    .regulation-layout {
        flex-direction: column;
        gap: 30px;
    }

    .regulation-sidebar {
        flex: none;
        position: static;
        max-height: none;
        overflow-y: visible;
    }

    .regulation-nav {
        padding: 20px;
    }

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

    .nav-list li {
        margin-bottom: 0;
    }

    .nav-link {
        padding: 8px 15px;
        font-size: 0.9rem;
        white-space: nowrap;
    }
}

@media (max-width: 768px) {
    .accounting-hero {
        height: 28vh;
        margin-bottom: 40px;
        margin-top: -12px;
    }

    .accounting-hero .hero-title { font-size: 1.7rem; }
    .accounting-hero .hero-description { font-size: 0.9rem; }
    .accounting-hero .scroll-indicator { bottom: 10px; }
    .accounting-hero .scroll-arrow { width: 35px; height: 35px; border-width: 1.5px; font-size: 1rem; }

    /* 히어로 텍스트를 살짝 위로 이동 (우선순위 강제) */
    .accounting-hero .hero-content { transform: translateY(-14px) !important; }

    .regulation-section {
        padding: 25px;
        margin-bottom: 25px;
    }

    .article {
        padding: 20px;
    }

    .nav-list {
        flex-direction: column;
    }

    .nav-link {
        white-space: normal;
    }

    /* 모바일에서 목차(사이드바) 숨김 */
    .regulation-sidebar { display: none; }
    .regulation-layout { gap: 20px; }
    .regulation-main { flex: 1 1 100%; width: 100%; }
}

@media (max-width: 480px) {
    .accounting-hero .hero-content { padding: 0 15px; }
    .accounting-hero .hero-title { font-size: 1.7rem; }
    .accounting-hero .hero-description { font-size: 0.85rem; }
    .accounting-hero .hero-subtitle { font-size: 1.2rem; }

    /* 초소형에서는 텍스트를 조금 더 위로 */
    .accounting-hero .hero-content { transform: translateY(-16px) !important; }

    .regulation-section h2 {
        font-size: 1.5rem;
    }

    .article h3 {
        font-size: 1.1rem;
    }

    /* 480px 이하 본문 폰트 더 축소 */
    .article p { font-size: 0.95rem; line-height: 1.7; }
    .article li { font-size: 0.95rem; line-height: 1.6; }
    .regulation-footer p { font-size: 0.95rem; }
}