/* ============================================================
 * 유틸리티 도구 메인 화면
 * ============================================================ */

.tools-page {
    max-width: 1180px !important;
    margin-top: 2rem !important;
    margin-bottom: 4rem !important;
}

.tools-hero {
    margin-bottom: 2rem;
    padding: 2rem 2.2rem;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #ffffff;
}

.tools-hero-title {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    color: #1f2937;
}

.tools-hero-title i.icon {
    margin: 0;
}

.tools-hero-description {
    margin-top: 0.8rem;
    margin-bottom: 0;
    color: #6b7280;
    font-size: 1rem;
    line-height: 1.7;
}

.tools-section-title {
    margin-bottom: 1rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: #374151;
}

.tools-grid {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.tools-card {
    display: flex;
    min-height: 205px;
    flex-direction: column;
    padding: 1.4rem;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #ffffff;
    color: inherit;
    text-decoration: none;
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        border-color 0.18s ease;
}

.tools-card:hover,
.tools-card:focus {
    color: inherit;
    text-decoration: none;
    transform: translateY(-3px);
    border-color: #cbd5e1;
    box-shadow:
        0 10px 26px rgba(15, 23, 42, 0.09);
}

.tools-card-icon {
    display: flex;
    width: 44px;
    height: 44px;
    margin-bottom: 1rem;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: #f3f4f6;
    font-size: 1.25rem;
}

.tools-card-icon i.icon {
    margin: 0;
}

.tools-card-title {
    margin-bottom: 0.35rem;
    font-size: 1.08rem;
    font-weight: 700;
    color: #111827;
}

.tools-card-meta {
    margin-bottom: 0.75rem;
    color: #6b7280;
    font-size: 0.88rem;
}

.tools-card-description {
    flex: 1;
    color: #4b5563;
    font-size: 0.94rem;
    line-height: 1.6;
}

.tools-card-footer {
    display: flex;
    margin-top: 1.1rem;
    align-items: center;
    justify-content: space-between;
    color: #4b5563;
    font-size: 0.88rem;
}

.tools-card-footer i.icon {
    margin-left: 0.3rem;
}

.tools-coming-soon {
    cursor: default;
    opacity: 0.62;
}

.tools-coming-soon:hover {
    transform: none;
    border-color: #e5e7eb;
    box-shadow: none;
}

@media (max-width: 1100px) {
    .tools-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 800px) {
    .tools-page {
        margin-top: 1rem !important;
    }

    .tools-hero {
        padding: 1.5rem;
    }

    .tools-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .tools-hero-title {
        font-size: 1.45rem;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

    .tools-card {
        min-height: auto;
    }
}

/* ============================================================
 * 도구별 포인트 색상
 *
 * 기본 배경과 텍스트는 차분하게 유지하고,
 * 아이콘과 hover 상태에만 도구별 색상을 적용한다.
 * ============================================================ */

.tools-hero {
    background:
        linear-gradient(
            135deg,
            #f8fffe 0%,
            #f8fafc 100%
        );
    border-color: #dbe7e5;
}

.tools-hero-title i.icon {
    color: #0f766e;
}


/* 1. 한자리 합 계산기 */
.tools-grid .tools-card:nth-child(1)
.tools-card-icon {
    color: #0f766e;
    background: #e6fffb;
}

.tools-grid .tools-card:nth-child(1):hover {
    border-color: #5eead4;
}


/* 2. 글자 수 세기 */
.tools-grid .tools-card:nth-child(2)
.tools-card-icon {
    color: #2563eb;
    background: #eff6ff;
}

.tools-grid .tools-card:nth-child(2):hover {
    border-color: #93c5fd;
}


/* 3. 자리 배치 */
.tools-grid .tools-card:nth-child(3)
.tools-card-icon {
    color: #d97706;
    background: #fff7ed;
}

.tools-grid .tools-card:nth-child(3):hover {
    border-color: #fdba74;
}


/* 4. 사다리 타기 */
.tools-grid .tools-card:nth-child(4)
.tools-card-icon {
    color: #16a34a;
    background: #f0fdf4;
}

.tools-grid .tools-card:nth-child(4):hover {
    border-color: #86efac;
}


/* 5. 단축 URL */
.tools-grid .tools-card:nth-child(5)
.tools-card-icon {
    color: #0891b2;
    background: #ecfeff;
}

.tools-grid .tools-card:nth-child(5):hover {
    border-color: #67e8f9;
}


/* 6. 수업용 타이머 */
.tools-grid .tools-card:nth-child(6)
.tools-card-icon {
    color: #7c3aed;
    background: #f5f3ff;
}

.tools-grid .tools-card:nth-child(6):hover {
    border-color: #c4b5fd;
}


/* 7. 랜덤 학생 추첨기 */
.tools-grid .tools-card:nth-child(7)
.tools-card-icon {
    color: #ea580c;
    background: #fff7ed;
}

.tools-grid .tools-card:nth-child(7):hover {
    border-color: #fdba74;
}


/* 8. 휴먼벤치마크 */
.tools-grid .tools-card:nth-child(8)
.tools-card-icon {
    color: #db2777;
    background: #fdf2f8;
}

.tools-grid .tools-card:nth-child(8):hover {
    border-color: #f9a8d4;
}


/* 카드 열기 표시 */
.tools-card-footer span:last-child {
    font-weight: 600;
    color: #0f766e;
}
