/* === 전체 레이아웃 기반 === */
* {
    box-sizing: border-box;
}

body {
    background-color: #f0f8e8;
    margin: 0 auto;
    max-width: 960px;
    padding: 0 30px;
    font-family: "맑은 고딕", "Malgun Gothic", sans-serif;
    color: #222;
}

/* === h1 === */
h1 {
    color: darkgreen;
    text-align: center;
    text-shadow: 1px 1px 3px rgba(0, 100, 0, 0.3);
    padding: 10px 0;
}

/* === h2 === */
h2 {
    color: #1a6b2a;
    text-shadow: 1px 1px 2px #a8d5a2;
    border-left: 5px solid darkgreen;
    padding-left: 10px;
    margin-top: 0;
}

/* === header === */
header {
    border-bottom: 1px solid #5d8a46;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

/* ================================================
   CSS3 핵심 배치 : #survey-layout
   nav(좌, 180px 고정) + .survey-main(우, 나머지)
   display:flex 로 나란히 배치
   ================================================ */
#survey-layout {
    display: flex;
    gap: 22px;
    align-items: flex-start;
}

/* === nav : 왼쪽 고정 컬럼 === */
nav {
    flex: 0 0 180px;
    background-color: #dff0d8;
    padding: 15px 18px;
    border-radius: 8px;
    position: sticky;      /* 스크롤 시 고정 */
    top: 20px;
}

/* === .survey-main : 오른쪽 가변 컬럼 (form 포함) === */
.survey-main {
    flex: 1;
    min-width: 0;
}

/* === ul : 1픽셀 점선 테두리 === */
ul {
    border: 1px dotted #5d8a46;
    padding: 10px 10px 10px 30px;
    border-radius: 4px;
    margin: 5px 0;
}

li {
    margin: 5px 0;
    line-height: 1.7;
}

/* === a : 밑줄 없애기 === */
a {
    text-decoration: none;
    color: #1a6b2a;
}

a:hover {
    text-decoration: underline;
    color: #27ae60;
}

/* === p === */
p {
    font-size: 1em;
    text-indent: 0;
    line-height: 1.85;
}

/* === label === */
label {
    margin-right: 14px;
    cursor: pointer;
}

label:hover {
    color: darkgreen;
}

/* === form 전체 === */
form {
    background-color: white;
    border: 1px solid #b2d9a0;
    border-radius: 12px;
    padding: 25px 30px;
    box-shadow: 2px 2px 8px rgba(0, 100, 0, 0.08);
}

/* === article === */
article {
    background-color: #f9fef5;
    border: 1px solid #c8e6b8;
    border-radius: 8px;
    padding: 18px 22px;
    margin-bottom: 20px;
}

/* === input text, email, select === */
input[type=text],
input[type=email],
select {
    border: 1px solid #5d8a46;
    border-radius: 5px;
    padding: 5px 10px;
    font-size: 1em;
    color: #222;
    background-color: #f9fff5;
}

input[type=text]:focus,
input[type=email]:focus,
select:focus {
    border-color: darkgreen;
    outline: none;
    box-shadow: 0 0 4px #a8d5a2;
}

/* hover 시 배경색 전환 — 5장 transition 효과 적용 */
input[type=text]:hover,
input[type=email]:hover,
select:hover {
    background-color: #eafaea;
    transition: background-color 0.4s;
}

/* === textarea === */
textarea {
    border: 1px solid #5d8a46;
    border-radius: 5px;
    padding: 6px 10px;
    font-size: 1em;
    width: 100%;
    max-width: 480px;
    height: 100px;
    resize: vertical;
    background-color: #f9fff5;
}

textarea:focus {
    border-color: darkgreen;
    outline: none;
    box-shadow: 0 0 4px #a8d5a2;
}

/* === 제출/초기화 버튼 === */
input[type=submit] {
    background-color: darkgreen;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 9px 26px;
    font-size: 1em;
    cursor: pointer;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s;
}

input[type=submit]:hover {
    background-color: #1a8a2a;
}

input[type=reset] {
    background-color: #aaaaaa;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 9px 20px;
    font-size: 1em;
    cursor: pointer;
    margin-left: 10px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.15);
    transition: background-color 0.3s;
}

input[type=reset]:hover {
    background-color: #888888;
}

/* === footer : orange 배경, 둥근 모서리 === */
footer {
    background-color: orange;
    border-radius: 15px;
    padding: 15px 25px;
    margin-top: 30px;
    text-align: center;
    color: white;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

footer p {
    color: white;
    margin: 5px 0;
    text-indent: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.25);
}

footer a {
    color: white;
    font-weight: bold;
}
