/* =========================
   Index Topbar
========================= */
.mypage-wrap {
    position: relative;
    margin-left: auto;
}

.mypage-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    color: #111;
    cursor: pointer;
    transition:
        border-color 0.2s ease,
        color 0.2s ease,
        background-color 0.2s ease;
}

.mypage-btn:hover {
    border-color: #06b7aa;
    color: #06b7aa;
}

.mypage-btn .material-symbols-outlined {
    font-size: 18px;
}

.alarm-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ef4444;
    flex-shrink: 0;
}

.mypage-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 260px;
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(17, 24, 39, 0.1);
    display: none;
    z-index: 1100;
}

.mypage-wrap.is-open .mypage-dropdown {
    display: block;
}

.mypage-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    text-decoration: none;
    color: #111;
    font-size: 13px;
}

.mypage-item:hover {
    background: #f3f4f6;
}

.mypage-item-label {
    color: #374151;
}

.mypage-item-value {
    font-size: 12px;
    font-weight: 700;
    color: #06b7aa;
}

/* =========================
   Consultant Profile Page
========================= */

.consultant-page {
    background: #f7f8fa;
}

.consult-hero {
    background: var(--primary-gradient);
    padding: 22px 0 70px;
    color: #fff;
}

.consult-hero-inner {
    max-width: 1200px;
}

.consult-hero-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 18px;
}

.consult-hero-left {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.consult-hero-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #06b7aa;
    font-weight: 700;
    font-size: 32px;
    flex: 0 0 auto;
    overflow: hidden;
}

.consult-hero-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.consult-hero-name {
    margin: 0;
    font-size: 26px;
    font-weight: 600;
    line-height: 1.2;
}

.consult-hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 15px;
    margin-top: 10px;
    justify-content: center;
}
.stat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
}

.stat b {
    font-weight: 600;
}

.stat .material-symbols-outlined {
    font-size: 18px;
}

.consult-hero-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 360px;
    max-width: 100%;
}

/* ÇÁ·ÎÇÊ ¼öÁ¤¹öÆ° */
.consult-hero-name-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.btn-profile-edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    padding: 0 12px;
    border: 1px solid #d7dbe2;
    border-radius: 999px;
    background: #fff;
    color: #444;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 6px;
}

.btn-profile-edit:hover {
    background: #f3f4f6;
    border-color: #c7cdd6;
}

.btn-profile-edit .material-symbols-outlined {
    font-size: 16px;
    line-height: 1;
}

/* card wrap overlaps hero */

.consult-card {
    max-width: 1200px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
    padding: 30px 35px;
}

/* consultant.html¿¡¼­¸¸ overlap Àû¿ë */
.consultant-page .consult-card-wrap .consult-card {
    margin-top: -30px;
}

.consult-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 18px 35px;
}

.info-title {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 600;
    color: #111;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ¹ÝÀÀÇü */
@media (max-width: 1024px) {
    .item-meta-row {
        display: flex;
        align-items: center;
        gap: 16px;
        flex-wrap: wrap;
    }
}

.admin-page-filter {
    display: flex;
    gap: 8px;
    margin-top: 20px;
    margin-bottom: 16px;
}

/* ±âº» »óÅÂ (¼±ÅÃ ¾ÈµÆÀ» ¶§µµ ÁÖÈ²) */
.admin-page-filter .btn[data-filter='pending'] {
    border-color: #ff8a00;
    color: #ff8a00;
}

/* hover */
.admin-page-filter .btn[data-filter='pending']:hover {
    background: #fff4e5;
}

/* active »óÅÂ (Å¬¸¯ÇßÀ» ¶§) */
.admin-page-filter .btn[data-filter='pending'].active {
    background: #ff8a00;
    border-color: #ff8a00;
    color: #fff;
}

/* =========================
   Inquiry Detail / Reply
========================= */
.detail-card,
.reply-form-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.detail-card + .detail-card,
.detail-card + .reply-form-card,
.reply-form-card + .detail-card {
    margin-top: 24px;
}

.detail-head {
    margin-bottom: 20px;
}

.detail-title {
    margin: 12px 0 0;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.4;
    color: #111827;
}

.detail-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 24px;
    padding: 20px 0;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
}

.meta-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.meta-label {
    min-width: 72px;
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
}

.meta-value {
    font-size: 15px;
    color: #111827;
}

.detail-body {
    padding-top: 24px;
}

.detail-section-title {
    margin: 0 0 14px;
    font-size: 16px;
    font-weight: 700;
    color: #111827;
}

.detail-content-box {
    min-height: 180px;
    padding: 20px;
    border-radius: 16px;
    background: #f8fafc;
    font-size: 15px;
    line-height: 1.8;
    color: #374151;
}

.detail-actions,
.reply-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
}

.reply-layout {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.reply-form-head {
    margin-bottom: 20px;
}

.reply-form-title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #111827;
}

.reply-form-desc {
    margin: 8px 0 0;
    font-size: 14px;
    color: #6b7280;
}

