/* dropdown.css */

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #1d1d1f;
    border: 1px solid #e0e0e0;
    width: auto;  /* 자동 넓이 설정 */
    max-width: 300px;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: 5px;
    padding: 10px 0;
}

.dropdown-content a {
    color: white;
    padding: 15px 20px;
    text-decoration: none;
    display: block;
    transition: background-color 0.2s;
    
    border: 1px solid #e0e0e0;
    width: auto;  /* 자동 넓이 설정 */
    max-width: 300px;
    min-width: 160px;
    box-shadow: 1px 8px 16px 1px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: 10px;
    
}

.dropdown-content a:hover {
    background-color: #3a3a3c;
}

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

/* Nested dropdown styles */

.nested-dropdown {
    position: relative;
}

.nested-dropdown .dropdown-content {
    left: 100%;
    top: 0;
    margin-left: 1px;
}

.nested-content {
    display: none;
    position: absolute;
    background-color: #1d1d1f;
    min-width: 200px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 2;
    border-radius: 5px;
    padding: 10px 0;
    left: 100%;
    top: 0;
}

.nested-content a {
    color: white;
    padding: 15px 20px;
    text-decoration: none;
    display: block;
    transition: background-color 0.2s;
}

.nested-content a:hover {
    background-color: #3a3a3c;
}

.dropdown > a, .nested-dropdown > a {
    cursor: pointer;
}

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

/* 새로운 코드를 추가합니다 */
.dropdown:not(:hover) .nested-content {
    display: none !important;
}

@media (max-width: 767px) {
    .dropdown-content {
        width: 100%;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .dropdown-content {
        width: 90%;
    }
}

@media (min-width: 992px) {
    .dropdown-content {
        width: 80%;
    }
}
