/* =========================
   색상
   ========================= */

:root {
    --primary: #20b89a;
    --primary-hover: #179c82;
    --primary-active: #12856f;
    --primary-focus: rgba(32, 184, 154, 0.20);

    --text: #212529;
    --text-secondary: #6c757d;

    --border: #ced4da;
    --background: #f5f7fb;
}


/* =========================
   기본 설정
   ========================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    background: var(--background);
    font-family: Arial, sans-serif;
    color: var(--text);
}


/* =========================
   기본 레이아웃
   로그인 / 회원가입 등
   ========================= */

.container-box {
    max-width: 500px;
    margin: 60px auto;
    padding: 40px;

    background: #fff;
    border-radius: 12px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.08);
}

.logo {
    margin-bottom: 30px;

    text-align: center;
    font-size: 32px;
    font-weight: bold;
}


/* =========================
   Footer
   ========================= */

footer {
    margin-top: 80px;

    text-align: center;
    color: #aaa;
}


/* =========================
   제목
   ========================= */

.signup-title {
    margin-top: 0;
    margin-bottom: 24px;

    text-align: center;
}

/* =========================
   공통 헤더
   ========================= */

.home-header .home-logo {
    color: var(--text);
    text-decoration: none;
}

.home-account {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* =========================
   프로필 회원탈퇴
   ========================= */

.profile-withdraw {
    margin-top: 20px;
    text-align: right;
}

.profile-withdraw a {
    color: var(--text-secondary);
    font-size: 13px;
}

.profile-withdraw a:hover {
    color: #dc3545;
}

/* =========================
   Form
   ========================= */

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;

    font-weight: 500;
}

.form-group input {
    display: block;
    width: 100%;

    padding: 9px 12px;

    font-size: 16px;
    line-height: 1.5;

    color: var(--text);
    background-color: #fff;

    border: 1px solid var(--border);
    border-radius: 6px;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.form-group input:focus {
    border-color: var(--primary);
    outline: none;

    box-shadow: 0 0 0 3px var(--primary-focus);
}

.form-group select {
    display: block;
    width: 100%;

    padding: 9px 12px;

    font-size: 16px;
    line-height: 1.5;

    color: var(--text);
    background-color: #fff;

    border: 1px solid var(--border);
    border-radius: 6px;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.form-group select:focus {
    border-color: var(--primary);
    outline: none;

    box-shadow: 0 0 0 3px var(--primary-focus);
}

.form-group input:disabled,
.form-group select:disabled {
    background-color: #f1f3f5;
    color: var(--text-secondary);
    cursor: not-allowed;
}

/* =========================
   Form 에러
   ========================= */

.form-error {
    margin-top: 5px;

    color: #dc3545;
    font-size: 14px;
}


/* =========================
   개인정보처리방침
   ========================= */

.privacy-box {
    padding: 12px;
    margin: 20px 0;

    border: 1px solid #ddd;
    border-radius: 8px;
}

.privacy-box h4 {
    margin-top: 0;
    margin-bottom: 10px;
}

.privacy-content {
    height: 160px;
    overflow-y: auto;

    padding: 8px;
    margin-bottom: 10px;

    font-size: 13px;
    line-height: 1.6;

    background: #fafafa;
    border: 1px solid #eee;
    white-space: pre-wrap;
}

.privacy-agree {
    font-weight: 600;
}


/* =========================
   기본 버튼
   ========================= */

.submit-button {
    display: block;
    width: 100%;

    padding: 10px 12px;

    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;

    color: #fff;
    background-color: var(--primary);

    border: 1px solid var(--primary);
    border-radius: 6px;

    cursor: pointer;

    transition:
        background-color 0.15s ease,
        border-color 0.15s ease;
}

.submit-button:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}

.submit-button:active {
    background-color: var(--primary-active);
    border-color: var(--primary-active);
}


/* =========================
   보조 버튼
   ========================= */

.secondary-button {
    display: block;
    width: 100%;

    padding: 9px 12px;

    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;

    color: var(--primary);
    background-color: #fff;

    border: 1px solid var(--primary);
    border-radius: 6px;

    cursor: pointer;

    transition:
        color 0.15s ease,
        background-color 0.15s ease;
}

.secondary-button:hover {
    color: #fff;
    background-color: var(--primary);
}


/* =========================
   링크 공통
   ========================= */

a {
    color: var(--primary);
    text-decoration: none;

    transition: color 0.15s ease;
}

a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}


/* =========================
   회원가입 하단 로그인
   ========================= */

.login-link {
    margin-top: 20px;

    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
}

.login-link a {
    margin-left: 4px;

    font-weight: 600;
}


/* =========================
   로그인 하단 링크
   ========================= */

.account-links {
    margin-top: 20px;

    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
}

.account-links a {
    font-weight: 600;
}

.link-divider {
    margin: 0 8px;

    color: #ced4da;
}


/* =========================
   인증 메일 재전송
   ========================= */

.resend-form {
    margin-bottom: 16px;
}


/* =========================
   Django Messages
   ========================= */

.messages {
    margin-bottom: 16px;
}

.alert {
    padding: 12px 16px;
    margin-bottom: 10px;

    border: 1px solid transparent;
    border-radius: 6px;

    font-size: 14px;
}

.alert-success {
    color: #0f5132;
    background-color: #d1e7dd;
    border-color: #badbcc;
}

.alert-error,
.alert-danger {
    color: #842029;
    background-color: #f8d7da;
    border-color: #f5c2c7;
}