.form-label {
    display: inline-block;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.reply-textarea {
    width: 100%;
    min-height: 260px;
    padding: 18px 20px;
    border: 1px solid #d1d5db;
    border-radius: 16px;
    font-size: 15px;
    line-height: 1.7;
    color: #111827;
    resize: vertical;
    background: #fff;
}

.reply-textarea:focus {
    outline: none;
    border-color: #111827;
}

/* =========================
   Inquiry Detail Preview
========================= */
.detail-preview-wrap {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.detail-preview-block {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-preview-label {
    font-size: 14px;
    font-weight: 700;
    color: #6b7280;
}

/* =========================
   Inquiry Detail Card
========================= */
.detail-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.detail-head {
    margin-bottom: 20px;
}

.detail-title {
    margin: 12px 0 0;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.4;
    color: #111827;
}

.detail-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 24px;
    padding: 20px 0;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
}

.meta-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.meta-label {
    min-width: 72px;
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
}

.meta-value {
    font-size: 15px;
    color: #111827;
}

.detail-body {
    padding-top: 24px;
}

.detail-section-title {
    margin: 0 0 14px;
    font-size: 16px;
    font-weight: 700;
    color: #111827;
}

.detail-content-box {
    min-height: 180px;
    padding: 20px;
    border-radius: 16px;
    background: #f8fafc;
    font-size: 15px;
    line-height: 1.8;
    color: #374151;
}

.detail-answer {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #f1f5f9;
}

.detail-answer-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.detail-answer-date {
    font-size: 13px;
    color: #6b7280;
}

.detail-content-box.is-answer {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}

.detail-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
}

.summary-label {
    display: block;
    font-size: 12px;
    opacity: 0.9;
}

.summary-value {
    display: block;
    margin-top: 8px;
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
}

.status-chip {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.status-wait {
    background: #fff7ed;
    color: #c2410c;
}

.status-ing {
    background: #eff6ff;
    color: #1d4ed8;
}

.status-done {
    background: #ecfdf3;
    color: #027a48;
}

@media (max-width: 768px) {
    .summary-value {
        font-size: 20px;
        margin-top: 3px;
    }
}

/* =========================
   Email Page
========================= */
.email-page {
    padding: 40px 0 100px;
    background: #f7f8fa;
    min-height: 100vh;
}

.email-compose-section .container-sm {
    max-width: 760px;
}

.email-detail-section .container-sm {
    max-width: 760px;
}

/* =========================
   Head
========================= */
.email-page-head {
    margin-bottom: 24px;
}

.email-page-subtitle {
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #0c88a8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.email-page-title {
    margin-bottom: 10px;
    font-size: 32px;
    font-weight: 800;
    color: #111;
    line-height: 1.3;
}

.email-page-desc {
    font-size: 15px;
    line-height: 1.7;
    color: #666;
}

/* =========================
   Consultant Card
========================= */
.email-consultant-card {
    padding: 20px 30px;
    margin-bottom: 18px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.email-consultant-top {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 14px;
}

.email-consultant-thumb {
    flex: 0 0 68px;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    background: #eef2f6;
}

.email-consultant-thumb .consultant-avatar {
    width: 70px;
    height: 70px;
    font-size: 28px;
    font-weight: 800;
}

.email-consultant-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.email-consultant-body {
    min-width: 0;
    flex: 1;
}

.email-consultant-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.email-consultant-name {
    font-size: 20px;
    font-weight: 800;
    color: #111;
}

.email-consultant-meta {
    font-size: 14px;
    font-weight: 600;
    color: #0c88a8;
}

.email-consultant-desc {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

.badge-consult {
    background: #e9f8f3;
    color: #12b76a;
}

.email-consultant-meta,
.email-consultant-desc {
    word-break: keep-all;
}

/* =========================
   Info Box
========================= */
.email-info-box {
    padding: 18px 20px;
    margin-bottom: 18px;
    border: 1px solid #e3edf2;
    border-radius: 16px;
    background: #f9fcfd;
}

.email-info-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.email-info-title {
    margin-bottom: 0;
}

.email-send-count {
    font-size: 13px;
    font-weight: 700;
    color: #0c88a8;
    white-space: nowrap;
}

.email-send-count strong {
    font-weight: 800;
    color: #111;
}

.email-info-list {
    margin: 0;
    padding-left: 5px;
}

.email-info-list li {
    position: relative;
    padding-left: 15px;
    font-size: 14px;
    line-height: 1.7;
    color: #555;
}

/* ºí·¿ */
.email-info-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 9px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #0c88a8;
}

/* =========================
   Scroll Animation (Fade Up)
========================= */

/* ±âº» »óÅÂ (¼û±è + ¾Æ·¡ À§Ä¡) */
.fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition:
        opacity 0.6s ease,
        transform 0.6s ease;
}

/* È­¸é¿¡ º¸ÀÏ ¶§ */
.fade-up.show {
    opacity: 1;
    transform: translateY(0);
}

/* =========================
   Scroll Animation Delay
========================= */

/* ¼øÂ÷ µîÀå (Hero Cards) */
.hero-card:nth-child(1) {
    transition-delay: 0.1s;
}

.hero-card:nth-child(2) {
    transition-delay: 0.2s;
}

.hero-card:nth-child(3) {
    transition-delay: 0.3s;
}

/* =========================
   Crab Animation
========================= */

.crab {
    opacity: 0;
    transform: translateY(60px) scale(0.9);
    transition: 0.8s ease;
}

.crab.show {
    opacity: 0.8;
    transform: translateY(0) scale(1);
}

/* ======================================================
   Responsive
====================================================== */
@media (max-width: 1165px) {
    .consult-info-grid {
        grid-template-columns: 1fr 1fr;
        gap: 18px 40px;
    }
}

@media (max-width: 1024px) {
    .consult-hero-name {
        font-size: 25px;
    }

    .consult-hero-actions {
        font-size: 15px;
    }
    .stat {
        font-size: 14px;
    }
    .post-grid {
        grid-template-columns: 1fr;
    }
    .post-aside {
        order: 2;
    }

    .mypage-summary {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 860px) {
    .consult-hero-actions {
        width: 100%;
    }
    .consult-hero-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .post-actions {
        font-size: 14px;
    }
    .attach-list {
        font-size: 14px;
    }

    .consult-hero-actions {
        font-size: 14px;
    }
    .back-link {
        font-size: 14px;
    }
    .list-card {
        background: none;
        border: none;
        border-radius: 0;
        box-shadow: none;
        padding: 0;
    }
    .list-more {
        font-size: 14px;
    }

    .consult-info-grid {
        grid-template-columns: 1fr;
    }
    .consult-hero-avatar {
        width: 72px;
        height: 72px;
        font-size: 28px;
    }
    .consult-hero-name {
        font-size: 22px;
    }
    .posts-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .info-list {
        font-size: 14px;
    }
    .info-desc {
        font-size: 14px;
    }
    .post-header {
        padding: 18px 0 12px;
    }
    .post-body {
        padding: 14px 0 18px;
    }
    .post-h1 {
        font-size: 20px;
    }

    .post-article {
        box-shadow: none;
    }
    .post-page {
        background: #fff;
        padding: 10px 0 80px;
    }

    .consult-card {
        border: 1px solid #eef0f3;
    }
    .consult-actions {
        font-size: 14px;
    }
    .info-title {
        font-size: 15px;
    }

    .detail-card,
    .reply-form-card {
        padding: 20px;
        border-radius: 16px;
    }

    .detail-title {
        font-size: 22px;
    }

    .detail-meta {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .meta-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .meta-label {
        min-width: auto;
    }

    .detail-actions,
    .reply-form-actions {
        flex-direction: column-reverse;
    }

    .detail-actions .btn,
    .reply-form-actions .btn {
        width: 100%;
    }

    .reply-textarea {
        min-height: 220px;
    }

    .btn-profile-edit {
        height: 25px;
        font-size: 11px;
    }
    .btn-profile-edit .material-symbols-outlined {
        font-size: 16px;
    }

    /* email- */
    .email-page {
        padding: 24px 0 80px;
    }

    .email-page-title {
        font-size: 26px;
    }

    .email-page-desc {
        font-size: 14px;
    }

    .email-consultant-card {
        padding: 16px 25px;
        gap: 25px;
        border-radius: 16px;
    }

    .email-consultant-thumb {
        flex: 0 0 68px;
        width: 68px;
        height: 68px;
    }

    .email-consultant-thumb .consultant-avatar {
        width: 68px;
        height: 68px;
        font-size: 24px;
    }

    .email-consultant-name {
        font-size: 17px;
    }

    /* =========================
   Mypage Button - Mobile
========================= */
    .mypage-btn {
        height: 28px;
        padding: 0 10px;
    }

    .mypage-btn span:last-child {
        display: none;
    }

    .mypage-btn .material-symbols-outlined {
        font-size: 22px;
    }
}

@media (max-width: 600px) {
    .row {
        flex-direction: column;
    }
    .row-right {
        display: flex;
        flex-direction: column;
        gap: 10px; /* ¹öÆ° »çÀÌ °£°Ý */
        align-items: stretch;
        width: 100%;
    }

    .row-right .btn,
    .row-right .btn-primary,
    .row-right .btn-outline {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .stat {
        font-size: 13px;
    }
    .kv-row {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 1px;
        padding: 7px 12px;
    }
    .kv-key {
        font-size: 13px;
    }
    .consult-card {
        padding: 20px 25px;
    }
    .info-title {
        margin: 0 0 5px;
        font-size: 14px;
        gap: 5px;
    }
    .info-list li {
        margin-bottom: 2px;
    }
    .info-title svg {
        width: 18px;
        height: 14px;
    }
    .summary-card {
        padding: 15px 15px;
    }
}

@media (max-width: 470px) {
    .consult-hero-left {
        flex-direction: column;
        text-align: center;
    }
    .consult-hero-row {
        align-items: center;
    }

    .consult-hero-name-row {
        justify-content: center;
    }
}
