/* 애니메이션 */
@keyframes fadeInOut {
    0% { opacity: 0; transform: translateX(-50%) translateY(-20px); }
    10% { opacity: 1; transform: translateX(-50%) translateY(0); }
    90% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-20px); }
}

/* 메시지 알림 */
.message-notification {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    padding: 15px 30px;
    border: 1px solid;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    animation: fadeInOut 3s ease-in-out;
}

.message-notification.success {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.message-notification.error {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

/* 관리자 버튼 */
.admin-btn {
    padding: 8px 16px;
    background-color: #333;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 14px;
    display: inline-block;
}

.admin-btn-container {
    margin-top: 15px;
}

/* FAQ 스타일 */
.faq-empty-message {
    text-align: center;
    padding: 50px;
    color: #666;
}

.faq-question-clickable {
    cursor: pointer;
}

.faq-toggle-no-pointer {
    pointer-events: none;
}

.faq-answer {
    display: none;
    padding: 15px 20px;
    background-color: #f9f9f9;
    border-top: 1px solid #eee;
}

.faq-answer p {
    color: #555;
    line-height: 1.6;
    margin: 0;
    white-space: pre-wrap;
}

.faq-admin-buttons {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.faq-edit-btn {
    padding: 6px 12px;
    background-color: #4CAF50;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
}

.faq-delete-btn {
    padding: 6px 12px;
    background-color: #f44336;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.faq-delete-form {
    display: inline;
    margin: 0;
}

/* Contact Section */
.contact-phone-link {
    color: inherit;
    text-decoration: none;
}

/* Counsel Section */
.counsel-section {
    width: 100%;
    padding: 0 60px;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.counsel-banner-wrapper {
    position: relative;
    width: 100%;
    display: inline-block;
}

.counsel-banner-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 12px;
}

/* 기본(PC)에서는 desktop-banner만 표시 */
.counsel-banner-image.desktop-banner {
    display: block;
}

.counsel-banner-image.mobile-banner {
    display: none;
}

/* PC/모바일 디스플레이 제어 */
.desktop-only {
    display: flex;
}

/* PC용 배너 오버레이 상담 버튼 */
.counsel-buttons-overlay {
    position: absolute;          /* 배너 이미지 위에 절대 위치 */
    bottom: 20%;                 /* 하단에서 위치 (PC만 더 아래로 이동) */
    left: 8%;                    /* 왼쪽에서 위치 */
    display: flex;
    gap: 12px;                   /* 버튼 간 간격 */
    z-index: 10;                 /* 이미지 위에 표시 */
}

/* PC용 오버레이 버튼 스타일 */
.counsel-btn {
    background: none;            /* 배경 없음 (이미지만 표시) */
    border: none;                /* 테두리 없음 */
    padding: 0;
    cursor: pointer;             /* 마우스 포인터 표시 */
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.counsel-btn:hover {
    transform: translateY(-4px); /* 마우스 올렸을 때 위로 4px 이동 */
    opacity: 0.9;                /* 약간 투명하게 */
}

.counsel-btn img {
    height: 7vw;                 /* 뷰포트 너비의 7% (10vw → 7vw로 크기 감소) */
    width: auto;                 /* 가로 비율 자동 조정 */
    display: block;
}

/* PC에서는 배너 오버레이의 전화상담 버튼 숨김 */
.counsel-btn.call-btn {
    display: none;
}

/* 간편 신청 버튼 스타일 - 이미지만 표시 */
.counsel-btn.apply-btn {
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
}

.counsel-btn.apply-btn img {
    height: 7vw !important;      /* 10vw → 7vw로 크기 감소 */
    width: auto !important;
    display: block !important;
}

.counsel-btn.apply-btn:hover {
    background: none !important;
    background-color: transparent !important;
    transform: translateY(-4px);
    opacity: 0.9;
}


/* 슬라이드 인 클래스 */
.slide-in {
  animation: slideUp 0.6s ease-out forwards;
}

/* 상담 섹션 슬라이드 인 초기 상태 */
.counsel-banner-wrapper {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

/* 애니메이션 활성 상태 */
.counsel-banner-wrapper.slide-in {
    opacity: 1;
    transform: translateY(0);
}


/* ============================================
   우측 상단 고정 상담 버튼 (PC/모바일 모두 표시)
   ============================================ */
.fixed-consult-buttons {
    position: fixed;             /* 화면에 고정 (스크롤해도 위치 유지) */
    display: flex;               /* Flexbox 사용 */
    flex-direction: column;      /* 세로 배치 (카톡상담, 전화상담 순서로) */
    right: 15px;                 /* PC 기본값: 오른쪽에서 15px */
    top: 120px;                  /* PC 기본값: 헤더 아래 120px */
    gap: 8px;                    /* 버튼 간 간격 8px */
    z-index: 50;                 /* 헤더(z-index: 100)보다는 낮지만 다른 요소보다 높게 */
}

/* 모바일용 고정 버튼 스타일 - 박스 형태 */
.fixed-consult-btn {
    background-color: #ffffff;   /* 기본 흰색 배경 */
    border: none;                /* 테두리 없음 */
    border-radius: 0;            /* 모서리 각지게 */
    padding: 14px 12px;          /* 내부 여백 */
    display: flex;
    flex-direction: column;      /* 세로 배치: 아이콘 위, 텍스트 아래 */
    align-items: center;
    justify-content: center;
    gap: 8px;                    /* 아이콘과 텍스트 간격 */
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    width: 110px;                /* 고정 너비 */
    min-height: 100px;           /* 최소 높이 */
}

/* 카카오톡 상담 버튼 - 노란색 배경 */
.fixed-consult-btn.kakao-btn {
    background-color: #FEE500;   /* 카카오톡 노란색 */
}

.fixed-consult-btn.kakao-btn span {
    color: #392020;              /* 어두운 갈색 텍스트 */
}

/* 전화 상담 버튼 - 회색 배경 */
.fixed-consult-btn.call-btn {
    background-color: #E8E8E8;   /* 밝은 회색 배경 */
    display: none;               /* PC에서는 숨김 */
}

.fixed-consult-btn.call-btn span {
    color: #333333;              /* 어두운 회색 텍스트 */
}

/* 버튼 호버 효과 */
.fixed-consult-btn:hover {
    transform: scale(1.05);      /* 살짝 확대 */
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* 아이콘 크기 */
.fixed-consult-btn img {
    width: 45px;                 /* 아이콘 크기 줄임 */
    height: 45px;
    object-fit: contain;
    display: block;
}

/* 텍스트 스타일 */
.fixed-consult-btn span {
    font-size: 14px;
    font-weight: 700;
    transition: none;
}

/* Features Section */
.features-section {
    background-color: #ffffff;
}

.features-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* 장점 카드 */
.feature-card {
    padding: 30px 20px;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
}

/* 애니메이션 활성화 시 */
.feature-card.animate {
    animation: slideUpFade 0.8s ease-out forwards;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 장점 이미지 디자인 */
.feature-card img {
    width: 300px;
    height: 300px;
    margin: 0 auto 16px;
    display: block;
    object-fit: contain;
}

.feature-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
    background-color: #f0f4f8;
    border: 2px dashed #ccc;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 10px;
}

.feature-text {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    line-height: 1.5;
}

.feature-text .highlight {
    color: #2168A3;
    background-color: #E3F2FD;  /* 밝은 파란색 형광펜 효과 */
    padding: 0.5px 3px;            /* 글자 주변 여백 */
    border-radius: 3px;          /* 둥근 모서리 */
    font-weight: bold;           /* 볼드 처리 */
}

/* 모바일 전용 줄바꿈 - PC에서는 숨김 */
.mobile-br {
    display: none;
}

/* FAQ Section */
.faq-section {
    background-color: #f8f9fa;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid #e0e0e0;
}

.faq-item:first-child {
    border-top: 1px solid #e0e0e0;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 20px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.faq-question:hover {
    background-color: #f8f9fa;
}

.faq-question span {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.faq-toggle {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.faq-toggle img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.faq-toggle:hover {
    background-color: #e0e0e0;
}

/* Contact Section */
.contact-section {
    background-color: #ffffff;
}

.contact-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-item {
    background-color: #ffffff;
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 24px;
    opacity: 0;
}

.contact-item {
    opacity: 0;
}

.contact-item.animate {
    animation: slideUpFade 0.6s ease-out forwards;
}

.contact-item-clickable {
    cursor: pointer;
}

.contact-icon {
    width: 60px;
    height: 60px;
    background-color: #f0f4f8;
    border: 2px dashed #ccc;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 12px;
    flex-shrink: 0;
}

.contact-icon-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    flex-shrink: 0;
}

.contact-info {
    flex: 1;
}

.contact-info h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1a3353;
    margin-bottom: 8px;
}

.contact-info p {
    font-size: 15px;
    color: #666;
    line-height: 1.6;
}

.contact-note {
    font-size: 13px;
    color: #999;
    margin-top: 4px;
}

.contact-arrow-icon {
    width: 30px;
    height: 30px;
    object-fit: contain;
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.contact-arrow-icon:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* PC/모바일 디스플레이 전환 */
    .desktop-only {
        display: none !important;
    }

    .counsel-section {
        padding: 0 20px;
    }

    /* 모바일에서는 mobile-banner만 표시 */
    .counsel-banner-image.desktop-banner {
        display: none !important;
    }

    .counsel-banner-image.mobile-banner {
        display: block !important;
    }

    /* 모바일에서 배너 오버레이 전화상담 버튼 숨김 */
    .counsel-btn.call-btn {
        display: none;           /* 모바일에서는 숨김 */
    }

    /* 모바일에서 간편 신청 버튼 표시 */
    .counsel-btn.apply-btn {
        display: block;                     /* 모바일에서도 표시 */
    }

    /* 모바일에서 배너 오버레이 버튼 크기 */
    .counsel-btn img {
        height: 15vw;            /* 뷰포트 너비의 15% (모바일 원래 크기) */
        width: auto;             /* 비율 자동 조정 (직사각형 유지) */
        max-height: 50px;        /* 최대 높이 제한 */
        max-width: 180px;        /* 최대 가로 길이 제한 */
        min-height: 40px;        /* 최소 높이 보장 */
        object-fit: contain;     /* 비율 유지 */
    }

    /* 모바일에서 배너 오버레이 버튼 간격 및 위치 조정 */
    .counsel-buttons-overlay {
        bottom: 15%;             /* 모바일 원래 위치 */
        left: 5%;                /* 좌측 여백 조정 */
        gap: 3px;                /* 버튼 간격 줄임 */
    }

    /* ============================================
       모바일 화면 (768px 이하) - 고정 상담 버튼 위치 및 크기 조정
       우측 상단에 박스 형태로 배치
       ============================================ */
    .fixed-consult-buttons {
        right: 10px;             /* 모바일: 오른쪽에서 10px */
        top: 100px;              /* 모바일: 헤더 아래 100px */
        gap: 8px;                /* 모바일: 버튼 간격 8px */
    }

    .fixed-consult-btn {
        padding: 12px 10px;      /* 모바일 패딩 더 줄임 */
        width: 90px;             /* 모바일 너비 더 줄임 */
        min-height: 85px;        /* 모바일 높이 더 줄임 */
        gap: 6px;                /* 아이콘-텍스트 간격 줄임 */
    }

    /* 모바일에서는 전화 버튼도 표시 */
    .fixed-consult-btn.call-btn {
        display: flex;           /* 모바일에서는 표시 */
    }

    .fixed-consult-btn img {
        width: 38px;             /* 모바일 아이콘 크기 더 줄임 */
        height: 38px;
    }

    .fixed-consult-btn span {
        font-size: 12px;         /* 모바일 텍스트 크기 줄임 */
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .feature-card {
        padding: 20px 10px;
    }

    .feature-card img {
        width: 150px;
        height: 150px;
    }

    .feature-text {
        font-size: 14px;
    }

    /* 모바일에서는 mobile-br 표시 */
    .mobile-br {
        display: inline;
    }

    .section-title {
        font-size: 24px;
    }

    .section-subtitle {
        font-size: 14px;
    }

    .faq-list {
        max-width: 100%;
    }

    .faq-question {
        padding: 16px 12px;
    }

    .faq-question span {
        font-size: 14px;
    }

    .contact-list {
        max-width: 100%;
        gap: 12px;
    }

    .contact-item {
        padding: 16px;
        flex-direction: row;
        align-items: center;
        gap: 16px;
    }

    .contact-icon-img {
        width: 50px;
        height: 50px;
        flex-shrink: 0;
    }

    .contact-info {
        flex: 1;
    }

    .contact-info h3 {
        font-size: 15px;
        margin-bottom: 4px;
    }

    .contact-info p {
        font-size: 13px;
    }

    .contact-note {
        font-size: 11px;
    }

    .contact-arrow-icon {
        width: 24px;
        height: 24px;
        flex-shrink: 0;
    }
}

/* 초소형 모바일 (Z폴드 외부 화면) */
@media (max-width: 400px) {
    .fixed-consult-buttons {
        width: 60px;
        right: 5px;
        top: 100px;
    }

    .fixed-consult-btn {
        font-size: 10px;
        padding: 8px 5px;
        width: 60px;
        min-height: 65px;
        gap: 4px;
    }

    .fixed-consult-btn img {
        width: 28px;
        height: 28px;
    }

    .fixed-consult-btn span {
        font-size: 9px;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .feature-card {
        padding: 15px 8px;
    }

    .feature-card img {
        width: 120px;
        height: 120px;
    }

    .feature-text {
        font-size: 11px;
        line-height: 1.4;
    }

    .main-content section {
        padding: 40px 15px;
    }

    .hero-section {
        padding: 60px 15px;
    }

    .hero-content h1 {
        font-size: 28px;
    }

    .hero-content p {
        font-size: 14px;
    }

    .section-title {
        font-size: 22px;
    }

    .section-subtitle {
        font-size: 13px;
    }
}