/* ===== Samwoo Adaptive Theme Base CSS ===== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Noto Sans KR', 'Outfit', sans-serif;
    color: #111;
    background-color: #fff;
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
}

/* ===== 관리자 로그인 메시지 (우측 하단 플로팅) ===== */
#hd_login_msg {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    background-color: rgba(61, 53, 50, 0.92);
    color: #FFFFFF;
    padding: 11px 20px;
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 13px;
    font-weight: 500;
    font-family: 'Noto Sans KR', sans-serif;
    box-shadow: 0 6px 20px rgba(61, 53, 50, 0.3);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    line-height: 1.5;
}

#hd_login_msg:hover {
    background-color: rgba(61, 53, 50, 1);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(61, 53, 50, 0.4);
}

#hd_login_msg a {
    color: #e2c9a8;
    text-decoration: none;
    margin-left: 10px;
    font-weight: 700;
    transition: color 0.3s ease;
}

#hd_login_msg a:hover {
    color: #FFFFFF;
    text-decoration: underline;
}

@media (max-width: 767px) {
    #hd_login_msg {
        bottom: 15px;
        right: 15px;
        padding: 8px 14px;
        font-size: 12px;
        border-radius: 20px;
    }
}

@media (max-width: 479px) {
    #hd_login_msg {
        bottom: 15px;
        right: 15px;
        padding: 7px 12px;
        font-size: 11px;
        border-radius: 18px;
    }

    #hd_login_msg a {
        margin-left: 6px;
    }
}

#wrapper {
    width: 100%;
    overflow-x: hidden;
}

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

ul, ol, li {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
    border: none;
    -webkit-user-drag: none;
    user-select: none;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

/* Modal Popup Styles */
.portfolio-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.portfolio-modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
}

.modal-body {
    position: relative;
    z-index: 10;
    width: 95%;
    max-width: 1200px;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    position: relative;
    display: block;
    width: fit-content;
    height: fit-content;
    max-width: 100%;
    margin: 0 auto;
}

.modal-content img {
    width: 1000px;
    max-width: 95vw;
    height: auto;
    max-height: 90vh;
    object-fit: contain;
    display: block;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.btn-modal-close {
    position: fixed;
    top: 30px;
    right: 30px;
    cursor: pointer;
    background: none;
    border: none;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10010;
    transition: transform 0.3s ease;
}

.btn-modal-close:hover {
    transform: scale(1.15);
}

.btn-modal-close img {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
    display: block;
}

.modal-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    cursor: pointer;
    z-index: 20;
    border: none;
    background: none;
}

.modal-btn img {
    width: 100%;
}

.prev-btn {
    left: -80px;
}

.next-btn {
    right: -80px;
}

/* Hide elements when requested */
.d-none {
    display: none !important;
}

/* Portfolio Item Hover Overlay & Zoom Icon */
.portfolio-item {
    position: relative;
    overflow: hidden;
}

.portfolio-hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
    pointer-events: none;
}

.portfolio-item:hover .portfolio-hover-overlay {
    opacity: 1;
}

.zoom-icon {
    color: #ffffff;
    font-size: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.portfolio-item:hover .zoom-icon {
    transform: scale(1.05);
}

/* Terms Modal & Success Modal */
.terms-modal, .success-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.terms-modal.active, .success-modal.active {
    display: flex;
}

.terms-modal .modal-overlay, .success-modal .modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
}

.terms-modal .modal-body {
    position: relative;
    width: 680px;
    max-width: 95vw;
    background-color: #ffffff;
    border-radius: 12px;
    z-index: 10001;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.18);
    padding: 20px 24px;
    box-sizing: border-box;
}

.terms-modal .btn-terms-close {
    position: absolute;
    top: 21px;
    right: 24px;
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
    line-height: 1;
}

.terms-modal .btn-terms-close img {
    width: 14px;
    height: 14px;
    filter: brightness(0);
    opacity: 0.35;
    transition: opacity 0.2s ease;
}

.terms-modal .btn-terms-close:hover img {
    opacity: 0.7;
}

.terms-modal .terms-content {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.terms-modal .terms-content h3 {
    font-size: 16px;
    font-weight: 700;
    color: #222222;
    margin-bottom: 16px;
    text-align: left;
    line-height: 20px;
}

.terms-modal .terms-text-scroll {
    font-size: 12px;
    color: #666666;
    line-height: 1.6;
    height: 320px;
    max-height: 45vh;
    overflow-y: auto;
    text-align: left;
    border: 1px solid #eae5e2;
    border-radius: 6px;
    padding: 12px;
    background-color: #faf9f8;
    box-sizing: border-box;
}

.terms-modal .terms-text-scroll h4 {
    font-size: 13px;
    font-weight: 700;
    color: #333333;
    margin-top: 12px;
    margin-bottom: 6px;
}

.terms-modal .terms-text-scroll ul {
    margin-left: 15px;
    margin-bottom: 10px;
    list-style-type: disc;
}

.terms-modal .terms-text-scroll li {
    margin-bottom: 4px;
}

/* Success Modal */
.success-modal .modal-body {
    position: relative;
    width: 400px;
    max-width: 90vw;
    background-color: #ffffff;
    border-radius: 16px;
    z-index: 10001;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.success-modal .success-content .success-icon {
    font-size: 64px;
    color: #cdae87;
    margin-bottom: 20px;
}

.success-modal .success-content h3 {
    font-size: 20px;
    font-weight: bold;
    color: #3d3532;
    margin-bottom: 15px;
}

.success-modal .success-content p {
    font-size: 15px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 30px;
}

.success-modal .success-content .btn-confirm {
    width: 100%;
    padding: 15px;
    background-color: #3d3532;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
}

.success-modal .success-content .btn-confirm:hover {
    background-color: #cdae87;
}
