* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    --header-height: calc(50px + 1rem);
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    line-height: 1.6;
}

/* Fixed Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    height: var(--header-height);
}

.header-inner {
    width: 100%;
    max-width: 900px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

header img {
    height: 45px;
    width: auto;
}

header ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

header li a,
header li div {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.3s;
}

header li a:hover,
header li div:hover {
    color: #0066cc;
}

header li a.active {
    color: #0066cc;
    border-bottom: 1px solid #0066cc;
}

header li div.active {
    color: #0066cc;
    border-bottom: 1px solid #0066cc;
}

main {
    margin-top: var(--header-height);
}

main img {
    width: 100%;
    height: auto;
    display: block;
}

/* Responsive Images */
.pcImg {
    display: block;
}

.moImg {
    display: none;
}

/* Bounce Animation */
@keyframes bounceUpDown {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(-10px);
    }
}

/* Bottom Fixed Button */
#bottomBtn {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    cursor: pointer;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    width: 600px;
    max-width: 90%;
    height: auto;
    animation: bounceUpDown 1.5s ease-in-out infinite;
}

#bottomBtn.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Form Section */
.form_section {
    padding: 2rem;
    background: #f9f9f9;
}

.form_section.fixed_form {
    background: white;
}

.inputForm-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

.inputForm-flex-wrap {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.inputForm-flex-wrap>div {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0;
    position: relative;
}

.privacy_box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.name-label,
.num-label {
    margin-bottom: 0;
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
    letter-spacing: -0.5px;
    white-space: nowrap;
    min-width: 60px;
    padding-right: 10px;
}

#counsel_hp {
    border-radius: 0 8px 8px 0;
}

input[type="text"] {
    flex: 1;
    padding: 0.7rem 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Noto Sans KR', sans-serif;
    transition: all 0.3s ease;
    background: white;
    width: 100%;
}

input[type="text"]:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

input[type="text"]::placeholder {
    color: #aaa;
}

.num-label-first {
    background: #0066cc;
    color: white;
    padding: 0.7rem 1rem;
    border-radius: 8px 0 0 8px;
    font-size: 1rem;
    font-family: 'Noto Sans KR', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Fixed Form Popup */
.form-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    animation: fadeIn 0.3s ease-in-out;
}

.form-overlay.active {
    display: block;
}

.form_section.fixed_form {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 600px;
    z-index: 2000;
    padding: 2rem;
    background: white;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateX(-50%) translateY(100%);
    }

    to {
        transform: translateX(-50%) translateY(0);
    }
}

.form-close-btn {
    position: absolute;
    top: -2rem;
    right: 1rem;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    transition: color 0.3s;
    background: #ffffff;
    width: 40px;
    height: 40px;
    border-radius: 5px;
}

.form-close-btn:hover {
    color: #333;
}

/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    animation: fadeIn 0.3s ease-in-out;
}

.modal-overlay.active {
    display: block;
}

#myModal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0;
    width: 90%;
    max-width: 600px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease-in-out;
}

#myModal.active {
    display: block;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 16px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.modal-content h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: #333;
    font-weight: 600;
}

.modal-content p {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.8;
    margin-bottom: 0.5rem;
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #999;
    transition: color 0.3s;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
}

.modal-close:hover {
    color: #333;
}

/* Responsive */
@media (max-width: 768px) {
    html {
        --header-height: calc(25px + 1.2rem);
    }

    /* Responsive Images */
    .pcImg {
        display: none;
    }

    .moImg {
        display: block;
    }

    header {
        padding: 0.6rem;
    }

    header ul {
        gap: 1rem;
        font-size: 0.7rem;
    }

    header img {
        height: 25px;
    }

    main {
        margin-top: var(--header-height);
    }

    .form_section,
    .form_section.fixed_form {
        padding: 1rem;
    }

    .privacy_box {
        font-size: 0.8rem;
    }

    #myModal {
        width: 95%;
        max-width: 100%;
    }

    .modal-content {
        padding: 1.5rem;
    }

    .modal-content h3 {
        font-size: 1.1rem;
    }

    .modal-content p {
        font-size: 0.85rem;
    }
}