.alert-warning {
    color: #664d03;
    background-color: #fff3cd;
    border-color: #ffecb5;
}

.alert-info {
    color: #055160;
    background-color: #cff4fc;
    border-color: #b6effb;
}


/* =========================
   Honeypot
   ========================= */

.hidden-field {
    position: absolute;
    left: -9999px;
}


/* =========================================================
   홈페이지
   ========================================================= */


/* =========================
   홈페이지 레이아웃
   ========================= */

.home-container {
    width: min(100% - 40px, 1000px);
    margin: 0 auto;
}


/* =========================
   홈페이지 상단
   ========================= */

.home-header {
    height: 72px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-bottom: 1px solid #e5e5e5;
}

.home-logo {
    font-size: 22px;
    font-weight: 700;
}

.home-account form {
    margin: 0;
}


/* =========================
   홈페이지 로그인 / 로그아웃
   ========================= */

.home-account-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 8px 16px;

    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;

    color: var(--primary);
    background: #fff;

    border: 1px solid var(--primary);
    border-radius: 6px;

    cursor: pointer;

    transition:
        color 0.15s ease,
        background-color 0.15s ease,
        border-color 0.15s ease;
}

a.home-account-button:hover,
button.home-account-button:hover {
    color: #fff;
    background-color: var(--primary);
    border-color: var(--primary);

    text-decoration: none;
}


/* =========================
   홈페이지 소개
   ========================= */

.home-intro {
    padding: 80px 0 70px;
    text-align: center;
}

.home-intro h1 {
    margin: 0 0 14px;

    font-size: 40px;
    line-height: 1.2;
}

/* 슬로건 */

.home-slogan {
    margin: 0;

    font-size: 18px;
    line-height: 1.6;

    color: var(--text-secondary);
}

/* 설명 */

.home-description {
    margin: 20px 0 0;

    font-size: 15px;
    line-height: 1.8;

    color: var(--text-secondary);
}


/* =========================
   서비스
   ========================= */

.service-section {
    padding-bottom: 40px;
}

.service-title {
    margin: 0 0 20px;

    font-size: 22px;
}


/* =========================
   서비스 목록
   ========================= */

.service-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
}


/* =========================
   서비스 카드
   ========================= */

.service-card {
    display: block;
    overflow: hidden;

    width: calc((100% - 48px) / 3);

    color: var(--text);
    background: #fff;

    border: 1px solid #e5e5e5;
    border-radius: 12px;

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);

    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        border-color 0.15s ease;
}

.service-card:hover {
    color: var(--text);

    border-color: #d5d5d5;

    transform: translateY(-3px);

    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);

    text-decoration: none;
}


/* =========================
   서비스 이미지
   ========================= */

.service-image {
    width: 100%;

    aspect-ratio: 16 / 9;

    overflow: hidden;

    background: #eee;
}

.service-image img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
}


/* =========================
   서비스 내용
   ========================= */

.service-content {
    padding: 18px;
}

.service-content h3 {
    margin: 0 0 8px;

    font-size: 20px;
    line-height: 1.3;

    color: var(--text);
}

.service-content p {
    margin: 0;

    font-size: 14px;
    line-height: 1.6;

    color: var(--text-secondary);
}

/* =========================
   점검 페이지
   ========================= */

.maintenance-container {
    min-height: 70vh;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 40px 20px;
    text-align: center;
}

.maintenance-container h1 {
    margin: 0 0 20px;

    font-size: 30px;
}

.maintenance-container p {
    font-size: 16px;
    line-height: 1.8;

    color: var(--text-secondary);
}

/* ==============================
   Django Messages Toast
   ============================== */

.toast-container {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);

    z-index: 9999;

    width: max-content;
    max-width: calc(100% - 32px);
}

.toast {
    padding: 14px 24px;

    background: #333;
    color: #fff;

    border-radius: 8px;

    font-size: 14px;
    text-align: center;

    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);

    animation: toast-in 0.3s ease-out;
}

.toast + .toast {
    margin-top: 10px;
}

.toast-success {
    background: #2e7d32;
}

.toast-error {
    background: #c62828;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

/* ==============================
   생일
   ============================== */

.birth-fields {
    display: flex;
    gap: 10px;
}

.birth-fields > * {
    flex: 1;
    min-width: 0;
}

/* =========================================================
   모바일
   ========================================================= */

@media (max-width: 600px) {

    /* 로그인 / 회원가입 */

    .container-box {
        margin: 20px 16px;
        padding: 24px;
    }

    .logo {
        margin-bottom: 24px;

        font-size: 28px;
    }


    /* 홈페이지 */

    .home-container {
        width: calc(100% - 32px);
    }

    .home-header {
        height: 64px;
    }

    .home-logo {
        font-size: 20px;
    }

    .home-account-button {
        padding: 7px 13px;

        font-size: 13px;
    }

    .home-intro {
        padding: 60px 0 50px;
    }

    .home-intro h1 {
        margin-bottom: 12px;

        font-size: 32px;
    }

    .home-intro p {
        font-size: 16px;
    }

    .service-title {
        font-size: 20px;
    }

    .service-grid {
        gap: 16px;
    }

    .service-card {
        width: 100%;
    }

    /* Footer */

    footer {
        margin-top: 40px;
        padding: 0 16px 20px;

        font-size: 13px;
    }

    /* 점검 */

    .maintenance-container h1 {
        font-size: 24px;
    }

    .maintenance-container p {
        font-size: 14px;
    }

}
