/* ============================================================================
 * Project : MEDITORIAL (메디토리얼)
 * File    : common.css
 * Desc    : 기본 테마, 레이아웃, 네비게이션, 푸터, 알럿 공통 설정
 * ============================================================================ */

/* 1. 기본 테마 설정 */
:root {
    --primary: #00c2cb;
    --bg: #0b0b0b;
    --card: #161616;
    --text: #ffffff;
    --text-dim: #999;
    --transition: 0.3s ease;
}

body {
    font-family: 'Pretendard', sans-serif;
    margin: 0;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
}

/* 2. 네비게이션 (PC/모바일 공통) */
nav {
    background: rgba(11, 11, 11, 0.95);
    backdrop-filter: blur(10px);
    padding: 0.8rem 4%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #222;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo-img {
    height: 40px;
    width: auto;
    transition: var(--transition);
    cursor: pointer;
}

.logo-img:hover {
    opacity: 0.8;
}

.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition);
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.menu-toggle {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    z-index: 1001;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: var(--primary);
    transition: var(--transition);
}

/* 3. 섹션 제어 */
.section {
    display: none;
    min-height: 70vh;
    padding: 60px 0;
}

.section.active {
    display: block !important;
    animation: fadeIn 0.6s ease-out;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-title {
    text-align: center;
    color: var(--primary);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 50px;
}

/* 글로벌 폼 요소 기본 설정 (Contact & Auth Box에서 이동) */
input, textarea, select {
    width: 100%;
    box-sizing: border-box;
    padding: 14px;
    margin-bottom: 15px;
    background: #0b0b0b;
    border: 1px solid #333;
    border-radius: 10px;
    color: white;
    font-size: 1rem;
}

/* --- 고급 커스텀 얼럿창 스타일 --- */
.custom-alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s;
}

.custom-alert-overlay.show {
    opacity: 1;
    visibility: visible;
}

.custom-alert-box {
    background: rgba(25, 25, 25, 0.9);
    border: 1px solid rgba(20, 184, 166, 0.3);
    border-radius: 16px;
    padding: 35px 40px;
    max-width: 380px;
    width: 90%;
    text-align: center;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(20, 184, 166, 0.1);
    transform: translateY(-20px) scale(0.95);
    transition: transform 0.3s ease;
}

.custom-alert-overlay.show .custom-alert-box {
    transform: translateY(0) scale(1);
}

.custom-alert-icon {
    font-size: 2.8rem;
    margin-bottom: 20px;
}

#custom-alert-message {
    color: white;
    font-size: 1.05rem;
    line-height: 1.5;
    margin-bottom: 30px;
    word-break: keep-all;
}

.btn-alert-confirm {
    background-color: var(--primary);
    color: #000;
    border: none;
    padding: 14px 30px;
    border-radius: 10px;
    font-size: 1.05rem;
    font-weight: 800;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.btn-alert-confirm:hover {
    background-color: #00e0eb;
    box-shadow: 0 0 20px rgba(0, 194, 203, 0.4);
}

/* footer 기본 스타일 */
footer {
    text-align: center;
    padding: 80px 0;
    color: #444;
    border-top: 1px solid #111;
    font-size: 0.85rem;
}

footer .sns-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 40px 0;
    border-top: 1px solid #222;
    margin-top: 60px;
}

footer .sns-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s, opacity 0.3s;
    cursor: pointer;
}

footer .sns-icon:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

footer .sns-icon img {
    height: 30px;
    width: auto;
}

/* 브라우저 자동완성 하얀색 배경 강제 제거 */
.input-group input:-webkit-autofill,
.input-group input:-webkit-autofill:hover,
.input-group input:-webkit-autofill:focus,
.input-group input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0px 1000px #1a1a1a inset !important;
    -webkit-text-fill-color: white !important;
    border: 1px solid #333 !important;
    caret-color: white !important;
    transition: background-color 5000s ease-in-out 0s !important;
}

/* 7. 네비게이션 반응형 설정 */
@media (max-width: 1100px) {
    .nav-links { gap: 12px; }
    .nav-links a { font-size: 0.75rem; }
}

@media (max-width: 768px) {
    .menu-toggle { display: flex; }
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(11, 11, 11, 0.98);
        flex-direction: column;
        gap: 0;
        border-bottom: 1px solid #222;
        padding: 10px 0;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    }
    .nav-links.mobile-active {
        display: flex;
        animation: slideDown 0.3s ease-out;
    }
    .nav-links a {
        width: 100%;
        padding: 18px 0;
        text-align: center;
        border-bottom: 1px solid #1a1a1a;
    }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}